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

This is an important topic for anyone doing any kind of content creation, using a module hakpak or override. Therefore a top level topic!

The NWN game engine has an amazing set of ways to have content overriden. This means you can provide a module with an updated "Magic Missile" spell script that does something completely different. You can also provide in a hakpak file an entirely new spell icon, and even alter the text describing the spell.

However what if someone includes a magic missile spell script in their override folder? What happens if a game is loaded from a save file? Read on for more...

Content Order

Highest to Lowest. Something in a higher option always overrides the lower option.

Most folders support any files being loaded in them, but it is better to stick to the general conventions.


Location NameExample NWN:EE location (Windows/Steam)Contents LoadedNotes
1User PortraitsDocuments\Neverwinter Nights\portraitsAll content file types except .modUsually stores .tga and .dds portrait files only
2Install Portraitssteamapps\common\Neverwinter Nights\data\prtAll content file types except .modUsually stores .tga and .dds portrait files only
3User Vault

Documents\Neverwinter Nights\localvault

Documents\Neverwinter Nights\dmvault

Documents\Neverwinter Nights\servervault

All content file types except .modUsually stores .bic files only
4Install Vaultsteamapps\common\Neverwinter Nights\data\lcvAll content file types except .mod

Usually stores .bic files only

"lvc" = local character vault

5User Development FolderDocuments\Neverwinter Nights\developmentAll content file types except .mod

Development folder is also refreshed actively in the game and is for development purposes only (be careful if using on live servers, and NOT for distributed content)

The folder does not presently load in the toolset

6NWSync ManifestDocuments\Neverwinter Nights\nwsyncAll content file types except .mod
7User HakpackDocuments\Neverwinter Nights\hak.hak files (and their contents)

A further page on what can go into a hakpack file will be created later

Note: Some things are loaded at game inception (not module load) so cannot be overriden by hakpacks regardless

8Install Hakpacksteamapps\common\Neverwinter Nights\data\hk.hak files (and their contents)Mostly this is for Premium Module content, user made stuff shouldn't go here anyway
9Current Game

The current game in memory at the moment of being played, eg; a creatures instanced health, effects, world position, in an area.
10Save GameDocuments\Neverwinter Nights\saves\NAME OF SAVE.sav (and their contents)

This essentially is a copy of anything altered in the game. EG: area files, creatures instances (like health, effects) and all sorts of others. It loads this and then anything missing is taken from the .mod files.

Think of it as a layer on top of the original .mod file.

11Module

Documents\Neverwinter Nights\modules

steamapps\common\Neverwinter Nights\data\nwm

steamapps\common\Neverwinter Nights\data\mod

.mod (and their contents)

Like hakpacks a further page will be written on what can be included in a .mod file.

"nwm" is essentially .mod but "official modules".

Loaded only when a module is selected to be loaded

12User PatchUser specified see tutorial.bif or .hak files and their contentsSee tutorial: https://forums.beamdog.com/discussion/69487/nwn-ee-userpatch-ini-unofficial-faq
13User OverrideDocuments\Neverwinter Nights\overrideAll content file types except .mod

Used for overriding the games default files, eg replacing a default placeable model, 2da or spell script

Loaded at game startup pre-module load if applicable

14Install Overridesteamapps\common\Neverwinter Nights\ovrAll content file types except .mod
15User AmbientDocuments\Neverwinter Nights\ambientAll content file types except .mod.wav files, ambient sound files usually
16User MusicDocuments\Neverwinter Nights\musicAll content file types except .mod.bmu files, music files usually
17Install Ambientsteamapps\common\Neverwinter Nights\data\ambAll content file types except .mod.wav files, ambient sound files usually
18Install Musicsteamapps\common\Neverwinter Nights\data\musAll content file types except .mod.bmu files, music files usually
19Install Patchsteamapps\common\Neverwinter Nights\data.bif files and their contentsBase game content but for the ones marked _patch
20Texture Packsteamapps\common\Neverwinter Nights\data\txpk.erf files and their contentsBase game content but dependant on "texture pack" values
21Keytablesteamapps\common\Neverwinter Nights\data.bif files and their contentsBase game content bif files

Movies

Movies are loaded specially, one off, and not kept in game memory. The order is User directory then Install directory.

TLK Files

These have their own special ordering and loading, since each module can load one customised .tlk file for use.

Priority From Code

This shows the exact ordering - that was made human readable above.

 Click here to expand...
// Resource Priority is determined by category. Adding key tables to ResMan will fit
// them in the first free priority slot within the category.
// Key tables within the same priority category have no guaranteed ordering.
// MAXINT is the top of the stack, 0 the bottom.
#define RESMAN_PRIORITY_SPACING                 1000000

#define RESMAN_PRIORITY_STACK_TOP               (100 * RESMAN_PRIORITY_SPACING)

#define RESMAN_PRIORITY_TEMP                    (99 * RESMAN_PRIORITY_SPACING)

#define RESMAN_PRIORITY_USER_PORTRAITS          (91 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_PORTRAITS       (90 * RESMAN_PRIORITY_SPACING)

#define RESMAN_PRIORITY_USER_VAULT              (81 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_VAULT           (80 * RESMAN_PRIORITY_SPACING)

#define RESMAN_PRIORITY_USER_DEVELOPMENT        (71 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_DEVELOPMENT     (70 * RESMAN_PRIORITY_SPACING)

// Resource Images override currentgame/savegame too. Strange corner case.
#define RESMAN_PRIORITY_RIM                     (60 * RESMAN_PRIORITY_SPACING)

// Manifests: NWSync.
#define RESMAN_PRIORITY_USER_MANIFEST           (40 * RESMAN_PRIORITY_SPACING)

// hak resources.
#define RESMAN_PRIORITY_USER_HAK                (31 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_HAK             (30 * RESMAN_PRIORITY_SPACING)

// Currentgame/Savegame
#define RESMAN_PRIORITY_CURRENTGAME             (23 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_SAVEGAME                (22 * RESMAN_PRIORITY_SPACING)

// NWSync Manifets attached to savegames need to sit beneath savegame.
// This is a reversion of how HAK functions; however, it is arguably the
// better priority order. It is also needed because savegame data needs
// to override data in nwsync, such as module.ifo.
#define RESMAN_PRIORITY_SAVEGAME_MANIFEST       (21 * RESMAN_PRIORITY_SPACING)

// Module files: there can only be one.
// NB: nwsync manifests also contain module data and thus would override
// haks and override/. That's intended.
#define RESMAN_PRIORITY_MODULE                  (20 * RESMAN_PRIORITY_SPACING)

// Override resources. Canonically below hak.
#define RESMAN_PRIORITY_USER_PATCH              (13 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_USER_OVERRIDE           (12 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_SOURCE_OVERRIDE         (11 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_OVERRIDE        (10 * RESMAN_PRIORITY_SPACING)

// Music and ambients: Allow overriding in modules if need be.
// (requested by milos, blame him.) -niv
#define RESMAN_PRIORITY_USER_AMBIENT            (9 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_USER_MUSIC              (8 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_AMBIENT         (7 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_INSTALL_MUSIC           (6 * RESMAN_PRIORITY_SPACING)

// Core game content
#define RESMAN_PRIORITY_INSTALL_PATCH           (3 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_TEXTUREPACK             (2 * RESMAN_PRIORITY_SPACING)
#define RESMAN_PRIORITY_KEYTABLE                (1 * RESMAN_PRIORITY_SPACING)

#define RESMAN_PRIORITY_STACK_BOTTOM            0
  • No labels