Side note on nwsync / .0 / .res / .270c files

Arising from a discussion of nwsync terminating when presented with a file named tfa01.res (as far as the user is concerned) which we are told is stored as tfa01.0 in erf-like containers…

On investigation, this file is a copy of tcn01.270c.

270c files exist for many Bioware tilesets. They contain a list of doors. The only references I can find state “filetype unknown” so perhaps they are an obsolete format which Beamdog just copied over from the Bioware original. Quite likely to turn up in reskinned tilesets, I imagine, which is the case here.

We’ve added a hotfix instruction to the CEP 2.70 downloads, and will delete the file from the next release.

0x270c hex is type 9996 (extension .ids), which is referenced in resman/nwn code such:

#define     RESTYPE_IDS    9996     // Legacy BG Script File

This is not used in Aurora engine games at all. Whoever packed that file initially probably used a utility that just rewrote the extension into .0/res.

For future reference, here’s all currently known types in NWN:

#define     RESTYPE_RES       0     // Generic type
#define     RESTYPE_BMP       1
#define     RESTYPE_MVE       2
#define     RESTYPE_TGA       3
#define     RESTYPE_WAV       4
#define     RESTYPE_WFX       5     // Wave extra info
#define     RESTYPE_PLT       6     // Packed Layered Texture
#define     RESTYPE_INI       7
#define     RESTYPE_MP3       8     // MP3 Audio File
#define     RESTYPE_MPG       9     // MPG Video File
#define     RESTYPE_TXT      10
#define     RESTYPE_KEY    9999     // Key file
#define     RESTYPE_BIF    9998     // BIFF file
#define     RESTYPE_ERF    9997     // Encapsulated file
#define     RESTYPE_IDS    9996     // Legacy BG Script File
#define     RESTYPE_PLH    2000     // Aurora Polyhedron
#define     RESTYPE_TEX    2001     // Aurora Texture
#define     RESTYPE_MDL    2002     // Aurora Model
#define     RESTYPE_THG    2003     // Aurora Thing
#define     RESTYPE_FNT    2005     // Aurora Font
#define     RESTYPE_LUA    2007     // Aurora Lua script
#define     RESTYPE_SLT    2008     // Aurora Slot file
#define     RESTYPE_NSS    2009     // Neverwinter Source Script
#define     RESTYPE_NCS    2010     // Neverwinter Compiled Script
#define     RESTYPE_MOD    2011     // Neverwinter Module File
#define     RESTYPE_ARE    2012     // Neverwinter Area File
#define     RESTYPE_SET    2013     // Neverwinter Tile Set File
#define     RESTYPE_IFO    2014     // Neverwinter Module Info File
#define     RESTYPE_BIC    2015     // Neverwinter Creature Class File
#define     RESTYPE_WOK    2016     // Neverwinter Walk Mesh
#define     RESTYPE_2DA    2017     // 2-Dimensional Array File
#define     RESTYPE_TLK    2018     // Dialog Tlk File
#define     RESTYPE_TXI    2022     // Extra Texture Info
#define     RESTYPE_GIT    2023     // Game Instance File
#define     RESTYPE_BTI    2024     // BioWare Template for Items ************ NO LONGER USED
#define     RESTYPE_UTI    2025     // User Template for Items
#define     RESTYPE_BTC    2026     // BioWare Template for Creatures
#define     RESTYPE_UTC    2027     // User Template for Creatures
#define     RESTYPE_DLG    2029     // Dialog File
#define     RESTYPE_ITP    2030     // Item Template Palette
#define     RESTYPE_BTT    2031     // BioWare Template for Triggers
#define     RESTYPE_UTT    2032     // User Template for Triggers
#define     RESTYPE_DDS    2033     // Compressed Texture File
#define     RESTYPE_BTS    2034     // BioWare Template for Sounds
#define     RESTYPE_UTS    2035     // User Template for Sounds
#define     RESTYPE_LTR    2036     // Letter combo probability info for name generation
#define     RESTYPE_GFF    2037     // Generic GFF file.  Used for instances when it is undesirable to create a new restype.
#define     RESTYPE_FAC    2038     // Faction file
#define     RESTYPE_BTE    2039     // BioWare Template for Encounters
#define     RESTYPE_UTE    2040     // User Template for Encounters
#define     RESTYPE_BTD    2041     // BioWare Template for Doors
#define     RESTYPE_UTD    2042     // User Template for Doors
#define     RESTYPE_BTP    2043     // BioWare Template for Placeable Objects
#define     RESTYPE_UTP    2044     // User Template for Placeable Objects
#define     RESTYPE_DFT    2045     // Used to define default values
#define     RESTYPE_GIC    2046     // Game Instance Comments
#define     RESTYPE_GUI    2047     // Graphical User Interface File.
#define     RESTYPE_CSS    2048     // Conditional Source Script
#define     RESTYPE_CCS    2049     // Conditional Compiled Script
#define     RESTYPE_BTM    2050     // BioWare Template for Market/Merchants (Stores)
#define     RESTYPE_UTM    2051     // User Template for Market/Merchants (Stores)
#define     RESTYPE_DWK    2052     // Door walkable mesh
#define     RESTYPE_PWK    2053     // Placeable object walkable mesh
#define     RESTYPE_BTG    2054     // BioWare Template for Random Item Generator
#define     RESTYPE_UTG    2055     // User Template for Random Item Generator
#define     RESTYPE_JRL    2056     // Journal file
#define     RESTYPE_SAV    2057     // neverwinter savegame file
#define     RESTYPE_UTW    2058     // waypoint template
#define     RESTYPE_4PC    2059     // Custom 16-bit RGBA texture format
#define     RESTYPE_SSF    2060     // sound set file
#define     RESTYPE_HAK    2061     // HAK file
#define     RESTYPE_NWM    2062     // The other MOD file.. this one is for the split modules
#define     RESTYPE_BIK    2063     // BINK movie files
#define     RESTYPE_NDB    2064     // NWScript Debug Format Files.
#define     RESTYPE_PTM    2065     // Plot Manager file
#define     RESTYPE_PTT    2066     // Plot Template file
#define     RESTYPE_BAK    2067     // Backup file (for player files) - NB
#define     RESTYPE_DAT    2068     // Digital Distribution Dat File - OB
#define     RESTYPE_SHD    2069     // Shader files -JK
#define     RESTYPE_XBC    2070     // Backup character files that have already been converted in the oldservervault, rename to BIC to use -MGB
#define     RESTYPE_WBM    2071     // [33650] Webm files -JK
#define     RESTYPE_MTR    2072     // [35424] Material files. -JK
#define		RESTYPE_KTX    2073     // KTX container used for ETC2 compressed image files - KS
#define     RESTYPE_TTF    2074     // True type font files
#define     RESTYPE_SQL    2075     // [38057] sql(ite) files containing textual queries
#define     RESTYPE_TML    2076     // .toml configuration files
#define     RESTYPE_SQ3    2077     // sqlite database format version 3
#define     RESTYPE_LOD    2078     // Level Of Details spec file
#define     RESTYPE_GIF    2079     // GIF, animated or otherwise
#define     RESTYPE_PNG    2080     // Portable Network Graphics
#define     RESTYPE_JPG    2081     // jpg
#define     RESTYPE_CAF    2082     // CombinedAreaFormat (for json serialisation)
2 Likes

Probably some leftover from infinity engine:

Niv: “Data consistency is important and just packing up random unknown stuff for minor convenience is worse in the long run.”

I was thinking more to skip it rather than pack it in the manifest. Ignoring files the game does not use does not seem that bad to me. Especially if there is a warning so you know to go look into it.

1 Like

Agreed. The game itself ships with these files, yet it allows the player to play.

Sounds good to me. I’ll roll in a degradation-to-warning as part of the next release.

FWIW I always understood that ERF stood for Encapsulated Resource Files and not just Encapsulated Files.

TR

Yes, and…?

For anyone who is interested like I was in the contents:


0 TCN01_dtype00
1 TCN01_dtype01
2 TCN01_dtype02
3 TCN01_dtype03

I bet this would have been a super alpha 2da file or similar, since scripts are not written that way in BG. Door type maybe? heh.

Not really surprised it got added to CEP…but silly it did get added.

Looks like an IDS file (identifier file) used in infinity engine games for translating numeric values into symbolic names (for example for compiling/decompiling) or file names. Perhaps Bioware had planned to use them in NWN too but because you can define constants in nwscript they weren’t required anymore. Infinity engine already had 2da files (v1.0) btw.