zeroark / EventSystem

A modular Event System for Neverwinter Nights: Enhanced Edition using NWNX:EE.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EventSystem

This is an easy to use modular Event System for Neverwinter Nights using NWNX:EE. It consists of a Core system that handles the event dispatching and loading of various Services and Subsystems.

What makes this Event System special?

As mentioned earlier, it's easy to use and modular. Want to change the Skill needed to identify an item from Lore to Spellcraft? All you have to do after adding the Core system is add the following script file to your module: es_s_iditem.nss. The next time you run your server it'll automatically load the subsystem and subscribe to the events it needs, all without having to edit any existing scripts.

Want players to get a movement speed increase while traveling on roads and a movement speed decrease while in water? es_s_travel.nss has you covered!

Lastly, tried a subsystem and it's actually not to your liking? All you have to do is remove its .nss file and it's gone, no fuss.

Requirements for Core

  • NWNX:EE Plugins:
    • Object
    • Util
  • NWNX:EE Environment Variables:
    • NWNX_CORE_ALLOW_NWNX_FUNCTIONS_IN_EXECUTE_SCRIPT_CHUNK=true
    • NWNX_CORE_SHUTDOWN_SCRIPT=es_obj_e_3018
    • NWNX_UTIL_PRE_MODULE_START_SCRIPT_CHUNK="#include \"es_inc_core\" void main() { ES_Core_Init(); }"

Docker Setup

The only difference on setting up the system in Docker than in native Linux is on setting the NWNX_UTIL_PRE_MODULE_START_SCRIPT_CHUNK variable. It should be set up as follows:

  • NWNX_UTIL_PRE_MODULE_START_SCRIPT_CHUNK=#include "es_inc_core" void main() { ES_Core_Init(); }

How To Use

  1. Make sure you have enabled the required plugins and set the required environment variables listed above.
  2. Add the script files in the Core folder to your module.
  3. Add one or more Core Components, Services and Subsystems script files to your module.
  4. Start your server!

Want to write your own subsystem?

Have a look at heavily commented es_s_example.nss! (TODO)

About

A modular Event System for Neverwinter Nights: Enhanced Edition using NWNX:EE.


Languages

Language:C 100.0%