Jump to content

[MOOSE] RAT - Random Air Traffic


Recommended Posts

PM sent with the error details. It appears to be related to both my moose.lua and my RAT.lua. I have two errors when loading them both, only one error if I just load moose, and no errors when I don't load either. They are both the exact same files I was using last night without errors. The errors didn't start occurring until I altered the RAT template aircraft to have two jets instead of one, but then even after changing it back to one aircraft per template the errors still occur. :huh:

Link to comment
Share on other sites

How?

 

Hi - I don't want to appear a plonker, but how do you get started using this program? I have downloaded the latest version of MOOSE - but what do I do with it? How & where is it installed in DCS? How do I use it in DCS? Once I am up & running I can probably work things out for myself. A step by step installation guide would be much appreciated. Thanks. ChrisJD

Link to comment
Share on other sites

A step by step installation guide would be much appreciated.

Hi Chris, there is a step-by-step guide in post #2. If you have further questions, just shoot.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Thanks FunkyFranky Yes, I did read part 2 as you say - however my first question is where do I install the folder Moose 2.2.3 which I downloaded? Step 3 is a little confusing - how do you make a text file & where does it go? I am venturing into completely unknown territory here, so please forgive my ignorance!

Link to comment
Share on other sites

however my first question is where do I install the folder Moose 2.2.3 which I downloaded? Step 3 is a little confusing - how do you make a text file & where does it go?

No problem, Chris. It's probably easier than you think :)

 

First, you don't have to install anything.

 

You need two files, the Moose.lua you downloaded and the little RAT script you create yourself.

 

Put these files anywhere on your harddrive. For example on the desktop or in a special folder.

 

When you open the DCS mission editor, create your RAT template as in step #2.

 

Then add the two triggers as in steps #4 and #5.

On the right hand side of the pictures, you see the drop down list where you select "DO SCRIPT FILE". There you can click on "Open" which opens a little file browser. Simply go to the folder where you store the Moose.lua and the RAT script. First select the Moose.lua and click ok.

Then create a new trigger, repeat the steps and at the end select your own script and click ok.

 

These two files will be loaded and executed when you start your mission and you will see some planes randomly fly around :)

 

If it's still unclear or does not work, ask again or drop me a PM. First steps are not easy if you never did this before.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Thanks again. What confused me was the Moose download is a folder with a large number of files & folders in it. The moose .lua is in the folder Mission editor. Do I extract this file & make a new folder separately or leave it where it is? I'll have a try today & see how it goes. ChrisJD

Link to comment
Share on other sites

Thanks again. What confused me was the Moose download is a folder with a large number of files & folders in it. The moose .lua is in the folder Mission editor. Do I extract this file & make a new folder separately or leave it where it is? I'll have a try today & see how it goes. ChrisJD

Ah, I see. You probably downloaded the whole source code.

 

Go to https://github.com/FlightControl-Master/MOOSE/releases

 

moose-download-1.thumb.PNG.0e7f40bb16363f37647bd880e0a47cf7.PNG

 

Click on either Moose.lua or Moose_.lua

 

moose-download-2.thumb.PNG.87ddbb1cd434d791f4169c9e5a04cc9b.PNG

 

Right click(!) on the download button and save the file. Make sure it has suffix ".lua" and not ".txt".

That is the only file you need.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hi - I don't want to appear a plonker, but how do you get started using this program? I have downloaded the latest version of MOOSE - but what do I do with it? How & where is it installed in DCS? How do I use it in DCS? Once I am up & running I can probably work things out for myself. A step by step installation guide would be much appreciated. Thanks. ChrisJD

 

fIp2VdvRXQw

 

Watch these video series:

 

-

(There are more videos!)

 

Watch the documentation:

 

- MOOSE online documentation!

 

kind regards,

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Hi FunkyFranky First the good news - I managed to work everything out as regards the basic spawn. The bad news I have a strange error message come up when I press Fly to start the mission. The message is' [string"T\Temp\DCS\/~miss00006118"]:7:unexpected symbol near'<''

This means absolutely nothing to me. The RAT script .lua file I copy/pasted from your post. I have a folder in F:/DCS World with the Moose & RAT script.lua. This is copied to T:\Temp\DCS\Mission\i10n\Default automatically. I also copied your script to here. After I have exited DCS after the error message I found that the RAT script had been changed in T drive- it now reads 'yak-RAT' not 'yak=RAT' & 'Rat -Yak' instead of 'Rat_Yak' I can find no mention of the '~miss00006118' The file in DCS World is still unchanged Any ideas?

Link to comment
Share on other sites

Quick question - can this RAT option be enabled system wide, meaning that those of us who don't build missions, but rather fly quick missions, see the random traffic as well, regardless of mission? In other words, is there an option for RAT to be always on by default whenever I hop into a quick mission on NTTR?

PC: AMD Ryzen 9 5950X | MSI Suprim GeForce 3090 TI | ASUS Prime X570-P | 128GB DDR4 3600 RAM | 2TB Samsung 870 EVO SSD | Win10 Pro 64bit

Gear: HP Reverb G2 | JetPad FSE | VKB Gunfighter Pro Mk.III w/ MCG Ultimate

 

VKBNA_LOGO_SM.png

VKBcontrollers.com

Link to comment
Share on other sites

Hi FunkyFranky First the good news - I managed to work everything out as regards the basic spawn. The bad news I have a strange error message come up when I press Fly to start the mission. The message is' [string"T\Temp\DCS\/~miss00006118"]:7:unexpected symbol near'<''

This means absolutely nothing to me. The RAT script .lua file I copy/pasted from your post. I have a folder in F:/DCS World with the Moose & RAT script.lua. This is copied to T:\Temp\DCS\Mission\i10n\Default automatically. I also copied your script to here. After I have exited DCS after the error message I found that the RAT script had been changed in T drive- it now reads 'yak-RAT' not 'yak=RAT' & 'Rat -Yak' instead of 'Rat_Yak' I can find no mention of the '~miss00006118' The file in DCS World is still unchanged Any ideas?

 

Chris. I think this is my mistake. Sorry mate.

I had to do a difficult merge and think i skipped a < sign.

I will check and come back.

 

I guess you download the latest version less than an hour so or a mission?

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Hi FunkyFranky First the good news - I managed to work everything out as regards the basic spawn. The bad news I have a strange error message come up when I press Fly to start the mission. The message is' [string"T\Temp\DCS\/~miss00006118"]:7:unexpected symbol near'<''

This means absolutely nothing to me. The RAT script .lua file I copy/pasted from your post. I have a folder in F:/DCS World with the Moose & RAT script.lua. This is copied to T:\Temp\DCS\Mission\i10n\Default automatically. I also copied your script to here. After I have exited DCS after the error message I found that the RAT script had been changed in T drive- it now reads 'yak-RAT' not 'yak=RAT' & 'Rat -Yak' instead of 'Rat_Yak' I can find no mention of the '~miss00006118' The file in DCS World is still unchanged Any ideas?

 

Chris, i don't think there is a mistake on our side.

 

First of all, the ~mis00006118 file is located on your temp directory. Can you go into T:\Temp\DCS\/~miss00006118 (or in another run, the file name may be different), but open this file, and check what is in it? Can you drop this file here pls as an attachment? I also suggest you join our slack site for support. Send me a private message with your email address. We'll get you on slack.com, which supports code sharing etc.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Quick question - can this RAT option be enabled system wide, meaning that those of us who don't build missions, but rather fly quick missions, see the random traffic as well, regardless of mission?

No, that's not possible. At least I'm not aware of a way to do it.

 

That's why I made RAT as simple as possible to include. However, the few steps in post number two are are the minimum. But that already generates a lot of immersion even for a simple free flight missions :) You really should watch out when you enter the runway because you never know what might be coming.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hi FF The file ~000006118 does not exist. There are 6 files in the DCS folder 2 autoupdate & a cookie - all text files A last mission track file, a temp mission miz file & an update info. json file.

Plus the Mission folder is/i10n/default which only has the 2 lua files.

There are many temp files in the temp folder but the above is all there is in the DCS folder.

Link to comment
Share on other sites

How can i commute a plane between a Zone and a Airfield

for example From McCarran to aa placed zone at the edge of the map and back

I got good and bad news for you ;)

 

Bad news first: It's not possible in the current version of RAT. Destinations can only be airports not zones.

 

Good news is that I already implemented it :) So you can expect a new RAT/MOOSE version within days. I'm just testing it to make sure it works as intended.


Edited by funkyfranky

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hi FunkyFranky First the good news - I managed to work everything out as regards the basic spawn. The bad news I have a strange error message come up when I press Fly to start the mission. The message is' [string"T\Temp\DCS\/~miss00006118"]:7:unexpected symbol near'<''

This means absolutely nothing to me. The RAT script .lua file I copy/pasted from your post. I have a folder in F:/DCS World with the Moose & RAT script.lua. This is copied to T:\Temp\DCS\Mission\i10n\Default automatically. I also copied your script to here. After I have exited DCS after the error message I found that the RAT script had been changed in T drive- it now reads 'yak-RAT' not 'yak=RAT' & 'Rat -Yak' instead of 'Rat_Yak' I can find no mention of the '~miss00006118' The file in DCS World is still unchanged Any ideas?

 

Hi FF The file ~000006118 does not exist. There are 6 files in the DCS folder 2 autoupdate & a cookie - all text files A last mission track file, a temp mission miz file & an update info. json file.

Plus the Mission folder is/i10n/default which only has the 2 lua files.

There are many temp files in the temp folder but the above is all there is in the DCS folder.

 

Can you drop your mission here in attachment? I can look at it tomorrow, or somebody else can check and help.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Hi - mission file (hopefully) attached

Okay, now we are talking :) This really helps to analyse the problem.

 

There are a couple of things that need to be adjusted.

 

1.) The Moose_.lua you use is strangely a html file and not the actual MOOSE script. I attached the file you need. Just download and unzip it from this post.

 

2.) You load the Moose_.lua in the first trigger. That is fine. But then you reload it again in the second trigger. Delete the first entry which is crossed out in the image.

nomoose.thumb.png.71585c32ce2531557cb011a379ad5ab0.png

 

3.) You need to correct the RAT script you use.

This is what you have:

local yak-Rat:new("Rat-Yak")
yak:spawn(5)

First, lua is case sensitive! "new" is not the same as "New" and "spawn" is not the same as "Spawn". Also the the local variable you define in the first line should be the same as the one you use with the Spawn command. And you should not use hyphens in variables.

So this would be the code that works:

 

local yak=RAT:[b]N[/b]ew("Rat-Yak")
yak:[b]S[/b]pawn(5)

Edit: Sorry, made a mistake in the code above. This is how it should look like!

 

Hope this helps :)

Moose_.zip


Edited by funkyfranky

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hey Frank, just FYI I've had no issues setting a single trigger to load both files. Is there something I should be wary of when doing it that way? I did it on accident and didn't realize it but all AI spawned as expected.

 

 

 

Typically you would only have a single mission start trigger with multiple actions. ie for your situation you have two do script file actions. First Moose and then your mission script.

 

 

Only reason you would have more than a single mission start trigger is if the condition to activate it was different for each trigger. That goes true for other triggers as well as there is a performance cost to each trigger being evaluated and fired. eg if you have two triggers with the same condition and an action on each that is more expensive than a single trigger with two actions.

Link to comment
Share on other sites

Hey Frank, just FYI I've had no issues setting a single trigger to load both files. Is there something I should be wary of when doing it that way?

No, you should be fine. As Stonehouse pointed out, the way I do it is a bit too "complicated". It works but easier is always better.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hi FF Thanks for your help. 1) I have no idea how the file came to be a HTML file - but I downloaded the correct one you supplied. 2) On your how -to video it does say to make 2 entries in Actions, but I see that this has now been changed & I will re-load with 1 entry. 3) You note that the text is incorrect in the RAT script. If you re-read my message you will see that I did a straight copy/paste of your own text to use as the RAT script. This has remained correct in the main folder in DCS root which I named RAT-moose. The problem has been that the copy of this in T:\Temp\DCS has been corrupted altering the = to - & the _ to -. This is the file which has caused the error message. I will delete all the existing files & replace them with the correct ones as downloaded now. I will run it tomorrow & let you know how I get on. I would like to thank you for your help & patience with this problem. Much appreciated. ChrisJD

Link to comment
Share on other sites

3) You note that the text is incorrect in the RAT script. If you re-read my message you will see that I did a straight copy/paste of your own text to use as the RAT script. This has remained correct in the main folder in DCS root which I named RAT-moose. The problem has been that the copy of this in T:\Temp\DCS has been corrupted altering the = to - & the _ to -. This is the file which has caused the error message. I will delete all the existing files & replace them with the correct ones as downloaded now. I will run it tomorrow & let you know how I get on.

Hi Chris, there is one thing that it is important to know in this context and it might be the cause of your trouble.

 

When you create a trigger to load the RAT script file and later click on save to save your mission, the script file is copied from the location you saved it into the mission .miz file.

 

So when you make changes to the script, e.g. correct errors add stuff and so on, you need to go back to the trigger section in the ME and reopen the script file and save the mission again.

Otherwise the changes are not taken over.

 

Or in other words, the script which is loaded/executed when you start the mission is not the one which lies in the folder on your Desktop or wherever. When you change that, you have to "upload" it into the mission file again.

 

I'm saying this because I looked into the mission file you attached in the other post. It is basically a zip file which you can open with e.g. 7zip. And the script which is used is the one I quoted above which will not work. This is why I think you maybe did not upload your corrected script file into the mission and got errors.

 

I would like to thank you for your help & patience with this problem. Much appreciated.

No problem! There are some things which are not obvious. We all had to go through this when starting with a mission scripting. But it's worth it :)

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Hi FF Thanks again for your input. I think the problem was the moose .lua file which was wrong. I re-loaded it from your message, check correct case, etc & tried the mission. First thing is that the mission loaded with no problems. There are no error messages & nothing is being written to the T:\temp folder. Only thing is - there are no aircraft that I can see. I suspect I am missing something very simple! I have been using F11 to view all the airports - vehicle traffic is running OK - but no planes. Help!! ChrisJD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...