dkfans / keeperfx

Open source remake and Fan Expansion of Dungeon Keeper.
https://keeperfx.net/
GNU General Public License v2.0
752 stars 77 forks source link

Computer players don't pick up creatures that can't reach the rooms they need #682

Open Loobinex opened 8 years ago

Loobinex commented 8 years ago

Load the attached save. Find a blue keeper with a guardpost behind a locked door. Creatures assigned to guard will go hungry and eventually end up being tortured to death.

fx1g0003.7z

Found in KeeperFX v0.4.6 r1737 patch, git 04d7924, dated 2015-11-05 18:59:28

mefistotelis commented 8 years ago

It isn't possible for computer player to know which tasks a creature tried but failed.

So this requires per-task fix - in this specific case, computer player should check for hungry creatures and put them into hatchery, even if they're working.

Loobinex commented 8 years ago

This cannot be accomplished by allowing the computer player to respond to the alert 'creature cannot reach the room it needs'?

mefistotelis commented 8 years ago

This message doesn't store the creature index - it only stores room kind, and the position where the creature was when message has been created. And currently there's no extra space in struct Event to store additional parameter.

Though I agree it would be best if computer could use the events list.

Loobinex commented 8 years ago

Having the Creature ID in the event would be a nice to have for the player as well, so that the zoom-eye can point towards the creature.

Worth the wait to do it right I think.

mefistotelis commented 8 years ago

I agree.

So - this is blocked until struct Event (array of which is in struct Game) can be resized, or at least moved to struct GameAdd.