gromit190 Posted December 11, 2017 Author Share Posted December 11, 2017 (edited) Hi Tyrannik! Hmm, can't see any errors with your script. I'll have to try it myself (this evening (GMT)) to see if I can figure out why it isn't working. Meanwhile, maybe you could try testing the example code from the getting-started-guide to see if any AutoGFT script is working for you? If not, then it's probably nothing wrong with your code, but with how the mission is configurated. EDIT: Scratch that, the cause of the issue has been found... Edited December 11, 2017 by gromit190 Autonomous ground AI project Link to comment Share on other sites More sharing options...
gromit190 Posted December 11, 2017 Author Share Posted December 11, 2017 Your code gave the following error (picture): Did you get this error? If not then I'm not sure the script is even loaded to your mission. Anyways, adding task group and specifying units (i.e. not using pre-added units to define your task force), you need to specify a country. I modified your script, and ran a successful test. --Blue Ground Forces autogft_Setup:new() :setCountry(country.id.NORWAY) :addBaseZone("BLUE_BASE") :addControlZone("OBJECTIVE_WEST") :addControlZone("OBJECTIVE_EAST") :setCountry(country.id.USA) :setSkill("High") :setSpeed(30) :setMaxRouteDistance(5) :setAdvancementTimer(300) :addTaskGroup():addUnits(6, "Leopard-2"):addUnits(8, "Marder") :addTaskGroup():addUnits(2, "Gepard"):addUnits(2, "M1097 Avenger") :setReinforceTimer(300) --Red Ground Forces autogft_Setup:new() :setCountry(country.id.RUSSIA) :addBaseZone("RED_BASE") :addControlZone("OBJECTIVE_EAST") :addControlZone("OBJECTIVE_WEST") :addTaskGroup():addUnits(8, "T-72B"):addUnits(10, "BMP-2") :addTaskGroup():addUnits(4, "ZSU-23-4 Shilka"):addUnits(2, "Strela-10M3") :setSkill("High") :setSpeed(30) :setMaxRouteDistance(5) :setAdvancementTimer(300) :setReinforceTimer(300) Autonomous ground AI project Link to comment Share on other sites More sharing options...
Tyrannik Posted December 12, 2017 Share Posted December 12, 2017 (edited) Thank you! That worked! Not sure why I wasn't getting that error before to be honest, it definitely seemed to be loaded... Anyway, now I have a new problem. I'd like to use the USAF Aggressors as the enemy, but only Russia seems to work, no other countries. Is there a list of which countries work with the script? Or is there something I'm doing wrong? I went to the db_countries.lua and used the "AGGRESSORS" from there but none of the names work. I even tried other countries like Ukraine etc. Nothing seems to work other than Russia. Very confused by this, to be honest. Thanks in advance. Edit: I should mention, Russia is on BLUE in this mission, hence my predicament. Edited December 12, 2017 by Tyrannik Link to comment Share on other sites More sharing options...
gromit190 Posted December 12, 2017 Author Share Posted December 12, 2017 If I understood your question correctly; you want Russia to be in the BLUE coalition? I think you have to select which countries are in the RED/BLUE coalition when you click "New mission". Here's a screenshot of the menu. Autonomous ground AI project Link to comment Share on other sites More sharing options...
Tyrannik Posted December 12, 2017 Share Posted December 12, 2017 Well Russia and USA was on Blue, so I wanted to make the USAF Aggressors country be the red armor. Unfortunately it didn't want to spawn anything unless I set the country.id to Russia. Link to comment Share on other sites More sharing options...
gromit190 Posted December 13, 2017 Author Share Posted December 13, 2017 I see. Please post your script so I can test it. Autonomous ground AI project Link to comment Share on other sites More sharing options...
Tyrannik Posted December 13, 2017 Share Posted December 13, 2017 I see. Please post your script so I can test it. Here you go. The mission had Russia and USA on Blue, and the USAF Aggressors on Red. --Blue Ground Forces autogft_Setup:new() :addBaseZone("BLUE_BASE") :addControlZone("OBJECTIVE_WEST") :addControlZone("OBJECTIVE_EAST") :setCountry(country.id.USA) :setSkill("High") :setSpeed(30) :setMaxRouteDistance(5) :setAdvancementTimer(300) :addTaskGroup():addUnits(6, "Leopard-2"):addUnits(8, "Marder") :addTaskGroup():addUnits(2, "Gepard"):addUnits(2, "M1097 Avenger") :setReinforceTimer(300) --Red Ground Forces autogft_Setup:new() :addBaseZone("RED_BASE") :addControlZone("OBJECTIVE_EAST") :addControlZone("OBJECTIVE_WEST") :setCountry(country.id.AGGRESSORS) :setSkill("High") :setSpeed(30) :setMaxRouteDistance(5) :setAdvancementTimer(300) :addTaskGroup():addUnits(8, "T-72B"):addUnits(10, "BMP-2") :addTaskGroup():addUnits(4, "ZSU-23-4 Shilka"):addUnits(2, "Strela-10M3"):addUnits(1, "Tor 9A331") :setReinforceTimer(300) I tried a number of different codes for the USAF Aggressors, including AUSAF and even the id # itself, which I believe was 7. Nothing seemed to get them to spawn, only when I chose Russia would they spawn a bunch of blue T-72s etc. Thanks in advance. Link to comment Share on other sites More sharing options...
gromit190 Posted December 14, 2017 Author Share Posted December 14, 2017 So I gave your script a go today, and red, USAF Aggressor units are spawning in the mission. So I'm not sure why they are not spawning for you. Maybe you could create a new mission and just create a simple test where it is failing for you, and upload the test mission so I could take a look at it? I put the working test mission here, if you want to have a look (maybe spot what we're doing differently): https://drive.google.com/drive/folders/1N2HuzNlB9T_tmODJuJWakWxI4WspFJi5 Autonomous ground AI project Link to comment Share on other sites More sharing options...
Tyrannik Posted December 18, 2017 Share Posted December 18, 2017 Hi, sorry for the late reply. I tried the script in another mission and it seemed to work fine again... Not really sure what changed to be honest, but thank you for the help anyway. Link to comment Share on other sites More sharing options...
gromit190 Posted December 18, 2017 Author Share Posted December 18, 2017 Glad to hear! Any errors in AutoGFT should result in a (popup) error message. I suspect that your mission not showing any error messages and the faulty spawning is related somehow... Let me know if you run into any other challenges using AutoGFT Autonomous ground AI project Link to comment Share on other sites More sharing options...
dooom Posted January 2, 2018 Share Posted January 2, 2018 hey gromit - im curious ... does this work with ships or infantry yet? ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
dooom Posted January 6, 2018 Share Posted January 6, 2018 so i tried this in an urban setting to see how an infantry firefight would unfold. I observe that if neither side has completely killed their opposing group before running out of ammo that they will simply begin to ignore one another and run past each other toward objectives. Q: is it possible to have groups out of ammo return to BASE and trigger a replacement spawn? OR is it possible to trigger a reinforcement spawn once a group is out of ammo? the other observation i noted with infantry in urban settings is their desire to assume a wedge formation - can the formation be easily changed to a "tighter" group formation for urban fights? ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
doodenkoff Posted January 6, 2018 Share Posted January 6, 2018 The infantry units in DCS can barely even be considered AI. More like random pixels bouncing around. What I meant to say was, this is one of the most entertaining and useful mission tools I've had the pleasure to mess around with. Many thanks to those responsible. Win 10 | i7 4770 @ 3.5GHz | 32GB DDR3 | 6 GB GTX1060 Link to comment Share on other sites More sharing options...
gromit190 Posted January 11, 2018 Author Share Posted January 11, 2018 (Please forgive me for another late reply) Thanks for the feedback! I haven't tested naval or infantry units with AutoGFT. I highly appreciate any feedback from those that do. Pikey tested naval units earlier and according to him it didn't work. I assume that it still doesn't, unfortunately. I observe that if neither side has completely killed their opposing group before running out of ammo that they will simply begin to ignore one another and run past each other toward objectives. Groups will advance if they are inside a zone with no enemies. I could add a condition here to check if enemies are present (not just in the zone in question, but near it). (Issue) Q: is it possible to have groups out of ammo return to BASE and trigger a replacement spawn? OR is it possible to trigger a reinforcement spawn once a group is out of ammo? Yes, good suggestion. Units who are out of ammo should defintely fall back. I think maybe the units can get their ammo resupplied (meaning they don't have to respawn), but I'm not sure. I'll look into implementing this. (Issue) the other observation i noted with infantry in urban settings is their desire to assume a wedge formation - can the formation be easily changed to a "tighter" group formation for urban fights? Sure! I'll add a way to change the formation between the tasks (issue). Autonomous ground AI project Link to comment Share on other sites More sharing options...
A Hamburgler Posted April 11, 2018 Share Posted April 11, 2018 Does this work with 2.5? Link to comment Share on other sites More sharing options...
doodenkoff Posted April 12, 2018 Share Posted April 12, 2018 Does this work with 2.5? Yes. I have not detected any issues with it in 2.5. Win 10 | i7 4770 @ 3.5GHz | 32GB DDR3 | 6 GB GTX1060 Link to comment Share on other sites More sharing options...
Haydz192 Posted June 2, 2018 Share Posted June 2, 2018 First off, thanks a bunch for putting this script out there, it's super awesome! Second, I have a question - I'm trying to use this alongside CTLD to make it so that I can airlift units from a FARP, drop them in a 'staging/reinforcement area' and then have those troops get added to a task force, but nothing I've come up with seems to work, unfortunately. I'm currently using it like this, in the understanding that every 60 seconds it will check what's inside the Base Zone named "AGFT_Staging ..." - but this doesn't seem to be working. BLU_TF_2 = autogft_Setup:new() :setCountry(country.id.USA) :startUsingRoads() :addBaseZone("AGFT_StagingArea_Blu") :addControlZone("OBJ_E") :addControlZone("OBJ_C") :addControlZone("OBJ_W") :addControlZone("OBJ_SUK") :setReinforceTimer(60) Any help would be much appreciated. Link to comment Share on other sites More sharing options...
gromit190 Posted June 28, 2018 Author Share Posted June 28, 2018 I'm trying to use this alongside CTLD to make it so that I can airlift units from a FARP, drop them in a 'staging/reinforcement area' and then have those troops get added to a task force, but nothing I've come up with seems to work, unfortunately. I'm currently using it like this, in the understanding that every 60 seconds it will check what's inside the Base Zone named "AGFT_Staging ..." - but this doesn't seem to be working. BLU_TF_2 = autogft_Setup:new() :setCountry(country.id.USA) :startUsingRoads() :addBaseZone("AGFT_StagingArea_Blu") :addControlZone("OBJ_E") :addControlZone("OBJ_C") :addControlZone("OBJ_W") :addControlZone("OBJ_SUK") :setReinforceTimer(60) Any help would be much appreciated. Hello Haydz192! Sorry for such a terribly late reply. Take a look at the "staging" example script (LINK), it should get you started with using staging in AutoGFT. Autonomous ground AI project Link to comment Share on other sites More sharing options...
wrl11 Posted July 12, 2018 Share Posted July 12, 2018 question on error Any help would be appreciated. What should I look at the would be causing this error? Thanks I am running a mission with both Moose and autoGFT. I am getting this error in the log: ERROR SCRIPTING: Error in scheduled function: [string "C:\Users\wrloo\AppData\Local\Temp\DCS.openbeta\/~mis00007E2A"]:2320: Group doesn't exist Which is pointing to this code in the main autogft script file (line 2320 is the local units = self.dcsGroup:getUnits() line): -- @param #TaskGroup self function autogft_TaskGroup:updateGroupLead() self.groupLead = nil if self.dcsGroup then local unitIndex = 1 local units = self.dcsGroup:getUnits() while unitIndex <= #units and not self.groupLead do if units[unitIndex]:isExist() then self.groupLead = units[unitIndex] end unitIndex = unitIndex + 1 end if not self.dcsGroup then self.dcsGroup = nil end end end 1st vAEW Link to comment Share on other sites More sharing options...
wrl11 Posted July 12, 2018 Share Posted July 12, 2018 (edited) I see what is happening. My forces are getting to the last control zone with no enemy engagement (defending a base in my mission) and despawning after a few minutes. So the group doesn't exist because they despawned. How can I stop them from despawing? I want them to hold the line as enemy forces attack the base, and get reinforced as they are destroyed. Thanks. -- (BLUE TASK FORCE) autogft_Setup:new() :setCountry(country.id.USA) :addBaseZone("bluebase1") :linkBase("bluebase1", "USA HQ1") :addControlZone("red3") autogft_Setup:new() :setCountry(country.id.USA) :addBaseZone("bluebase2") :linkBase("bluebase2", "USA HQ2") :addControlZone("red2") -- (RED TASK FORCE) autogft_Setup:new() :setCountry(country.id.RUSSIA) :addBaseZone("redbase1") :linkBase("redbase1", "HQ1") :addControlZone("red9") :addControlZone("red10") :addControlZone("red4") :addControlZone("red2") :addControlZone("red1") autogft_Setup:new() :setCountry(country.id.RUSSIA) :addBaseZone("redbase2") :linkBase("redbase2", "HQ2") :addControlZone("red8") :addControlZone("red5") :addControlZone("red3") :addControlZone("red1") autogft_Setup:new() :setCountry(country.id.RUSSIA) :addBaseZone("redbase3") :linkBase("redbase3", "HQ3") :addControlZone("red7") :addControlZone("red6") :addControlZone("red2") :addControlZone("red1") Any help would be appreciated. What should I look at the would be causing this error? Thanks I am running a mission with both Moose and autoGFT. I am getting this error in the log: ERROR SCRIPTING: Error in scheduled function: [string "C:\Users\wrloo\AppData\Local\Temp\DCS.openbeta\/~mis00007E2A"]:2320: Group doesn't exist Which is pointing to this code in the main autogft script file (line 2320 is the local units = self.dcsGroup:getUnits() line): -- @param #TaskGroup self function autogft_TaskGroup:updateGroupLead() self.groupLead = nil if self.dcsGroup then local unitIndex = 1 local units = self.dcsGroup:getUnits() while unitIndex <= #units and not self.groupLead do if units[unitIndex]:isExist() then self.groupLead = units[unitIndex] end unitIndex = unitIndex + 1 end if not self.dcsGroup then self.dcsGroup = nil end end end Edited July 12, 2018 by wrl11 add script 1st vAEW Link to comment Share on other sites More sharing options...
wrl11 Posted July 12, 2018 Share Posted July 12, 2018 found problem I found the problem, there was a conflict with this moose command: CleanUpAirports = CLEANUP_AIRBASE:New( "Gudauta" ) The moose code was "cleaning up" my autogft groups that were near an airport (these were not even at Gudauta, but Kobuleti, and it still despawned my autogft forces). I eliminated the moose line and now autogft works fine. 1st vAEW Link to comment Share on other sites More sharing options...
gromit190 Posted July 13, 2018 Author Share Posted July 13, 2018 Hey wrl11, Glad to hear it's working. And thanks describing how you solved the issue, it's really helpful for others who might run into similar problems :) Autonomous ground AI project Link to comment Share on other sites More sharing options...
wrl11 Posted July 13, 2018 Share Posted July 13, 2018 Thanks for your hard work gromit. Your code really makes the DCS ground AI so much better! Question: do you have one place that documents all of the possible commands? I see the example missions on github, but there seems to be more possible commands then in the example missions. 1st vAEW Link to comment Share on other sites More sharing options...
gromit190 Posted July 14, 2018 Author Share Posted July 14, 2018 (edited) Thanks for saying that! :thumbup: Yes, you can take a look at the code API here: https://birgersp.github.io/dcs-autogft/Setup.html These documents list every function in the project. But I've only added a description to the functions that may be relevant for mission designers directly. Edited July 15, 2018 by gromit190 Autonomous ground AI project Link to comment Share on other sites More sharing options...
Oh-Zee Posted November 9, 2018 Share Posted November 9, 2018 Script newbie I have never used a script before, but I've read about them in the forums and love what they do to the game. Looking at yours it's seems simple enough for a newbie. Is this something I could try without any steep learning curve or needed software ? I love what you've shown hear and is something I wanted to do for a long time. I miss his type of mission making coming from IL2 1946 with the Dynamic campaign manager. I'm going to download it and stare at it for a while and see what I can do with it. I write missions for a small group of guys and I just get tired of knowing whats going to happen. Even with randomizing you still kinda of know whats going to happen. Looks neat and thanks for you hard work to make the game even more enjoyable. Link to comment Share on other sites More sharing options...
Recommended Posts