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.71k stars 376 forks source link

Adventure map, Visions spell should take into account the possibility of reorganizing the hero's army to indicate the intentions of wandering troops #6964

Open LeHerosInconnu opened 1 year ago

LeHerosInconnu commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

In fheroes2, the Visions spell should take into account the possibility of reorganizing the hero's army to indicate the intentions of wandering troops.

In the example, depending on whether or not the ranger troops are reunited within the hero's army, the displayed intention of the grand elves is different. This is really annoying. Also, if the hero goes to meet the grand elves, the hero's army should be automatically reorganized (since it is possible to do so) to integrate the grand elves into the hero's army.

In fheroes2: Two troops of rangers:

https://user-images.githubusercontent.com/43583994/230733978-1cb74d79-aedf-44b8-8242-0ad5c9a4c897.mp4

Visions intention 001 Visions intention 002

The two troops of rangers combined:

https://user-images.githubusercontent.com/43583994/230733972-580ae175-2945-4634-a668-fa9ea284018b.mp4

Visions intention 003 Visions intention 004

Describe the possible solution

The Visions spell should take into account the possibility of reorganizing the hero's army to indicate the intentions of wandering troops. Also, if the hero goes to meet the grand elves (in the example), the hero's army should be automatically reorganized (since it is possible to do so) to integrate the grand elves into the hero's army.

Additional info

Here is the save file: Before cyclope elf visions dip.zip

oleg-derevenetz commented 1 year ago

That's all the same topic that was already discussed in #5671. The condition of having a place in the army "right there, right now" for joining neutral monsters is a mandatory condition from the rules of the original game, and an attempt to somehow "automate" it will again lead to the fact that monsters will want to join much more often than in the original game.

LeHerosInconnu commented 1 year ago

Hello @oleg-derevenetz,

That's all the same topic that was already discussed in #5671. The condition of having a place in the army "right there, right now" for joining neutral monsters is a mandatory condition from the rules of the original game, and an attempt to somehow "automate" it will again lead to the fact that monsters will want to join much more often than in the original game.

It's a bit related, but here it's about the Visions spell. We can make fheroes2 better than the original game in this regard.

In the case presented, it forces the player to perform annoying micromanagement actions that could be avoided before casting the Visions spell. This does not increase the "real" fact that the creatures will or will not want to join the hero. In the original game too, if the army is reorganized the intention message of the wandering creatures is different.

It is undoubtedly badly done in the original game, but just because it works that way in the original game does not mean that it has to be reproduced exactly in fheroes2.

oleg-derevenetz commented 1 year ago

In the case presented, it forces the player to perform annoying micromanagement actions that could be avoided before casting the Visions spell. This does not increase the "real" fact that the creatures will or will not want to join the hero.

But if the Visions spell tells you that the monsters are ready to join, when in fact they won't, then it's confusing (at least). Report from the Visions spell should match the reality - if with the current army configuration wandering monsters are not going to join, then Visions spell should not tell that they are willing to join.

LeHerosInconnu commented 1 year ago

@oleg-derevenetz.

In the case presented, it forces the player to perform annoying micromanagement actions that could be avoided before casting the Visions spell. This does not increase the "real" fact that the creatures will or will not want to join the hero.

But if the Visions spell tells you that the monsters are ready to join, when in fact they won't, then it's confusing (at least). Report from the Visions spell should match the reality - if with the current army configuration wandering monsters are not going to join, then Visions spell should not tell that they are willing to join.

This is why the hero's army should be reorganized to match the information in the Visions spell about the intention of the grand elves if the hero decides to meet the grand elves.

I understand your logical approach to the situation. But the point here is to improve the user's playing comfort. Let's remove, when possible, all those "time-wasting" manipulations that are uninteresting from the point of view of the user's enjoyment of the game.

oleg-derevenetz commented 1 year ago

This is why the hero's army should be reorganized to match the information in the Visions spell about the intention of the grand elves if the hero decides to meet the grand elves.

This idea doesn't look well thought out. What if player really wants to find a stack of wandering monsters that will join his army in its current configuration (no reorganizations allowed - for example, because he just do not want new monster types in his army)? What if there are multiple army configurations that allow new wandering stacks to join? In which of these configurations should the army be "automatically" reorganized and why? Etc., etc.

LeHerosInconnu commented 1 year ago

@oleg-derevenetz.

This is why the hero's army should be reorganized to match the information in the Visions spell about the intention of the grand elves if the hero decides to meet the grand elves.

This idea doesn't look well thought out. What if player really wants to find a stack of wandering monsters that will join his army in its current configuration (no reorganizations allowed)? What if there are multiple army configurations that allows new wandering stacks to join? In which of these configurations should the army be "automatically" reorganized and why? Etc., etc.

I will create a test scenario to test this and explain how it might work.

LeHerosInconnu commented 1 year ago

Hello @oleg-derevenetz,

I will create a test scenario to test this and explain how it might work.

So here are some cases, one of which explains a possible functioning (the second case).

In fheroes2:

No free slots in the hero's army, but two similar troops that could be combined: (press to expand)
Only the group of 20 rangers is indicated as wanting to join. ![Visions merging troops 001](https://user-images.githubusercontent.com/43583994/230794185-2a7e340b-5900-4e3a-b2d6-f16bd4853558.png) ![Visions merging troops 002](https://user-images.githubusercontent.com/43583994/230794186-6d61814f-e6bf-43f8-9893-29a259d53be9.png) ![Visions merging troops 003](https://user-images.githubusercontent.com/43583994/230794189-07e506d2-575e-47ac-8608-b4202d4da61b.png) ![Visions merging troops 004](https://user-images.githubusercontent.com/43583994/230794190-61071bd8-dc08-4a6b-82f2-17267b9a22c1.png) ![Visions merging troops 005](https://user-images.githubusercontent.com/43583994/230794194-a12534f2-90a5-4572-831b-ce721e1d19b4.png) https://user-images.githubusercontent.com/43583994/230794204-7e712b21-e1f9-42d9-9a4f-7e92546a2d28.mp4
One free slot in the hero's army, but three similar troops that could be combined: (press to expand)
Groups of 20 rangers, 49 grand elves, 1000 peasants, 20 veteran pikemen and 20 grand elves are indicated as wanting to join. How it might work to reorganize the hero's army so that groups can join the hero's army: The group of 20 rangers joins because a troop of the same creatures is present in the hero's army. The group of 49 grand elves joins because there is a free slot in the hero's army. The group of 20 grand elves joins because a troop of the same creatures is present in the hero's army. From this moment on, there is no free space in the hero's army for the 1000 peasants to join. But there are several troops of the same creatures in the hero's army. The program should therefore automatically combine two troops of the same creature when meeting the 1000 peasants to allow the 1000 peasants to join. The first two ranger troops in the hero's army are joined to free a location, and the 1000 peasants can join. From this moment on, there are no free slots in the hero's army for the 20 veteran pikemen to join. But there are still several troops of the same creatures in the hero's army. The program should therefore automatically combine two troops of the same creature when meeting the 20 veteran pikemen to allow the 20 veteran pikemen to join. The two ranger troops in the hero's army are combined to free a slot, and the 20 veteran pikemen can join. ![Visions merging troops 006](https://user-images.githubusercontent.com/43583994/230794275-3e9ff8b6-2615-4482-b3cc-8534b34d74b0.png) ![Visions merging troops 007](https://user-images.githubusercontent.com/43583994/230794277-3c599ddd-ccb2-46d2-848a-1114514bd4ba.png) ![Visions merging troops 008](https://user-images.githubusercontent.com/43583994/230794281-6cad1217-745e-44fe-8396-0c13b5faf8a9.png) ![Visions merging troops 009](https://user-images.githubusercontent.com/43583994/230794282-f6d92bbf-311d-480c-b73f-8c1e7d1390dd.png) ![Visions merging troops 010](https://user-images.githubusercontent.com/43583994/230794287-cc57a1d9-78fa-4e91-9706-544cc446efe8.png) ![Visions merging troops 011](https://user-images.githubusercontent.com/43583994/230794290-7ee6a80b-d38e-4d64-ba04-a094330ae03b.png) ![Visions merging troops 012](https://user-images.githubusercontent.com/43583994/230794293-1ed3963d-7e52-4c69-9271-d2e1b98c4eaa.png) ![Visions merging troops 013](https://user-images.githubusercontent.com/43583994/230794295-ad6f07a8-ed58-4c73-b492-7ae8f1a45ad9.png) https://user-images.githubusercontent.com/43583994/230794302-497435de-34c3-4f7d-8199-e0ea4f8f48d8.mp4
Free slots in the hero's army, but similar groups of wandering creatures: (press to expand)
In this example, we can also see that the way the information is given with the message windows is not very practical. Two groups of wandering creatures consisting of "throng of master swordmen", one troop wants to join the other wants to fight, how do we know which troop wants what? Discussion on this subject here: https://github.com/ihhub/fheroes2/discussions/2655. Explanations here (part on right click information window): https://github.com/ihhub/fheroes2/discussions/2659. ![Visions merging troops 014](https://user-images.githubusercontent.com/43583994/230794463-c7d7df7b-0402-4b5d-ba4e-ff9c449556f1.png) ![Visions merging troops 015](https://user-images.githubusercontent.com/43583994/230794464-122b6381-f392-49a1-a81a-fc34fc89abde.png) ![Visions merging troops 016](https://user-images.githubusercontent.com/43583994/230794466-72720adc-988b-4354-88b7-752b1973ce40.png) ![Visions merging troops 017](https://user-images.githubusercontent.com/43583994/230794469-f0337214-87fe-4442-be9c-d4d8daee69e0.png) ![Visions merging troops 018](https://user-images.githubusercontent.com/43583994/230794471-c2b059fd-0c36-4963-bafb-6521ce2a8741.png) https://user-images.githubusercontent.com/43583994/230794484-900b8323-6baf-4848-8d80-3e7198936b7a.mp4

Here is the save and the test scenario files: Visions start 01.zip

Edit.

...because he just do not want new monster types in his army)

I saw that you added this case. In this case, if the wandering creature troop would have fled if there was no room in the hero's army, and the player does not want the wandering creature troop to join his hero's army, when the player refuses the wandering creature troop's offer to join his hero's army in exchange for gold (by clicking on the "NO" button), the message window that offers to fight the wandering creatures or to let them flee is displayed.

In fheroes2:

Visions merging troops 019 Visions merging troops 020