README
Spellcast is a scripting language, an interpreter/server, plus a terminal and a web clients with powerful capabilities.
It's main purpose is to create scenario with branches, so you can build game in the spirit of old roleplay gamebooks out of the box.
But Spellcast can also be embedded into your app, to allow users to create content, item, campaign and so on.
This page focus on the story capabilities of spellcast, but Spellcast is also a task-runner.
See also:
Usage
Usage: spellcast story [<book>] [<options 1>] [<options 2>] [...]
Options:
--ui <name>
: Set the UI to use--locale <locale>
: Set the locale for the script--locale-list
: List the available locales--assets <URL>
: Set the asset base URL (default: main book directory)--ws-server [<port>]
: Create a web socket server (default to port 57311)--http
: Create a HTTP server for content, sharing the port of the web socket server--token <token>
: Add a token to server accepted token list (can be used multiple times)--browser , -B <exe>
: Open a client browser, force --ws-server and --http --electron , -E
: Open Electron client, force --ws-server and --http--client-ui <name>
: Set the UI for the local client (use with --browser)--client-name <name>
: Set the name of the local client user--script-debug
: Activate debug-level logs for scripts ([debug] tag)--script-verbose
: Activate verbose-level logs for scripts ([debug verbose] tag)--max-ticks
: Max ticks between two user interactions (prevent from infinite loop, default: Infinity)--js
/--no-js
: Turn on/off the [js] tags
Getting started: basic script example
This is an example of a very short script with 3 scenes, featuring the most basic tags.
Copy-paste this script into a file named test.kfg
, then run spellcast story test.kfg
.
[[doctype spellcast/book]]
[chapter intro]
[scene village]
[message]