Monday, April 16, 2012

BUG SC2 UPDATE!!!! : AI can build factory upgrade repeatedly

I was modding the AI trying to get it to build the factory upgrades more often, mainly anti air when I noticed anti air upgrades being built in the center of the factory(where it builds units) while it already had an AA upgrade in the normal spot.



The more I watched the worse it was, AI had put in like 5 shields on 1 factory and all other factories were not upgraded at all.



It seems the AI checks to see if the factory can build the upgrade, and whether or not the enemy has land or air units, but there is no check for whether the factory is already upgraded, and nothing to prevent a 2nd upgrade of the same type being built.|||Thanks for the heads up, we are investigating this.



- Servo|||Its really great to know someone from GPG is looking for bug reports. I really wasn't sure if I should even bother posting it, and really was just hoping someone with more experience had an idea on how to get it working.



Thanks!



If there is anything I can do to help let me know, I'd really love to get this sorted out so I can explore experimental factory upgrades :)|||No problem. You provided enough detail to make this easily understood, enough insight to help us know what to isolate, and even reported it with a helpful attitude. That's a bug report hat trick in my book.



I wish all reports were like this one.



- Servo|||I am pretty confident the problem is being caused by the "airunitsspotted" and "landunitsspotted" conditions in the upgrades builder.



Normally the AI will multi build AA upgrades. If I remove the "airunitsspotted" from the AA upgrade, it only builds a single one, but then spams shield or TML.



The problem is if I just remove all the "unitspotted" conditions, it seems to only build upgrades on its first factory.



It happens with mainly the turtle AIs, probably because they allocate the most to defense spending. Does not matter if it is Normal, Hard or Cheat difficulty.



I am of course using a 100% clean SC2 install, no mods installed, even using a clean game.prefs file to rule out anything.



The next odd thing is the ai doesn't always have this problem, but it usually either has it or doesn't. If the brain has the problem its actions are separated by far fewer ticks, seen in the F9 log.

Something like...

AI Brain 2 Building Factory AA Upgrade (tick 100)

AI Brain 3 Building Factory AA Upgrade (tick 140)

AI Brain 3 Building Factory AA Upgrade (tick 150)

AI Brain 2 Building Factory AA Upgrade (tick 400)



In this simple example, AI brain 2 is NOT bugged and is building 2 upgrades on separate factories, AI brain 3 IS bugged and is building the same upgrade on the same factory.



Sometimes the AI builds the multiple upgrades at the same time, sometimes they can be built at different times.



I have some replays of the problem occurring if it is of any use.



http://ai-machater.googlecode.com/files ... .SC2Replay

http://ai-machater.googlecode.com/files ... .SC2Replay

http://ai-machater.googlecode.com/files ... .SC2Replay|||Machater: I think the problem is more serious than just the AI trying to attempt to build multiple upgrades. It simply shouldn't be possible to do that in the first place. This bascially means, that a human player could do that too through an UI mod, possibly.



I think it's similar to the T2 to T3 mass fab upgrade in Forged Alliance. The blueprint of the T2 mass fab allowed it to be upgradeable to a T3 mass fab and this was only prevented through the lack of an UI option for that. But with an UI mod it was made possible.

No comments:

Post a Comment