Skip to content
#33
Auto-translated
About morale in Heroes.

Yesterday, I analyzed the disassembled executable hmm2pl.exe (v2.1, Gold edition by Buka). Here are the results:

1) At the beginning of the battle, a certain pseudo-random number is generated (it likely depends on the qualitative and quantitative composition of the army, the distribution of stacks in slots, etc.). This number does not depend on the timer and is stored at the same address throughout the battle! Furthermore, it changes during the battle, but only as a result of arithmetic and logical operations (and, or, shl, etc.). That is, if you repeat the same moves (actions), the morale pattern will always be the same, which allows you to record a "notation" of the game (similar to chess).

2) If the morale (m) is greater than zero, then whether it triggers for a specific stack depends on the condition: mod(R, 24) + 1 <= m, where R is the aforementioned pseudo-random number (it can be found using a debugger or special programs). If this condition is met, morale triggers; otherwise, it does not. I haven't yet analyzed the mechanics of "bad" morale triggering.

3) Conclusions: a) if a unit does not trigger morale on one tile, it will not trigger on any of the other tiles (and vice versa; provided that the unit is not attacking; thus, the hypothesis about "morale tiles" is incorrect); b) if morale triggers/does not trigger during an attack, it doesn't matter which tile the attack was launched from: morale will trigger/not trigger on all other tiles as well (here, the number R is calculated after the retaliation); c) by attacking different enemy stacks, we get different R values and, accordingly, different morale.

In the third game, the mechanics may be the same. But R is calculated before the battle and DEPENDS on the timer, but still ONLY before the battle. That is, I want to say that if two players have the same R number, then no matter how they adjust the delays, the morale pattern will also be the same.

I would like to know your opinion on this. And any counterexamples (I haven't found any yet).

Statistics

Welcome our newest member: dodoD0D0