Skip to content

A program for calculating the strength of the guard on random maps in Heroes of Might and Magic III, called H3CalcGuards.

#30
Auto-translated
Wicc
The algorithm behind the program is interesting.

Has anyone delved into the code and figured out exactly how Heroes determines the number of monsters? Or, based on a large sample of generations, has anyone determined an approximate correlation?
Here is everything the program is based on:
http://forum.df2.ru/index.php?s=&showtopic=2342&view=findpost&p=559149 (it also contains information about the value of resource nodes and Pandora boxes)
http://forum.df2.ru/index.php?s=&showtopic=27998&view=findpost&p=558697
http://forum.df2.ru/index.php?s=&showtopic=2342&view=findpost&p=546608 (with clarification http://forum.df2.ru/index.php?s=&showtopic=2342&view=findpost&p=560072, the misunderstanding regarding 1 Azure Dragon is likely due to the fact that in games where it appeared, the WT text file was used)

All of this was determined through code analysis, i.e., the information is accurate (although I cannot guarantee that I haven't made any mistakes anywhere :)).
Javdet
And perhaps an answer can be found as to where the 31 Cyclops guarding the Angel dwelling came from. It's a normal spawn, similar to the starting spawn on the Castle map, week 2.
For example, monsters avg + strong, 5 zones of the Castle out of 16.
Wicc
No matter how I tried, I couldn't generate a guard that would realistically appear, like 33 Minotaurs on a Giant node.
strong + strong, 4 zones of the Tower out of 16.
Wicc
The parameter "Zones count" is unclear. Especially since it is precisely what determines the guard on resource nodes.

Value of a resource node = (AI Value of the creature) * (Growth of the creature) * (1 + (Zones count: city of the creature) / (All zones with towns count)) + (AI Value of the creature) * (Zones count: city of the creature) / 2

Value of a Pandora box = (AI Value of the creature) * (Number of creatures) * (1 + (Zones count: city of the creature) / (All zones with towns count))

Value of a Seer's Hut = (2 * (AI Value of the creature) * (Number of creatures) * (1 + (Zones count: city of the creature) / (All zones with towns count)) - 4000) / 3

How these "Zones count" are determined, I wrote about here:
http://forum.df2.ru/index.php?s=&showtopic=29068&view=findpost&p=575859

And also, if there are resources near the resource node, they also add to the value.

Another point regarding resources: the generator generates both clusters of specific resources, each with its own value, and clusters of random resources with their own, different value. The former will remain the same from game to game on the same map, while the latter will change. It is impossible to distinguish them in the game, so it will not be easy to accurately calculate the guard of resources.


Roger DAltavilla
You are on the wrong path, fellow programmers! You are making the game simpler, but you should be making it more interesting.
Actually, I was initially interested in the question of adding objects to the map. :) I successfully solved it and, at the same time, posted the information I had accumulated. I considered developing this program to be interesting and useful; in any case, it is better than if someone else wrote it based on my information, and in case of errors, it would be unclear to me whether I needed to look for them myself.

Statistics

Welcome our newest member: wayal