|
![]() |
|
Thread Tools | Display Modes |
|
![]() |
#1 |
Senior Member
Join Date: Sep 2015
Location: Asgård
Posts: 2,310
|
![]() ![]() Hi guys, I have been working on a new implementation - simply named RAT - to generate random air traffic. This is something I was missing a lot in many of my missions ![]() So what is RAT about? RAT generates air traffic and fills the DCS sandbox with more life. Each aircraft will be spawned at a random airport of the map and gets a random route to another random destination. This creates a lot of dynamics and unpredictability to your missions with very little effort. Even the mission designer will not know what is going to happen. When an aircraft has arrived at its destination it will be despawned and a new aircraft is spawned at another random departure airport and the game begins anew. How much effort is it to use it? One important aspect in the design of RAT was to keep it simple and easy to use even for people who are not so familiar with lua scripting but also very flexible at the same time. The most basic example needs two lines of simple lua code. But there are many options for fine tuning. Which maps are supported? All current DCS maps - Caucasus, NTTR and Normandy - are supported. Furthermore, the implementation of RAT is general, so that also all future maps such as SoH or whatever will come should be seamlessly usable as well. Which airports are supported? All airports of all maps. Again, the implementation is universal, so that there is no restriction regarding the airports. There are also several options to define which airports should or should not be used if this is desired. What aircraft are supported? There is no restriction regarding the aircraft type. You can use anything from civil aircraft over fighters and WWII birds to helicopters. Helos can also use FARPs and ships as airbases. RAT works with templates. So you decide which aircraft will be included in the air traffic. Will RAT interfere with the rest of my mission? Only in the sense that your airspace gets more crowded. The main task of RAT planes is to fly from A to B. By default, they will not engage other units or even react to enemy threads if you don't ask them to. What is the difference compared to other random air traffic scripts? I'm aware of at least two other scripts that deal with random air traffic. Firstly, there is a great script by SNAFU. However, in contrast to RAT it is rather specific and written to work only with airports on the Caucasus map. Secondly, there is a very nice script by Zubetto. This script works with pre-defined routes the user has to create before the mission. So there is a bit more effort the user has to invest before the mission. What about multiplayer? RAT should work equally well in SP and MP. Where is the catch? The RAT implementation is kept general by supporting all maps, airports and aircraft types. This naturally leads to some problems. However, most of these can be handled by the user. PROBLEM: The DCS AI logic sometimes causes aircraft to block each other on the taxi way. If that happens no aircraft is able to make its way to the runway or to its parking spot. SOLUTION: If a RAT aircraft is on the ground and does not change its position for a certain time interval, it will be despawned automatically. By default the interval is set to 5 minutes. It has to be rather long (maybe even longer) because there are also many valid situations, where aircraft are waiting in a queue and don't need to be removed. The interval can be fine tuned by the TimeDestroyInactive option. PROBLEM: If several aircraft arrive simultaneously at the same airport, the DCS ATC has often problems to manage the landing and/or take off queue. So it can happen that aircraft don't get landing clearance for a long time. This has been reported here. SOLUTION: The RAT class has a build in rudimentary ATC queue. When RAT aircraft arrive simultaneously at the same aircraft, each one gets a holding point and the landing clearance is triggered for one aircraft after the other. This eases the workload for the DCS ATC but problems are still to be expected. PROBLEM: Especially on the NTTR and Normandy map, there are quite a few smaller airports and airstrips. These can't be used by all aircraft especially bigger ones - the aircraft can land or takeoff but they don't have a parking space. This has two unpleasant consequences. Firstly, if aircraft are spawned at these airports they are spawned in air on airports on the Caucasus map. On the NTTR and Normandy map however, aircraft are spawned on the runway and can even be spawned on top of each other - see here. SOLUTION: The user can restrict the departure and destination airports for each aircraft type. Secondly, if aircraft land at airports where they don't have a valid parking spot, they will be despawned directly after they land. This is a minor problem, but it causes that no new RAT aircraft is spawned since this is normally done after the aircraft has reached its parking position. SOLUTION: RAT has an option so that aircraft can be respawned after the landing event with a certain delay. Check out the RespawnAfterLanding function. Do you have an example? There are several example missions available. These cover a lot of the basic RAT features and options. You can find them here. Most of the examples take place on the Caucasus map, but there are also some for NTTR and Normandy. Is there a documentation? You find the documentation here. Are there YouTube tutorials? YT videos about RAT can be found on the MOOSE channel but I will also link them here in another post. They provide the basic concepts and cover important examples what can be done with RAT. With time, I'll add more episodes showing RAT in action. What do I need for RAT? RAT is a class of the MOOSE framework. You can download the latest Moose.lua file which includes RAT here. Note that you need at least MOOSE version 2.2.0! I will make step-by-step guide how to set up a mission employing RAT in separate post of this thread. Last but not least, a big thanks to Sven aka FlightControl! Without his help this project would not have been possible. I hope RAT helps to fill your DCS sandbox with nice toys ![]() Change log:
__________________
Multiple exclamation marks, are a sure sign of a diseased mind. i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Last edited by funkyfranky; 03-26-2019 at 06:00 PM. Reason: Updated links |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Sep 2015
Location: Asgård
Posts: 2,310
|
![]()
Part 1: Introduction and Concepts
Part 2: Examples and Options Step-by-step Setup Guide Step 1: First, you need to download the Moose.lua file from the MOOSE github page. This contains the RAT class. Here is also the direct link to the Moose.lua version 2.3.1. Step 2: ![]() Open the DCS mission editor and:
Step 3:
Step 4: ![]() In the mission editor:
Step 5: ![]() Repeat similar steps as in Step 4 to include the "RAT Script.lua":
Step 6: ![]() Start the mission and observe five Yak-40 being spawned at random airports. Tips 'n' Tricks Random Liveries These are the available liveries of the Civil Aircraft Mod. Each spawned aircraft will get a random livery from the list. Code:
local b737=RAT:New("RAT_B737") local b747=RAT:New("RAT_B747") local b757=RAT:New("RAT_B757") local a380=RAT:New("RAT_A380") local cessna=RAT:New("RAT_Cessna") -- Liveries CAM v0.78 local b727skins={"AEROFLOT", "Air France", "Alaska", "Alitalia", "American Airlines", "Clean", "Delta Airlines", "Delta Airlines OLD", "Hapag Lloyd", "Lufthansa", "Lufthansa Oberhausen Old", "Northwest", "Pan Am", "Singapore Airlines", "Southwest", "UNITED", "UNITED Old", "ZERO G"} local b737skins={"Air Algerie", "Air Berlin", "Air France", "airBaltic", "Airzena", "AM", "American_Airlines", "British Airways", "C40s", "Clean", "Disney", "EA", "easyjet", "FINNAIR", "HARIBO", "JA", "Jet2", "kulula", "LH", "Lufthansa BA", "Lufthansa KR", "OLD_BA", "OMAN AIR", "PAN AM", "Polskie Linie Lotnicze LOT", "QANTAS", "RYANAIR", "SouthWest Lone Star", "ThomsonFly", "TNT", "Ukraine Airlines", "UPS"} local b747skins={"AF", "AF-One", "AI", "CP", "IM", "KLM", "LH", "NW", "PA", "QA", "TA"} local b757skins={"AA", "BA", "C-32", "Delta", "DHL", "easyJet", "Swiss", "Thomson"} local a380skins={"Air France", "BA", "China Southern", "Clean", "Emirates", "KA", "LH", "LHF", "Qantas Airways", "QTR", "SA", "TA"} local cessnaskins={"Blank", "D-EKVW", "HellenicAF", "Muster", "N9672H", "SEagle_blue", "SEagle_red", "USAF-Academy", "V5-BUG", "VH-JGA"} b737:Livery(b737skins) b747:Livery(b747skins) b757:Livery(b757skins) a380:Livery(a380skins) chessna:Livery(cessnaskins) Radio Communication If you don't want to get spammed by RAT group radio messages like "passing waypoint", you can simply disable the COMM tick box of the RAT template group in the ME. In future, it will also be possible to enable/disable this setting via scripting. Show Cases McCarran Airport Cam (Inbound Traffic) McCarran Airport High Frequency Outbound Traffic Henderson Executive Activate Uncontrolled Aircraft
__________________
Multiple exclamation marks, are a sure sign of a diseased mind. i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Last edited by funkyfranky; 05-25-2018 at 12:02 PM. Reason: Updated links |
![]() |
![]() |
![]() |
#3 |
Veteran
Join Date: May 2012
Location: Okotoks, Alberta
Posts: 3,549
|
![]()
I've got a few different groups of aircraft spawning uncontrolled at Kobuleti- fighter sized aircraft of different types are disappearing as they start to head out to the taxiway... Other aircraft of the same type seem to be fine- not sure the connection.
Any ideas?
__________________
"ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Last edited by ENO; 05-18-2019 at 02:21 AM. Reason: Sorry for stupid questions- maybe this one is better... |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Oct 2015
Posts: 848
|
![]()
awesome stuff thank u, ill try this for sure!
|
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Sep 2015
Location: West Sussex, United Kingdom
Posts: 2,153
![]() |
![]()
Wow this is great, cant wait to give this a try.
Thank you
__________________
Razbam Community Manager Water cooled i7-7700K oc at 5Ghz | 2080ti | 32GB DDR4 Ram | Virpil T50 | Warthog Throttle | Saitek Peddles | Rift S Razbam Website | Facebook Page | Offical Razbam YouTube Channel |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Jul 2015
Posts: 2,372
|
![]()
Awesome!
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Feb 2015
Posts: 741
|
![]()
Sweet congrats on the release!
|
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Aug 2010
Posts: 122
|
![]()
How do I setup multiple types of aircraft?
|
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Sep 2015
Location: Asgård
Posts: 2,310
|
![]()
Hey Chicki - good question
![]() For each aircraft type you want to include, you need to add an own template group in the mission editor. So if you want, for example, to add a C-130 additionally to a Yak-40, you have to add a new group of a C-130 in the mission editor, name it e.g. "RAT_C130" and set the "LATE ACTIVATION" tick box. The lua code would look like this: Code:
local yak=RAT:New("RAT_YAK") yak:Spawn(5) local c130=RAT:New("RAT_C130") c130:Spawn(3)
__________________
Multiple exclamation marks, are a sure sign of a diseased mind. i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss |
![]() |
![]() |
![]() |
#10 |
Senior Member
Join Date: Sep 2015
Location: West Sussex, United Kingdom
Posts: 2,153
![]() |
![]()
We have added various random flights into our training map for QRA.
Thank you for this gem ![]() Sent from my SM-G950F using Tapatalk
__________________
Razbam Community Manager Water cooled i7-7700K oc at 5Ghz | 2080ti | 32GB DDR4 Ram | Virpil T50 | Warthog Throttle | Saitek Peddles | Rift S Razbam Website | Facebook Page | Offical Razbam YouTube Channel |
![]() |
![]() |
![]() |
Tags |
moose, random air traffic, rat |
Thread Tools | |
Display Modes | |
|
|