Page tree
Skip to end of metadata
Go to start of metadata

Some notable resource limits; watch out for these on large modules.

Total Resources Loaded

The game will reach an eventual limit of loading resources. This is upwards of 1,000,000 items - anyone building a module referencing this many items might want to reconsider since they'll probably not just overload the game, but peoples RAM, VRAM, CPU, GPU and disk all at once.

16K per ERF File

NWN:EE 1.80.8193.14 and later

There are no limits on a particular ERF object containing objects. The game now successfully reads all objects into the game properly. This means that you can safely have all areas, scripts and blueprints in the module file as usual, and other things like models, effects and 2da files in hakpacks.

Note: Hakpack files should stay under 2GB since the Toolset (and other tools like nwsync) doesn't read past 2GB.

Anything Earlier than 1.80.8193.14 (including NWN Diamond)

You can have 16K resources per ERF file format (specifically 16,384 is the number quoted - 14bits):

  • .mod is ERF
  • .hak is ERF
  • .erf is of course, ERF (although these don't tend to be used to load items nowadays, especially in NWN:EE)
  • .bif is a type of ERF (the base game files, don't edit these!)

This limit is primarily around the basis of the resman (resource manager) in the toolset and game. The game may load the module but things may not be fully loaded into the game (scripts may not fire, placeables may not appear). The toolset resman may lose resources (meaning things start to break, but it's unknown what rhyme or reason there is to it there).

Notably the toolset does not warn you of this limit when saving or opening!

To find the amount of files in your module open it, and look in the temp0 folder. This is the amount of files packaged up.

Fixing This Limit

Of course you can move resources into the .hak files - they are now uneditable (they also take precedence), but for some objects (such as say, placeable blueprints) this is an easy way to get around the limit. An automated build process could selectively do this.

Since scripts tend to be 2 items (a .nss and a .ncs file) these can also be optimised with very similar ones being merged.

See this discussion:

Palette Limits

There was previously in 1.69 and earlier a palette size limit of 1MB for the DM palette. It takes a lot to fill this - but funnily enough it's on average 16K entries. This is fixed in NWN:EE and palette sizes can be a lot bigger so go nuts.

  • No labels