Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Money bug
Thread: Money bug
snailrider
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?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
FfuzzyLogik
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...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted January 02, 2023 08:29 PM
Edited by Warmonger at 20:31, 02 Jan 2023.

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!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
snailrider
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





 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
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

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
snailrider
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0277 seconds