RESTYPE_* Constant Group

From NWN Lexicon
Jump to: navigation, 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 Description
RESTYPE_2DA 2017 2da file; use Get2DAString to easily load data from it.
RESTYPE_4PC 2059
RESTYPE_ARE 2012 Area Blueprint file. TemplateToJson can use this type. See also RESTYPE_CAF.
RESTYPE_BAK 2067 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 Player BIC file. Player BICs contain more data than a creature blueprint, but are not spawnable.
RESTYPE_BIF 9998 BIF Files are the "hakpacks" of the base game, not a loadable file format in of itself.
RESTYPE_BIK 2063 BIK files are the old "Bink video" format, and not present in NWN:EE by default (and not even sure the game would load them). WBM files are used instead.
RESTYPE_BMP 1 Bitmap image files. Not sure the game can even load them, possibly an early holdover in Bioware development before TGA/DDS.
RESTYPE_BTC 2026
RESTYPE_BTD 2041
RESTYPE_BTE 2039
RESTYPE_BTG 2054
RESTYPE_BTI 2024
RESTYPE_BTM 2050
RESTYPE_BTP 2043
RESTYPE_BTS 2034
RESTYPE_BTT 2031
RESTYPE_CAF 2082 Combined Area Format, used for TemplateToJson, consisting of a combined ARE, GIT and GIC all in one.
RESTYPE_CCS 2049
RESTYPE_CSS 2048
RESTYPE_DAT 2068
RESTYPE_DDS 2033 Texture file format, loaded in as a priority over TGA and PLT files.
RESTYPE_DFT 2045
RESTYPE_DLG 2029 Dialogue file format, for conversations.
RESTYPE_DWK 2052 Door walkmesh file.
RESTYPE_ERF 9997 ERF files contain other files.
RESTYPE_FAC 2038 Faction files - used in the .mod to define different (custom) factions and their standing.
RESTYPE_FNT 2005 Font files, you can use custom ones in PostString but the base game loads specifically named TTF ones nowadays.
RESTYPE_GFF 2037 Generic File Format. Most of the files in this list are of a GFF type, but none will be named "file.gff"
RESTYPE_GIC 2046 Area file instanced content; eg: placed monsters and placeables in the area. Part of the CAF format see above.
RESTYPE_GIF 2079 Image format. These can be used in Nui panels, see NuiCreate etc.
RESTYPE_GIT 2023 Area file instanced comments, part of the CAF format see above.
RESTYPE_GUI 2047 Graphical User Interface files, essentially containing some of the config for the mostly hardcoded GUI.
RESTYPE_HAK 2061 Hackpack files. The module loads this before nwscript instantiates.
RESTYPE_IDS 9996
RESTYPE_IFO 2014 Information files - primarily module.ifo is stored in the .mod of a module and defines the name/start location/default module scripts etc.
RESTYPE_INI 7 INI are for config files, used by the toolset mainly in NWN:EE. Mostly unused by the game since settings.tml was introduced.
RESTYPE_ITP 2030 Item Template Palette - used primarily in the toolset and DM client to spawn new stuff.
RESTYPE_JPG 2081 Image format. These can be used in NuiImage, see NuiCreate etc.
RESTYPE_JRL 2056 Journal file - can define quests and journal entries.
RESTYPE_JUI 2083 JSON User Interface files. They are not generic JSON, used only for NuiCreateFromResRef, and must be client side for use there.
RESTYPE_KEY 9999 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 iOS optimised texture format.
RESTYPE_LOD 2078 Level of Detail file.
RESTYPE_LTR 2036 Random name generation file format, for PC and NPC name generation, and RandomName.
RESTYPE_LUA 2007 Lua script? except the game doesn't use them.
RESTYPE_MDL 2002 Model file format. Since you can't rewrite a MDL file dynamically (eg; a VFX MDL file) or the 2da lines that load the models by name, this isn't particularly useful.
RESTYPE_MOD 2011 Module file format. Obviously you could check a module file exists before using StartNewModule in singleplayer.
RESTYPE_MP3 8 MP3 files are use for sounds and music. In particular it is really used only for stereo music; the underlying format is usually actual MP3 with a different header.
RESTYPE_MPG 9 Presumably MPEG file format, not used by the game as far as we're aware - WEBM is used by NWN:EE for videos nowadays.
RESTYPE_MTR 2072 Material file format for texture information.
RESTYPE_MVE 2 The old Baldur's Gate movie format, doubtful if the game would load them however!
RESTYPE_NCS 2010 Compiled nwscript format. Could check for it before using ExecuteScript.
RESTYPE_NDB 2064 nwscript files Debug file for use with DebugServer.exe
RESTYPE_NSS 2009 nwscript uncompiled source files.
RESTYPE_NWM 2062 Module files but official Bioware main modules. There are some special things the engine does in regards to these and save games.
RESTYPE_PLH 2000
RESTYPE_PLT 6 Texture file format for textures using the palette system. Overriden by DDS but overrides TGA.
RESTYPE_PNG 2080 Image format. These can be used in NuiImage, see NuiCreate etc.
RESTYPE_PTM 2065 Plot Template manager file, ie for the "Plot Wizard" in the toolset. Unused by the game itself.
RESTYPE_PTT 2066 Plot Template file, ie for the "Plot Wizard" in the toolset. Unused by the game itself.
RESTYPE_PWK 2053 Placeable walkmesh file.
RESTYPE_RES 0 Default format the game loads if the type is not recognised. Not a "real" type.
RESTYPE_SAV 2057 Save file format. For non-NWM modules it will basically save a copy of the module entirely to the save file.
RESTYPE_SET 2013 Tileset definition file. Defines all the tiles (models) and the rules (how things fit together on the grid)
RESTYPE_SHD 2069 Shader files.
RESTYPE_SLT 2008
RESTYPE_SQ3 2077 SQLite database related file.
RESTYPE_SQL 2075 SQLite database related file.
RESTYPE_SSF 2060 Soundset file format. Not loadable by nwscript for analysis alas.
RESTYPE_TEX 2001
RESTYPE_TGA 3 Texture file format, PLT and DDS override it on the same name type.
RESTYPE_THG 2003
RESTYPE_TLK 2018 Talk table format. Note the game has one (dialog.tlk), and the module has a user defined one.
RESTYPE_TML 2076 TOML, used for settings.tml that NWN:EE uses.
RESTYPE_TTF 2074 Truetype Font file, most of the GUI now uses this.
RESTYPE_TXI 2022 Additional texture information file. Overrides MTR.
RESTYPE_TXT 10 Text file, the game doesn't load these as such.
RESTYPE_UTC 2027 Creature template usable in TemplateToJson.
RESTYPE_UTD 2042 Door template usable in TemplateToJson.
RESTYPE_UTE 2040 Encounter template usable in TemplateToJson.
RESTYPE_UTG 2055 Unknown template type.
RESTYPE_UTI 2025 Item template usable in TemplateToJson.
RESTYPE_UTM 2051 Merchant (Store) template usable in TemplateToJson.
RESTYPE_UTP 2044 Placeable template usable in TemplateToJson.
RESTYPE_UTS 2035 Sound template, cannot be added to areas usually (NWNX can however).
RESTYPE_UTT 2032 Trigger template usable in TemplateToJson.
RESTYPE_UTW 2058 Waypoint template usable in TemplateToJson.
RESTYPE_WAV 4 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 WEBM video file format, truncated name to WBM. Can be loaded with the StartNewModule parameters only, you can't load videos at other times.
RESTYPE_WFX 5
RESTYPE_WOK 2016 Walkmesh file.
RESTYPE_XBC 2070


Version

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


See Also

functions: ResManGetAliasFor, ResManFindPrefix