I've tested it, and here are the results:
The number of units guarding the passage is calculated using the formula:
V = Vconst + Vrandom
where
Vconst = Value / Price (rounded up to the nearest whole number)
Value - is specified in the template (for creatures = 6000)
Price - is the unit's price (see Physmig)
Vrandom - can be a positive or negative random number, and is chosen from the following range:
(the first number is for non-upgraded units, the second for upgraded units)
Level 1: 9/8
Level 2: 8/7
Level 3: 7/6
Level 4: 6/5
Level 5: 5/4
Level 6 guards do not appear when Value = 6000; to be precise, Liches and Minotaurs do not appear. It doesn't work for Faeries and upgraded Faeries; there are always fewer of them than the formula suggests. Sometimes it doesn't work for Air Elementals and Storms; there are often fewer of them than the formula suggests.
The formula may have the following practical significance.
Example 1
A spawn point spawns Monks; the game shows a number of 20-49.
We calculate 6000/400 = 15
15 +/- 5 = we get a range of 10-20
Applying the interval 10-20 to the interval 20-49, we get that there are exactly 20 Monks, and not 30 or 49.
Example 2
A spawn point spawns Silver Pegasi; the game shows a number of 10-19
We calculate 6000/275 = 21.8 = 22
22 +/- 5 = we get a range of 17-27
Applying the interval 17-27 to the interval 10-19, we get that there are 17-19 Pegasi, meaning that we cannot rely on the minimum or average.
And here's another unpleasant addition:
if the spawn point consists of several squads, i.e., there are several squads along the path, or a passage through an elevator or teleport. And if one of the guard units is level 2, then there is a very high probability (>75%) that the number of them in the squad will be higher than the formula suggests. Instead of 45 +/- 8, there will be 70-80+.
The formula is valid for single guards.
Tested on sm and 8mm6 templates for guards with Value of 3000 and 6000
Please criticize. :smile11: