RESTYPE_* Constant Group

From NWN Lexicon
Jump to navigationJump to search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.

Used in the functions ResManGetAliasFor, ResManFindPrefix and TemplateToJson.

The game loads files by the 3 letters at the end of the name, sometimes these files are included in other files (eg; .mod files usually contains a set of .are and .ncs files the game loads). Some of these types are not even loaded by the engine but are used by the toolset or are some legacy aspect of the game.


Constants

Constant Value Game or Toolset Usage Description
RESTYPE_2DA 2017 Game and Toolset 2da file; use Get2DAString to easily load data from it.
RESTYPE_4PC 2059 Legacy / Unused A legacy "Custom 16 bit RGBA texture format" - No files of this type appear in the game files and it's unknown what the format consists of. Given 32 bit colour DDS / TGA / KTX are the norm nowadays this can be safely ignored.
RESTYPE_ARE 2012 Game and Toolset Area Blueprint file. TemplateToJson can use this type. See also RESTYPE_CAF.
RESTYPE_BAK 2067 Toolset Backup module file, created by the toolset to have a backup copy of the module being edited available in case of crashes.
RESTYPE_BIC 2015 Game and Toolset Player BIC file. Player BICs contain more data than a creature blueprint, but are not spawnable. You can now include one in the module as a default player to use.
RESTYPE_BIF 9998 Game and Toolset BIF Files are the "hakpacks" of the base game, not a loadable file format in of itself.
RESTYPE_BIK 2063 Legacy / Unused BIK files are the old "Bink video" format, and not present in NWN:EE by default (and will not be loaded by the game). WBM files are used instead.
RESTYPE_BMP 1 Toolset Bitmap image files. Used only in the toolset for the Win32 display of colour pickers for PLT files.
RESTYPE_BTC 2026 Toolset (Legacy) Legacy/Unused "Bioware Template: Creature" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTD 2041 Toolset (Legacy) Legacy/Unused "Bioware Template: Door" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTE 2039 Toolset (Legacy) Legacy/Unused "Bioware Template: Encounter" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTG 2054 Toolset (Legacy) Legacy/Unused "Bioware Template: Random Item Generator" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTI 2024 Toolset (Legacy) Legacy/Unused "Bioware Template: Item" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTM 2050 Toolset (Legacy) Legacy/Unused "Bioware Template: Merchant" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTP 2043 Toolset (Legacy) Legacy/Unused "Bioware Template: Placeable" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTS 2034 Toolset (Legacy) Legacy/Unused "Bioware Template: Sound" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_BTT 2031 Toolset (Legacy) Legacy/Unused "Bioware Template: Trigger" format. No files of this type are included in the game and their use in the toolset would probably not go well so just ignore.
RESTYPE_CAF 2082 Game Combined Area Format, used for TemplateToJson, consisting of a combined ARE, GIT and GIC all in one. Can be used in hakpacks to load an area using JsonToObject.
RESTYPE_CCS 2049 Unused / Legacy Unused. No files of this type appear in the game files and they won't load.
RESTYPE_CSS 2048 Unused / Legacy Unused. No files of this type appear in the game files and they won't load.
RESTYPE_DAT 2068 Unused / Legacy "Premium Module" "Digital Distribution Dat File" encrypted file type, or at least some part of the encryption / setup of it. Unused in NWN:EE.
RESTYPE_DDS 2033 Game and Toolset DDS Texture file format, loaded in as a priority over TGA and PLT files.
RESTYPE_DFT 2045 Unused / Legacy "Used to define default values" was used in the toolset at one point in regards to Area Properties, completely unused however.
RESTYPE_DLG 2029 Game and Toolset Dialogue file format, for conversations.
RESTYPE_DWK 2052 Game and Toolset Door walkmesh file.
RESTYPE_ERF 9997 Toolset Encapsulated Resource File, or ERF, contain other files, for instance some scripts exported from a module. It isn't loaded by the game, and it's unknown if the game can check for it.
RESTYPE_FAC 2038 Game and Toolset Faction files - used in the modules .mod container to define different (custom) factions and their standing.
RESTYPE_FNT 2005 Game Font files, you can use custom ones in PostString but the base game loads specifically named RESTYPE_TTF ones nowadays.
RESTYPE_GFF 2037 Special Case Generic File Format. Most of the files in this list are of a GFF type, but none will be named "file.gff".

The toolset will use these in ERF files as a "ExportInfo.gff" file.

The game engine uses this format for temporary engine files not written to disk, as well as in the generic StoreCampaignObject and related functions but again, hidden since the object stored will be retrieved correctly due to the GFF headers.

RESTYPE_GIC 2046 Game and Toolset Area file instanced content; eg: placed monsters and placeables in the area. Part of the CAF format if you want to have a easier way to save all area info in one, see above.
RESTYPE_GIF 2079 Game Image format. These can be used in Nui panels, see NuiCreate etc. Not usable as textures on models however.
RESTYPE_GIT 2023 Game and Toolset Area file instanced comments. While used in the toolset primarily, technically the game needs them to be present when using CopyArea etc. but the game doesn't really display them anywhere. Part of the CAF format if you want to have a easier way to save all area info in one, see above.
RESTYPE_GUI 2047 Game Graphical User Interface files, essentially containing some of the config and layout for the mostly hardcoded GUI (the events/buttons etc. have hardcoded ID's).
RESTYPE_HAK 2061 Game and Toolset Hackpack files. The module loads these before nwscript instantiates, but it might be useful to identify what might have been loaded.
RESTYPE_IDS 9996 Unused / Legacy Appears to be the legacy Baldur's Gate era script file type, none are included in the game data and the game won't load them.
RESTYPE_IFO 2014 Game and Toolset Module Information files - ie module.ifo is stored in the .mod of a module and defines the name/start location/default module scripts etc.
RESTYPE_INI 7 Game and Toolset INI files are for config files, used by the toolset mainly in NWN:EE. Mostly unused by the game since settings.tml was introduced, but a few still exist like userpatch.ini
RESTYPE_ITP 2030 Game and Toolset Item Template Palette - used primarily in the toolset and DM client to spawn new stuff.
RESTYPE_JPG 2081 Game Image format. These can be used in NuiImage, see NuiCreate etc. but are not usable as model textures.
RESTYPE_JRL 2056 Game and Toolset Journal file - can define quests and journal entries.
RESTYPE_JUI 2083 Game JSON User Interface files. They are not generic JSON, used only for NuiCreateFromResRef, and must be client side for use there.
RESTYPE_KEY 9999 Game and Toolset The KEY files are used to store some base information about the BIF file locations and other bits NWN uses. Obviously not useful when a module is loaded.
RESTYPE_KTX 2073 Game Texture format primarily used on iOS in replacement of DDS. Not sure if it will load on Windows etc. properly.
RESTYPE_LOD 2078 Game Level of Detail file
RESTYPE_LTR 2036 Game and Toolset Random name generation file format, for PC and NPC name generation, and RandomName.
RESTYPE_LUA 2007 Unused / Legacy Apparently Lua would have at one point been an option for scripting, but Bioware never used them and the game and toolset won't load them.
RESTYPE_MDL 2002 Game and Toolset Model file format. Most models are referenced in a 2da or SET file (eg; appearance.2da, visualeffects.2da or as part of an areas tileset) but this is useful for finding valid appearances for SetCreatureBodyPart and CopyItemAndModify - eg are "Male, Human, Hands, Normal Phenotype 005" (pmh0_hands003) valid for armor.
RESTYPE_MOD 2011 Game and toolset Module file format. Obviously you could check a module file exists before using StartNewModule in singleplayer.
RESTYPE_MP3 8 Game and Toolset MP3 files are use for sounds and music. In particular it is really used only for stereo music however RESTYPE_WAV can be MP3 if a suitable header is added (and indeed most of the game files are really MP3).
RESTYPE_MPG 9 Unused / Legacy MPEG video file format, completely unused by the engine since BIK was used in 1.69 and WEBM (RESTYPE_WBM) is used by NWN:EE for videos.
RESTYPE_MTR 2072 Game and Toolset Material file format for texture information.
RESTYPE_MVE 2 Unused / Legacy The old Baldur's Gate movie format, the game won't load them. WEBM (RESTYPE_WBM) is used by NWN:EE for videos.
RESTYPE_NCS 2010 Game and Toolset Compiled nwscript format. Could check for it before using ExecuteScript.
RESTYPE_NDB 2064 Game and Toolset nwscript files Debug file for use with DebugServer.exe (script debugger)
RESTYPE_NSS 2009 Game and Toolset nwscript uncompiled source text files.
RESTYPE_NWM 2062 Game and Toolset Module files but official Bioware main modules. There are some special things the engine does in regards to these and save games; generally user modules won't ever use this since it can cause issues if an area is removed or altered significantly and someone loads an older save.
RESTYPE_PLH 2000 Unused / Legacy "Aurora Polyhedron" - something presumably related to models. No files of this type appear in the game files and the game won't load them.
RESTYPE_PLT 6 Game and Toolset PLT Texture file format for textures using the palette system. Overriden by DDS but overrides TGA.
RESTYPE_PNG 2080 Game Image format. These can be used in NuiImage, see NuiCreate etc.
RESTYPE_PTM 2065 Toolset Plot Template manager file, ie for the "Plot Wizard" in the toolset. Unused by the game itself.
RESTYPE_PTT 2066 Toolset Plot Template file, ie for the "Plot Wizard" in the toolset. Unused by the game itself.
RESTYPE_PWK 2053 Game and Toolset Placeable walkmesh file.
RESTYPE_RES 0 Game and Toolset (kinda) "Generic typE" - Default format the game loads if the type is not recognised. Not a "real" type of file.
RESTYPE_SAV 2057 Game Save file format. For non-NWM modules it will basically save a copy of the module entirely to the save file. For NWM modules it'll save the dynamic area content and instanced things but not scripts, area files, etc.
RESTYPE_SET 2013 Game and Toolset Tileset definition file. Defines all the tiles (models) and the rules (how things fit together on the grid). The game reads some basic data (such as the grass height) but doesn't bother loading things like the tile orders so there's no enforcement of tile placement in a loaded area.
RESTYPE_SHD 2069 Game and Toolset Shader files.
RESTYPE_SLT 2008 Unused / Legacy "Aurora Slot file" - No files of this type appear in the game files and the game won't load them.
RESTYPE_SQ3 2077 Game SQLite database related file. Saved to the module in save games.
RESTYPE_SQL 2075 Game SQLite database related file. SQL files on disk, you can generate your own just fine or read them once written by the game with tools.
RESTYPE_SSF 2060 Game and Toolset Soundset file format. Not loadable by nwscript for analysis alas.
RESTYPE_TEX 2001 Game - Special "Aurora Texture" - No files of this type appear in the game files, but it's a magic identifier for the network traffic for SetTextureOverride where it will find any appropriate texture to load.
RESTYPE_TGA 3 Game and Toolset Texture file format, PLT and DDS override it on the same name type.
RESTYPE_THG 2003 Unused / Legacy "Aurora Thing" - No files of this type appear in the game files and the game won't load them. Unused format.
RESTYPE_TLK 2018 Game and Toolset Talk table format. Note the game has one (dialog.tlk), and the module has a user defined one.
RESTYPE_TML 2076 Game and Toolset TOML, used for settings.tml that NWN:EE uses.
RESTYPE_TTF 2074 Game Truetype Font file, most of the GUI now uses this.
RESTYPE_TXI 2022 Game and Toolset "Extra Texture Info" file.
RESTYPE_TXT 10 Game Text file. The game has some uses for this but most of the time you won't care:
  • Log files in the logs folder
  • Information text file when a save game is made called savenfo with the area name
  • Player-generated clientside-only character notes for their PC
  • Server description file
RESTYPE_UTC 2027 Game and Toolset Creature template usable in TemplateToJson.
RESTYPE_UTD 2042 Game and Toolset Door template usable in TemplateToJson.
RESTYPE_UTE 2040 Game and Toolset Encounter template usable in TemplateToJson.
RESTYPE_UTG 2055 Toolset "User Template for Random Item Generator" toolset only.
RESTYPE_UTI 2025 Game and Toolset Item template usable in TemplateToJson.
RESTYPE_UTM 2051 Game and Toolset Merchant (Store) template usable in TemplateToJson.
RESTYPE_UTP 2044 Game and Toolset Placeable template usable in TemplateToJson.
RESTYPE_UTS 2035 Game and Toolset Sound template, cannot be added to areas usually (NWNX can however).
RESTYPE_UTT 2032 Game and Toolset Trigger template usable in TemplateToJson.
RESTYPE_UTW 2058 Game and Toolset Waypoint template usable in TemplateToJson.
RESTYPE_WAV 4 Game and Toolset WAV Audio file format, specifically it can be actually MP3 (most are) but the end 3 letters are WAV, and is used for mono sounds (mostly anything other than the music and ambient tracks for areas).
RESTYPE_WBM 2071 Game and Toolset WEBM video file format, truncated name to WBM. Can be loaded with the StartNewModule parameters only, or in NUI panels. The toolset only checks for these files to populate the field to play the movie.
RESTYPE_WFX 5 Unused / Legacy "Wave extra info" but no files of this type appear in the game files and the game won't load them.
RESTYPE_WOK 2016 Game and Toolset Walkmesh file.
RESTYPE_XBC 2070 Game Backup character files that have already been converted in the oldservervault, rename to BIC to use.


Version

This constants group was added in 1.85.8193.31 of NWN:EE.


See Also

functions: ResManGetAliasFor, ResManFindPrefix