Skip to content

A program for determining luck/morality in Heroes 3!

User Avatar
#668
Auto-translated
LM Oracle 3 FE

[HoMM I]
1. A full-fledged Diplomacy Oracle has been added;
2. Hero names in taverns are now displayed in the list in italics (in square brackets, highlighted in color).

Diplomacy Oracle

Three options:

1) Neutrals will never join:
Example message: N = 24, Hostile!;

2) Neutrals will join if the hero is strong enough:
Example message: N = 6, k = 57005/34326 = 1.66 [3066]
Numerator - the strength of your army,
Denominator - the strength of the neutral army,
The number in square brackets - the number of AI_Value units that are missing for them to join. If this number is zero, the neutrals will still not join (there would be enough 1 AI_Value unit to join. Add a peasant, and everything will be OK);

3) Neutrals will join:
Example message: N = 35, k = 57005/16870 = 3.38 [Will join]

To run the Diplomacy Oracle, double-click on the hero's name in the list (the one you will use to recruit). The Diplomacy Oracle works in real time (this does not apply to the window with army numbers), so there is no need to worry about, for example, your hero's army changing. Information about neutrals is displayed when you hover over them.

Note:
The computer recruits neutrals according to its own rules. It can even recruit stronger neutrals! For a human player, the ratio is 1.75. That is, the condition for joining is Hero_Army_Power > 1.75 * Neutrals_Power.

I decided not to bother with campfires, resource piles, etc.

P.S. I tried to speed up the process of building the secondary skill tree for Heroes 2, but it is not possible to optimize the algorithm due to the huge number of calculations performed to obtain a new pair of skills at the next level-up. This is a flaw of the NWC programmers. Just imagine: the game can perform up to 5000(!) iterations just to get 1(!) new skill. And the number of iterations is proportional to the number of secondary skills the hero already has at the expert level. Therefore, the deeper you set, the slower the tree is built. The recommended depth is 15 levels. Already at a depth of 20 levels, a noticeable slowdown is observed, not to mention the time required to build a complete development tree. Fortunately, 15 levels is more than enough to choose a starting hero.

Heroes 3 is free from this shortcoming, and a complete tree on medium-powered machines is built in less than half a minute.

Download
Re-uploaded.