Jump to content

Random Airtraffic Script (with MIST2.0)


SNAFU

Recommended Posts

Doum76,

I had a look at Raf's script and it is using Mist to do the respawn and I believe that currently the Mist function involved only returns a random vec2 position. ie doesn't consider height. This is because the Mist function is generic and used for all types of units. I have however asked Grimes if he will consider a change in his next version of Mist that may end up with what you want. See http://forums.eagle.ru/showthread.php?p=2462646#post2462646

 

The CAPGCI script does spawn aircraft at random heights as does (I think) the random air traffic script but they do so via a different type of logic and neither does it by radio command.

 

I've seen a script by Ajax that gives you the ability to scramble aircraft by radio calls don't know if that helps http://www.159thgar.com/forums/viewtopic.php?f=47&t=8228

 

Unfortunately adding radio calls to the f10 menu does take scripting so unless you perhaps substitute mission triggers you may have to be patient and see if Grimes is able to assist and even then Raf's script may need tweaking.

Link to comment
Share on other sites

Doum76,

I had a look at Raf's script and it is using Mist to do the respawn and I believe that currently the Mist function involved only returns a random vec2 position. ie doesn't consider height. This is because the Mist function is generic and used for all types of units. I have however asked Grimes if he will consider a change in his next version of Mist that may end up with what you want. See http://forums.eagle.ru/showthread.php?p=2462646#post2462646

 

The CAPGCI script does spawn aircraft at random heights as does (I think) the random air traffic script but they do so via a different type of logic and neither does it by radio command.

 

I've seen a script by Ajax that gives you the ability to scramble aircraft by radio calls don't know if that helps http://www.159thgar.com/forums/viewtopic.php?f=47&t=8228

 

Unfortunately adding radio calls to the f10 menu does take scripting so unless you perhaps substitute mission triggers you may have to be patient and see if Grimes is able to assist and even then Raf's script may need tweaking.

 

 

 

Thanks, i appreciate. Well i'll wait until then, even though they all spawn at the same height i still need to lear kill them first before they get me and find them on radar :) You know if it's possible to spawn random group? for exemple if i create more than 1 IL-78 when i spawn, it select one of the unit inside a group or so?

Link to comment
Share on other sites

  • 1 month later...

hi

 

is this working in DCS v1.5 + MIST v4 ?

 

thanks for your work

 

edit, and let me reply to myself:

 

yes it does work, but because of a script init bug in the current mission editor, the new MIST v4.x must be activated using the standard trigger method / run script, AI traffic works just fine your example .miz


Edited by Teschmacher

My custom made aircraft skins and other content for DCS World!

 

WIN 10  / 64Gb RAM DDR4 @ 4000mhz / i9-10900KF @ 5.3ghz / NVIDIA GeForce 3090 RTX / SSD Samsung EVO 970 / VIRPIL / MFG Crosswind / Pimax 5k+ 

Link to comment
Share on other sites

Thanks for testing.

 

Since I experience some issues in DCS 1.5 with previously working scripts, I wait until the BETA is a little more settled before I waste my time in reworking scripts (for which I do not have time anymore anyway... :helpsmilie: ).

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

  • 2 weeks later...

Alright, guys, I give up. I didn't want to bother you with questions, but I've spent like 4 hours in vain trying to modify the script and the sample mission.

 

Actually I just wanted to create a non-conflict mission for training and aerobatic flights without hostile airplanes.

 

I modified the script file to spawn only Russian aircrafts and changed the airfields in the sample mission to belong to red faction. The problem is that the script continues generating planes and helis for Blue factions.

 

I decided to try and build a new mission with this script. Added all the countries to the red faction to prevent any possible conflicts.

 

Then I've chosen Anapa, Krasnodar (center) and Krymsk as the spawning airfields, added triggerzones for them (named just like the airfields they belong to) and a flightspace zone.

I've checked the names in the ME and in the script many times - they are the same.

 

Added triggers to start MIST and the Random Air Traffic itself.

 

But as soon I start the mission, it loads MIST and (supposedly) the script, but creates no traffic at all. No errors, just nothing.

 

Tried to remove MIST loading - it returned an error after mission start. So, I suppose, the script actually loads but for some reason it refuses to add any traffic.

 

Could someone give me a tip what could I do about that? Thanks in advance!

 

 

  • 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

Maybe you can upload the *.miz file, so it is possible to check.

 

I cannot promise anything, since I have little time at hands in the moment in the next 3 weeks, but maybe some other kind sould finds time to help.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Thanks a lot, I'll upload my miz (and maybe the script file with all the changes) as soon as I get home from work.

 

UPD: Here we go, added my mission as well as the script in attachments.

[RAT]Krasnodar_Center.miz

RandAirtraffic_r6.lua


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

I redownloaded the script and edited to work with your airports and also switched to MIST 4.0.55. Now it works.

 

 

In your first script, the line 18:

trigger.action.outText(string.format(AF1ID).."-" ..string.format(AF2ID).."-" ..string.format(AF3ID),10)	

was not commented out.

[RAT]Krasnodar_Center.miz

MIST3_2_RandAirtraffic_r6.lua

  • Like 1

[sIGPIC][/sIGPIC]

 

We are looking for Swedish members!

http://www.masterarms.se

Link to comment
Share on other sites

Thank you so much! It will really add some life to my training flights.

 

Just curious - was it really just because that one line I uncommented or were there other issues?

 

 

  • 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

  • 1 month later...

Hi,

 

I tried Dami's Krasnodar mission which is pretty nice. Unfortunately, there are just two to three AI aircrafts flying at the same time, so I wanted to increase the spawn intervall by using the instruction on page one of this thread.

 

"In line 10 the spawnintervall can be set:

 

Code:

intervall = math.random(300,900) --(x,y) minimum x seconds, max. y seconds"

 

Unfortunately, it doesn't work for me as new aircrafts are still spawning very slowly (each 10 minutes appr. one aircraft)

Could anyone please let me know how I can increase the number of AI aircrafts?

 

Thanks a lot!


Edited by dynasty
Link to comment
Share on other sites

  • 2 weeks later...

Eh guys.

 

So I'm busy trying to build an active template for the NTTR and DCS 2.0 and of course one of my first priorities was to have some "action."

 

I went through and plunked in some data on the off chance it might actually work... and to my surprise it "sort of" did. Sort of?

 

Seems aircraft were being generated... but many didn't take off and just sat idling in their spot for seemingly random amounts of time. Others appeared and either spontaneously blew up or hit something and forced the pilots to eject.

 

I'm quite certain this behavior isn't tied to the script itself... probably just errant AI behavior.

 

 

I designated all 3 airfields as just Nellis AFB- and had the single area named exactly that designated as a zone. I also created a turning point zone (named as in the script) but the aircraft that did make it off the ground didn't appear to go there.

 

Anyone else have recent experiences with 2.0? SNAFU- are you still dabbling with this script?

 

I let my mission run for about an hour yesterday to see what happened and do have the track if you think it'll help?

"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

Actually I am surprised something happens at all...

 

The airfield IDs are hardcoded and based on the Georgia map. So it should really not work with NTTR.

 

You need to modify the list of airfields and their IDs, then you could try again and get a little closer. ;)

 

I have currently actually little time and even less interest in scripting. The little spare time I have left I have spent on something less troubling... ;)

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Well hopefully someone with some energy remaining will, with your permission of course, be able to blow some of the dust off and maybe at least get it working. I can probably do the new list of airfields etc but anything more than that and I'll do more harm than good.

"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

Yes, hopefully.

 

What is morst important, that you get the airfield IDs. Since the NTTR does not have so many airfields, this should be not too difficult.

The ID is written in the mission-file if you place an aircraft on it with ramp start. So you basically just need to place an aircraft on every airfield and open the miz-file and note down the IDs. Then you need the exact name of the airfield as its defined within DCS. If you are lucky it is ecactly the name as in the Mission Editor. Might be worth a try.

 

Both were available for the old map, but for the new, someone has to find out. :)

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

So I did get a chance to grab that new NTTR list from Wolle's thread on the subject- and used that information to plunk into the script in its existing format.

 

Everything worked pretty well while I was watching it the first 10-15 minutes or so but this popped up in the log and resulted in a total crash so no track.

 

 

00032.769 ERROR Lua::Config: load error :can't open ''.

00034.549 INFO SCRIPTING: Mist version 4.0.57 loaded.

00287.352 ERROR SOUND: invalid source_params(woLA-16778752:damage\wings_overload): gain

00341.960 ERROR SOUND: invalid source_params(woLA-16778496:damage\wings_overload): gain

00516.900 ALERT FLIGHT: No taxiroad found from 59 to 0

00642.145 ALERT FLIGHT: No taxiroad found from 250 to 1

00668.196 ERROR SOUND: invalid source_params(woLA-16782336:damage\wings_overload): gain

00684.187 ERROR SOUND: can't load wave: "effects\aircrafts\mi-8mtv2\cockpit\pump2"

00684.187 ERROR SOUND: can't load wave: "effects\aircrafts\mi-8mtv2\cockpit\pump1"

00684.187 ERROR SOUND: can't load wave: "effects\aircrafts\mi-8mtv2\cockpit\pump2_end"

00684.187 ERROR SOUND: can't load wave: "effects\aircrafts\mi-8mtv2\cockpit\pump1_end"

00685.248 ERROR DX11BACKEND: texture "mi_8_tex_spec" not found

00725.652 ALERT FLIGHT: No taxiroad found from 1079 to 1

00754.603 ERROR SOUND: invalid source_params(woLA-16782848:damage\wings_overload): gain

00767.395 ERROR wInfo: negative weight of payload "{D5D51E24-348C-4702-96AF-97A714E72697}"

00767.546 ERROR DX11BACKEND: texture "f-18c_damage_main" not found

00767.646 ERROR DX11BACKEND: VFSTextureDriver: Failed to load texture /textures/f-18c_damage_main_map.dds

00809.150 ALERT FLIGHT: No taxiroad found from 249 to 1

00850.894 INFO DCS: try to write dump information

 

 

It looks to be more alpha pathfinding related than script related... and I realized after looking at the script again that I hadn't originally used proper zone names in my previous mission attempt. This time aircraft spawned in, taxied and then flew to the turn around zone (airlanehub1). All manners of aircraft appeared as scripted by design... randomly as expected and within proper time parameters (optional in the script).

 

So I'm quite certain that without doing anything else to the script this may still work... buuuuuut I've read that aircraft are having difficulty taxiing and collisions have occurred. So right now in my inexperienced eye I think it's more an issue with the alpha and not the script itself.

"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

  • 3 weeks later...
Hi,

 

I tried Dami's Krasnodar mission which is pretty nice. Unfortunately, there are just two to three AI aircrafts flying at the same time, so I wanted to increase the spawn intervall.

 

"In line 10 the spawnintervall can be set:

 

Code:

intervall = math.random(300,900) --(x,y) minimum x seconds, max. y seconds"

 

Unfortunately, it doesn't work for me as new aircrafts are still spawning very slowly (each 10 minutes appr. one aircraft)

Could anyone please let me know how I can increase the number of AI aircrafts?

 

Thanks a lot!

 

 

Hi. Sorry, I didn't see your question, so it will be kind of a necropost I guess :) But still...

 

If you increase the interval, the aircrafts will spawn less frequent.

 

If you want more air traffic you need to decrease spawn interval.

 

There is also another issue - I noticed at some point that simply editing the script file having your Mission Editor still opened will not refresh the code in the mission itself (at least it's my guess).

 

What you actually need to do is:

1. Save your mission, close the ME, then exit the game.

2. Open your script file and edit the code, decreasing the interval to something like 10,20 then save it.

3. Relaunch the game, open the ME.

4. Go to "triggers" menu in the ME, find the trigger that activates the Random Traffic script, choose the 'Execute script file' action (or something similar) and apply your RAT script file again. I know it's dumb but it's the only way I managed to refresh the script inside the mission.

5. Save the mission, launch it.

6. Be totally freaked out about the amount of the aircrafts spawning and getting stuck at the airfield since "10,20" is not the best interval :)

 

UPD By the way, I can share my new RAT-based mission (you'll find it in attachment). It uses Sochi-Adler, Gudauta and Suhumi airfields. I modified the script so that it spawns the traffic more frequently (but still not that frequent to ruin the game). I also used a simple workaround to make the script spawn twice as much aircrafts in Sochi since I believe it's logical.

[RAT] Virtual Sochi.zip


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

...So I'm quite certain that without doing anything else to the script this may still work... buuuuuut I've read that aircraft are having difficulty taxiing and collisions have occurred. So right now in my inexperienced eye I think it's more an issue with the alpha and not the script itself.

 

Wow, I missed this post the first time around. I really like this script and try to use it but haven't considered it due to my ineptitude with the ME and because I just assumed it wouldn't work with the NTTR map. Can't wait to see a working version for this map!

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

If someone manages to find out the airfiels IDs for NTTR map, please please please post them here.

 

I tried to do it myself but I think I'm stuck.

At the moment I couldn't make it to spawn any aircrafts - and the most logical reason seems to be that the IDs I use are wrong.

 

 

  • 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

If someone manages to find out the airfiels IDs for NTTR map, please please please post them here.

 

I tried to do it myself but I think I'm stuck.

At the moment I couldn't make it to spawn any aircrafts - and the most logical reason seems to be that the IDs I use are wrong.

 

{

[1] = {name = 'Creech AFB', id = 1},

[2] = {name = 'Groom Lake AFB', id = 2},

[3] = {name = 'McCarran International Airport', id = 3},

[4] = {name = 'Nellis AFB', id = 4}

}

[sIGPIC][/sIGPIC]

 

Intel Core I7 4820K @4.3 GHz, Asus P9X79 motherboard, 16 GB RAM @ 933 MHz, NVidia GTX 1070 with 8 GB VRAM, Windows 10 Pro

Link to comment
Share on other sites

So I got aircraft loading in a test map in Nevada....but quick question. I have a mission I created last year where Russia is red....is there a way to make Russia blue after creating the mission? I cant seem to figure out how to move it.

Coder - Oculus Rift Guy - Court Jester

Link to comment
Share on other sites

So I got aircraft loading in a test map in Nevada....but quick question. I have a mission I created last year where Russia is red....is there a way to make Russia blue after creating the mission? I cant seem to figure out how to move it.

 

There is a mod around here called ME CoalitionModification. Do a search for it and it will allow you to change sides of nations in a mission within the ME.

 

EDIT: Here is the link to the thread about it: http://forums.eagle.ru/showthread.php?t=141475&highlight=Coalition+Modification

 

Also, feel free to share your edited lua if you'd like. ;)


Edited by Justificus
Add link

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

  • Recently Browsing   0 members

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