Installation

_images/installation.png

Requirements

  • A Neverwinter Nights: Enhanced Edition dedicated server (nwserver).

  • NWNX:EE, or it’s updated fork.

Module setup

  1. Add ff_core.hak to the hak list of the module.

  2. Set the NWNX environment variables below, then start the server.

At startup, the framework registers every unit it finds, then runs the status console command. Read the server log for warnings about missing plugins or environment variables.

Environment variables

Required by NWNX. The server shuts down at startup if one of them is not true:

  • NWNX_TWEAKS_DEAD_CREATURES_TRIGGER_ON_AREA_EXIT=true

  • NWNX_TWEAKS_DONT_DELAY_EQUIP_EVENT=true

  • NWNX_NWSQLITEEXTENSIONS_ENABLE_2DA_VIRTUAL_TABLE_MODULE=true

Recommended. A warning is logged when they are not set:

  • NWNX_CORE_SHUTDOWN_SCRIPT=ff_x_modstop, so the units can save their data when the server shuts down.

  • NWNX_CORE_ALLOW_NWNX_FUNCTIONS_IN_EXECUTE_SCRIPT_CHUNK=true, without which the console commands of the framework do not work.

  • NWNX_OPTIMIZATIONS_CACHE_SCRIPTS=true and NWNX_OPTIMIZATIONS_CACHE_SCRIPT_CHUNKS=true.

Optional, read by the framework (see ff_x_modstartex):

  • NWN_DEBUG: set to Y to run the module in debug mode.

  • NWN_CLEAR_CONSOLE: set to N to keep the console content on start.

  • NWN_SHUTDOWN: set to Y to shut the server down right after startup, to check that the module starts cleanly.

  • NWN_STARTUP_SCRIPT: name of a script to run once the framework startup is done.

  • X0_CAMPAIGN_DB: campaign name. Defaults to the lowercased module tag.

To try the framework on a ready-made module, see Demo.