Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Non-responsive Units
Non-responsive Units
Feb 7 2021, 9:28 am
By: Ultraviolet  

Feb 7 2021, 9:28 am Ultraviolet Post #1



In my impossible map, around the fifth mission, we encounter a glitch where so many units have been spawned that normal (computer) units no longer respond to attacks. Hero units and spellcasters still respond as expected, and normal units respond appropriately when being given trigger based orders. All this leads me to believe there is some issue with the computer player running out of guard slots or something (if that's even a thing?). Does anyone know what this issue is and more importantly how I might be able to fix it?

Post has been edited 1 time(s), last time on Feb 7 2021, 11:49 pm by Ultraviolet.




Feb 7 2021, 10:30 am IlyaSnopchenko Post #2

The Curious

It is a thing but I thought it only occurs after the AI produces about 1000 units (happened to an Insane computer player during a very long game in one mission in my campaign).

I guess Neiv might know what to do to mitigate (or fix) that.



Trial and error... mostly error.

Feb 7 2021, 1:00 pm Nekron Post #3



You're right that there's an upper limit of guard slots, it's 1000. You can double it if after the issue first occurs you start a town for the AI player that controls the guards, if the guards are now dead (starting a town for a player that had none before will clear out empty guard slots)
Otherwise, I don't think you can do much about it besides spawning less units/using EUDs to produce units as military instead of guards maybe? If I remember impossible maps right, it should be feasible to have an AI produce units instead of spawning them, which should help a little
edit: looked up the actual limit, you can check the rest here https://docs.google.com/document/d/1KXbIDuIBnacWwpJJxSQePmIhc1GKuEgRZxtf8cLi_Qo/edit?usp=sharing if needed, under "AI limits"

Post has been edited 1 time(s), last time on Feb 7 2021, 1:10 pm by Nekron.




Feb 7 2021, 1:56 pm Ultraviolet Post #4



Quote from IlyaSnopchenko
It is a thing but I thought it only occurs after the AI produces about 1000 units (happened to an Insane computer player during a very long game in one mission in my campaign).

I guess Neiv might know what to do to mitigate (or fix) that.

Yeah, it seems like it goes a step further than that and occurs after the AI has owned 1000 units regardless of creation method.

Quote from Nekron
You're right that there's an upper limit of guard slots, it's 1000. You can double it if after the issue first occurs you start a town for the AI player that controls the guards, if the guards are now dead (starting a town for a player that had none before will clear out empty guard slots)
Otherwise, I don't think you can do much about it besides spawning less units/using EUDs to produce units as military instead of guards maybe? If I remember impossible maps right, it should be feasible to have an AI produce units instead of spawning them, which should help a little
edit: looked up the actual limit, you can check the rest here https://docs.google.com/document/d/1KXbIDuIBnacWwpJJxSQePmIhc1GKuEgRZxtf8cLi_Qo/edit?usp=sharing if needed, under "AI limits"

Interesting. So, given that it is an impossible map, there aren't any traditional bases for the computer player to operate out of. But I'm imagining for the purposes of clearing guard slots, that wouldn't matter. Thank you, I think you put me on the right track. Would any town AI work? Like "Terran Expansion Custom Level" at any old location?




Feb 7 2021, 2:50 pm Nekron Post #5



Shouldn't matter, though I'm not sure if the town gets properly setup if the AI has absolutely no buildings? Typically it needs at least one building for the script to persist, but it might not be true for main towns
Any script with start_town would work, and assuming you don't want it to change the computer player's behaviour your best bet would be something like Brood Wars Terran 2 - Town B (Start_town with no other commands, used to facilitate nuke generation during the mission (idle AI towns produce nukes by default, whenever they have an unoccupied silo)).

Also, if you want to see how deleting empty guards works in practice, you can see it in xZ6 (Fury of the Swarm) - cutscene leftover guards are removed when the main Zerg towns start. On the other hand, if you want to see it fail, you can take a look at xT5A (Ground Zero) - because the AI has a supplementary Areatown that starts 1 frame before the remove-empty-guards check would be run, ghosts used for the initial cutscene persist as guards.

I guess if you used multiple players, you could stretch the limit to 1k x each player used with proper resets




Feb 7 2021, 11:48 pm Ultraviolet Post #6



Quote from Nekron
Shouldn't matter, though I'm not sure if the town gets properly setup if the AI has absolutely no buildings? Typically it needs at least one building for the script to persist, but it might not be true for main towns
Any script with start_town would work, and assuming you don't want it to change the computer player's behaviour your best bet would be something like Brood Wars Terran 2 - Town B (Start_town with no other commands, used to facilitate nuke generation during the mission (idle AI towns produce nukes by default, whenever they have an unoccupied silo)).

Also, if you want to see how deleting empty guards works in practice, you can see it in xZ6 (Fury of the Swarm) - cutscene leftover guards are removed when the main Zerg towns start. On the other hand, if you want to see it fail, you can take a look at xT5A (Ground Zero) - because the AI has a supplementary Areatown that starts 1 frame before the remove-empty-guards check would be run, ghosts used for the initial cutscene persist as guards.

I guess if you used multiple players, you could stretch the limit to 1k x each player used with proper resets

Oh nice, you actually solved one of my unasked questions with your response. I had issues getting the AI to build nukes, which makes a lot of sense based on your answer. I wasn't running any town AI script, I was just running the nuke at location script after giving them nuke silos and sufficient resources to build nukes, assuming the nuke script would handle building them as well. Thanks, you've given me a lot of valuable information :)




Feb 8 2021, 9:57 am IlyaSnopchenko Post #7

The Curious

Every town AI also starts the computer doing a lot of other stuff like training 2 dropships if it has a starport w/control tower, sending any vultures it has to place mines around if the tech is researched, etc.

There are many "empty" AIs (that is, starting the town and then doing next to nothing) in the script database.

I also used a different way to charge nuclear silos: there's a create_nuke() command used in the nefarious TB2A script (the one that nukes your assets to kingdom come in "Ground Zero"). If isolated and put into a dedicated script, it will work to generate a single nuke in a silo owned by the computer player.



Trial and error... mostly error.

Feb 8 2021, 11:53 am Nekron Post #8



In general, starting a town will enable campaign spellcasting and targeting of enemy units based on missing HP and some other arbitrary values for a computer player in UMS maps -- so not just vultures, but different rules as to when high templars would cast a storm etc.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[03:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Roy, Ultraviolet, RIVE