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 TypeDescription
RESTYPE_NSSNWScript: Source file
RESTYPE_NCSNWScript: Compiled file
RESTYPE_AREArea file (tiles, where they are, weather, sounds etc.)
RESTYPE_IFOModule IFO file (module main information)
RESTYPE_GITInstanced area information (placed doors, creatures, stores and so forth)
RESTYPE_UTITemplate: Item
RESTYPE_UTCTemplate: Creature
RESTYPE_UTDTemplate: Door
RESTYPE_UTETemplate: Encounter
RESTYPE_UTPTemplate: Placeable
RESTYPE_UTSTemplate: Sound
RESTYPE_UTTTemplate: Trigger
RESTYPE_DLGDialog file
RESTYPE_FACFaction reputations
RESTYPE_DFTArea default values files (NB: this is functionality that the toolset doesn't use, instead area defaults are in areag.ini)
RESTYPE_GICComments file
RESTYPE_UTMTemplate: Store
RESTYPE_UTGTemplate: Item generator
RESTYPE_JRLJournal file
RESTYPE_ITPPalette file
RESTYPE_UTWTemplate: Waypoint
RESTYPE_SSFSoundset file (interesting they were even saved in mod file previously! perhaps there was an editor at one point included in it)
RESTYPE_PTTPlot template file
RESTYPE_PTMPlot manager file
RESTYPE_NDBNWScript: 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 TypeDescription
RESTYPE_IFO

The modules core data, including additional information on:

  • That it is a save game
  • The player character(s) information (in MP you can rejoin and reuse the character from the save)
  • Event queue
  • Local variables
  • Tokens
  • Time of day/date
  • Limbo creatures
  • Potentially any other things changed from the start of the module
RESTYPE_FACFaction reputation list (updated with knowledge of creature-to-creature faction updates)
RESTYPE_JRLJournal
RESTYPE_SQ3Module's SQLite DB
RESTYPE_AREArea files
RESTYPE_GITArea instanced files (all the objects and their current state/local variables)
RESTYPE_GICArea comment files
RESTYPE_DLGDialogue files
RESTYPE_NCSCompiled script files
RESTYPE_NDBDebug script files
RESTYPE_NSSSource script files
RESTYPE_UTCCreature templates
RESTYPE_UTDDoor templates
RESTYPE_UTEEncounter templates
RESTYPE_UTIItem templates
RESTYPE_UTMMerchant templates
RESTYPE_UTPPlaceable templates
RESTYPE_UTWWaypoint templates
RESTYPE_ITPPalette files
RESTYPE_UTTTrigger templates
RESTYPE_UTSStore templates
RESTYPE_PTMPlot manager file
RESTYPE_PTTPlot 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 TypeDescription
RESTYPE_IFO

The modules core data, including additional information on:

  • That it is a save game
  • The player character(s) information (in MP you can rejoin and reuse the character from the save)
  • Event queue
  • Local variables
  • Tokens
  • Time of day/date
  • Limbo creatures
  • Potentially any other things changed from the start of the module
RESTYPE_FACFaction 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
  • No labels