Skip to content

Engine Limits

This page collects important hard capacities and supported gameplay limits in the original engine and Star Rod’s current compilers. It is not an exhaustive list. A field may be wide enough to store a larger number while normal engine code deliberately clamps or indexes it more narrowly.

LimitValueReason
Badges owned128PlayerData has 128 acquired-badge slots.
Badges equipped64PlayerData has 64 equipped-badge slots.
Star Pieces held222The field is one byte, but ordinary inventory and pickup code clamp it to 222.
LimitValueReason
Models in a loaded map256The engine model list has 256 entries.
Unique collision vertices1,024Each triangle stores three 10-bit vertex indices; Star Rod rejects larger tables.
Maps with encounter-defeat history in one area60EncounterStatus has defeatFlags[60][12].
LimitValueReason
Ordinary NPC slots64The world NPC list uses MAX_NPCS = 64.
Ordinary NPC ID storageSigned byteA live Npc stores its ID as s8; negative values are reserved for special lookups.
World or battle item entities256Each item-entity pool has 256 entries.
Enemy actors in one battle24Enemy actor IDs run from 0200 through 0217.

An API which accepts an s32 npcID does not enlarge the ID stored by an NPC. It allows the call to accept special negative IDs as well as ordinary list indices.

LimitValueReason
Loaded code per effect4 KiBThe engine maps one physical 0x1000-byte page for each loaded effect.
Simultaneously loaded effect types15The engine owns 15 effect-code pages and 15 shared-data records.
Live effect instances96The engine’s effect-instance pointer table has 96 entries.

The effect virtual addresses are spaced by 0x2000, but that spacing does not provide 8 KiB of writable code. Star Rod rejects a rebuilt effect whose padded code blob is larger than 0x1000 bytes.

LimitValue
Labels in one event script16
Nested event-script loops8
Nested switches8
Local variables16
Local flags96
Message-variable buffers3
Encoded characters in one message-variable buffer31 plus terminator

The local variable and flag capacities apply to each Evt context. Child and parallel scripts may share or copy state depending on how they were started.