|
|
snailrider
Tavern Dweller
|
posted January 01, 2023 11:18 PM |
|
|
Money bug
I have been playing a huge map in hota. Got Treasury all in my 5 Ramparts so my money quickly snowballed. At month 9 I already had 1,501,804,284 gold.
Then hit end turn and next day I got to negative amount. I suppose the variable that holds the money got overflow. New balance is -2,042,189,572
When I try to buy units, they also look weird, their resource cost is also negative.
I have screenshots if interested.
Is there a plan to increase the gold balance variable in the game? With Hota introducing Huge maps, there is a chance other people will hit this bug?
|
|
FfuzzyLogik
Known Hero
|
posted January 02, 2023 07:51 PM |
|
|
Hello,
Its not really a "bug" but an amount of money you shouldn't have...
The memory stores values and "over some" it become negative.
The problem is more equilibration of maps than size... Normally you still use your money even on big maps to not get those values...
See you,
____________
FfuzzyLogik.
If I'm crazy ? Sure, because its madness to be normal...
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted January 02, 2023 08:29 PM |
|
|
This comes from 32-bit integer overflow. VCMI uses 64 bits for total money count, though the money income is capped at one billion, which fits easily within 32-bit range. So it will never overflow even with multiple Ramparts.
____________
The future of Heroes 3 is here!
|
|
snailrider
Tavern Dweller
|
posted January 02, 2023 10:16 PM |
|
|
I am not sure then how my money snowballed. Perhaps there was another bug some point that made my money so big. I definitely only noticed it when it turned negative. Also why the resource cost for creatures turned negative?
I uploaded some screenshots to the link. First screen shows the last day when had still positive $. The other two screens are next day.
https://imgur.com/a/f0RFFpW
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 02, 2023 11:31 PM |
|
|
Its a very known bug, no need of screens. All you can do is reload then use market to lower your wealth.
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted January 02, 2023 11:59 PM |
|
Edited by NimoStar at 00:00, 03 Jan 2023.
|
FfuzzyLogik said: Hello,
Its not really a "bug" but an amount of money you shouldn't have...
The memory stores values and "over some" it become negative.
The problem is more equilibration of maps than size... Normally you still use your money even on big maps to not get those values...
See you,
It is still a bug. The process could limit the money amount to positives (since H3 doesn't use debt) thus preventing overflow. Also, by making it an unsigned (rather than signed) integer the money could be doubled
Also, do negative total costs give you 2000 crystal per every dragon?
____________
Never changing = never improving
|
|
snailrider
Tavern Dweller
|
posted January 03, 2023 04:32 PM |
|
|
yes exactly. I understand somehow the amount of money got out of control. But how does that impact the resource cost of units, like on one of my screenshots.
|
|
|