Skip to content

Setup

You need Node. Wraith gets found on its own, from the Wraith app’s install or your PATH. If there isn’t one, the first build downloads it.

npm create @ratatoskr.io/plugin my-plugin

It asks a few questions, like the plugin’s name and which game it’s for. Pass --js to skip straight to JavaScript, or --yes to take the defaults.

cd my-plugin
npm install
npm run dev

dev builds into dist/ and rebuilds every time you save. The first time, run the wraith dev add line it prints, then Rescan in the overlay’s Plugins window. After that, Reload there to pick up changes.

Command What it does
npm run dev Builds on every change. Skips type checks for speed.
npm run build Type checks and builds dist/ once.
npm run types Refreshes the typings in .wraith/types for your editor.
npm run pack Builds and zips it as <name>-<version>.zip.

Any editor that speaks TypeScript works, since the typings are plain .d.ts files.

The Wraith extension for VS Code is optional, but useful. It highlights your .sal schemas and has snippets for them.

If autocomplete for wraith stops working, run npm run types.

Made with ♥ by Asgard