nd-class for axil-nd, ported from SIC to libxylem.
git clone https://github.com/tty-pt/nd-classDocumentation
axil-nd-class
nd-class for axil-nd, ported from SIC to libxylem.
Owns character classes: the class table (auto-indexed), the per-entity classist assignment, and the life-dice bonus. Its one stat role is co-implementing nd-attr's hp_max chain โ base value plus class life dice scaled by level โ reading the predecessor with nd_last().
Install
make install
Installs one file:
lib/libnd-class.so
There is deliberately no lib/nd-class.so symlink (see axil-nd-wts for why: mods.load names the installed filename, and the OpenBSD packing list never lists a symlink).
Also packaged across all 9 platforms (deb, apk, rpm, pacman, brew, openbsd, winget + Scoop, android-lib, and ios-lib + SwiftPM XCFramework) from a v* tag.
It installs no header because it exports no API โ every symbol it defines is discovered by the engine, not called by another module.
Build from source
make
Needs libxylem and the engine's game API, <nd/xy.h>, plus <nd/level.h> (it scales by level) and <nd/attr.h> (the chain it co-implements) โ from checkouts beside this repo or from installed packages:
git clone https://github.com/tty-pt/nd-class && cd nd-class
git clone https://github.com/tty-pt/axil-nd ../axil-nd
git clone https://github.com/tty-pt/nd-level ../axil-nd-level
git clone https://github.com/tty-pt/nd-attr ../axil-nd-attr
make
Both the checkout -I flags and the installed-package paths are on the command line at once (see Makefile), and a missing -I is ignored, so the same command works either way. CI names the deps explicitly (axil-nd,libxylem,nd-level,nd-attr).
What it does
xy_install()registers theclasstable (auto-indexed) and the
classist table (one row per entity).
hp_maxadds the class life dice on top of the chain value;
on_add assigns the class; on_status reports it.
In-Game Commands (man-src/)
Class selection and review are integrated with nd-session's character creation and nd-attr's status command.
Packaged Assets (art/)
Class insignias, skill badges, and character creation portraits.
Wire Protocol & BCP Integration
Class hit dice and level bonuses fold into BCP_HP and BCP_STATS updates streamed to client HUDs.
XY Bus Hooks & Dependencies
- Co-implements the
hp_maxchain and hookson_add(creation) andon_status. - Depends on
nd-attrandnd-level.
Modder Extension Guide
To register a custom character class:
- Define a new
class_trecord specifying base hit die (e.g. d6, d8, d10, d12) and primary attribute affinities. - Insert the class into the
classtable duringxy_install(). - Co-implement class-specific stat or combat bonuses in
hp_maxormodifierchains.
Testing
There is no test.sh here. Behaviour is asserted by the engine's own suite:
cd ../axil-nd
make && ./test.sh
Notes from the port
SIC_DEFโXY_IMPL,mod_installโxy_install,call_f(...)โ
f(...).
- The link line is libxylem alone.
NEEDEDislibxylem.soandlibc.so.6.
License
BSD 2-Clause, carried over from tty-pt/nd-class. See LICENSE.