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.
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
Please log in to shout.


Members Online: Ultraviolet