Jump to content

Random Airtraffic Script (with MIST2.0)


SNAFU

Recommended Posts

Could anyone share their .lua for Nevada? Would love to implement this in my current mission...

[sIGPIC][/sIGPIC]

PC Specs: i5 8600K | GTX 1080 Ti | 16 GB DDR4 | 4x SSD | Samsung Odyssey VR

Peripherals: Thrustmaster T16000M FCS HOTAS | 4x Bassshakers

Modules: A-4E | A-10C | F-14B | F-15C | Ka-50 | Su-25A | Su-27 | Su-33 | F/A-18C | P-51D | Mi-8MTV2

Link to comment
Share on other sites

Could anyone share their .lua for Nevada? Would love to implement this in my current mission...

 

I could send it to you as soon I get home. Thanks to the guys who provided the airfield IDs for Nevada map I got it finally working in my mission.

 

I should warn you, though - there are numerous issues with taxiing paths on most of the airfields (the NTTR is still beta, remember?). The random traffic behavior is rather strange sometimes.

 

Some of the airplanes spawned already in the air just above the McCarran airport, some got stuck at taxiing - and I got a couple of game crashes.

 

So, as I said, I can share my lua, but I definitely wouldn't recommend using it until the NTTR gets AI taxiing waypoints fixed.

 

 

  • Gigabyte Z97X SLI
  • i5 4670K OC + СoolerMaster 212 Evo
  • inno3D GTX980 iChill
  • 16 GB RAM
  • OCZ Vector 128 GB SSD + 3TB Seagate HDD
  • M-Audio 2496 Audiophile
  • Pimax 4K HMD

 

  • Self-made air mouse controller
  • VKB Cobra Z (BRD Mod)
  • Gametrix ECS; VKB T-Rudder
  • Custom Mjoy 16 switch panel
  • Wireless Inertial Tracker + Opentrack

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Great script, thanks SNAFU!

 

I've only tried Dami's virtual Sochi mission, and adjusted the interval to a slightly lower number. So far so good.

 

I was wondering, How would I go about increasing the number of helicopters in the aircraft that are spawned, or create a preference for certain civilian or transport aircraft over the military ones?

 

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
Great script, thanks SNAFU!

 

I've only tried Dami's virtual Sochi mission, and adjusted the interval to a slightly lower number. So far so good.

 

I was wondering, How would I go about increasing the number of helicopters in the aircraft that are spawned, or create a preference for certain civilian or transport aircraft over the military ones?

 

Thanks.

 

If you are using the lua I attached previously to my Virtual Sochi mission, I have bad news for you - I've modified the code so that it doesn't spawn any helis at all.

 

But if you use the stock script by SNAFU, I should notice that he has provided the whole code with useful comments. Let's try digging a little bit more.

 

There is a selfexplanatory variable in the lua file:

LogisticOrHeliOrFighter = math.random(1,3) //random for transport, heli or fighter 

If I'm not mistaken, 1 is transport, 2 is heli and 3 is fighter.

 

 

Basically what it does on each loop is assigning a random number to the LogisticOrHeliOrFighter variable to decide which type of aircraft it will spawn next.

 

Below in the script you'll find big chunks of code starting with smth like that:

if LogisticOrHeliOrFighter == 1

If you want to spawn helis more frequently, I'd suggest adding additional number to the random()

LogisticOrHeliOrFighter = math.random(1,4)

Then if 2 means heli we sould look for this line

elseif LogisticOrHeliOrFighter == 2

and modify it so that it looks like

elseif (LogisticOrHeliOrFighter == 2 or LogisticOrHeliOrFighter == 4)

Don't forget the parentheses or you'll mess up everything.

 

What do we have now?

In the stock script possibility of spawning a heli on each iteration of the loop was ~33%. Now it should be 50% possibility of spawning a heli rather than any other type of aircraft.

 

But again, if you are using the code I modified for Virtual Sochi mission, look at this line:

elseif LogisticOrHeliOrFighter == 2
       then    
           LogisticOrHeliOrFighter = 3

...and now you know why there are no helis in my mission. :)


Edited by Dami

 

 

  • Gigabyte Z97X SLI
  • i5 4670K OC + СoolerMaster 212 Evo
  • inno3D GTX980 iChill
  • 16 GB RAM
  • OCZ Vector 128 GB SSD + 3TB Seagate HDD
  • M-Audio 2496 Audiophile
  • Pimax 4K HMD

 

  • Self-made air mouse controller
  • VKB Cobra Z (BRD Mod)
  • Gametrix ECS; VKB T-Rudder
  • Custom Mjoy 16 switch panel
  • Wireless Inertial Tracker + Opentrack

 

 

 

Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...

Eh SNAFU- just dropped in to see how this was going. Been on a variety of long hiatuses... I see you've been active in here within the month so that's great news!

 

Your script is a staple for my missions so I'm glad to see you still touch them up occasionally.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

  • 2 weeks later...

This script keeps crashing my DCSW 1.5.5 after a while, and theres nothing obvious about the crash in the DCS.log file. Didn't manage to isolate event that causes crash.

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

Hi chrisofsweden, this is a known bug in the current DCS script environment. This happens with every script in 1.5.5 which gives AI any kind of tasking.

 

Nothing we can do about, only ED.

 

Anyway, I plan to overhaul the script totally, but only someday when 2.5 is out and ED shows some more consistency concerning its script environment.

 

In my opinion there is no use in mission building at all, if everything stands the very high chance to break with the next patch.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Hi chrisofsweden, this is a known bug in the current DCS script environment. This happens with every script in 1.5.5 which gives AI any kind of tasking.

 

Nothing we can do about, only ED.

 

Anyway, I plan to overhaul the script totally, but only someday when 2.5 is out and ED shows some more consistency concerning its script environment.

 

In my opinion there is no use in mission building at all, if everything stands the very high chance to break with the next patch.

 

I concur. This is seems to receiving a lot of attention and I have no doubt that ED knows how important this is. You never know, maybe this is something that will included in future ME options. I am just doing some wishful thinking but I have faith.

Link to comment
Share on other sites

Your scripts, however, are working perfectly. :)

 

Yes. I don't ever put any kind of bugs in my scripts :smartass::megalol:

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

Hi chrisofsweden, this is a known bug in the current DCS script environment. This happens with every script in 1.5.5 which gives AI any kind of tasking.

 

Ah I see. I did not know this. Thanks! Do we have any specifics about exactly what with AI tasking scripts is causing trouble?

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
Any chance I could get a LUA for NTTR as well? Working on some missions for online play, and it does get a bit barren sometimes.

 

I'd like this aswell. Cant get anything to spawn? Code is supposed to fetch the ID's in the beginning of the script but nothing happens in Nevada. Works in Caucasus like a charm.

 

EDIT: Ok I worked it out the manual way to find the ID's and got it working. But the spawned flights won't go to the trafficzone. They skip that step. Any ideas?


Edited by chrisofsweden

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

  • 1 month later...

Would love to see something like this for Normandy...

:notworthy::worthy::thumbsup: Please.


Edited by Justificus

Justificus

 

System Specs:

i7 4970K @ 4.8, GTX 1080 SC, 32GB G.Skill DDR 2133,Thermaltake Level 10 Full Tower Case, Noctua NH-D15 6 Cooler, Win 10 Pro, Warthog, CH Pro Pedals, CH Throttle Quadrant, Oculus, 1 32" & 2 19" Monitors

 

 

 

Modules Owned: A-10C I+II, Ka-50, FC3, F-86, Mig-15, Mig21, UH-1H, Mi-8, CA, P-51D, BF-109K-4, FW-190 D-9, Hawk, NTTR, M-2000C, SA342, F-5E, Spit Mk. IX, AJS-37, Normandy, WWII A.P., AV-8B, F/A-18C, L-39, Persian Gulf, Mig-19P, I-16, Super Carrier, F-16, Channel, Syria

Link to comment
Share on other sites

 

Thanks for the reply and link! read it a few times and it is definitely above my pay grade I'm sorry to say... Maybe some day.

Justificus

 

System Specs:

i7 4970K @ 4.8, GTX 1080 SC, 32GB G.Skill DDR 2133,Thermaltake Level 10 Full Tower Case, Noctua NH-D15 6 Cooler, Win 10 Pro, Warthog, CH Pro Pedals, CH Throttle Quadrant, Oculus, 1 32" & 2 19" Monitors

 

 

 

Modules Owned: A-10C I+II, Ka-50, FC3, F-86, Mig-15, Mig21, UH-1H, Mi-8, CA, P-51D, BF-109K-4, FW-190 D-9, Hawk, NTTR, M-2000C, SA342, F-5E, Spit Mk. IX, AJS-37, Normandy, WWII A.P., AV-8B, F/A-18C, L-39, Persian Gulf, Mig-19P, I-16, Super Carrier, F-16, Channel, Syria

Link to comment
Share on other sites

  • 8 months later...
  • Recently Browsing   0 members

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