Module Startup
Launching
In order to start your module with the Faerun framework, it must be loaded by specifing a startup script via the NWNX environment variables. This script is run before module loading.
export NWNX_UTIL_PRE_MODULE_START_SCRIPT="fw_evt_mod_start"
export NWNX_TWEAKS_DEAD_CREATURES_TRIGGER_ON_AREA_EXIT=y
LD_PRELOAD="./NWNX_Core.so" LD_LIBRARY_PATH="." ./nwserver-linux (...)
Execution steps
The initialization sequence that the script fw_evt_mod_start
runs is the following:
Verify NWNX:EE support and required plugins.
Disable the instruction count limiter on startup, so as to not timeout.
Verify some environment variables, such as
NWN_DEBUG
Set and install required scripts for module events. As a double check feature, the script expects the module settings to be correctly set.
Load and send a
REGISTER
event to files that begin with one of the following:fw_x_
,fu_
,fd_
,un_
, andud_
.Disable the instruction count limiter.
Continue with module loading.