Skip to content
#93
Auto-translated
kinORnirvana
The funniest bug I've ever encountered in Heroes is when the amount of gold resets to zero. In one very long and difficult game (the map was created by some Englishman), I accumulated a lot of money. The count went into the millions, or even billions. And then, one day, after my turn, the balance became negative.
Damn! I spent several minutes typing out the response, and suddenly it disappeared! :(
Okay, now I’ll be more careful.
Actually, this isn’t a bug at all, but rather an effect of numerical overflow, related to the limited bit depth of integers!
And the developers are not to blame here. :)
A little theory. For values such as the total amount of gold or hero experience, 4 bytes = 32 bits are allocated, so the maximum number with a sign that can fit in them is 2^31-1 = 2147483647, i.e., just over 2 billion. As soon as the number reaches this value, the sign will change (0 changes to 1 in the most significant digit), and you will have to wait for a very long time until enough money (or experience) accumulates for this number to become positive again.
For this reason, you should not be too happy if you have too much money, and especially if your hero has reached level 81 (see FizMiG, section 1.8, Dependence between Hero Level and Number of Experience Points (XP))!
I once experienced a gold overflow when I was playing samatron's map "Island of the Little Skull" (see also: /topic/7037/).
By the way, kinORnirvana, what was that map, and on which month did “the terrible thing” happen?
Another thing to watch out for, and where an overflow is quite possible, is the number of creatures in a stack: by getting carried away with necromancy, you can end up with zero skeletons after a few months! For these values, not 4, but 2 bytes are allocated, and after 65535, an overflow will occur! (This was discussed somewhere on the WoG forum recently)

Added after 13 minutes
Turkish Cucumber
There’s a bug on platinum mode where my Fireball spell doesn’t work... I cast it, it explodes, and it’s as if nothing happened, and mana is spent. And it doesn’t even deal damage.
And this, judging by the description, is also not a bug, but simply the effect of magic resistance, if the enemy has the Resistance skill, artifacts providing resistance, or resistance properties for creatures (dwarves). I have encountered this many times; yes, it's annoying, but it was designed by the developers as one of the random factors in the game. To check and make sure that this is not a bug, just repeat it several times; sometimes it will work, sometimes it won't.

Statistics

Welcome our newest member: dodoD0D0