Jump to content

[MOOSE] RAT - Random Air Traffic


Recommended Posts

I see that the new version of Moose is out. Has the commute to zone been implemented now ?

And how do i set it up?

Is it the same as SetDestination: ( "RAT Zone East" )

No, it's not yet in the new version Moose. I'll post a changelog here and a link to the Moose.lua with the latest RAT when I'm done.

 

I will basically work like

yak=RAT:New("RAT_YAK")
yak:DestinationZone()
yak:SetDestination("RAT Zone East")

 

If SetDestination() contains at least one zone the code should recognize that and automatically use DestinationZone(). So that line would be redundant. But airports are also allowed as destination zones. That's why the option DestinationZone() is necessary.

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

So if im correct a Plane commuting between McCarren International Airport and a Zone has to be something Like this. When there are 4 Zones

 

 

yak=RAT:New("RAT_YAK")
yak:SetDeparture("McCarran International Airport")
yak:DestinationZone()
yak:SetDestination("RAT Zone East")

 

Yes Liger, that code is correct for an airplane that always flies from McCarran to Zone East. Just don't forget to spawn them :D

 

If you want it to fly to any of the 4 zones it would look like this:

 

yak=RAT:New("RAT_YAK")
yak:SetDeparture("McCarran International Airport")
yak:DestinationZone()
yak:SetDestination({"RAT Zone East", "RAT Zone West", "RAT Zone North", "RAT Zone South"})
yak:Spawn(3)

 

Cheers!


Edited by RyboPops
Link to comment
Share on other sites

New version - changelog and examples

 

RAT v2

 

The RAT code has seen a complete overhaul. Many changes under the hood and some new features. However, older scripts should still work as before.

 

The most important new feature that has been added is that RAT now also allows zones as destination, i.e. the final destination does not necessarily have to be an airport any more.

This opens the door for a lot of new scenarios.

 

Download:

 

The new RAT version can be downloaded from the MOOSE github page. Here is also the link to the latest Moose.lua file - version 2.2.6.

Edit: This version included the hotfixes from post #81.

 

New features:

  • Zones are allowed as destinations. These can be trigger zones defined in the mission editor or airports. Each airport automatically has a zone defined around it with a radius of 8 km.
  • Aircraft can fly to a zone and return to their departure. E.g. interesting for Carrier ops.
  • Improved waypoint construction algorithm.
  • Valid departure and destination airports can be selected by MOOSE zones. Easy selection of airports depending on their geographical location.
  • More detailed updates about aircraft status, i.e. when aircraft enter climb, cruise, descent and holding stage of their flight. This option must be enabled actively by the user.

 

New options:

  • DestinationZone() - Destinations will be treated zones. Aircraft will not descent or land but despawned once they reach the destination zone.
  • ReturnZone() - Aircraft will fly to a zone and then return to their departure airport or zone.
  • StatusReports() - Aircraft will send text messages when they change their flight status, e.g. take-off, climb, cruise, descent, hold.
  • SetDestinationsFromZone(moose_zone) - Valid destinations are selected from airports which lie inside a MOOSE(!) zone.
  • SetDeparturesFromZone(zone) - Valid destinations are selected from airports which lie inside a MOOSE(!) zone.
  • NoRespawn() - Aircraft are not respawned when they have reached there destination.
  • Uncontrolled() - Aircraft are spawned in uncontrolled state. They will just sit at their parking spot and not fly anywhere. For populating airports.
  • RadioON() - Enables voice radio messages. Same as activating the COMM tick box in the mission editor template.
  • RadioOFF() - Disables voice radio messages. Same as deactivating the COMM tick box in the mission editor template.
  • RadioFrequency(frequency) - Sets the radio frequency of voice messages.
  • ATC_Clearance(n) - RAT ATC gives landing clearance for up to n aircraft at the same time but still with a delay after the last landing clearance was given. Default is 2.
  • ATC_Delay(time) - Time which has to pass until the next aircraft will get landing clearance after the previous one got clearance. Only applies if ATC_Clearance(n) is used with n>1.

 

There are some more new switches/options. The complete list can soon be found on the RAT documentation page.

 

Examples:

 

HukGGFQ.png

 

Destination Zones

 

Zones as destination are simply enable as

yak=RAT:New("RAT_YAK")
yak:DestinationZone()
yak:Spawn(5)

This code would spawn five aircraft at random airports on the ground. They will fly to another random airport but instead of landing there, they will be despawned when they

have reached a random point near the airport.

 

Overseas Traffic

 

You can of course define your own zones in the mission editor and define them as destinations

yak=RAT:New("RAT_YAK")
yak:DestinationZone()
yak:SetDestination({"Zone North", "Zone East"})
yak:Spawn(5)

Five aircraft will be spawned at random airports and fly heading North or East. Trigger zones "Zone North" and "Zone East" must be defined in the ME and the aircraft will fly to a random point within these zones where they will be despawned.

Note, that you can also mix airport names with trigger zone names. They will all be treated as destination zones.

 

High Altitude Transient Traffic

 

You can combine DestinationZone() with SetTakeoff("air") so that aircraft will start in air and never touch the ground.

yak_northsouth=RAT:New("RAT_YAK", "YAK North-South)
yak_northsouth:SetTakeoff("air") 
yak_northsouth:DestinationZone()
yak_northsouth:SetDeparture({"Zone North", "Zone South"})
yak_northsouth:SetDestination({"Zone North", "Zone South"})
yak_northsouth:SetFLmin(300)
yak_northsouth:SetFLcruise(310)
yak_northsouth:SetFLmax(320)
yak_northsouth:Spawn(5)

yak_westeast=RAT:New("RAT_YAK", "YAK West-East)
yak_westeast:SetTakeoff("air") 
yak_westeast:DestinationZone()
yak_westeast:SetDeparture({"Zone West", "Zone East"})
yak_westeast:SetDestination({"Zone West", "Zone East"})
yak_westeast:Spawn(5)

In this example five aircraft will be spawned either in "Zone North" or in "Zone Sourth" and fly to the other zone. Additionally, five aircraft will be spawned in either "Zone East" or "Zone West" and fly to the "opposite" zone.

In the north-south case, the aircraft are set to fly between FL300 and FL320.

 

Return Zones

 

ReturnZone() makes aircraft fly to a particular zone and then back to their destination airport or zone.

local A10C=RAT:New("RAT_A10C")
A10C:SetDeparture({"Creech AFB", "Tonopah Test Range Airfield", "Nellis AFB"})
A10C:SetDestination({"Range A", "Range B", "Range C"})
A10C:ReturnZone()
A10C:Spawn(4)

Here, four A-10C's are spawned at either Creech, Tonopah or Nellis and will fly to one of the three ranges. There they will make a U-turn and fly back to their home base.

 

 

Finally

 

Thanks to RyboPops for testing and bug hunting.

 

Hope you enjoy the new version :)

 

PS: This is still WIP. So let me know if you have any issues and please attach the mission file. This helps me greatly to identify potential problems.


Edited by funkyfranky
Updated download links.
  • Like 1

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

Hotfix RAT 2.0.1

 

Guys, I tested many scenarios yesterday and found three bugs that slipped through my fingers.

 

These have been fixed in the latest MOOSE release 2.2.6. Here is also the direct link to the Moose.lua containing RAT 2.0.1.

 

Fixed bugs:

  • SetDestination() only works when SetDeparture() is used as well.
  • Respawning with Commute() happens in air even when destination is not a zone.
  • Wrong behavior when aircraft change their flight plan, e.g. for combination DestinationZone() and Commute().

 

Please update :)


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

I build a RAT-Traffic around Nellis with some C-17, starting at a certian parking slot, flying to a destination Zone and return back to Nellis. At Nellis the planes should respawn and so on. The script works so long, but after some respawns, the C-17 respawn on the runway, which make them crash.

I try to give them a certian parking slot (SetParkingID), but that only works for the first time. After the respawn they use different parking places and at the end the runway.

How may I fix this or is it a known bug?

Link to comment
Share on other sites

I build a RAT-Traffic around Nellis with some C-17, starting at a certian parking slot, flying to a destination Zone and return back to Nellis. At Nellis the planes should respawn and so on. The script works so long, but after some respawns, the C-17 respawn on the runway, which make them crash.

I try to give them a certian parking slot (SetParkingID), but that only works for the first time. After the respawn they use different parking places and at the end the runway.

How may I fix this or is it a known bug?

Hi Tom, this is a "known" bug - but a DCS one. I reported it already some time ago here (at the end of the thread).

I introduced the SetParkingID function exactly because of that behavior. But no joy :( It simply does not work with DCS at the moment - at least not on the NTTR airports.

 

I'd love to see this fixed as well. I even started a wishlist thread to improve this and other things at e.g. McCarran.

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

is there a way to set zones to spawn RAT aircraft only when the player enters?

 

I have a busy Nellis airspace, but I'm assuming the the aircraft spawning at the far edges are taking up resources. So in a free flight over Normandy say, ill only see or encounter RAT around me in the zone I just entered, and the the other zones will be RAT free untill i get there

 

RAt and Moose have got me back into DCs in such a big way, thanks guys!

  • Like 1

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

is there a way to set zones to spawn RAT aircraft only when the player enters?

I have a busy Nellis airspace, but I'm assuming the the aircraft spawning at the far edges are taking up resources. So in a free flight over Normandy say, ill only see or encounter RAT around me in the zone I just entered, and the the other zones will be RAT free untill i get there

If I get your question right, it's essentially about optimizing the performance because spawning too many AI aircraft in order to guaranty a certain density of planes on the whole map are a big hit. This kind of bubble principle is an interesting idea!

 

There is no RAT function to achieve spawning of planes depending on the players position out-of-the-box. However, there are relatively easy ways within MOOSE to trigger events if a player enters a zone. Can't tell you from the top of my head right now. But no rocket science for sure. FC is the better address for this question ;)

The RAT functions could also be improved in this regard. I'll keep it in mind for the further development :thumbup:

 

RAt and Moose have got me back into DCs in such a big way, thanks guys!

Thanks! Big compliment :)

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

Yes precisely that, for optimisation and I was going to call it "RAT bubble" (thats TM now :thumbup:)

 

thanks Ff, ill check out Moose a bit more

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

Hi.

 

I would like to know if it is possible to make a RAT departure from airport A, go to a trigger zone X, then to trigger zone Y, then trigger zone Z and finally land in the airport B. is this possible? Could you help me with an example to write the script? My idea is that the aircraft can follow a more real path through a SID, a route, a STAR and finally IAC.

 

Sorry for my English is not my native language.

Link to comment
Share on other sites

  • 1 month later...
Hi FunkyFranky,

how do you deactivate messages on the upper right corner when ATC speaks to IA planes?

I would like human players not to be notified about traffic.

You can't just yet. But that function is coming with next MOOSE update :)

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 funkyfranky,

 

I got an issue with aircraft respawning. It appears that aircrafts does spawn correctly on parking as long as those spawn for the first time, but after those are landed and respawn then those do spawn directly on runway instead of respawing at the same parking than before. Any hints ?

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Hey funkyfranky,

I got an issue with aircraft respawning. It appears that aircrafts does spawn correctly on parking as long as those spawn for the first time, but after those are landed and respawn then those do spawn directly on runway instead of respawing at the same parking than before. Any hints ?

Hi Sacha, this is a very annoying DCS bug which I already reported three month ago here. Unfortunately nothing we can do about it but to wait until ED fixes 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

  • 3 weeks later...

Quick question hoping someone knows off the top of their head.....reading through doco it implies (to my reading anyway) when the RAT group spawns it contains only a single aircraft.

 

 

Is there a parameter that allows more than one aircraft to be spawned in a group eg so essentially xyz:Spawn(5) might spawn 5 groups with more than a single aircraft in each group rather than just 5 aircraft?

 

 

It's just pretty rare for military aircraft to fly in less than pairs unless they are a transport or something. So if wanting to add believable background military air traffic it would be good to be able to spawn groups of more than a single aircraft.

 

 

Thanks

Link to comment
Share on other sites

Is there a parameter that allows more than one aircraft to be spawned in a group eg so essentially xyz:Spawn(5) might spawn 5 groups with more than a single aircraft in each group rather than just 5 aircraft?

Yes, it's possible. The number of aircraft is taken from the template. So for military purposes just create a template group that contains say two fighters. Then the RAT group will also spawn a two ship flight :)

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

I've tried to do a search on this thread without finding any info about what I would like to do, so again on the military background idea, got the flights taking off with more than a single aircraft via the template group as suggested but I don't seem to be able to set the formation used by the spawned traffic? Particularly for WW2 there were distinctive formations used at various points in the war so I would like B17s to use the WW2 bomber element for example and Luftwaffe to use finger four while Allied fighters use a mixture of formations. Any pointers as to how to do this?

At present everyone defaults to echelon right, tried setting the formation on the template but it doesn't seem to be brought through to the spawned group.

 

Thanks

 

 

PS Almost forgot - it's generating lots (and lots) of messages in dcs.log........anyway to suppress these to improve performance? From the doco it seems debug is defaulted to off so assume there might be another thing to set off somewhere?


Edited by Stonehouse
Link to comment
Share on other sites

I've tried to do a search on this thread without finding any info about what I would like to do, so again on the military background idea, got the flights taking off with more than a single aircraft via the template group as suggested but I don't seem to be able to set the formation used by the spawned traffic? Particularly for WW2 there were distinctive formations used at various points in the war so I would like B17s to use the WW2 bomber element for example and Luftwaffe to use finger four while Allied fighters use a mixture of formations. Any pointers as to how to do this?

Uh, to be honest, I have not yet bothered setting a specific formation. But of course, for WWII bombers this would be nice.

I do not change the formation int the template when the group is spawned. So I would have thought that is also carried over from the ME setting but obviously not.

I can add the possibility to set the formation via script. Maybe that works better.

 

PS Almost forgot - it's generating lots (and lots) of messages in dcs.log........anyway to suppress these to improve performance? From the doco it seems debug is defaulted to off so assume there might be another thing to set off somewhere?

Yeah, there is a lot of stuff written to the log file. Did that in the beginning for debugging.

Actually, this was changed already but so far it is only available in the MOOSE master branch on github. So with the next update it should be much less spam ;)

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

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