Talk:What are the limits on various things?

Jump to navigation Jump to search

What about money? --Andrusi 14:54, 4 December 2005 (PST)

The Mad Cacti: Speaking about money, I've noticed that in some places in the source, gold is limited to 1,000,000,000 and other places 2,000,000,000. I favour the 2000,000,000 figure. But it's only there to prevent overflows, right?

Bob the Hamster: Yes, just to prevent overflows.


Bis_Senchi : Hello everybody! I was just thinking that it would be a good idea to add the limits concerning menus.

What kind of items a menu can have? How much menu can you edit under custom?

Good luck in enconding the next version!


Mike C.: As a purely academic question, how come the limit is 32000, and not 32767?

Bob the Hamster: I set it to 32767, and then I remembered that many places store item ID+1 so that would result in a value of 32768 which would flip a signed 16 bit integer over to negative, but then I remembered that our in-memory storage is all signed 32 bit numbers so it didn't matter, but then I remembered that it *does* matter for storage in lumps because those still are "short" ints, and then I wondered which lumps store +1 and which don't and whether the .SAV format stores +1, but instead of going to look it all up, I decided that 32000 was "prettier", and so I left it at that.

Mike C.: Ah. Not that it's going to be a problem anyway. That's still 12498% more than we had before ;)

Bob the Hamster: First person to make a game that genuinely uses all of them wins a cookie.... a magical cookie that revives General Leo.

Mike C.: Oh! I bet it can do Aries, Tellah and Galuf too!

Kizul: Wow, if that's what you get for just using all the items, what do you get when you've used everything, everywhere? (edit) P.S.: when can we expect 32,767 NPCs existing on a map simultaneously, 32,767 doors/door-links, 32,767 tags, along with (just to be silly) 32,767 tile layers and 32,767 spell lists, capable of holding 32,767 spells? :D

The Mad Cacti: Extrapolating from current trends, surely within 3 years!


Moogle1: What about stats? If I'm not mistaken, there's still a hard cap of 9999 on HP/MP for heroes, 32767 for enemies, and 999 for all other stats (except Ctr and Hits). This is slightly different than the focus of this page, but the information should be preserved somewhere. Also, those caps should be lifted so that I can start dealing a million damage per hit.

The Mad Cacti: Actually, due to popular request I raised the limit on Ctr to 999. Come to think of it, I should have raised it to 32767. There's no real reason to keep around the other limits either, is there. Agreed?

Bob the Hamster: The only reason for the limits was to discourage insane values (like focus > 100 or any value of "extra hits" larger than zero ;)

Outdated info on the Plotscripting Dictionary?[edit]

Kizul: Was just thumbing through the 'definition' for the global variable entry, and it says:

"The ID number for a global variable is a number from 0 to 1024."

And yet, on the limit-list, it says that, "You can have up to 4096 global script variables…"

Wouldn't this mean that they can actually use from 0 to 4096/4095 (and have apparently quadrupled since the last PlotDict update of that area)? >.>?

Bob the Hamster: Yep, you are right. We forgot to update that section of plotdict.xml


Moogle1: Slices? I'm about to put down ~2000. This will be interesting.

The Mad Cacti: I'm pretty sure there are no limits of any type on slices. There is more overhead than you might expect though. About 200 bytes for a typical slice, most of which are wasted. There are inefficiencies in places. Profiling shows only about 10-15% of time spent in the slice code (not including drawing) in Gohrillas.