This is some info on modules, or their file format and use for save games.
Usually they are .mod files but the game also ships with .nwm files as well which are primarily different in the way save games are handled.
Module File Contents
The module file can now contain in EE any filetype except other container formats (HAK and ERF), other modules (MOD), save games (SAV) and KEY and BIF which make no sense to save.
The general content mod files would save via. the toolset (which is also loaded) is below (the list before EE expanded it to include most file types):
| Resource Type | Description |
|---|---|
| RESTYPE_NSS | NWScript: Source file |
| RESTYPE_NCS | NWScript: Compiled file |
| RESTYPE_ARE | Area file (tiles, where they are, weather, sounds etc.) |
| RESTYPE_IFO | Module IFO file (module main information) |
| RESTYPE_GIT | Instanced area information (placed doors, creatures, stores and so forth) |
| RESTYPE_UTI | Template: Item |
| RESTYPE_UTC | Template: Creature |
| RESTYPE_UTD | Template: Door |
| RESTYPE_UTE | Template: Encounter |
| RESTYPE_UTP | Template: Placeable |
| RESTYPE_UTS | Template: Sound |
| RESTYPE_UTT | Template: Trigger |
| RESTYPE_DLG | Dialog file |
| RESTYPE_FAC | Faction reputations |
| RESTYPE_DFT | Area default values files (NB: this is functionality that the toolset doesn't use, instead area defaults are in areag.ini) |
| RESTYPE_GIC | Comments file |
| RESTYPE_UTM | Template: Store |
| RESTYPE_UTG | Template: Item generator |
| RESTYPE_JRL | Journal file |
| RESTYPE_ITP | Palette file |
| RESTYPE_UTW | Template: Waypoint |
| RESTYPE_SSF | Soundset file (interesting they were even saved in mod file previously! perhaps there was an editor at one point included in it) |
| RESTYPE_PTT | Plot template file |
| RESTYPE_PTM | Plot manager file |
| RESTYPE_NDB | NWScript: Debug file |
Save Game Differences
Mod files
These save pretty much the entire module plus some additional information of the games state at the save time. You can load the game from this save file and it won't even need the original module.
There are now some additional file types the sav file might not save but can be included in modules, see below for save game patching notes.
| Resource Type | Description |
|---|---|
| RESTYPE_IFO | The modules core data, including additional information on:
|
| RESTYPE_FAC | Faction reputation list (updated with knowledge of creature-to-creature faction updates) |
| RESTYPE_JRL | Journal |
| RESTYPE_SQ3 | Module's SQLite DB |
| RESTYPE_ARE | Area files |
| RESTYPE_GIT | Area instanced files (all the objects and their current state/local variables) |
| RESTYPE_GIC | Area comment files |
| RESTYPE_DLG | Dialogue files |
| RESTYPE_NCS | Compiled script files |
| RESTYPE_NDB | Debug script files |
| RESTYPE_NSS | Source script files |
| RESTYPE_UTC | Creature templates |
| RESTYPE_UTD | Door templates |
| RESTYPE_UTE | Encounter templates |
| RESTYPE_UTI | Item templates |
| RESTYPE_UTM | Merchant templates |
| RESTYPE_UTP | Placeable templates |
| RESTYPE_UTW | Waypoint templates |
| RESTYPE_ITP | Palette files |
| RESTYPE_UTT | Trigger templates |
| RESTYPE_UTS | Store templates |
| RESTYPE_PTM | Plot manager file |
| RESTYPE_PTT | Plot template file |
NWM Files
NWM or "Neverwinter Modules" are split module files where the save game will be different, allowing some level of patching if the nwm file itself. These are usually only released as official files by the game developers.
The difference is only a subset of files are saved to the .sav and it will be flagged as a nwm sav file. These are loaded then the .nwm files are loaded as well, meaning some patching can occur of things.
| File Type | Description |
|---|---|
| RESTYPE_IFO | The modules core data, including additional information on:
|
| RESTYPE_FAC | Faction reputation list (potentially updated with changes) |
| RESTYPE_ARE | Area setup (weather, tiles, etc.). This being part of a NWM sav means changes (eg to the tiles) won't occur. Not sure why Bioware includes this but it at least makes it consistent with the GIT below. With the advent of NWNEE it does make nwm save files more hardy when employing things like SetTile. |
| RESTYPE_GIT | The instanced objects in the game world, basically everything placed or created/spawned later, and all their local variables and action states, and anything for the area itself (ie the areas local variables, any changes to the area such as SetWeather). This means you cannot update a nwm file to include, say, a new placeable put on the ground in an area. |
Patching Modules
Patching MOD files
As per above save games for mod files are conceptually everything the module usually generally has making patching pretty much impossible by just editing your mod file. However with the advent of NWNEE any additional file types such as 2da files may be patched although are much more likely to be in a hakpack file anyway, or only used at module load like a preset BIC file.
For more advanced patching it might be recommended to have the player run a specific patching script in the games console/debug panel:
- These scripts can patch the save game to change some aspects - eg many changes to objects can be done, tiles in areas etc. or even quest progress or variables could be updated.
- Some limitations would be you cannot (yet) alter some properties of things natively, replace scripts, or replace files such as .dlg (dialogue) files. However you might be able to work around some of this with Json for some objects.
Patching NWM files
These modules can be patched carefully in some instances, primarily these can be updated since they will load from the nwm file always:
- Blueprints
- Scripts
- Dialog files
However instanced active objects in the world, local variables (and thus quest progresses) and the area files themselves cannot be changed, nor can module settings like the time/date or the scripts the module runs/hakpack list/etc. So you'd need to script anything else with an On Module Load script eg:
- Check for the modules local variables for the presence of a "Is Patched" variable (or "Patched to level" variable if there is more than one patch)
- Apply changes to the areas/instanced objects/variables as needed (CopyArea/CreateArea/SetTile/DestroyObject/CreateObject and various Json functions can assist with all this)
- Set the "Is Patched" or "Patched to level" variable on the module so it doesn't do the same changes next load
- Possibly provide a quick feedback message in the OnClientEnter to tell them the save is patched