Statblock Studio: schema-first, system-agnostic statblock authoring tool for tabletop GMs (Kotlin, Compose Multiplatform).
Find a file
2026-09-27 10:20:18 +02:00
composeApp Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
core Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
gradle Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
tool Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
.gitignore Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
AUTHORING.md Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
build.gradle.kts Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
gradle.properties Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
gradlew Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
gradlew.bat Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00
README.md Add README with build/run and authoring instructions 2026-09-27 10:20:18 +02:00
settings.gradle.kts Statblock Studio: schema-first statblock authoring tool 2026-09-27 10:06:24 +02:00

Statblock Studio

A cross-platform statblock authoring tool for tabletop GMs. Statblock Studio is schema-first and system-agnostic: a "system" is a folder of plain files (schema, templates, styles) that defines how statblocks are edited, validated, and rendered — so any game system can be supported without rebuilding the app.

Currently a Compose Multiplatform desktop app (JVM). The rendering/validation engine lives in a Kotlin Multiplatform core module so it can later power mobile and CLI builds.

Features

  • Schema-driven editor — the form is generated from a JSON Schema; add fields to the schema and the UI, validation, and preview all follow automatically.
  • Live validation — required fields, string patterns/lengths, number bounds, array min/max, and additionalProperties are checked as you type, surfaced in the issues panel.
  • Three preview tabs — rendered Markdown, raw JSON, and raw YAML side-by-side with the form.
  • Programmatic rules — optional Kotlin rules compute derived values (e.g. ability modifiers, XP, average damage) that appear in templates.
  • Open / Save / Export — open and save statblocks as JSON or YAML; export to Markdown, standalone HTML (styles inlined), PDF, JSON, or YAML.
  • Multiple systems — the built-in Demo Fantasy system plus any packs you add from a folder in the UI (persisted between runs).

Requirements

  • JDK 21 (the build pins jvmToolchain(21))
  • Any OS with a desktop JVM (Linux, macOS, Windows)

Build & run

# run the desktop app
./gradlew :composeApp:run

# run the tests (core)
./gradlew :core:jvmTest

# full build
./gradlew :composeApp:build

Everything is a standard Gradle project, so IDEs work as usual (open the root settings.gradle.kts).

Note: this environment's Gradle resolves dependencies from repo1.maven.org — if you hit resolution errors, make sure that repository is reachable (see settings.gradle.kts).

Scaffold a new system

A bundled CLI writes a complete, working starter pack:

./gradlew :tool:installDist
tool/build/install/tool/bin/tool --id my-system --name "My System" --out ./systems
# options: --version, --description, --author, --help

Then load it in the app: system menu → Load systems folder… → pick the folder containing your pack folder.

Authoring systems

The schema is a targeted JSON Schema subset with x-* annotations that drive the form (sections, ordering, labels, help text, multiline fields, collapsed groups), plus $defs/$ref, oneOf variant branches, enums, and shared validation keywords. Templates are Mustache (with dotted access and sections). Full reference: AUTHORING.md.

The built-in Demo Fantasy system in core/src/commonMain/kotlin/dev/statblock/core/demo/DemoPack.kt is the canonical example.

Project layout

core/            Kotlin Multiplatform engine (platform-agnostic)
  commonMain/    schema parser/validator, mustache renderer, rules engine,
                 JSON + YAML codecs, demo system
  jvmMain/       PDF export (PDFBox), directory-based system source, system scaffolder
  commonTest/    engine tests (schema, rules, templates, codecs, round trips)
  jvmTest/       scaffolder + system-loading integration tests
composeApp/      Compose Multiplatform desktop app
  ui/            schema-driven form, preview (Markdown/JSON/YAML), issues panel
  Main.kt        window, toolbar (system switch, Open/Save/Export), FileKit wiring
tool/            CLI to scaffold new system packs (thin wrapper over core)

Export formats

  • Markdown — the template.md rendering
  • HTML — standalone page, template.html body wrapped with styles.css inlined
  • PDF — renders the Markdown via PDFBox
  • JSON / YAML — the raw statblock document (round-trip through the app)