Jump to content

Stonehouse

Members
  • Posts

    1484
  • Joined

  • Last visited

Everything posted by Stonehouse

  1. Quick performance related question, had an idle moment at work and thinking about CAPGCI improvements that I might be sufficiently lua skilled to do went googling after running the code inspection part of pycharm over the script. One of the thing it flagged was the large numbers of global variables and google info seemed to agree that because the global vars are stored in some sort of high level hash table the script performance is reduced because it has to access the hash table before using the variable. My question is - would this generate decent performance returns for not too much effort other than some analysis to determine which variables really need to be global? It sounds like it might but wondered if some lua guru's would tender some helpful feedback if they have time? Thanks, Stonehouse
  2. Not your fault, just your plain bad luck. You've picked a early 2015 version of MIST that had a bug that impacted this script. Grimes did a hot-fix not long after releasing 3.6.43 to fix it but that particular version will cause exactly the problem you are finding. I updated your mission to the latest version of MIST and test ran it - no problems at all and the CAP GCI script side of things worked fine. So just update MIST, get rid of your old versions so you don't make the mistake of using them accidently and enjoy! Cheers, Stonehouse
  3. There is a demo mission in the github download @ http://457stonehouse.github.io/GCICAP/
  4. So you overlayed the blue territory over a portion of the red? Nice lateral thinking and quite obvious once you consider it. Looks like I need to rewrite some parts of the manual and give examples of changing various variables in mission as well as have a good close look at which ones you should not change because it will stuff things up. Some very exciting things could be done and quite possibly instead of adding things like recon flights and script generated CAS flights to this script you could modularise things and use non local tables and variables to pass info about. S!
  5. Basically the isTargetDetected function didn't work for an AWACS and I haven't yet found what does. Ditto for ship radars from memory. Have a look at Ajax's AWACs script (don't have the link handy right now sorry) for the players to use for intercept guidance. Much better than my attempt at GCI messages. Doesn't assist with AI CAP and GCI flights using AWACS to be triggered though. From what I understand however if you put a tanker up the script aircraft will refuel rather than RTB courtesy of internal DCS logic.
  6. Thank you. You've got me thinking about it again, the same principle also applies to other controlling variables if done with care. The logistics side is one such place, it should be possible to add resupply now based on a trigger condition in the mission, like a ship arrives in a harbour or a flight lands at a base ;D. Very nice! thank you again. PS the mission also sounds like a winner too
  7. That's really interesting it was so easy although I'm so bogged down with work at the moment I haven't really been thinking about the script much except to support people asking questions. Yes the script initialises the tables for the airbases for each side at the start only but agree it is definitely doable even for me - not new to programming but only really began looking at lua very recently so struggle with it at times as it is quite different to what I normally work in. I'd be very interested in seeing your mission and version of the script when you are done if you are willing to share.
  8. Ok you will need to tweak that quite a bit to get the balance right. At the moment if the borders are present intercepts will only be launched against intruders ie blue will launch against detected red aircraft in blue airspace and vice versa. So you will get red launching on the intruding blue aircraft but you will not get blue launching across the border to help the blue aircraft under attack in red airspace. To get something like that you would have to go for no borders and position the radars very carefully or perhaps place some near the border but have them off until a trigger turns them on and some at the rear to cover the general centre of the sides airspace. It would take some experimentation. Additionally at present the script doesn't really handle airbase captures (in case that is in your mind) although that plus making the border be able to be switched on and off during the mission is on the dream list for enhancements. Radar detection is pure DCS and the script just uses the features. I believe terrain masking is part of the DCS ground radar model but could be wrong.
  9. There are not really any hard and fast rules and you can change size of zones and whether they are right on the border or further back and whether the airbases where the CAP flights launch are within the zone to help balance and control the pace of the mission ie how fast it turns into a furball. Usually I would say at least 20kms though unless your mission needs to have them smaller. That's really just to give the guys on patrol some room to fly around in. Also how close to the border you place the radar units has a reasonably high impact as well. ie the sooner intruders are detected the sooner flights will launch to intercept. This is particularly the case when you have borders turned off. If you have a look on the github site (link in post #1 in thread) you'll see a pdf manual to download which does go over some of this sort of thing. Realistically though you need to think about what you would like to see happen, place the zones and radars etc accordingly and then play test and tweak until you get the mission you want. I usually start with the border, then the airbases and objectives and go from there trying to come up with a plausible deployment that also gives me the pace of mission I want. Hope that helps a bit. Cheers, Stonehouse
  10. Yeah we've had discussions about micro stutters and such previously and basically it appears that it is getting to be too much happening under the covers. Unfortunately of all the people who have been involved in getting it to this point none of us are sufficiently good at lua to rewrite it for better performance. Which is a shame as one of my long term hopes was to add recon and auto generated ground strikes against targets the recon flights spot but even the last wip version which was to fix up some logistic issues has bogged down due to real life work and home pressures. Maybe my next vacation will help it get finished lol. Cheers, Stonehouse Cheers,
  11. Hi Quax, Ok downloaded your mission and went through it and the issue is actually only small but unfortunately as I know too well myself is sometimes hard to spot. The problem is that the script is expecting the CAP and GCI templates to have __CAP__ and __GCI__ prefixes but you have only a single underscore ie _CAP_. That's all that is stopping it from working. As an FYI I did my test runs of your mission with MIST 3.7.48 where you are using 3.6.44 so you may want to upgrade the version you are using as there was a particular release of MIST that had some problems in the 3.6 series. Can't remember the exact one sorry. Only other thing to perhaps suggest is that I feel sorry for the P51s trying to intercept the Tu95s as they don't have much chance considering they are slower and have to climb to the Tu95s height. Maybe give the Tu95s a lower height and speed. On the other hand the 109s have a much happier time with the B29s lol ;D Also if you turn off the alert messages (which I understand as they do tend to spam things a bit) you may want to look at Ajax's AWACs script which works very nicely to act like a ground controlled radar intercept system for players. Cheers, Stonehouse
  12. Hi Quax, Sorry for lack of response I've been away for the last couple of weeks and couldn't access the internet much where we were. Anyway just got back this afternoon so will check out your test mission as soon as we're unpacked and back to normal. Should get back to you in the next day or so. Cheers, Stonehouse
  13. Lots more info and help here too http://forums.eagle.ru/forumdisplay.php?f=210
  14. Really nice work as usual. Thanks.
  15. Not sure, you have noborders = 1 so as soon as the ground radars detect an enemy aircraft they will order GCIs to launch. Perhaps double check the radar ranges rings on the map they may see further than you realise - if you are getting GCI messages then the targets have been picked up by radar. To be honest these days I find Ajax's AWAC's script to be much better than my simple GCI messages and I am using the GCI messages almost as a debug message to tell me when something gets detected and turn them off for the finished mission. You are right though and they do hog the message box particularly if there are a lot of intercepts happening. Don't have a link handy but if you do a search you should find it. Cheers, Stonehouse PS actually do have a link http://www.159thgar.com/forums/viewtopic.php?p=75796&sid=fed0e9563766f3c802019398a141e04b but please be sure to credit Ajax if you use it
  16. Hi Klem, Ok looked through your mission and found the following things for you to look at. I think your main problem is you've somehow got some files misnamed and so got tangled up. First up in your posted mission file the file you've named MIST.lua is actually a out of date copy of the GCICAP script so will straight away be responsible for the error you are seeing. I suggest you replace this with a fresh copy of Mist 3.6.44 (https://github.com/mrSkortch/MissionScriptingTools/releases/tag/3.6.44) Second the version of GCICAP you are using is out of date please go to http://457stonehouse.github.io/GCICAP/ and get the latest which will also give you a comprehensive manual for the script. Lastly three other points some minor and one major: You have one of your border helicopters not set as late activation so it appears in mission You have one of your blue cap zones named bluCAPzone1 (or 2 sorry can't remember which it was) rather than blueCAPzone1 When you have edited the GCICAP script you have gone down into the part which is normally not edited (circa line 279 in your copy of the script) and changed things so there is: This isn't something you want to do as what the script actually does is append the string 'redCAPzone' to the number 1 up to the max number of red cap zones you have defined and go looking for the trigger zone with the constructed name (ditto for the blue ones). What you have done will break the script entirely unless you follow through and update all the relevant code portions. Have a read of the manual when you download the new version of GCICAP and if you have questions then post them up and either myself or one of the others experienced in using the script will happily help you out. I did get a version of your mission running the GCICAP script after taking care of all the above but didn't attach it as I basically removed everything that wasn't GCICAP related to make it easier to figure out the issues. I strongly recommend to everyone using GCICAP to make that the very first thing you put in your mission and verify it is working before adding additional layers as going back and trying to find the issues later is much harder. Cheers, Stonehouse
  17. No worries Klem, the error seems to indicate that mist is not loaded prior to GCICAP running but will look at the mission and let you know what I find. Cheers, Stonehouse PS I am just the latest custodian there have been quite a few hands involved in getting GCICAP to this point ;D It definitely is not all me lol
  18. Ok that's interesting, possibly it is a side effect of me making the reset task interval so long. There is an interceptor RTB routine already that is supposed to send them home/back to zones if no border violations are in progress or if no borders then no hostiles on radar and there is similar to your code snippet Hijack in the reset task routine. All I can think is that either DCS internal logic has taken over - ie they have spotted something enemy so hang around - or there is a problem in the code although I've no idea what at this point in time. There is an intermittent problem with CAP fighters getting seemingly lost and flying right off the map and returning much later presumably low on fuel but as I said it only happens occasionally and I've never been able to figure out whether it is a script error or a DCS error like the landing in pairs close formation issue. By the way the CAP and GCI aircraft will hit ground targets or aircraft on the ground so potentially that is what they are seeing???? I will try to see if I can see something like you describe while testing the new version and if found try to correct it. It may also be tied up with the ROE changes that happen when they are assigned an intercept. <edit> Greyl, I can't remember off the top of my head and I'm on a 5 min loo break between pouring loads of concrete so can't spend time checking but if the red radar coverage encapsulates the blue bases or comes near you may reduce the CAP camping issue by moving them rearwards a bit so that incoming intruders are picked up closer to the border and intercepted later leaving the CAPs further away from nice snacks.
  19. Correct. The problem was due to the update to Mist having some backwards compatibility issues. New version of GCICAP is in progress and I am sorting bugs coming out of testing in between concreting and landscaping during my "holidays". Funny how a wife and a husband can view the same period of time differently lol
  20. Apologies, must be tired. I just plain forgot to come back to here and update the thread after the issue was dealt with in the Mist thread. Mist version 3.6.44 solves the problem and is now the recommended version for GCICAP.
  21. Hi Greyl, I've had a look through it and have some observations and thoughts that may be of help. First weird thing though, I've looked carefully through each of your triggers and cannot for the life of me see the one that does the DO SCRIPT FILE for Mist. Perhaps the copy of the mission you uploaded had accidently had that trigger removed or perhaps I am just blind lol as you have quite a few triggers. Anyway specific to the CAPGCI script. You have specified zero cap groups and zones and allowed 2 flights for GCI for blue. Setting zero cap groups and zones is quite expensive as you will still execute all the code but generate no CAP. If you want no caps for blue there is actually a parameter noblueCAPs at line 92 that should be set to 1. This will skip over all the CAP related code for blue and save some cycles for you. By setting 2 flights for GCI you are telling the script that you want up to 2 GCI flights for blue but then you specify no blue GCI template aircraft. So the script will be doing a lot of effort again with no chance of success. If you want no blue GCI planes then best to set numberofspawnedandactiveinterceptorgroupsBLUE to 0. Some general thoughts. You have a lot of triggers with the same conditions including about 4-6 mission start triggers with no condition at all. I have no idea how DCS determines which order to fire these triggers in and feel that basically if there is a dependency you are leaving it up to chance. Additionally it possibly is more expensive performance wise as you are forcing multiple evaluations where you could do one mission start trigger with multiple trigger actions. eg, one mission start which has a do script file for Mist, GCICAP, CTTS, Medivac probably in that order but definitely mist first. This means that for one evaluation you get the scripts run in a guaranteed order. You also have a LOT of once triggers with exactly the same or similar conditions. Perhaps you want a different random chance for each one so haven't grouped the actions under a single trigger and in which case fine but if you aren't concerned about that then I would have one once trigger for a given condition and then have multiple trigger actions for that trigger rather than many triggers with the same condition. I believe that each trigger would be a very small performance hit as every one is evaluated every sec and your micro pause looks to be roughly every sec to me running it on my PC. Activating groups also will create a pause although much less than spawning in a group, most of your activations seem time based. I don't know exactly the overall plan for your mission so this next thought may not be relevant but it looks to me that the activations are happening well outside any possible player view so perhaps you should add a zone to the conditions so that activation only happens when a player is within 20-30 kms of a group? Anyway try the changes for GCICAP and see if there is any improvement your end. Hope something above helps you. Best wishes, Stonehouse
  22. That worked fine Greyl. I will check it out somewhere over the next day or so and get back to you. Cheers, Stonehouse
  23. Hi Greyl, Assuming you haven't changed the code then the only way you should be seeing that message is if you have debuggingmessages at line 103 set to true. I'm pretty sure Pikey's problem was that he was editing the script outside DCS and thinking that the changes would automatically be picked up next time he went into the mission editor. DCS doesn't work that way as you may already know and instead a .miz file is like a zip file and it contains a version of the script (ie not the one you edit) and the most sure way to refresh this version you need to delete the DO SCRIPT FILE trigger action for the script, save the mission and readd the DO SCRIPT FILE trigger action. Anyway yes debug on will cause you stutters. The other issues you mention are sounding like mission set up not being quite right. If you want to post up the mission I am happy to have a quick look through and try to help you sort it out. Cheers, Stonehouse
×
×
  • Create New...