There are various environment variables you can configure to adjust various parts of nwn-lib.
All of them are optional, and, in fact, can waste your time!
Under linux, just add them to your shell environment (usually .bashrc), like so:
export NWN_LIB_DEBUG=0
The character encoding your local data (gff) files are in. Defaults to windows-1252. Extended dump formats like yaml, xml are always format-specific. YAML and json, for example, are always UTF-8.
Set to non-nil to make :json print pretty output (with whitespace) instead of a spaghetti bowl. nwn-lib returns compact json output, by default. Does not affect reading json.
nwn-lib prints, by default, various informational and warning messages to stderr. This is a non-optimal solution, but needed to indicate various problems or misshapes with resource files you are working with.
If you want to suppress them for some reason, set NWN_LIB_DEBUG to “0” or “off”. Any other value will indicate that you want to see the messages.
Set to non-nil to print full stack traces for each debug message emitted by NWN_LIB_DEBUG. Default is not to print them, just the first non-library-frame.
Set this to “1” if you are sure that you are only working with NWN1 files. This will make nwn-lib fail hard (Exception) on invalid resref lengths, and might save you some time tracking things down.
Note that nwn-lib takes a parameter that can force a specific NWN version.
Set this to “1” if you are working with NWN2 files and do not want to see the warnings generated by too long resref values.
Note that nwn-lib takes a parameter that can force a specific NWN version.
Set to a path containing all 2da files to initialize the 2da cache. This is needed for most interactive helpers and a few gizmos, and, of course, for TwoDA::Cache.
Specify the type of newline that Table#to_2da uses to join rows.
0 for windows newlines: \r\n (default) 1 for unix newlines: \n 2 for caret return only: \r