Jump to content

Autonomous CAP and GCI AI fighter script


SNAFU

Recommended Posts

Thx HiJack, my squadmates tested the script on our dedicated server too and reported very low FPS too.

 

Might be related to the script as you point out. Maybe I find out while further testing tonite. Would be a pitty if this can only be used in SP.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Thx HiJack, my squadmates tested the script on our dedicated server too and reported very low FPS too.

 

Might be related to the script as you point out. Maybe I find out while further testing tonite. Would be a pitty if this can only be used in SP.

Agree, it must be MP possible. I think it is important to start off with a clean new mission and just a few countries on each side. Just add the script and no other AI flights and then test with these settings and human players.

 

I inspected the logs but there were no script errors.

Link to comment
Share on other sites

@uboats, I think I see what you want ie a matched response to whatever unit the player is flying or unit that is intruding over the border so that P51s are met by FW190s, F16s by Su27s, F86s by Mig15s etc. Possibly also some sort of plane set validation?? So F86s only go against Mig15s???

 

Something like that. Coz personally I want a map scalable for wide period of planes. Script partially works, and is still under tuning.

 

One question, I found that sometimes the GCI was sent towards intruder, but when GCI was quite close to the intruder, the GCI disappeared. Sometimes this happened during GCI taxiing.

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

Sounds strange, only thing I can think of is that part of the GCI flight got stuck while taxiing or the airfield is "slow" from the viewpoint of getting planes in the air (Beslan is a good example of a "bad" airfield for throughput) and the stuck planes time limit kicks in and despawns the group because a flight member is still on the ground in the process of taking off while the rest are airborne.

 

I'd suggest going into the script, find the airfieldwreckagecleanup function and the if condition

 

if (currentaircraftunit:inAir() == false and currentaircraftunit:getLife() <= lowerstatuslimit) --XX4

or (currentaircraftunit:inAir() == false and stucktime >=900) --XX8 change 15 mins life for stuck aircraft

 

and change the 900 to be 1800 and see how you go.

Link to comment
Share on other sites

  • 2 weeks later...

Well not sure if it is relevant to people anymore since the reported MP issues but I'm now down to finishing the simple logistics system. Had trouble with doing things in the apron clean up and via the spawning sections so I'm going to try to do it via the world events. So a takeoff event = -1 supply to a side and a landing = +1. Assuming I can get it to work that will make it at the airframe level so give a more accurate count of supply v's losses. Airbases thing with mixed human and CAP/GCI bases definitely is working, no cap switch is working but I think it will get broken by Snafu's rework removing the interceptmain function so will have to rejig that. Fixed a bunch of issues around stuck aircraft and also now have the GCI messages configurable to use metric or imperial.

 

But it seems like unless the lag issues in multiplay can be solved that further advances in the script functionality just make the issue worse as complexity increases so it's kind of a dead end unless things change. Any progress or thoughts on what can be done to fix things or even where to start looking? I have done some research on co-routines but it looks like a fairly major redesign to sort that out.

Link to comment
Share on other sites

I'm trying to get the Mig-21 as an intercept/cap flight....i keep getting game freezes at 40 seconds...no error....can some one plz have a look and try to get the mig-21 spawning in correctly

 

MIST3_4_GCI-CAP older Migs.lua

 

 

 

 

I got it set up for random (1,1) for redcap spawn to see the mig21 spawn....if you change it to include the othe planes it will just skip over the mig21 and spawn the other planes...but when you force the 21 to spawn the game freezes...

 

 

my mission file so you dont have to set up the zones.....I think I left an older script version in the mission trying to get the mig-21 to work..

 

GCI-CAP8.miz

 

this has more then one script in it...grimes exploding missile, random traffic for blue and red, respawning tankers, IADS by grimes....its basically my go to mission editor file....

It only takes two things to fly, Airspeed and Money.

Link to comment
Share on other sites

Usually that sort of thing is due to payload specs (ie you have got something wrong and the unit won't spawn) in the old versions of the script. I can have a look over the next couple of days if I get some spare time but you may find it quicker to convert to the newer version of the script which will pick up your caps and gci aircraft configurations from late activation units placed on the map

Link to comment
Share on other sites

kk

 

 

edit...I played alittle last night....didnt get the new version to work....will put more time in it after work....

 

...old version still has problems with new mig21...spawns other AC just fine...

 

 

 

 

...and the speeds are too low for a mig21 or mig23....they dont do good trying to patrol at 280kph....

 

... GCI-CAP8.miz ... this is where I left off last night, if anyone wants to take a look... still old version of script..... new auto version seem to have problems with random traffic script maybe... I will start from scratch tonight to better trouble shoot the problems... and only having to turn all un-used airbases to neutral kinda defeats the purpose of this mission...


Edited by Davis0079

It only takes two things to fly, Airspeed and Money.

Link to comment
Share on other sites

alright, i got it...

 

...was some bad on my part, but I did find something interesting....after I added the mig-21BiS to the line up I started getting bad freezes...so i debugged and rewrote the sloppy stuff I modified....now i dont get any errors that I know of...BUT!!!...the Mig-21BiS is a problem for this or mabey other scripts....

 

heres what is happening to me...now I jumped back into DCS after a few months off, so this may be known....when I make this script load a mig-21 it will take 40 seconds from the start of the mission to spawn, at this point i get a bad freeze....BUT!!!....if I add a mig-21 anywhere on the map and mark it as uncontrolled then run the mission....without changing anything else...at 40 seconds into the mission when the Mig spawns I have no problems....

 

....So, if a new Mig-21biS is already loaded into the mission I have no problems....But if I run the script and it trys to load a Mig-21, if its the first one to be placed on the map, I get a bad game freeze while the Mig loads in....

..my game freeze will eventually push through, at first I didnt know this, but after many trys I finally saw it win after like a minute or two...

 

 

....certainly not a big deal since I'm using an older version on the script...

 

...heres the .MIZ GCI-CAP8.miz , try to load it with the uncontrolled Mig-21 at Sochi...after that, remove the Mig-21 and try again....this will answer if this is just me or can it be reproduced..

...here is the working "old" version of the script MIST3_4_GCI-CAP older Migs.lua ,

It only takes two things to fly, Airspeed and Money.

Link to comment
Share on other sites

I'm sorry Davis I haven't looked at it as I badly pulled thigh muscles over last weekend and am due for cortisone shots tomorrow and can only bear to sit at the keyboard for short periods. Interesting what you say though. I haven't experienced any issues with the Mig21 and this script but it arrived at the same time as the "new" version using template aircraft already placed as late activation aircraft to pick up CAP/GCI type, skin, skill, loadout etc. So probably I just sidestepped the issue completely.

 

@Phantom, you always get a pause when a spawn takes place due to loading the aircraft, textures etc but it sounds like the Mig21 is problematic. Are the Mig21s only player aircraft ie not one of the CAP or GCI groups?

 

If so try an experiment please and stick one onto the map being careful NOT to name it __CAP or __GCI as per the script instructions and make it uncontrolled and late activation. It can be anywhere you want as it will never be in play. See if it changes the pause for the better. Then try removing the late activation but make it uncontrolled still (probably need to place it on the ground somewhere this time). This time it will be in play but never "turned on". See what happens to your pausing. let us know how you go. Might be a bug for leather neck to look at

Link to comment
Share on other sites

Just to clarify that I concur with the observation the MIG21 is problematic, none of us in our group get any pauses of any significance when joining with any other type of aircraft, only with the MIG21 do we all suffer a severe pause, to the point now we give each other a heads up with that plane when spawning in case someone is on finals or pointing at the ground etc :joystick:

Link to comment
Share on other sites

  • ED Team

MIG-21 Issue is a general Multiplayer issue and has been reported.

 

The Autonomous CAP and GCI AI fighter script is working great in one of my missions :)

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

yes...I've got the script working great....it was just a side note, the new mig-21 module has a need for resources when first loading in.....and if its the first mig-21 on the map it can cause temporary freezes....like it loads more then the normal modules we had in the past....

 

 

...P.S. that mission I linked is secretly a free flight mission (that I use to play/build with)...it may one day be called "Black Sea Alive". Its borders, but with conditions (dont cross the borders). If you stay in your area your good to go, but flying too far is deadly. Turmoil centered in Abkhazia. Much respect to grimes for IADS and all those putting effort into this CAP/GCI script. Add in a little ambient life from the random air traffic script and flying single player can be a full experience.


Edited by Davis0079

It only takes two things to fly, Airspeed and Money.

Link to comment
Share on other sites

Hi Davis,

I think you must be as tired as me lol. Anyway it's getting close to midnight here so I will keep it short. The root cause for your problem was that you haven't got Mist set up to load prior to the GCI/CAP script.

 

Couple of other observations is that you may get funky behaviour with how you defined the borders. Remember these border units never spawn so you don't need to give them take off and landing waypoints. They can all be turning or flyover waypoints. Other thing is more important - I really recommend you use a mission start trigger to load Mist and the GCI/CAP script as this will fire before anything else in the mission goes anywhere. Using the old style once on time more 10 leaves you open to potential problems when you are building a complex mission and I guess I would class it as a bad habit to avoid.

 

Once mist was loaded the problem appears to be resolved. Modified version below.

 

Cheers and G'Night,

Stoney

GCI-CAP99stoney.miz

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for this nice script, we had a lot of fun in the last 2 Weeks. :-)

 

By the way is there a option to disable the GCI Message?

Module: viel zu viele...

Warte auf: Fulda Gap, MiG-23, xy (4th. Gen RED) und mehr neue und alte Propeller wie P-38, Corsair, DC-3, Transall, Tucano usw.

 

Projekt: OpenFlightSchool -> Thread

Link to comment
Share on other sites

No changes since 17th Oct version released. Snafu has been keeping the first post in the thread up to date. The new work in progress version is proving........problematic.. shall we say. I have some time off coming up over Christmas and hope to spend some hours that are actually consecutive on fixing the remaining issues. Still no real fixes though for the MP lag that seems to happen I'm afraid and it's appearing to be out of my league coding wise and even to find the root cause using methods other than guess work and trial and error.

 

Cheers,

Stonehouse

Link to comment
Share on other sites

I couldn't get the your latest version to work properly Stonehouse. I narrowed it down to the airfield detection. I tried turning debugging on but failed.

 

After i commented it out and used the old code where you type in the airfields manually it worked again.

 

I can do some more testing if you help me get debugging to work.

Missionfile: https://www.dropbox.com/s/on9yxelemwy97wd/Operation%20Steel%20Rain6.miz?dl=0

[sIGPIC][/sIGPIC]

 

We are looking for Swedish members!

http://www.masterarms.se

Link to comment
Share on other sites

Ok will do. It seems that the airfield side of things in the last release is giving people headaches. You aren't the first by a long shot.

 

<edit> I downloaded it and had a quick look and although I won't have time to do more this evening I did see a few things. The major thing I think is you have 3 red cap zones but the GCICAP script is only set up to have 1. Other minor points you have some red units outside the borders so perhaps stretch the western red border a little further west to include them. It's probably not important but your borders don't quite have the first and last waypoint on top of each other. Last one I guess is just style, I would replace the two once triggers with a single mission start trigger with two actions - loading mist first and then GCICAP. Messages as you want although the script tend to load so quick that you don't really see a "mist loaded" message before the "GCICAP loaded" message overlays it.

 

I won't get back to looking at it further until tomorrow after work but see if the cap zone thing and the border thing helps you get it going.


Edited by Stonehouse
quick feedback.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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