Posted: Wed Sep 28, 2016 6:06 am Post subject:
AI won't rebuild the upgrade
Subject description: Does anyone get this problem?
Today I made an upgrade (with animation) for the Soviet Battle Lab. I can build it without any problem and so can the AI for the first time, but after the AI's upgraded Battle Lab was destroyed, AI rebuilt it without rebuilding the upgrade. I've tested this several times, waiting for AI to build all structures but the problem is still the same.
I've checked the debug.log, nothing is special except this line repeating:
"Abandoning production of Tech Upgrade"
Here is the code of my upgrade:
Oh I misread... But yes, AI only applies usually the upgrade once and the other same building won't get it to my recall.
TS had some extra logic to this with power plant but the extra logic is gone. QUICK_EDIT
@E1Elite: No, It's not a tech building, "Tech Upgrade" is just the name of my upgrade for the Soviet Battle Lab.
@ApolloTD: So it's some kind of bug and has no way to fix? QUICK_EDIT
You could give the AI a cloned version of the lab which is build already equipped with the upgrade by default (with the upgrade animation set as normal ActiveAnim to the cloned version of the lab).
After all your upgrade is just an animation and the AI doesn't care about prerequisites anyways, so it doesn't matter for the AI if it has the upgrade or not. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Soviet Battle Lab is Tech building, it is in BuildTech=NATECH. Game has bug with
Tech building, when destroyed, its abilities still remain. Put the upgrade on some
other building and try.
There is no problem for me with other buildings like powerplants etc. for AI when
destroyed and rebuilt. It builds the upgrade also. QUICK_EDIT
Soviet Battle Lab is Tech building, it is in BuildTech=NATECH. Game has bug with
Tech building, when destroyed, its abilities still remain. Put the upgrade on some
other building and try.
There is no problem for me with other buildings like powerplants etc. for AI when
destroyed and rebuilt. It builds the upgrade also.
Is this really the case?
The game decides tech buildings based on NeutralTechBuildings=. BuildTech= denotes the 'tech center' buildings, i.e. battle labs, which are not the same as tech buildings.
IIRC there aren't any special logics tied to that tag other than the base distribution.
IF there is really such a bug related to that flag, then I suggest getting around it by simply omitting NATECH from that list, and depending on AIBuildThis to make the AI build it as a normal building. . QUICK_EDIT
My AI always builds upgrades whether or not the building has +/- power as long as the upgrade is listed under AI.PowerPlants=.. it's weird I know but for some reason it works. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum