Skip to content

Memory and limits

The game was made for a PS3's memory. With any mod on, it gets much more; without mods, it keeps a PS3's sizes, so nothing changes for unmodded play.

How much room a mod has

A PS3 With mods
Video memory (textures and models) 256 MB 512 MB
The game's memory window 256 MB 511 MB, plus 608 MB for one big block
Main heap 86 MB 256 MB
Graphics heap 13 MB 64 MB
Physics heap 20 MB 64 MB
Effects heap 9 MB 32 MB
Sound heap 4 MB 32 MB
Script heap 2.4 MB 12 MB
Menu heap 2 MB 8 MB
Scratch heap 1 MB 4 MB
Debug heap 2 MB 8 MB
File loader (one file, unpacked) 12.25 MB 64 MB, or the mods' largest file plus 8 MB, up to 608 MB
Sound cues, bank sets, emitters at once 400, 30, 400 800, 60, 800
Kinds of character with sound in one area 16 46
Kinds of character loaded at once 64 128
Point lights at once 512 1,024
Character IDs that get a sound bank 1 to 8999 1 to 9999, when a mod gives the bank's file

Video memory can go up to 1 GB, the most it can be, with the environment variable DES_VRAM_MB=1024.

What has no limit

Some things have no limit, because the game hands them on without reading them itself, or reads them as they are:

  • Textures: any size (see Music, movies and textures).
  • Music, voice lines and movies in open formats.
  • Map layouts (.msb): the game reads the parts, regions, events and models from the file however many there are. The disc's largest map has 1,887 parts. A bigger layout needs only memory.

Model meshes cost video memory only: the game keeps every model's vertices in video memory and keeps no other copy.

What counts

The game loads one area at a time and frees the last, so only one area's needs count. A mod's total size has no limit. An area is a world: Boletaria, Stonefang, Latria, the Shrine of Storms, the Valley of Defilement, or the Nexus.

Limits that stay

Limit What the game does at it
1,024 point lights the light isn't drawn
128 kinds of character loaded at once the character isn't made
46 kinds of character with sound at once the character has no sound effects
Character sound banks only for IDs 1 to 9999 the character has no sound effects
A heap full the game may stop, or the loading screen may never end
A file bigger than the file loader the loading screen may never end
A load list line (.arealoadlist) longer than 63 characters the game's check for its buffer fails ("Expected buffer size too large") when it loads the area. The Mods screen warns about such a line: see What the Mods screen checks

A kind of character is one model: its files, textures and animations. In the game, a 65th kind in an area isn't made, the game reports an error, and the area can stay on its loading screen. With mods on, this version adds 64 slots past the game's 64, used only when those are full. What bounds the count after that is the heaps above, which the kinds' files go in.

The point lights work the same way: the game's 513th light isn't made, so it lights nothing. With mods on, the lights past 512 go in a second table of 512 beside the game's.

The game loads sound for character IDs up to 8999 only. With mods, a character from 9000 to 9999 gets its bank too when a mod gives the file (sound/ds_se_cNNNN). The log names it. With DES_MODS_HEAPS=0, the game's own 64 kinds of character and 512 point lights stay.

When a mod reaches a limit

The first time a limit is reached in a session with mods on:

  • A message over the game names the limit, what the game does at it, and the mod with the largest share of this area's mod files. For a file too big for the file loader, it names the file and its mod.
  • The same line stays on the Mods screen until the game restarts, and goes in a problem report.
  • If the game then crashes or stops responding, the crash window shows it first: "A mod reached one of the game's limits first." Turning that mod off may let the game run.

Without mods there are no messages; the log's [limits] lines are always there.

The memory meter

With a mod on, the Mods screen's summary shows Memory in this area: the four limits this area came closest to, each as a bar with the most it used since the area began, and the most of the rest. It measures the game's heaps, the file loader, video memory and the point lights. A problem report lists every one.

Modders can watch it to see a limit coming before a player reaches it: walk through each area your mod changes, open the Mods screen, and look at the bars.

Frame rate follows the number of draws

The game prepares every draw on one CPU thread, so a map's frame rate depends more on how many draws a frame has than on its textures or vertices. The disc's Boletaria (1-1) has about 800 draws a frame: 476 for the scene and 304 for the shadow map. A scene draw costs that thread about 2 microseconds, a shadow draw about 1. One mod's 1-1 with 2,300 scene draws ran at 135 fps on a fast desktop CPU, where the disc's runs near 300. Draw params (param/drawparam/) can also make the shadow map draw nearly all of them again, which costs more.

The graphics card isn't the limit there: a lower render scale gives the same frame rate. To see a map's count, set the environment variable RSX_TITLE_STATS=1 before starting the game. In a window (not full screen), the window's title shows the frame rate and the number of draws.