package documentation
A python package with various modules for accessing Neverwinter Nights: Enhanced Edition data formats and functionality.
Stability
This package is currently in ALPHA state. API stability is not guaranteed.
Installation
The package is available on PyPI and can be installed with pip:
pip install nwn
License
This package is licensed under the MIT license.
Module | compressedbuf |
Read and write compressedbuf files, used in NWSync and campaign databases. |
Module | erf |
Read and write ERF (Encapsulated Resource Format) archives. |
Package | gff |
Transform GFF (Generic File Format) files from/to native python types. |
Module | key |
Read keyfiles, which store base game resources in the installation directory. |
Package | nwscript |
nwscript-related utilities. |
Package | nwsync |
nwsync file formats and utilities. |
Module | ssf |
Read and write soundset files. |
Module | tileset |
A parser for .set files (tilesets configuration). |
Module | tlk |
Read and write TLK (Talk Table) files (for translation and base game string references). |
Module | twoda |
Read and write 2DA files (2-dimensional array, similar to CSV). |
Module | _shared |
Shared types and helpers useful across the whole library. |
From __init__.py
:
Class |
|
A file magic identifies a file type: For NWN, it is the first four characters on certain file types. |
Class |
|
Maps engine gender IDs. |
Class |
|
A combination of Language and Gender. |
Class |
|
Maps engine language IDs. |
Function | extension |
Convert a file extension to its corresponding resource type identifier. |
Function | get |
A stand-in to enable dynamic configuration later. |
Function | restype |
Convert a resource type to its corresponding file extension. |
Convert a file extension to its corresponding resource type identifier.
Parameters | |
extension:str | The file extension to convert. |
Returns | |
int | The resource type identifier corresponding to the given extension. |
Raises | |
ValueError | If the extension is not recognized. |