Davis0079 Posted June 23, 2014 Posted June 23, 2014 (edited) edit.....sorry...your talking landing speed...nothing intelligent to contribute on that topic..... here are my "Random traffic Scripts" that are modified for AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, AF11, AF12, AF13, AF14, AF15, AF16......airlanehub1, airlanehub2, airlanehub3 Blue Random Traffic 1.lua ...AF1, AF2, AF3, airlanehub1... these two blues cover all of georgia Blue Random Traffic 2.lua ...AF4, AF5, AF6, airlanehub1... this one need modifying...i was trying to get a carrier to work (no joy) Red Random Traffic1.lua ...AF7, AF8, AF9, airlanehub2...Russian...will work with blue random traffic Red Random Traffic2.lua ....AF11, AF12, AF13, airlanhub2...Russian...helps cover north in random traffic Red Random Traffic3.lua ....AF14, AF15, AF16, airlanehub3...Russian...needs modifying....i was setting up a helo only and trying to get farps working (no joy) All these run together...but they are seen as one big script because of the global counters I think.....they do not spawn individually....so you can control the spawn rate by adjusting all the same and its pot luck on with airfield will spawn random traffic.....i normally run 300, 1200 interval in order to not over populate the map..... .....there are probably alot of problems here that I dont know about because i just hacked and slashed the available script...its quite obviously I dont have any skill when it comes to this....but i figured I would show what I've done in hopes that someone greater then I will get a clever idea after looking at my slop......i changed most to only spawn an-26s and yak-40s...civilian traffic only ...edit...after looking closer...you will have to edit the airfields on most of those...but the idea is that you can have 6 blue and 9 red airfields spawning traffic, one blue air hub, two red air hubs.....works rather well.... ...the auto cleanup is not my favorite...I know it makes it nice when a plane gets destroyed at an airfield by bad taxi driving....but it also makes it to where I've had problems after shooting the traffic down and after ai has shot them down.....maybe a problem with the latest changes in mist and DCS....but spawning random su-25's over an area and sending AI planes to attack have yielded crashes in my DCS..... Edited June 24, 2014 by Davis0079 It only takes two things to fly, Airspeed and Money.
ajax Posted June 24, 2014 Posted June 24, 2014 I'm still leaning towards meters per second based on this statement in the referenced Mist function: [font=Courier New][font=Courier New] if not speed then wp.speed = mist.utils.[color=Red]kmphToMps[/color](500) else wp.speed = speed end [/font][/font]
ENO Posted June 24, 2014 Posted June 24, 2014 (edited) Eh guys- Still working on this landing issue... I've been over the script and I can't see where it is that it says that the fighter aircraft groups will be spawned in with a wingman. Anything in there jump out that could be modified so that it's single aircraft only? That will help with the landing issue. Whoops- okay... well I looked again with a different head on and found that 2602-2619 is the script for the wingie for the fighters. I've deleted that and they fly solo now... no wingie and therefore no landing problems! Edited June 24, 2014 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Davis0079 Posted June 24, 2014 Posted June 24, 2014 I wish to spawn on a carrier and a farp.....i get errors....has anyone else tried this...????... It only takes two things to fly, Airspeed and Money.
ENO Posted June 30, 2014 Posted June 30, 2014 (edited) Originally Posted by SNAFU View Post This should be the airdrome IDs: 0 Airdrome_0 1Khersones 2 Saki 3Simpheropol 4 Razdolnoe 5 Dzhankoy 6 Kirovskoe 7 Kerch 8 Belbek 9 Krasnogvardeyskoye 10 Octyabrskoe 11 Gvardeyskoe 12 Anapa 13 Krasnodar 14 Novorossiysk 15 Krymsk 16 Maykop 17 Gelendzhik 18 Sochi 19 Krasnodar_P 20 Sukhumi 21 Gudauta 22 Batumi 23 Tskhakaya 24 Kobuleti 25 Kutaisi 26 MinVody 27 Nalchik 28 Mozdok 29 Tbilisi-Lochini 30 Soganlug 31 Vaziani 32 Beslan Anyone know if these are all still current? Reason I ask is I've been adding versions of this script to add airfields. Once I added the third iteration it stopped spawning aircraft at thode designated places. I know the script loaded since I have it changed to a c- prefix... predictably all subsequent aircraft are spawned with c prefixes. But they won't take off from those bases- in particular Krasnodar center, Anapa and Krymsk. I've used the names in a corrected post earlier in this thread. I've changed everything I can think of in terms of random numbers and airfield id's (up to 7-9) and in my last log the Anapa base returned a nil value. So just wondering how I can go about problem solving this? Edited June 30, 2014 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Davis0079 Posted July 1, 2014 Posted July 1, 2014 dont know about the other two...but = 'Krasnodar-Center' ...works for me.... heres what I can conferm from my working scripts 'Krasnodar-Center' 'Gelendzhik' 'Minoralnve Vody' 'Nalchik' 'Maykop-Khanskaya' 'Beslan' 'Sochi-Adler' 'Gudauta' 'Kutaisi' 'Kobuleti' 'Senaki-Kolkhi' 'Batumi' all these names came from scripts that I know work.....I believe I used the full name I saw on the map in the ME, with hyphen, and had no problems....that list did not work for me.... It only takes two things to fly, Airspeed and Money.
ENO Posted July 1, 2014 Posted July 1, 2014 Thanks DAvis... I see just about all of them are named differently than what I used. I'll try that and report back. (Tried to rep but no joy.) "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ajax Posted July 2, 2014 Posted July 2, 2014 (edited) That list is from the {DCS}\scripts\database\wsTypes.lua file, which apparently are not the right names for use in a script. I generated this list using the scripting-engine world.getAirbases() function: ID CALLSIGN 12 Anapa-Vityazevo 13 Krasnodar-Center 14 Novorossiysk 15 Krymsk 16 Maykop-Khanskaya 17 Gelendzhik 18 Sochi-Adler 19 Krasnodar-Pashkovsky 20 Sukhumi-Babushara 21 Gudauta 22 Batumi 23 Senaki-Kolkhi 24 Kobuleti 25 Kutaisi 26 Mineralnye Vody 27 Nalchik 28 Mozdok 29 Tbilisi-Lochini 30 Soganlug 31 Vaziani 32 Beslan This is an exhaustive list -- I guess the others are not available for scripting purposes. Hope it helps. Edited July 2, 2014 by ajax
ENO Posted July 2, 2014 Posted July 2, 2014 Your awesomeness knows no boundaries! thanks Ajax. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Stonehouse Posted July 3, 2014 Posted July 3, 2014 I was looking into the GCICAP script (which is closely related to this one) last night and trying to debug it to finally find why my red cap units don't always spawn. The function spawnCAP seems to die randomly on this code: local CAPairfield = Airbase.getByName(CAPairfieldname) -- XX CAPairfieldID = CAPairfield:getID() moved down to make it the same as blue logic Debug("debuggingmessage spawnCAP: script hung A-X3: counter:"..string.format(counter), CAPside) actualCAPairfield = trigger.misc.getZone(CAPairfieldname) So I am beginning to think that the airbase name is the problem and that is why my error is occuring randomly. That is, the red cap can spawn from 3 different airbases chosen at random from Sukhumi, Nalchik and Mozdok. So looking at the last few posts in this thread it sounds like I should be using 'Sukhumi-Babushara' instead of Sukhumi in my script? or have I misunderstood? I'd try by experimentation and avoid asking the question here but I'm at work for the next 8-10 hours and I'm curious to see if my problem is due to Sukhumi being randomly chosen and I'm using the wrong name. Which then explains why sometimes the problem goes away if only Nalchik and Mozdok are chosen. Thanks, Stonehouse
ENO Posted July 3, 2014 Posted July 3, 2014 Sorry I can't test it for you right now stone but your problems are identical to the issues I was having... Script worked fine when I had the name right- which makes sense. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Stonehouse Posted July 3, 2014 Posted July 3, 2014 Ok thanks and no problems Eno. I can test it when I get home tonight, guess I'm just overly keen to get the thing moving as I've been looking at it on and off for 6 months now (it feels like it anyway) and it was Chameleon Silk looking at the runway use issue the other day that got me motivated again...plus getting the script working would take a big chunk out of building a dynamic border war mission.
ENO Posted July 3, 2014 Posted July 3, 2014 Oh I get it- believe me. I'm up at work myself and not always on the computer early enough (when off shift) to get any editing time in. But I'm confident that will resolve your issue. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Stonehouse Posted July 3, 2014 Posted July 3, 2014 Yep all fixed. See http://forums.eagle.ru/showpost.php?p=2107566&postcount=104 for an update incorporating my own, Rivverns and Silks changes.
SNAFU Posted September 7, 2014 Author Posted September 7, 2014 I was looking into the GCICAP script (which is closely related to this one) last night and trying to debug it to finally find why my red cap units don't always spawn. The function spawnCAP seems to die randomly on this code: local CAPairfield = Airbase.getByName(CAPairfieldname) -- XX CAPairfieldID = CAPairfield:getID() moved down to make it the same as blue logic Debug("debuggingmessage spawnCAP: script hung A-X3: counter:"..string.format(counter), CAPside) actualCAPairfield = trigger.misc.getZone(CAPairfieldname) So I am beginning to think that the airbase name is the problem and that is why my error is occuring randomly. That is, the red cap can spawn from 3 different airbases chosen at random from Sukhumi, Nalchik and Mozdok. So looking at the last few posts in this thread it sounds like I should be using 'Sukhumi-Babushara' instead of Sukhumi in my script? or have I misunderstood? I'd try by experimentation and avoid asking the question here but I'm at work for the next 8-10 hours and I'm curious to see if my problem is due to Sukhumi being randomly chosen and I'm using the wrong name. Which then explains why sometimes the problem goes away if only Nalchik and Mozdok are chosen. Thanks, Stonehouse Here too, thanks Stonehouse for keeping this alive. I will try to pick up here in the next weeks and see what is happening, what I can remember... :music_whistling: [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Stonehouse Posted September 7, 2014 Posted September 7, 2014 Not to worry m8, that's what the community is for after all.
SNAFU Posted October 16, 2014 Author Posted October 16, 2014 I reworked this script a little in regard of "waste mangement" and idle or damaged planes should now be removed more reliably. Furthermore I added textmessages to the script, to simulate Radio traffic in the most pragmatic way I could find. For warning the player of AI activity around, the aircraft will trigger messages to the coalition it belongs to, reflecting the phase of the procedure the craft is in. As example an RFF IL78M spawned on Kutiasi: "Kutaisi, RFF5897, IL-78M, taxiing to active runway!" [unit spawned on Apron] "Kutaisi, RFF5897, departing active runway and leaving control zone!" [(2nd of Flight) Unit started takeoff roll] "Kutaisi, RFF5897, airborne" [ (2nd of Flight) Unit is 15m above ground] "Kutaisi, RFF5897, is bearing: 308 for 3 nautical miles at altitude 1800, leaving control zone." [(2nd of Flight) Unit leaves triggerzone you have to set in the ME around airfield] "Tbilisi-West, RFF5897, is N42,125 - E 042,045 at altitude 20000, checking in." [(1st of Flight)Unit enters triggerzone "trafficzone"] "Kobuleti, RFF5897, is bearing: 102 for 3 nautical miles at altitude 2000, for landing." [(1st of Flight) Unit enters triggerzone you have to set in the ME around airfield] "Kobuleti, RFF5897, on final!" [(1st of Flight) Unit is lower than 500m above ground] "Kobuleti, RFF5897, touchdown!" [(2nd of Flight) Unit is lower than 15m above ground] "Kobuleti, RFF5897, runway vacated!" [(2nd of Flight) Unit is not moving anymore and taken out of game] Files and updates in the first post. [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Vespa Posted October 19, 2014 Posted October 19, 2014 (edited) Just to make it more clear...since I'm not sure how Mission Editor and additional script works.. 1. Download Speed&Grimes MIST 2.0 script collection Do you mean MIST 3.3? http://forums.eagle.ru/showthread.php?t=98616 Do I need to place MIST script in any specific folder? For example C:\Users|{username}\Saved Games\DCS? 2. .... 3. Open the trigger page 4. Below you find a row with which you initialize the MIST 2.0 file I'm lost....I don't see any row to initialize MIST 5. Choose airfield nr 1 you want to have traffic on, place a trigger zone with the name "airfield1" over the airfield. Write the name of the airfield, in the script in line 12 6. Choose airfield nr 2 you want to have traffic on, place a trigger zone with the name "airfield2" over the airfield. Write the name of the airfield, in the script in line 13 7. Choose airfield nr 3 you want to have traffic on, place a trigger zone with the name "airfield3" over the airfield. Write the name of the airfield, in the script in line 14 8. Place a triggerzone called "airlanehub1" somewhere on the map. The radius of the zone defines the spread of points the planes will fly to after take off. (They take off fly to a random point in the zone and land at a random airfield (1-3)) 9. Create a "Once->Time more than 1 seconds -> Do script file (load the script)" Trigger 10. Start the mission You can edit the script randomization in a way, that you only spawn planes of certain nations or types in lines 26-28. "math.random(x,y)" means it chooses a random value in the range of [x,y], so if you edit x and y you can define the range aircrafttypes and therefore nations, because every type is only available for one nation, except a few like Uh-1, Mi-8, Yak-40 and the like. In line 10 you can edit the spawnintervall, if you feel the map gets too crowded, or you want to have more traffic. Edited October 19, 2014 by Vespa
SNAFU Posted October 20, 2014 Author Posted October 20, 2014 Hi Vespa, 1. Yes, you can use MIST 3.3. Here you find the latest 3.5 afaik. http://forums.eagle.ru/showpost.php?p=1622305&postcount=3 2. No. The script file does not need to be in a specific folder. 3. Below the 3 grey boxes you see the line INITIALIZATION SCRIPT: Here you have to initialize MIST 3.5. You can also create a new trigger type on the same page as MISSION START and then under ACTIONS chose the action DO SCRIPT FILE and initialize MIST with this trigger. Important is, that you initialize MIST before you run any script, which uses functions defined in MIST. You can take a look at the example file I uploaded in the first post ( randomairtraffic_scripttest.miz (58.7 KB, 6 views)) and see how it is done there. The GUI manual provided by ED might also be helpful for understanding the ME basics as creating trigger zones and triggers. It is no rocket science and can be fun. ;) [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Vespa Posted October 20, 2014 Posted October 20, 2014 Thanks a lot for feedback and info...I'm trying to get deeper into LUA and ME. Really appreciate your patience
johnv2pt0 Posted October 21, 2014 Posted October 21, 2014 This is great! Thanks very much for working on it and sharing
Vespa Posted October 22, 2014 Posted October 22, 2014 Snafu, in your script you randomly define the ac type...where did you get the list of number AC for each AC type? I don't find any list in the ED wiki. Thanks for feedback
theGozr Posted October 22, 2014 Posted October 22, 2014 So which should we download and try ? Thx Fly it like you stole it..
SNAFU Posted October 23, 2014 Author Posted October 23, 2014 Snafu, in your script you randomly define the ac type...where did you get the list of number AC for each AC type? I don't find any list in the ED wiki. Thanks for feedback There is no such list. I put every AC with a defined skin and loadout into a mission and opened the mission file (use winrar or 7z to open *.miz file), picked out the tables and put them into my lua file. :smilewink: So which should we download and try ? Thx Depends on your taste. The both do the same. You have to set some parameters in both versions, depending if you want to have traffic with only western or russian planes or only fixed wings or only tactical etc. In both cases you have to define the airfields in the script an in the editor (maybe I improve that part). That should be explained in the first post. :music_whistling: the r5 version has no text messages for the simplified the radio traffic. r6 prints out text messages as outlined on page 1 with the idea to give players around a heads up, while taxiing, in close pattern or the like. [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Doum76 Posted September 2, 2015 Posted September 2, 2015 I'm so not into scripting, this gives me a headache :( I'm trying to make in my mission some spawning using the radio comm, this works as i used RAF Automan,s script, but i'm trying to make my spawn random altitude, how could i achieve this huge puzzle? :(
Recommended Posts