GithubHelp home page GithubHelp logo

cavcode / eventsystem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daztek/eventsystem

0.0 1.0 0.0 622 KB

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

C 100.00%

eventsystem's Introduction

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_2018
    • 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)

eventsystem's People

Contributors

daztek avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.