Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: AI stops attacking if I disable certain units
AI stops attacking if I disable certain units
Sep 10 2023, 4:12 am
By: Gbchubs3  

Sep 10 2023, 4:12 am Gbchubs3 Post #1



Hi, I am making a holdout mission and I'm trying to make it hard with 2 insane zerg campaign Ais attacking you. Problem is I only want them to be able to make hydralisks, zerglings and mutas. At first they do fine and attack once or twice but after they just sort of sit there. If I make it so they have a full tech tree they will attack but make a bunch of ultras and guardians. I was just curious if there was a way to make it so I can determine the units the Ai can or cannot make without them just glitching out 10 minutes into the game. I'm not sure if I have to make them lower difficulty or something to keep them from building mass guardians but if I do that the mission is to easy. Does anyone know if there is a way to turn off certain units and buildings in the tech tree without completely breaking the ai script? Thank you!

Post has been edited 3 time(s), last time on Sep 10 2023, 4:23 am by Gbchubs3.



None.

Sep 10 2023, 2:29 pm C(a)HeK Post #2



As far as I know, you can't just disable any units\upgrades for AI without breaking the script.

Think of a script as a sequence of actions: A-B-C-D, etc.
If you'll disable B, the AI won't miss action B, AI will finish work on this action.

I think modmakers will explain this more better than me.



Hello everyone, friends. You can call me Alexander. :)
Additional Story Series creator
Maps & Info - https://disk.yandex.ru/d/8yj1Y_ddxE9FIA
Videos - https://www.youtube.com/playlist?list=PLvj8rhscGCvTrcYKVyvvMP7uTxlkSjMzz

Sep 11 2023, 2:03 am TheHappy115 Post #3



An AI Script follows a set of rules and essentially goes down a list of things it is required to do. These lists are pre-determined and made by Blizzard
Here is what the Zerg Insane AI script looks like:
Zerg Insane AI

Now, you'll notice that these commands go from top to bottom. I don't know all the advance branches but the main branch (first section) where it does attacks is shown. The issue with disabling certain units is that the AI script will always attempt to execute the line of code before moving on to the next. Important part is always attempt to execute it. This means if it can't execute the code (such as Build a Defiler Mound) then it will just try to execute the code to build a defiler mound again until it works. However, if it is disabled, it will never be able to execute this code and forever get stuck. This helps in situations where the AI can't meet a condition (because of limited resources or tech) as it will constantly check until it CAN meet the condition and finally execute to progress the script.

Insane AI will always essentially do -> Zerglings attack -> Hydralisk Attack -> Mutalisk attack -> Mutalisk+Guardian Attack (gets stuck here indefinitely because can't make guardians but will keep trying to) -> Ultralisk+Hydralisk -> Mutalisk+Ling+Defiler Attack (Loop back to Mutalisk Guardian Attack)
So what are your options?

1) Try using a Custom AI Zerg Script. This AI script is able to make "guards" of certain units and doesn't break as easily as the other AI. You will still run into issues with it not attacking, but you can force another trigger to order said units to attack you. Just beware that this AI has a bad tendency to spam one unit.
2) Create pre-made spawn waves. Majority of UMS holdout maps honestly do this if they are limiting units that can be created.
3) Use EUD Triggers. You can modify the AI Script directly to change it so that it only attacks with Zerglings, Hydralisks, and Mutalisks. You can also order the amount of units (up to 50 of each I believe). This would be by far the most advanced option which would require other tools as well. (I use PyMaster and EUD Editor 3 along with Scmdraft 2 to do that and only learned how to a few weeks ago since thats when I installed those tools).



None.

Dec 1 2023, 1:33 am Dungeon-Master Post #4



Quote from TheHappy115
An AI Script follows a set of rules and essentially goes down a list of things it is required to do. These lists are pre-determined and made by Blizzard
Here is what the Zerg Insane AI script looks like:
Zerg Insane AI

Now, you'll notice that these commands go from top to bottom. I don't know all the advance branches but the main branch (first section) where it does attacks is shown. The issue with disabling certain units is that the AI script will always attempt to execute the line of code before moving on to the next. Important part is always attempt to execute it. This means if it can't execute the code (such as Build a Defiler Mound) then it will just try to execute the code to build a defiler mound again until it works. However, if it is disabled, it will never be able to execute this code and forever get stuck. This helps in situations where the AI can't meet a condition (because of limited resources or tech) as it will constantly check until it CAN meet the condition and finally execute to progress the script.

Insane AI will always essentially do -> Zerglings attack -> Hydralisk Attack -> Mutalisk attack -> Mutalisk+Guardian Attack (gets stuck here indefinitely because can't make guardians but will keep trying to) -> Ultralisk+Hydralisk -> Mutalisk+Ling+Defiler Attack (Loop back to Mutalisk Guardian Attack)
So what are your options?

1) Try using a Custom AI Zerg Script. This AI script is able to make "guards" of certain units and doesn't break as easily as the other AI. You will still run into issues with it not attacking, but you can force another trigger to order said units to attack you. Just beware that this AI has a bad tendency to spam one unit.
2) Create pre-made spawn waves. Majority of UMS holdout maps honestly do this if they are limiting units that can be created.
3) Use EUD Triggers. You can modify the AI Script directly to change it so that it only attacks with Zerglings, Hydralisks, and Mutalisks. You can also order the amount of units (up to 50 of each I believe). This would be by far the most advanced option which would require other tools as well. (I use PyMaster and EUD Editor 3 along with Scmdraft 2 to do that and only learned how to a few weeks ago since thats when I installed those tools).

Man I might just have to start looking into EUDs as well. I always loved the plug and play nature of using vanilla triggers but sometimes they are just so limiting.



None.

Dec 1 2023, 1:37 am Ultraviolet Post #5



Quote from Dungeon-Master
Man I might just have to start looking into EUDs as well. I always loved the plug and play nature of using vanilla triggers but sometimes they are just so limiting.

EUDs are dope, basically modding-lite. The main thing that is frustrating is that you can't modify unit iscripts, but other than that, it's pretty great. Definitely renewed my interest in mapping. Making major Battle.net usable changes is so much more accessible than it was 10-15 years ago.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-12. : 12:52 pm]
Oh_Man -- da real donwano
da real donwano shouted: This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
it's pretty common
[2024-4-11. : 9:53 pm]
da real donwano -- This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
[2024-4-11. : 4:18 pm]
IlyaSnopchenko -- still better than "Pakistani hookers in Sharjah" that I've seen advertised in another forum
[2024-4-11. : 4:07 pm]
Ultraviolet -- These guys are hella persistent
[2024-4-11. : 3:29 pm]
Vrael -- You know, the outdoors is overrated. Got any indoor gym and fitness equipment?
[2024-4-10. : 8:11 am]
Sylph-Of-Space -- Hello!
[2024-4-09. : 7:59 am]
kesexib477 -- hi
[2024-4-05. : 9:24 am]
Sylph-Of-Space -- I just very barely got SCMDraft to work with crossover, if anyone is still interested in making maps I wanna make terrain again!!
[2024-4-05. : 12:00 am]
Vrael -- like I'm not even canadian
[2024-4-04. : 9:24 pm]
NudeRaider -- :awesome:
Please log in to shout.


Members Online: Excalibur, Roy