TalebenchFor developers
Talebench games grow in two ways without changing Talebench itself:
- Kits are content: passages, values and things added to a game in one step. Creators make them in the editor; the editor's help explains them (Kits).
- Add-ons (module packages) are code: a feature with logic of its own, written in Rust, compiled to WebAssembly and run by Talebench's engine in a sandbox. An add-on can react to the story, carry out effects and steps of its own, answer formulas, keep its own part of a save, show screens drawn in the game's look and bring settings that creators fill in.
These pages are for people who write add-ons.
- The guide: a first add-on from an empty folder to a game that plays it.
- The reference: every message between the engine and an add-on, the fields of
module.json, the settings schema, the screens' parts and every code an add-on file can be refused with. - Examples: Talebench's test add-on, file by file, and Talebench's own kits to download.
An add-on runs inside the engine, never on the game's page: it has no network, no clock and no randomness but the engine's own draws, a memory cap and a step budget per call. The same game plays the same way every time, in the editor's test play, in a published game, in a replay.