World of Warcraft limits your wealth to 2^31 copper

Players have discovered that a programming decision in World of Warcraft puts a hard limit on how much in-game wealth a player can acquire: 2^31 gold pieces are all you can have. I wonder how long the gold farmers have know about this?

Today, while skimming over various WoW sites, I noticed two forum posts about the same topic: Players have discovered that there's a cap on how much money you can carry in the game. Apparently that amount is 214,748 gold, 36 silver, 48 copper. After you reach that lofty sum, you'll no longer be able to receive money from any source in the game. While some responses to the original posts claim that this exact limit had previously been theorized to exist, there have been no reports of anyone in the game actually achieving this amount via legal means.

Dorgabas on the official forums and meth on MMO-Champion's forums both reported the discovery today, each with a screenshot to provide veracity to their claims. You can check them out by clicking here. The shots are of two different players, one of whom is on a German-speaking server. In the shot you can read his conversation with a GM, which supposedly translates to him asking the GM about the limit and the GM scratching his head in response.

Link (via /.)

Discussion

Take a look at this

Actually, that's 2^31 copper pieces. If you get 100 copper it automatically converts it into 1 silver, and 100 silver into 1 gold.

Sorry to geek out so much about it. :P

Take a look at this

Sounds like they just used a 32 bit signed int to represent money in the system. This is an unfortunate mistake, but one that is made so easily. The Integer 32 type is one of the most commonly used types in any strongly-type language like C, C++, Java, C#, etc.

I recall a project I worked on a couple of years ago. We had to replace all of the int32 representations of a particular data-point with int64 representations. After doing so, and thoroughly testing, we still had bugs cropping up for months because of the difference in data types. I would imagine that the WoW people are hesitant to change the data type for money in the system, and have instead placed limits on the value.

Take a look at this

Thanks, Metostopholes! Fixing now.

Take a look at this

@joe jance:
Yeah, that's exactly what I thought too. One of their programmers somewhere must have 'int' when he should have 'unsigned int'.

It's interesting that he is no longer able to receive money in the game. It makes me think that they are aware of the bug, and added the limit to prevent the gold amount from underflow. If the limit wasn't there to prevent him from getting more gold, I'm sure somewhere in their code base it would happily change his amount of gold to -2^31.

Take a look at this

Just a rough translation of the German chat log:
GM: Hi, I'm a Gamemaster. Excuse the disturbance, but would you have a moment to talk about your ticket regarding the gold limit?
Player: Hi!
P: Yes, I've got time.
G: So you reached the Gold Limit?
P: No idea
P: Is there such a thing?
P: I can't get money by mail or from trading anymore.
G: The message you're getting says it. Have you tried sending some money to other characters?
P: Yes, that works
P: I'm wondering about that strange number*typo here*
P: number *corrects typo*
G: Then you found a way around the limit. You provoked some rather astounded game master faces ;)
P: :)
P: A pity. Wanted to become an in-game millionaire
G: The strange number probavly comes from the money not being stored in a decimal format. But there I'm just wildly guesing...
P: That's what I thought as well.
G: Can I help you otherwise?
P: No, thanks. Now that I know that it isn't a bug. Thanks for the help.
G: Have a nice day then. Good luck at trading!
P: Thanks!

Take a look at this

How much of a problem is this, really? I don't have a lot of experience with WoW, but is there really anything you could spend 2 gibicopper on?

Take a look at this

Id hope this was a bank character. Whatever the case, if I remember right you can make a specified amount of money an object to place in your bank, which would eliminate this problem.

Take a look at this

I've taken at least 4 server projects to 64-bit over the past decade. No reason WoW can't due the same other than laziness. Besides, proper classes could easily be constructed to allow a number as large as the number of bits in your entire server if you avoid using built in primitives.

Take a look at this

That said, to make it prettier they could have invented a new money type(s), like platinum, diamond, etc., then stuck to char's and rolled them all at 100. It depends on the trade off in their design, which I am unaware of. structs of 8-byte combinations and algorithms to roll them over or a single 64-bit value per item/char and algorithms to present it as gold/silver/copper.

Take a look at this

considering my character only has 72g right now, and i've worked dang hard to get every copper, i doubt i will ever have this problem. : P

art imitates life, indeed!

Take a look at this

Also, it's avoid "misusing" built-in primitives. I can't seem to get it all in before hitting post.

Take a look at this

If art imitated life, my WoW character would be in debt.

Take a look at this

Due to dew, do da doo doo.

Take a look at this

There will always be those who say 'Get A Real Life' when someone comments on MMO's, whatever people play them and they are great for examining how art and life imitates each other, for example the CDC article which looked at how disease spreads from a concept created in Wow.

Blizzard is rather good for creating Wow gold sinks, and its still pretty unlikely that this will be a problem for anyone but Gold farmers and advanced guild bank characters. When Wrath of the Lich King comes out around November they might update this to 64bit just in case, though still you won't find many people around 21K gold let alone 10x that amount.

Take a look at this

Having read Halting State, I assume this is a feature and not a bug.

Take a look at this
#16 posted by zuzu Author Profile Page, January 20, 2008 6:37 PM
Yeah, that's exactly what I thought too. One of their programmers somewhere must have 'int' when he should have 'unsigned int'.
No, the problem is using static type at all! It's a premature optimization -- the manual memory management equivalent of using constants or global variables. Von Neumann architecture has ruined the conception of epistemology in computer science -- almost exactly like the economic calculation problem.

The very simple lesson is: if you don't know something, don't hard code it into your software!

What's the most "gold" someone will ever collect in WoW? Who knows! a googleplex for sure, eventually. This is supposed to be why your interview at Google or Microsoft or wherever asks you a question like "How many cars are there in the USA?" The answer is never a fixed number (e.g. 1 million); you can only answer relative to some other value, such as the number of gas stations. This is also why all those science teachers berated you for not including units in your answers. "My foot is 24.5 long" doesn't mean anything; it's calibrated so some other "standardized" value, such as centimeters -- 24.5cm in this case.

Take a look at this
#17 posted by Moon , January 20, 2008 7:24 PM

So, go out and BUY something!

/Geez.

Take a look at this

#14: "... unlikely that this will be a problem for anyone but Gold farmers and advanced guild bank characters."

And someone whose name is "meth".

Take a look at this

Another reason to vote for Ron Paul! Oh, wait...

-G.

Take a look at this

"The very simple lesson is: if you don't know something, don't hard code it into your software!"
Yeah, but you need to code something into your software, so might as well use the largest number that can fit into a 32 bits. If someone accidently used 'int' instead of 'unsigned int', they are only using the largest number that fits in 31 bits, effectively halving the maximum number. Programmers do this all the time, like when winzip takes a shit with .zip files over 2 gigs.

Post a comment

Anonymous