License: MIT ci CodeQL codecov Documentation Status

rollNW

rollNW is an homage to Neverwinter Nights in C++. It started as reusable NWN infrastructure and is broadening toward support for a modern authored RPG toolset/game: content formats, rules, scripting, rendering validation, networking foundations, and the runtime services needed to make those pieces authorable and playable.

See the docs and tests for more info, or open an IDE in browser in the quickstart section below.

Warning

rollNW is in active transition. Older docs and APIs may show a narrower NWN library cross section of the project. Current work is reframing the codebase as a foundation for an authored RPG toolset/game, with nw::gfx as the low-level graphics layer, lib/nw/render and mudl for renderer-backed asset validation, and Smalls as the rule/script authoring path. Networking and runtime services are part of the long-term foundation. Until there is a real release, assume APIs and subsystem boundaries can move.


features

  • The beginnings of a novel Rules System designed for easily adding, overriding, expanding, or removing any rule and reasonable performance

  • A combat engine that’s very nearing being able to simulate melee battles.

  • Objects (i.e. Creatures, Waypoints, etc) are implemented at a toolset level. In other words, their features cover blueprints and area instances, with support for effects and item properties. Loading objects from resman or the filesystem is transparent whether the source is GFF or JSON.

  • A recursive descent NWScript Parser. This remains useful for NWN compatibility, but new rules and scripting experiments are moving toward Smalls.

  • Implementations of pretty much every NWN File Format

  • A binary and ASCII Model Parser.

  • nw::gfx, lib/nw/render, and mudl form the current renderer validation path for NWN model, area, spell, VFX, particle, and glTF/PBR work.

  • A Resource Manager that can load all NWN containers (e.g. erf, key, nwsync) and also Zip files.

  • An implementation of NWN’s Localization System focused on utf8 everywhere.

  • Smalls is the active rules/script transition path for modern embedded tooling and rule experiments.


goals

  • aims to implement the reusable RPG, toolset, resource, rendering, networking, and runtime foundations for a modern authored game inspired by NWN.

  • keeps current implementation focused on practical foundations first: rules, content formats, renderer validation, authoring workflows, and the services a playable toolset/game will need.

  • focuses on authoring and usage, instead of doing things the Aurora Engine Way.

  • follows utf8 everywhere.

  • hews as close to C++ Core Guidelines as possible.

  • aims to be as easily bindable as possible to other languages. I.e. only library specific or STL types at API boundaries.


quickstart - Open VS Code in your Browser

Open in Gitpod

Github Codespaces is available to those in the beta.


History

A lot of what’s here was written in the 2011-2015 range as part of personal minimalist toolset, modernized and with new EE stuff added. In some sense, it’s a work of historical fiction - it’s what I’d have suggested at the start of NWN:EE: get the game and the community on the same set of libraries. Similarly to an older project that asked “what if Bioware had stuck with Lua?”. The answer to that was pretty positive: a decade ahead, at least, of nwscript.


Moonshots

You make ask yourself, why? But, to paraphrase Tennyson, ours isn’t to question why, it’s but to do and die and learn and maybe make neat things. In that spirit, here is a list of crazy projects that this library hopes to facilitate and that all fly in the face of “WHY?”.

  • A nwscript Language Server

  • A modern, cross-platform nwexplorer.

  • And, of course, the ever elusive open source NWN Toolset, with plugins, scripting, and a built-in console.


Credits

getting started