reclaiming valuable stuff
Posted: 07 May 2006, 20:18
do any of the AIs actively keep track of whether their expensive buildings are alive or dead?
i was thinking along the lines of storing an alive/dead bool along with each building of sufficient metal cost so that the AI could figure out if one had died and send a builder to the location and reclaim the spot. once a relcaim command has been given then the bool is deleted.
eg build a structure at location x. bool set to alive. building gets killed, bool set to dead (but implicitly assumed to stilll be there as wreckage). builder gets given a reclaim order at the location. bool is deleted.
could say delete the bool as soon as the reclaim order is sent so we don't have builders one by one running into enemy lines. perhaps vary this in relation to how much the structure was worth when it was alive...but then that's more info to keep track of.
just an idea: the only ai reclaiming i've seen is the 'oops it's in the way of what i'm about to build' kind...
i was thinking along the lines of storing an alive/dead bool along with each building of sufficient metal cost so that the AI could figure out if one had died and send a builder to the location and reclaim the spot. once a relcaim command has been given then the bool is deleted.
eg build a structure at location x. bool set to alive. building gets killed, bool set to dead (but implicitly assumed to stilll be there as wreckage). builder gets given a reclaim order at the location. bool is deleted.
could say delete the bool as soon as the reclaim order is sent so we don't have builders one by one running into enemy lines. perhaps vary this in relation to how much the structure was worth when it was alive...but then that's more info to keep track of.
just an idea: the only ai reclaiming i've seen is the 'oops it's in the way of what i'm about to build' kind...