Jump to content

[MOOSE] RAT - Random Air Traffic


Recommended Posts

... Unfortunately when following the links and arriving the Github page ,the file doesn't seem to download . Also , I'm seeing some sort of poss error saying the file is too big .

 

The error means that the file is too big to show in preview.

 

Anyway when clicking on the download button ,it just opens the file up and displays contents , but no down load ! Please advise ?

 

True, please right click on the download button and select "Save link as" .. it should save a file called "Moose.Lua" .. dont try to edit it, just include it on your missions with a Load Trigger:

 

nRtkhIc.jpg

 

Best regards

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Thanks for your valuable work. Please, let us know when ready fix for NTTR.

 

 

Just wanted to clear up that I'm not a Moose Developer, I'm a just a user that tries to keep informed by reading these Forums :)

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Just wanted to clear up that I'm not a Moose Developer, I'm a just a user that tries to keep informed by reading these Forums :)

 

 

You are too modest ;)

Kein Anderer als ein Jäger spürt,

Den Kampf und Sieg so konzentriert.

 

Das macht uns glücklich, stolz und froh,

Der Jägerei ein Horrido!

Link to comment
Share on other sites

Hi Rudel,

 

and thanks for your reply. Unfortunately when following the links and arriving the Github page ,the file doesn't seem to download . Also , I'm seeing some sort of poss error saying the file is too big . Anyway when clicking on the download button ,it just opens the file up and displays contents , but no down load ! Please advise ?

Copy and paste the contents. This is a github problem so direct your complaints to Microsoft. You are not the first to find this stupid/confusing at all. There's nothing we can do about that because Moose is generated dynamically when people make code changes and when it's compiled it sits there but not as a file, just as a vomit of code on a web page.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Using RAT class in my missions, love it, thank you for the great asset. I was hoping there was a way to have aircraft randomly spawn in air. The aircraft would then continue their flight as if they were just passing over the areas, not land at an airport on the map. Or if they were to spawn and depart from an airfield on the map, they would continue off map or be removed from play.


Edited by rwbishUP

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

Using RAT class in my missions, love it, thank you for the great asset. I was hoping there was a way to have aircraft randomly spawn in air. The aircraft would then continue their flight as if they were just passing over the areas, not land at an airport on the map. Or if they were to spawn and depart from an airfield on the map, they would continue off map or be removed from play.

 

I augment RAT with normal spawns to get traffic already up there. I don't know if you need help with normal spawns, but it's a very established and useful class to know some of, for anyone (count how many posts are about making something random)

If you need help on that Moose Discord or new post.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

I augment RAT with normal spawns to get traffic already up there. I don't know if you need help with normal spawns, but it's a very established and useful class to know some of, for anyone (count how many posts are about making something random)

If you need help on that Moose Discord or new post.

 

Thank you

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

I’ve read this thread through, watched the tutorial videos, and was wondering if someone can please help me. My intent is to use RAT to have civilian airliners from the Civil Aircraft Mod randomly takeoff/fly/land around the Caucuses and SoH maps (something like 3x of each aircraft with random liveries). My questions are:

 

1: What exactly do I need to download? Where is it located and where on my computer do I need to extract it?

 

2: I’ve never done .lua scripting. What program do I need to download or is notepad ok?

 

3: After the initial RAT script, all the other script adding additional aircraft, random liveries, etc...is that done all in one go or is each a separate file I need to create?

 

Thanks.

Link to comment
Share on other sites

https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/RAT%20-%20Random%20Air%20Traffic/Caucasus

 

Your best approach is to take a sample mission then change it to suit once it makes more sense. Link above, look through them.

1. The files are in the example. Use a zip extractor to open it. Run it first, see what it does, then look at what made it happen. Then tinker.

2. Notepad is fine. Notepad++ would be better for you, depends how long you do it for.

3. Your mission script can contain more than RAT things, You don't need to seperate them out, you can put in as much scripting as you want to in the same script. You can create two scripts if you like, which is sometimes easier to compartmentalise. I think there's more than 20 files on my server, it really doesnt matter.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

I've gotten the aircraft to randomly spawn and fly around. However I can't get the random liveries to work. Below is my RAt.Lua code. Does anyone know what I'm doing wrong? I've trimmed the amount of liveries so it fits better in this post. Thanks.

_____________________________

local A320=RAT:New("RAT_A320")

A320:Spawn(5)

A320:SetMinDistance(100)

A320:Livery(A320skins)

 

local B727=RAT:New("RAT_B727")

B727:Spawn(5)

B727:SetMinDistance(100)

B727:Livery(B727skins)

 

local B737=RAT:New("RAT_B737")

B737:Spawn(5)

B737:SetMinDistance(100)

B737:Livery(B737skins)

 

local A380=RAT:New("RAT_A380")

A380:Spawn(3)

A380:SetMinDistance(100)

A380:Livery(a380skins)

 

local B757=RAT:New("RAT_B757")

B757:Spawn(5)

B757:SetMinDistance(100)

B757:Livery(B757skins)

 

local B747=RAT:New("RAT_B747")

B747:Spawn(3)

B747:SetMinDistance(100)

B747:Livery(B747skins)

 

local B727skins={"AEROFLOT", "Air France", "Alaska"}

local B737skins={"Air Algerie", "Air Berlin", "UPS"}

local B747skins={"AI", "CP", "KLM", "LH", "NW", "PA", "QA"}

local B757skins={"AA", "BA", "C-32", "Delta", "DHL"}

local A380skins={"Air France", "BA"}

local A320skins={"Aeroflot", "Aeroflot 1", "Air Asia"}


Edited by Tread_Head57
Link to comment
Share on other sites

Place the local definitions at the top of the file rather than at the bottom.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Next question (please keep in mind I have exactly 3 days .lua coding experience) is how to code specific aircraft flying only to a designated selection of airfields? I currently have 5x different types of civilian aircraft, with random liveries, flying to random airports all over the SoH map (except for the small island airports, which I turned "red" since the landing strips were too small). My goal is to have 3 different groups: 1) civilian airliners flying randomly to all civilian airports throughout the SoH map; 2) Iranian military aircraft flying randomly to all Iranian military airfields; 3) and "blue" military aircraft flying randomly to all "blue" military airfields. My questions are:

 

1: Exactly how to I tell a specific aircraft group (say the B747) which airfields I want it to use for takeoff/landing?

 

2: Where do I get the correct airfield name to use in the coding? The name off the mission editor? Somewhere else?

 

3: My current .lua code is posted above, with the correction Rudel made. Where in the lines of code should these instructions go?

 

4: I don't know what I don't know... is there anything else I'm missing to make this work?

 

Thanks.

Link to comment
Share on other sites

... My questions are:

 

1: Exactly how to I tell a specific aircraft group (say the B747) which airfields I want it to use for takeoff/landing?

 

Use the options SetDeparture and SetDestination, like this:

 

b747:SetDeparture({"Al Maktoum Intl", "Dubai Intl", "Sharjah Intl", "Fujairah Intl", "Shiraz International Airport", "To Asia", "To Europe"}) 
b747:SetDestination({"Al Maktoum Intl", "Dubai Intl", "Sharjah Intl", "Fujairah Intl", "Shiraz International Airport", "To Asia", "To Europe"}) 

 

"To Asia" and "To Europe" are not airfields, but trigger zones names that I use for map outbound and inbound traffic, in order to not have only within-map traffic .. very useful for the larger aircrafts.

 

2: Where do I get the correct airfield name to use in the coding? The name off the mission editor?

 

Yes, the names they have on the ME, be careful with the casing.

 

3: My current .lua code is posted above, with the correction Rudel made. Where in the lines of code should these instructions go?

 

I place them like this:

 

local b747=RAT:New("RAT-B747")
b747:Livery(b747skins)
b747:SetCoalitionAircraft("neutral")
b747:SetCountry(country.id.SWITZERLAND)
b747:SetDeparture({"Al Maktoum Intl", "Dubai Intl", "Sharjah Intl", "Fujairah Intl", "Shiraz International Airport", "To Asia", "To Europe"}) 
b747:SetDestination({"Al Maktoum Intl", "Dubai Intl", "Sharjah Intl", "Fujairah Intl", "Shiraz International Airport", "To Asia", "To Europe"}) 
b747:Spawn(2)

 

4: I don't know what I don't know... is there anything else I'm missing to make this work?

 

To avoid the planes from being attacked by either red or blue, I place my civil aircrafts on a country that is neutral, on this example: Switzerland.

 

Best regards

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Rudel,

 

Thanks for your continued help. I have the civilian airliners flying to all civilian airports (added all on the map and narrowed down the selection for 747's and A380s). I followed your code for making civilian airliners neural and it's working as well. I also have "blue" military aircraft/helicopters flying randomly to all "blue" airfields. I ran the mission about 4 times without a fly-able plane just to observe. I noticed some interesting observations:

 

1: With civilian airliners set to neural, they don't show up on the F10 map. I played with the mission editor and can't figure out how to get them to show up.

 

2. Every time I've run a test, I've increased the time to speed it up. For reference, the start time is 1700 on 01JUN2020. By the time the sun is dipping below the horizon, almost all civilian aircraft are stuck in a left hand orbit. Most aircraft stuck in this orbit are outside of visual distance of an airfield. It's weird, everything works well for a while (takeoff-land-disappear-respawn-takeoff-...), but then civil airliners get stuck in this orbit. This was also the case for "blue" aircraft from the Military Aircraft Mod (C-5) and standard DCS aircraft (C-130 and C-17).

 

3: Helicopters (CH-47 and UH-60) like to spawn on top of each other. I have 2 of each programmed (4 total) with, I believe, 5 military airbase options for takeoff/landing. In 3 of 4 testing runs the UH-60s have spawned on top of the CH-47s preventing either of them from moving. In the one testing scenario where this worked, one UH-60 spawned on top of a CH-47 while the second UH-60/CH-47 spawned separately and actually flew around as they were supposed to.


Edited by Tread_Head57
Link to comment
Share on other sites

1: With civilian airliners set to neural, they don't show up on the F10 map. I played with the mission editor and can't figure out how to get them to show up.

 

Unfortunately, you can't ... DCS won't show neutral units on the Map. If you want them to show up there (why you need that? ) then assign them to a Red or Blue country, howevere they could get attacked by enemy AI.

 

2. Every time I've run a test, I've increased the time to speed it up. For reference, the start time is 1700 on 01JUN2020. By the time the sun is dipping below the horizon, almost all civilian aircraft are stuck in a left hand orbit. Most aircraft stuck in this orbit are outside of visual distance of an airfield. It's weird, everything works well for a while (takeoff-land-disappear-respawn-takeoff-...), but then civil airliners get stuck in this orbit. This was also the case for "blue" aircraft from the Military Aircraft Mod (C-5) and standard DCS aircraft (C-130 and C-17).

 

I haven't noticed that .. here is a Mission I setup today as test, where the mission runs two hours without encountering what you describe:

 

https://1drv.ms/u/s!Ai6cuX3YQI26hJgmHH6CLDZEUvQTNg?e=0um4oX

 

and here a video running it at 10x time:

 

yvBi-skCbOE

 

Yes, the AI does really silly maneouvers, but at 1X speed they go unnoticed :music_whistling:

 

3: Helicopters (CH-47 and UH-60) like to spawn on top of each other.

 

Yes, it happens to me too, altough not that frequently .. the author of RAT, FunkyFranky, took a look at it but couldnt fix this bug :(

 

Anyways, for my missions at least (I mostly fly Single player). the RAT does work fairly well and so it is a great tool to add ambiance around my airbases.

 

Best regards


Edited by Rudel_chw

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Hey,

 

Ive been playing around with RAT and CAM and noticed one thing. It does not matter how many Aircraft I am Spawning in, somehow it wouldnt be able to Spawn them in the Airbase Im in.

 

Example:

Im in Dubai Intl. I have 4 Aircraft Types summing up to 40 Aircraft. Absoulutely no Aircraft Spawn at Dubai Intl.

 

Any help on that?

Link to comment
Share on other sites

Any help on that?

 

Attach the mission and I will take a look at it.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Scratch my last post I figured out using the airbase openbig command u can force large planes to park at bays that are big,

 

Edit: Seems to still be an issue on some bigger planes on Persian Gulf , works great on the Caucaus map with the above!


Edited by Badass1982
Corrected my previous comment
Link to comment
Share on other sites

Random question. I've noticed that using RAT (I have all my units set to ContineJourney() ) but the ones that take off from the Stennis never return to it (in fact i dont even get any planes return to the stennis) obviously the airliners arent going to but some F14's or F18's should no???

 

Just not sure if that only works by forcing it with a SetDestination .....

Link to comment
Share on other sites

I've noticed that using RAT (I have all my units set to ContineJourney() ) but the ones that take off from the Stennis never return to it .....

 

Actually, I've never tried to use RAT to generate traffic on the carriers, as I imagined that they would be a nuisance for my own operational flights.

 

What I do use on the carrier is the Rescue Helo (https://forums.eagle.ru/showthread.php?t=215825&highlight=rescue+helo+funkyfranky) and the Recovery Tanker aircraft (https://forums.eagle.ru/showthread.php?t=231022&highlight=rescue+helo+funkyfranky), but both with dedicated Scripts, not RAT.

 

However, I have used RAT to generate helicopter traffic on Marine Oilfields, like this:

 

iR6E4VL9kXY

 

:)

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

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...