What are the limits on various things?

From OHRRPGCE-Wiki
Jump to: navigation, search

Many people ask about the various limits on different features. Here is a more-or-less complete list of all the limits on various things in an OHRRPGCE game.

Contents

[edit] Graphics

All 16-color paletted graphics, including heroes, walkabouts, enemies of each size, weapons and attacks are limited to 32767 graphics sets. (See also What are the correct sizes for each type of graphics?)

Frame limitations:

  • Walkabouts may have 8 frames: 2 in each direction
  • Hero sprites have 8 frames: Standing/Walk Frame A, Walk Frame B, Attack A, Attack B, Cast/Use Item, Defend, Hurt, Dead
  • Enemy sprites all have 1 frame
  • Weapons have 2 frames
  • Attacks have 3 frames animated any number of ways

See also: Plan for raising sprite frame limits

[edit] Backdrops

You can have up to 32767 backdrops (battle & textbox backgrounds)

[edit] Palettes

You can have up to 32767 master palettes, only one of which can be used at once. Each master palette contains 256 colours from the usual 24-bit RGB colour-space. It can also be modified in-game. You can have 32767 16-color palettes, with colours chosen from the active master palette.

[edit] Maps

Starting with release rusalka, you can have up to 32767 maps. (In version quaternion and older, the limit was 100 maps.)

Map width and height must multiply together to a number less than or equal to 100000. for example, 200*100 = 20000, is okay, but 600*200 = 120000, is not allowed. This is an arbitrary limit imposed to help prevent games that would require too much memory to run on any future handheld ports.

Each map can have up to 8 layers, numbered 0 to 7. You can select how many layers are drawn on top of the hero and NPC sprites.

You can define 9999 zones (bitmaps) per map, numbered 1-9999. No more than 15 zones may overlap at any tile on the map.

[edit] Tilesets

You can have up to 32767 tilesets. Each layer of a map can optionally use a different tileset. (You can change tilesets with plotscripting using the 'load tileset' command.)

[edit] Songs

You can have up to 32767 songs, which can be any of BAM, MIDI, OGG, or various Module formats: IT, S3M, MOD and XM. MP3 and WAV are also supported by automatically converting to OGG. See: BAM

Only one song may play at once (no cross-fading), a limit imposed by our music libraries.

[edit] Sound Effects

You can have up to 32767 sound effects. They are in OGG format, but you can also import WAV and MP3 files and they will be converted.

The number of sound effects playable at once depends on the music backend (at least 8). Each sound may only play once at a time, simply because we forgot to allow it.

[edit] Heroes

You can have 4 heroes in your active party at a time. You can have 41 heroes at a time total, including both active and reserve heroes. You can have 60 heroes defined in your whole game. Each hero you create in CUSTOM.EXE may appear in the party any number of times (that is, up to 41). All of these limits were imposed by memory limits in the old DOS version, and persist for historical reasons.

[edit] NPCs

There is a maximum of 500 NPCs defined per map, although you can place more than one copy of the same NPC in different places on the map. There is a maximum of 300 total NPC "instances" per map. So yes, you can actually create more NPCs than you can actually use on a map

See also: Plan for raising NPC-per-map limits

[edit] Doors

There is a maximum of 100 doors per map. However, you can have up to 200 door links leading away from a map, with any number per door. This is so that the same door can lead to different places depending on conditionals.

[edit] Attacks

You can define up to 32767 attacks.

An attack can do up to 2147483647 damage (unless a Damage Cap is set), however the enemy and hero editors let you specify a maximum of only 32767 HP. (You can use Cure attacks to increase HP above that.)

[edit] Enemies

You can define up to 32767 enemies.

[edit] Enemy Formations

You can combine your enemies into up to 32767 formations.

[edit] Enemy Formation Sets

You can combine your formations into up to 255 formation sets. This limitation is because the formation set number has to be stored in 8-bits of data.

[edit] Items

Starting with version ypsiliform the limit is 32000 items.

There are up 600 slots in your inventory (up to 600 types of items in your inventory at a time), although you can lower it if you want. This was a limit imposed by the SAV format, and it will be raised further in the future.

You can have up to 99 instances of each of those items in each slot of your inventory. That is just a screen-space limit, plus it is longstanding RPG tradition. If you gain more than 99 of an item, the next 99 will fill another slot in the items menu, and so on.

See also: Plan for increasing item limit

[edit] Tags

There are 1000 tags. (tags 0 and 1 are special, 2-999 are customizable). This is a file format and backwards compatibility limitation.

See also: Plan for increasing available tags

[edit] One-time usable NPCs

You can have up to 1000 one-time usable NPCs. Internally, one-time NPCs are actually stored the same way as tags.

See also: Plan for increasing available tags

[edit] Scripts

Your game can contain more than 16383 scripts. The script interpreter can handle up to 128 scripts at a time, with up to 2048 local variables in total (including recursive scripts). The maximum size of a single compiled script is 256KB (which is a few times more than all the scripts in Wandering Hamster put together), besides this there is no script buffer limit.

You can have up to 4096 global script variables (numbered 0 to 4095) and 32 strings (numbered 0 to 31). Global and local variables are signed 32-bit integers, which means they can take values from -2147483648 to 2147483647. (Before Ubersetzung they were 16-bit, limited to -32768 to 32767). There is no limit on the length of a string (before Ubersetzung, it was 40 characters)

[edit] Script strings

You can use 32 different "plot" strings at a time, numbered from 0 to 31, although you can use the Create text command to display (or store) an unlimited number of strings at a time. There is also a plan for replacing plot-string strings with real strings in any full-fledged programming language (which will of course remove the 32 string limit).

[edit] Script timers

You can use up to 100000 timers. See the allocate timers command.

[edit] Text boxes

You can have up to 32767 text boxes.

[edit] Shops

You can have up to 100 shops defined (numbered 0-99) (save format limitation), and each shop can contain up to 50 items/heroes (file format limitation)

[edit] Spells

Each hero can have up to 4 spell lists, each containing up to 24 spells.

[edit] Vehicles

You can define up to 32767 vehicle types, but the number of vehicles you can actually place is limited by the number of NPCs per map.

[edit] Money

The maximum amount of money the party can carry is 2000000000. This is the largest neatly rounded number that can fit in a signed 32 bit number. (2147483647 is the real largest 32-bit number, but 2 billion seemed cleaner)

[edit] Menus

You can have up to 32767 menus, but are limited to a total of 32767 menu items for all menus combined. For example, if you created 128 menus that each had 256 menu items, you would not be able to create any more menu items.

[edit] Slices

The only realistic limitation on slices is memory and speed. If you add too many slices, your game will run too slow. The number of slices that is "too many" will vary depending on the speed of your computer, the arrangement of the slices, and the complexity of the scripting you are performing on them.

If you had an infinitely fast computer with infinite memory, you should be able to have 2 billion children for each slice. (not counting grandchildren, great-grandchildren, etc.)

[edit] See Also

Personal tools