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.74k stars 377 forks source link

Instant combat and Auto combat, something is wrong with these combat modes compared to Manual combat #5511

Open LeHerosInconnu opened 2 years ago

LeHerosInconnu commented 2 years ago

Preliminary checks

Platform

Windows

Describe the bug

In fheroes2, something is wrong with Instant combat and Auto combat modes compared to Manual combat.

In the example, a simple combat between two troops of creatures that always attack each other on their turn. The combat result should be the same in all cases. Note: "battle: deterministic events" option is enabled for this scenario.

In fheroes2:

Instant combat: vlcsnap-2022-06-06-17h04m49s515

Manual combat: vlcsnap-2022-06-06-17h05m14s868

Auto combat: vlcsnap-2022-06-06-17h06m05s812

Instant combat and Manual combat:

https://user-images.githubusercontent.com/43583994/172192034-82a6314b-7806-4788-bf09-aface7992d94.mp4

Instant combat and Auto combat:

https://user-images.githubusercontent.com/43583994/172192122-1f01ff67-6a5d-42ab-b0c5-807d5de00d65.mp4

Save file

Here is the save file: Before ghosts mine 01.zip

Additional info

Version 0.9.15 5406

oleg-derevenetz commented 2 years ago

@LeHerosInconnu

In the example, a simple combat between two troops of creatures that always attack each other on their turn. The combat result should be the same in all cases.

Only if you do exactly the same moves by hand as it is done in the instant/auto combat. But in this video you don't.

In fheroes2, something is wrong with Instant combat and Auto combat modes compared to Manual combat.

Nope, nothing is wrong here. If you do different moves (for example, attack from different cell) the results from the random generator will not be the same.

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz,

@LeHerosInconnu

In the example, a simple combat between two troops of creatures that always attack each other on their turn. The combat result should be the same in all cases.

Only if you do exactly the same moves by hand as it is done in the instant/auto combat. But in this video you don't.

In fheroes2, something is wrong with Instant combat and Auto combat modes compared to Manual combat.

Nope, nothing is wrong here. If you do different moves (for example, attack from different cell) the results from the random generator will not be the same.

Maybe it's not "wrong" the way it's done, but it's not at all the way it works in the original game.

In fheroes2: Yes, depending on the "angle" of attack the damage is different. This is freaking crazy! :rofl:

In the first case, the first dragons attack does 152 damage when attacking horizontally. vlcsnap-2022-06-06-18h42m51s109

https://user-images.githubusercontent.com/43583994/172212011-6ec9d966-a7d4-4a5a-9d65-c8a09afe93f4.mp4

In the second case, the first dragons attack does 192 damage when attacking obliquely. vlcsnap-2022-06-06-18h45m02s929

https://user-images.githubusercontent.com/43583994/172212174-a036259e-ee87-4bf4-bd0c-96337b5c3750.mp4

Whereas in the original game, it is the troop being attacked that is taken into account, not from which hex the troop is attacked.

In Heroes 2:

In the first case, all phoenixes attacks are done horizontally. Successive attacks do: 120 damage 60 damage 84 damage 216 damage, with the luck 105 damage

https://user-images.githubusercontent.com/43583994/172212308-8a4bee28-1177-4cd8-930d-0a0b107b799c.mp4

In the second case, all the phoenixes attacks are made obliquely (except the first one). Successive attacks do: 120 damage 60 damage 84 damage 216 damage, with the luck 105 damage

https://user-images.githubusercontent.com/43583994/172212549-dfe6d53b-030c-4924-89b5-8cf4587d7c39.mp4

In the original game, you can redo this combat dozens of times and you will always get the same result if you perform the same actions (by the same actions, it means attacking the same troop with the same troop, casting the same spells at the same time on the same troops, etc.).

In fheroes2, it should work the same way as in the original game, at least when the "battle: deterministic events" option is enabled.

Edit.

In the case presented in the original post, for Auto combat, Instant combat and Manual combat modes the result should therefore be the same in all cases because there are only two troops fighting and attacking each other.

oleg-derevenetz commented 2 years ago

Yes, depending on the "angle" of attack the damage is different. This is freaking crazy! 🤣

No, this is called "random".

Maybe it's not "wrong" the way it's done, but it's not at all the way it works in the original game.

At the very beginning, when the function "battle: deterministic events" was still only discussed, I said that badly implemented random generator in the original game is not a reason and not an excuse to reproduce it in the fheroes2. My point of view has not changed since then.

oleg-derevenetz commented 2 years ago

I reclassify this as a request for an improvement, but I strongly doubt that, in fact, degradation of the random generator can be considered as an improvement :)

zenseii commented 2 years ago

I think we can agree that there are two camps of Heroes II players: Those who prefer randomized gameplay, and those who prefer deterministic gameplay. Considering how much was deteriministic in the original game, I'm not surprised that many veteran players prefer such gameplay.

I haven't seen much disagreement internally in those camps though, so at least there's that. The players who prefer deterministic gameplay seem to prefer that the game is deterministic in the same way as Heroes II was, so not more deterministic.

To me it is slowly starting to seem more logical to separate these two fundamentally opposite approaches, instead of trying to mix deterministic gameplay with randomized. If this were to be considered we'd be talking much further on, since making such a huge change overnight is not possible.

oleg-derevenetz commented 2 years ago

@zenseii my point of view is the following: random events are included in the core of the game mechanics. What concerns exactly the battle: damage is random, luck/morale events are random, etc. Even when initial seed is not random for the purposes of reproducibility, less predictable random events are good and not evil. Random generator in the original game was just not good enough, maybe due to the hardware limitations in those days (DOS, 640K are enough for everyone, that sort of thing). It is not worth to reproduce it "literally".

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz and @zenseii,

I have nothing against improving the random number generator, or that the combats can be more random if that is the player's preference. My point is that when a player has enabled the "battle: deterministic events" option, he expects to have the same experience and feel of the original game. I also think that this option should be enabled by default. :)