ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.58k stars 359 forks source link

Adventure map, AI should not capture bottle objects on the ocean #8433

Open LeHerosInconnu opened 4 months ago

LeHerosInconnu commented 4 months ago

Preliminary checks

Describe the problem requiring a solution

In fheroes2, AI should not capture bottle objects on the ocean.

In scenarios, bottle objects are generally used to give information to the human player, either to give life to the scenario as in campaigns, or to suggest things. These objects are of no value to the AI, and it can "ruin" a scenario if the bottle objects are captured. In the original game, I think the AI avoids capturing bottle objects.

In fheroes2:

https://github.com/ihhub/fheroes2/assets/43583994/c801383d-6260-4b66-8729-fbfd5fd0a360

Here is the save file: AI bottle 01.zip

Describe the possible solution

Make sure the AI doesn't capture bottle objects.

Additional info

No response

oleg-derevenetz commented 4 months ago

While these objects has no value for AI by themselves, AI currently still can collect them to clear path to other objects or for the purpose of fog discovery.

ihhub commented 4 months ago

I agree with @oleg-derevenetz that the AI needs to collect them and sometimes must do this to clear a path. This improvement should be overcome by a map designer.

ihhub commented 3 months ago

I would classify bottles as passable action objects for AI. If a shortest path is through a bottle an AI hero will go though it.

zenseii commented 3 months ago

Hi, everyone. To me it seems like the AI sometimes goes out of its way just to pick up a bottle? Like in this video: https://www.youtube.com/watch?v=jVZCs36lQeg&t=5624s

oleg-derevenetz commented 3 months ago

Hi, everyone. To me it seems like the AI sometimes goes out of its way just to pick up a bottle? Like in this video: https://www.youtube.com/watch?v=jVZCs36lQeg&t=5624s

For AI, bottles have zero value (literally). As for this video, based on the typical zigzag-like movements of the boat, I would say that this hero is performing the fog discovery.