more intelligent target selection for units
Posted: Mon Jun 17, 2019 9:12 pm
currently in my Robot Army mod, if i send a group of units out to attack a nest, the path-finder gets them a path to go in the close proximity of the nest, and i'm using the area_attack command to send them there.
When they get there, the friendly units might pull some initial biters and kill them well enough - but when they get within sight of the nests or worms, they seem to prioritize the nests and worms more than the biters which are quite literally biting them, and they are sometimes even trying to walk around/through swarms of biters just to get closer to be in firing range of the nests/worms.
It could be because i'm using "distraction=defines.distraction.by_anything" that is causing it. If I use "distraction=defines.distraction.by_enemy" instead, will they pay less attention to the 'buildings' category of nests and worms and focus more on killing the closest enemy "units" instead?
Can there be some additional logic put in for the targeting of nearby enemies, where "units" are highest priority, and everything else comes second?
When they get there, the friendly units might pull some initial biters and kill them well enough - but when they get within sight of the nests or worms, they seem to prioritize the nests and worms more than the biters which are quite literally biting them, and they are sometimes even trying to walk around/through swarms of biters just to get closer to be in firing range of the nests/worms.
It could be because i'm using "distraction=defines.distraction.by_anything" that is causing it. If I use "distraction=defines.distraction.by_enemy" instead, will they pay less attention to the 'buildings' category of nests and worms and focus more on killing the closest enemy "units" instead?
Can there be some additional logic put in for the targeting of nearby enemies, where "units" are highest priority, and everything else comes second?