module documentation

Types and classes for ResMan (resource management) functionality.

Class Container A generic resource container interface suitable for plugging into ResMan.
Class ResDict A case-insensitive resource dict that validates resource references. Data is stored in memory.
Function extension_to_restype Convert a file extension to its corresponding resource type identifier.
Function is_valid_resref Check if a given filename is a valid NWN resref.
Function restype_to_extension Convert a resource type to its corresponding file extension.
Constant RESTYPE_MAP Undocumented
def extension_to_restype(extension: str) -> int: (source)

Convert a file extension to its corresponding resource type identifier.

Parameters
extension:strThe file extension to convert.
Returns
intThe resource type identifier corresponding to the given extension.
Raises
ValueErrorIf the extension is not recognized.
def is_valid_resref(f: str) -> bool: (source)

Check if a given filename is a valid NWN resref.

Parameters
f:strThe filename to check.
Returns
boolTrue if the filename is a valid resref, False otherwise.
def restype_to_extension(restype: int) -> str: (source)

Convert a resource type to its corresponding file extension.

Parameters
restype:intThe resource type to convert.
Returns
strThe corresponding file extension for the given resource type.
Raises
ValueErrorIf the given resource type is unknown.
RESTYPE_MAP: dict[int, str] = (source)

Undocumented

Value
{0: 'res',
 1: 'bmp',
 2: 'mve',
 3: 'tga',
 4: 'wav',
 5: 'wfx',
 6: 'plt',
...