Simple program to create and automate random roll tables, with additional features for setting requirements to roll on additional tables or bring up extra information about certain entries.
Find a file
RobinFiredrake 87e578b85a Play-side UI: BBCode rendering, hover details, card decks, variables, copy, ref pipes
- Cards, result chips and the Earlier list render BBCode with RichTextLabel;
  Play rows show [[refs]] as teal chips and {vars} in brass, lit rows show the
  rolled text; missing/unset/too-deep markers are red.
- Hover pop-up (DetailsPopup) for table headers, entries with details, result
  chips and [url] metas in rendered text; items with details get a small ⓘ.
- Card-mode tables show cards left and Reshuffle; chips note reshuffles.
- Local state: decks, persistent variables and history per collection via
  StateStore (memory only when saving is off); delete_table forgets its state.
- Result tray: Copy menu (text / BBCode / with details) and a Variables tab
  (edit, re-roll, clear; last roll's chain variables read-only).
- Reference pipes drawn dashed from TextExpander.references; lit when used.
- Build mode: weight field, per-entry and table details editors, a gear
  button for table settings, pipe popover (count, save as, remove), range
  clamps use min_value(); Build cards are 300px wide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:43:01 -06:00
assets/fonts Build the pipe-board app in Godot 2026-11-08 12:05:41 -06:00
core Roller: expand refs and variables through RollContext, save pipe results 2026-11-08 12:26:33 -06:00
docs Add design document 2026-11-08 11:13:57 -06:00
io Add import/export converters: JSON, JSON Canvas, Mermaid, DOT, GraphML 2026-11-08 12:14:56 -06:00
tests Roller: expand refs and variables through RollContext, save pipe results 2026-11-08 12:26:33 -06:00
tools Add a test-window wrapper that keeps test runs in the background 2026-11-08 12:11:55 -06:00
ui Play-side UI: BBCode rendering, hover details, card decks, variables, copy, ref pipes 2026-11-08 12:43:01 -06:00
.gitattributes Initial Godot 4.7 project: TableTower 2026-11-08 10:38:06 -06:00
.gitignore Add a test-window wrapper that keeps test runs in the background 2026-11-08 12:11:55 -06:00
export_presets.cfg Add Linux export preset (M7) 2026-11-08 12:08:26 -06:00
icon.svg Initial Godot 4.7 project: TableTower 2026-11-08 10:38:06 -06:00
icon.svg.import Initial Godot 4.7 project: TableTower 2026-11-08 10:38:06 -06:00
project.godot Build the pipe-board app in Godot 2026-11-08 12:05:41 -06:00
README.md Add a test-window wrapper that keeps test runs in the background 2026-11-08 12:11:55 -06:00

TableTower

Random roll tables for tabletop games, built as a board of table cards joined by pipes. Click the die on any table and the result flows down its pipes into the next table.

Made with Godot 4.7 (GDScript).

Running

Open project.godot in Godot 4.7.x and press Play, or from a terminal:

godot --path .

Using it

  • Play mode is for the game table. Click a die to roll. The results flicker, one lands, and a bead runs down any pipe into the next table. The tray at the bottom shows the whole chain and the last few rolls.
  • Build mode is for setting up tables. Edit names and results in place, add or delete results and tables, and drag a card by its header. Drag from a result's ● onto another table to lay a pipe. Click a pipe to remove it. Deletions can be undone from the toast.
  • Ranged tables (like Wilderness Travel) roll a d100 where each range's size sets its chance. Each range takes one pipe; laying a new one replaces the old.
  • Collapsing: the arrow beside a table's name collapses it. A collapsed table still shows its last result. Collapse all / Expand all in the top bar does every table at once.
  • Moving around: drag the felt to pan, use the mouse wheel to scroll (Shift for sideways), Ctrl+wheel or pinch to zoom, and Fit to see every table.

The board saves automatically to user://board.json (on Linux, ~/.local/share/godot/app_userdata/TableTower/board.json). Reset sample in Build mode restores the example tables.

Layout

core/    data model and roller (no UI; testable headless)
ui/      main scene, board view, cards, pipes, ports, result tray, styles
assets/  fonts (Rokkitt and Atkinson Hyperlegible, both SIL OFL)
tests/   headless checks
docs/    design document

Tests

godot --headless --path . -s res://tests/test_roller.gd

Screenshots from the command line

tools/test_window.sh -- --screenshot=/tmp/board.png [--build] [--expand-all] [--collapse-all] \
    [--roll=wilderness] [--shot-delay=0.75]

This uses the sample board and doesn't save anything. tools/test_window.sh runs the game under the window class "TableTower Test" (via a temporary override.cfg), which a KWin window rule keeps in the background without focus.