Jump to content

[MOOSE] RAT - Random Air Traffic


Recommended Posts

Hi mav,

 

Right now I see planes parking at the gate reversed, how can I fix their position?

You can't - only ED can. This is something we users have no control over unfortunately.

 

Also, how can I add inbound AI traffic to Dubai International airport? I already have outgoing, but I would also like to add incoming flights as well.

Well, in principle you just exchange the names of the departure and destination airports/zone, i.e. something like

 

local b737inbound=RAT:New("RAT_B737", "B737 Inbound")
b737inbound:SetDeparture("RAT Zone)
b737inbound:SetDestination("Dubai Intl")
b737inbound:Livery(b737skins)
b737inbound:StatusReports(false)
b737inbound:SetSpawnDelay(60)
b737inbound:SetSpawnInterval(10)
b737inbound:SetTakeoff("air")
b737:Spawn(7)

 

BUT, it will not work correctly if you also have a lot of outbound traffic. The inbound aircraft won't get landing clearance from the DCS ATC. They will always abort their final approach because the outbound planes occupy the runway. At least this is what I found.

Unfortunately, there is also not much we can do about this. It's on ED to improve their ATC logic.

 

So you can have either inbound or outbound traffic with a relatively high frequency. Or you reduce the frequency quite a bit so that there are windows where incoming planes have enough time to land before the next outbound panes block the runway. But that needs a bit of fiddling around and fine tuning.

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

where can i find démo .MIZ file and mod file ?

thanks

 

Thanks !

links seems now OK and not broken

System specs: Win10 x64 | i7-9700KF / i9-12900KF | 48/64 GB | GTX 1080 Ti 11 GB / RTX 3090TI 24GB | *NvME PRO 2To | HOTAS Warthog/Virpil | MFG Crosswind Pedals | Button Box

Link to comment
Share on other sites

Hi FunkyFranky,

 

Thanks a lot for your amazing work ! Random spawn seems to work perfectly on the new Persian Gulf map but as soon as I SetDeparture or SetDestination it does not work, I suspect this is because moose.lua does not contain PG list of airbases yet. Can I add them manually ?

 

Cheers,

Badoo 4 | iPod

Link to comment
Share on other sites

Hi FunkyFranky,

Thanks a lot for your amazing work ! Random spawn seems to work perfectly on the new Persian Gulf map but as soon as I SetDeparture or SetDestination it does not work, I suspect this is because moose.lua does not contain PG list of airbases yet. Can I add them manually ?

Cheers,

Hi kaymelkan, RAT does not depend on any airport lists of maps. It works with all current maps including PG and should also work with all future maps. That is unless anything vital in the DCS API changes, of course ;) But I would fix that immediately.

So there must be something else in your script that causes SetDeparture and SetDestination not fail. I have used it in my scripts and it works :)

 

Shoot me your mission file and I'll have a look in the next few of days!

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, you can use the carrier group (or was it the unit?) name in SetDeparture and/or SetDestination just like airbases. Just did it with the Stennis today.

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

Wow, this is really fantastic!!! Great work. This is something DCS needs badly.

One question though. When I use this script, the planes keep spawning. Anyone have an idea why?:

 

-- Liveries

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 b737=RAT:New("RAT_B737")

b737:SetDeparture("Dubai Intl")

b737:SetDestination("Bandar Abbas Intl")

b737:Livery(b737skins)

b737:SetMaxRespawnTriedWhenSpawnedOnRunway(0)

b737:StatusReports(false)

b737:SetSpawnDelay(60)

b737:SetSpawnInterval(10)

b737:SetTakeoff("cold")

b737:RespawnInAirNotAllowed()

b737:RespawnAfterTakeoff()

b737:Spawn(7)

Link to comment
Share on other sites

b737:RespawnAfterTakeoff()

This line causes a new aircraft to be spawned each time another one takes off. Delete it and you will have only seven aircraft going from Dubai to Bandar Abbas. Each time one reaches Badar Abbas, a new one in Dubai is spawned. So you have a constant flow of seven aircraft in that direction.

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

This line causes a new aircraft to be spawned each time another one takes off. Delete it and you will have only seven aircraft going from Dubai to Bandar Abbas. Each time one reaches Badar Abbas, a new one in Dubai is spawned. So you have a constant flow of seven aircraft in that direction.

 

You're a star! And again, thanks for the fantastic work. It really makes a huge difference in the cold and empty DCS world

Link to comment
Share on other sites

Hi,

I started tinkering with RAT, I use the RAT manager to have 5 random planes flying on my mission, and I have 2 questions:

 

  • Is there a way to have RAT planes hidden on map? I tried checking the option on the unit in mission editor but it did not work (I tried in multiplayer only)
  • I'd like to have the aircraft staying parked 5 minutes after engine shutdown before being despawned, and have an additional 5 minutes delay before respawn, is there a way to do that with RAT manager? I tried RAT:RespawnAfterLanding(300) and RAT:SetRespawnDelay(300) but it didn't work.

"You don't rise to the occasion, you fall to your level of preparation."

Link to comment
Share on other sites

Hi,

[*]Is there a way to have RAT planes hidden on map? I tried checking the option on the unit in mission editor but it did not work (I tried in multiplayer only)

I have never tried to enable the hidden option. This setting is not overwritten when by the RAT logic when the plane is spawned from the template. So like other options, I would have thought that the RAT planes should get this setting from the template. Does it work for you in other cases? I ask because I vaguely remember that there was a DCS bug that hidden units are displayed on the map. But I don't know if this was fixed already.

[*]I'd like to have the aircraft staying parked 5 minutes after engine shutdown before being despawned, and have an additional 5 minutes delay before respawn, is there a way to do that with RAT manager? I tried RAT:RespawnAfterLanding(300) and RAT:SetRespawnDelay(300) but it didn't work.

Yeah, sorry, that will not work with the RAT manager. Because it keeps the number of planes constant. And there is currently no way to keep the plane alive after it has reached the parking position and shut down the engines.

I could try to add parameter and schedule the despawn. Good idea actually. It probably looks a bit nicer when the plane does not immediately vanish :)

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 have never tried to enable the hidden option. This setting is not overwritten when by the RAT logic when the plane is spawned from the template. So like other options, I would have thought that the RAT planes should get this setting from the template. Does it work for you in other cases? I ask because I vaguely remember that there was a DCS bug that hidden units are displayed on the map. But I don't know if this was fixed already.

 

I did some testing in Open Beta, it seems to work in single player, but not in multiplayer :(

 

Yeah, sorry, that will not work with the RAT manager. Because it keeps the number of planes constant. And there is currently no way to keep the plane alive after it has reached the parking position and shut down the engines.

I could try to add parameter and schedule the despawn. Good idea actually. It probably looks a bit nicer when the plane does not immediately vanish :)

 

If you can do that it would be a nice eye candy indeed, right now some planes vanish before their propeller can completely stop :joystick:

"You don't rise to the occasion, you fall to your level of preparation."

Link to comment
Share on other sites

I did some testing in Open Beta, it seems to work in single player, but not in multiplayer :(

Okay, but that behavior strongly suggests that this is a DCS bug.

If you can do that it would be a nice eye candy indeed, right now some planes vanish before their propeller can completely stop :joystick:

Yes, it's a good idea :) In principle the implementation is easy. However, RAT meanwhile has a lot of options. I need to carefully test that this feature does not break other stuff. And, you know, the Hornet is out... :D

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

  • 2 weeks later...
yes, you can use the carrier group (or was it the unit?) name in SetDeparture and/or SetDestination just like airbases. Just did it with the Stennis today.

 

How? I've been playing with it, and I can't get anything to spawn on the Sten. I've given it a very simple name, STN, and that's what I'm using - SetDeparture("STN"), but the aircraft never appears. Have no problems with other aircraft at actual fields, just the boat

 

 

***EDIT***

So, I don't know what I did in my first iteration, but, basically, I rewrote the entire LUA (my RAT TEST if you will) and, using the ships Unit Name (STN #001), I was able to get it to start working.....I went over that first one again and again and didn't see any syntax or spelling errors (lordy knows I can't speel, but that wasn't it), so...*shrug* at least it's working now and now we know for sure it's Unit Name ;) and not just Name


Edited by Swany

B. "Swany" Swanberg

Gigabyte Designare, Intel i9 9900KF (3.6, OC'd to 5.0)

32GB Patriot Viper Steel (black, non-RGB)

OS installed on a Samsung Evo 970 1TB SSD

DCS installed on a Samsun Evo 860 1TB SSD

EVGA 2080Ti 11GB

EVGA Supernova 720p 750w PS

3 Dell S2716DG monitors in Surround mode (7680x1440)

Oculus Rift S VR

Thrustmaster Warthog Throttle and Stick

Thrusmaster Rudder Pedals

assorted button boxes/Arduino boards

All drivers always kept up to date (30 days old, max)

Link to comment
Share on other sites

A question about RAT -

 

If an AI, RAT Spawned, air craft goes down for whatever reason (out of fuel, shot down, a bug hits it and it crashes), will that cause it to respawn, or do you "lose" that one for good until Map restart?

 

 

***Edit***

 

I guess I really should experiment more before I get a "Brilliant idea!", then ask about it lol

To answer my own question, yes, you get them back, but, not until the others in the flight have crashed/landed/despawned. Once they do, the entire flight is back


Edited by Swany

B. "Swany" Swanberg

Gigabyte Designare, Intel i9 9900KF (3.6, OC'd to 5.0)

32GB Patriot Viper Steel (black, non-RGB)

OS installed on a Samsung Evo 970 1TB SSD

DCS installed on a Samsun Evo 860 1TB SSD

EVGA 2080Ti 11GB

EVGA Supernova 720p 750w PS

3 Dell S2716DG monitors in Surround mode (7680x1440)

Oculus Rift S VR

Thrustmaster Warthog Throttle and Stick

Thrusmaster Rudder Pedals

assorted button boxes/Arduino boards

All drivers always kept up to date (30 days old, max)

Link to comment
Share on other sites

ok, THIS time I did a lot more digging and can't find my answer - (actually have a question and a semi bug?)

 

question - How would you go about setting a "home" point? I get that there may be some coding, but I just can't wrap my head around how to do it (blame it on just not knowing enough of the language yet) I get Commute() command, but it's not quite what I'm after

 

Example - I've set a carrier (The Carl) out at see, I use RAT to spawn 4 F18's on it. I want them to randomly pick an air field (or even the other carrier) and I want them to fly there. Then when they take off, fly back to their Home Carrier, Carl. Then, when the leave there, pick another random spot. Commute will only send them back and forth to the first random and no others.

 

Spawn on A, fly to B, return to A, fly to C, return to A, fly to D, return to A, etc etc

 

 

Now, the bug that isn't a bug (or maybe it's part of the DCS bug?)

I watched my F18's fly to an airport, they got the clearance and were setting up on final, gear down, doing an approach, then random's spawned in on that field (I saw them pop up) and all the F18's pealed off...Good, avoid a crash. How ever, after that, they could NEVER figure out how to get back to that air field again. They flew around it for EVER. Each time they'd drop their gear and start an approach, they were lined up perfectly........With the runway to their backs. They'd realize this, then, gear up, peal away, fly around a while, and repeat this until one crashed and the other ran out of fuel (which they all seem to follow the exact same path. The others almost crashed in EXACTLY the same spot as the first one, they all just managed to miss the trees that got the first one). At that point, they respawned on the field they were trying to land on, then flew back to the Carl

B. "Swany" Swanberg

Gigabyte Designare, Intel i9 9900KF (3.6, OC'd to 5.0)

32GB Patriot Viper Steel (black, non-RGB)

OS installed on a Samsung Evo 970 1TB SSD

DCS installed on a Samsun Evo 860 1TB SSD

EVGA 2080Ti 11GB

EVGA Supernova 720p 750w PS

3 Dell S2716DG monitors in Surround mode (7680x1440)

Oculus Rift S VR

Thrustmaster Warthog Throttle and Stick

Thrusmaster Rudder Pedals

assorted button boxes/Arduino boards

All drivers always kept up to date (30 days old, max)

Link to comment
Share on other sites

Commute will only send them back and forth to the first random and no others.

Spawn on A, fly to B, return to A, fly to C, return to A, fly to D, return to A, etc etc

That's right, at the moment they will only commute between A and B. But I like what you describe better :)

I'll try to implement that. If one wants to have a commute between the same airports, one then needs to specify only one destination explicitly.

 

Now, the bug that isn't a bug (or maybe it's part of the DCS bug?)

I watched my F18's fly to an airport, they got the clearance and were setting up on final, gear down, doing an approach, then random's spawned in on that field (I saw them pop up) and all the F18's pealed off...Good, avoid a crash. How ever, after that, they could NEVER figure out how to get back to that air field again. They flew around it for EVER. Each time they'd drop their gear and start an approach, they were lined up perfectly........With the runway to their backs. They'd realize this, then, gear up, peal away, fly around a while, and repeat this until one crashed and the other ran out of fuel (which they all seem to follow the exact same path. The others almost crashed in EXACTLY the same spot as the first one, they all just managed to miss the trees that got the first one). At that point, they respawned on the field they were trying to land on, then flew back to the Carl

Yeah, that sounds pretty much like a DCS bug. Once the aircraft gets the signal to land and starts it's final it is out of my hands. DCS logic than takes over and there is nothing we can do.

It seems that aircraft that take off or event taxi to the runway have priority over the ones that land. And the landing ones abort their final.They (ED) need to find a better balance for starting and landing aircraft. At the moment, simultaneous landing and taking off seems difficult. There must be a rather big time window so that the landing ones can finish their final approach.

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

That's right, at the moment they will only commute between A and B. But I like what you describe better :)

I'll try to implement that. If one wants to have a commute between the same airports, one then needs to specify only one destination explicitly.

Looking forward to it! Maybe a SetHome.?

 

Yeah, that sounds pretty much like a DCS bug. Once the aircraft gets the signal to land and starts it's final it is out of my hands. DCS logic than takes over and there is nothing we can do.

It seems that aircraft that take off or event taxi to the runway have priority over the ones that land. And the landing ones abort their final.They (ED) need to find a better balance for starting and landing aircraft. At the moment, simultaneous landing and taking off seems difficult. There must be a rather big time window so that the landing ones can finish their final approach.

 

Could there be a way to have the spawning group check the logic and see if there's already an inbound (is cleared for landing) plane, then abort the spawn if so? That way the landing aircraft do no lt have to abort their run and can land

B. "Swany" Swanberg

Gigabyte Designare, Intel i9 9900KF (3.6, OC'd to 5.0)

32GB Patriot Viper Steel (black, non-RGB)

OS installed on a Samsung Evo 970 1TB SSD

DCS installed on a Samsun Evo 860 1TB SSD

EVGA 2080Ti 11GB

EVGA Supernova 720p 750w PS

3 Dell S2716DG monitors in Surround mode (7680x1440)

Oculus Rift S VR

Thrustmaster Warthog Throttle and Stick

Thrusmaster Rudder Pedals

assorted button boxes/Arduino boards

All drivers always kept up to date (30 days old, max)

Link to comment
Share on other sites

Looking forward to it! Maybe a SetHome.?

I think I will just make it so that the normal RAT:Commute() switch does that. No need for SetHome() I'd say.

Could there be a way to have the spawning group check the logic and see if there's already an inbound (is cleared for landing) plane, then abort the spawn if so? That way the landing aircraft do no lt have to abort their run and can land

In principle yes, but it would not avoid the problem if non-RAT aircraft would be spawned etc etc. Plus, this is really something ED should fix. They have many more possibilities with their access to the core engine.

It even happens on big airports which have two runways. But only one is used for T/O and landing.

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 think I will just make it so that the normal RAT:Commute() switch does that. No need for SetHome() I'd say.

 

Wouldn't the intent of commute be to move between just the same two points? Where as SetHome would always return to the same location, but have different destinations when leaving Home? Or am I just not following what you are saying? (Entirely possible lol)

 

IIn principle yes, but it would not avoid the problem if non-RAT aircraft would be spawned etc etc. Plus, this is really something ED should fix. They have many more possibilities with their access to the core engine.

It even happens on big airports which have two runways. But only one is used for T/O and landing.

 

Totally agree on ED needing to fix that. And what busts my chops as well, players trying to take off get denied for incoming all the time! Why can't they do that for AI as well?

B. "Swany" Swanberg

Gigabyte Designare, Intel i9 9900KF (3.6, OC'd to 5.0)

32GB Patriot Viper Steel (black, non-RGB)

OS installed on a Samsung Evo 970 1TB SSD

DCS installed on a Samsun Evo 860 1TB SSD

EVGA 2080Ti 11GB

EVGA Supernova 720p 750w PS

3 Dell S2716DG monitors in Surround mode (7680x1440)

Oculus Rift S VR

Thrustmaster Warthog Throttle and Stick

Thrusmaster Rudder Pedals

assorted button boxes/Arduino boards

All drivers always kept up to date (30 days old, max)

Link to comment
Share on other sites

Wouldn't the intent of commute be to move between just the same two points? Where as SetHome would always return to the same location, but have different destinations when leaving Home? Or am I just not following what you are saying? (Entirely possible lol)

No, you are right, and probably that was also my thinking when I first implemented it. But having a commute between to points would also be possible with the new implementation. You would just need to define exactly one departure and one destination. And if you want a random departure and destination you would need to select the single departure and destination randomly before. So nothing would be lost. However, I'll give the SetHome() option another thought :)

 

Totally agree on ED needing to fix that. And what busts my chops as well, players trying to take off get denied for incoming all the time! Why can't they do that for AI as well?

Don't know. But AI is not easy to implement and I think it was not on top of their prio list because of PG and Hornet. They improved the taxiing behavior quite a bit meanwhile. That's a good step in the right direction. Hopefully we see more like this.

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