Working as Designed max stack gone wrong

Yousef the H

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Windows 10
Terraria Version
1.4.4.7
Controls Used
Keyboard/Mouse
i don't have a photo for this one but, when collecting more than 999 platinum 99 gold 99 silver and 99 copper coins (practically getting 1000 platinum coins+ at once) only displays the number i just said
(useless info v)
it's kinda funny to just see 999 platinum 99 gold 99 silver and 99 copper just display like that and i discovered this while (obv) playing journey mode and doin stuff around
i wonder how did this not get realised by yall it's CLEARLY an obvious thing
 
Yep, I ran into this multiple times but then got used to it and forgot it's actually a bug. This also happens if you pick multiple stacks of coins with less than 1000 platinum in each, it doesn't have to be a single one with 1000 platinum. If you keep picking up coins after the hovering text display adds up to 999.99.99.99 coins, it remains stuck at that value until it fades away and resets.
 
Thanks for the report!
i wonder how did this not get realised by yall it's CLEARLY an obvious thing
Because it's not a bug. :)
The display is intentionally limited to 999 platinum, 99 gold, 99 silver, 99 copper. Values higher than about 1400 platinum would previously cause unusual behaviour, including overflows, incorrect values shown and crashes. This might be due to engine limitations.
 
It is not due to engine limitations but just an arbitrary (game design) choice :) "The engine" couldn't stop you from counting coins in an unsigned 64 bit integer, which could store a value of up to 18,446,744,073,709,551,615 copper coins which is equivalent to 18,446,744,073,709 platinum coins, 55 gold coins, 16 silver coins and 15 copper coins.
 
It is not due to engine limitations but just an arbitrary (game design) choice :) "The engine" couldn't stop you from counting coins in an unsigned 64 bit integer, which could store a value of up to 18,446,744,073,709,551,615 copper coins which is equivalent to 18,446,744,073,709 platinum coins, 55 gold coins, 16 silver coins and 15 copper coins.
Yes, but Windows Terraria is a 32 bit application and 999,99,99,99 is fairly close to 2147483647. No reason they couldn't count the coins with a method other than storing it in a 32 bit integer, though, other than it takes more work. I also don't see what 1400 platinum has to do with anything. Either way, this is just a cosmetic bug and basically never happens outside of Journey Mode/cheating.
 
2147P 48G 36S 47C is max. theoretical limit
 
From the C# Language Specification, Section 8.3.6, Integral types:
The ulong type represents unsigned 64-bit integers with values from 0 to 18446744073709551615, inclusive.
No mentioning of this type being dependent on the compilation target. This is also obvious, compilers simply emulate 64-bit values by using two 32-bit registers on 32-bit systems at a performance cost that is almost irrelevant, especially for something like this. So again, this is a choice by the developer, not a "theoretical limit" or anything else. In fact, even if the language didn't offer an inbuilt 64-bit long integer type, one could still easily implement counting that goes higher than the 32-bit integer limit by using a second integer just like the compile would otherwise.
 
Thanks for the report!

Because it's not a bug. :)
The display is intentionally limited to 999 platinum, 99 gold, 99 silver, 99 copper. Values higher than about 1400 platinum would previously cause unusual behaviour, including overflows, incorrect values shown and crashes. This might be due to engine limitations.
the point which confused me was the fact that when dying, it displays the correct amount of coins dropped even when it's more than 9999 platinum coins
my guess is that part is just display and not calculations through all the coins for the limit
 
Back
Top Bottom