RollTable.roll_floor and roll_ceiling (numbers or values) limit a ranged
roll's total after its modifier (RollRange.limit). An earlier result's
change (e.g. @atmo_min = 7) can thereby raise or cap a later card's roll.
The inspector's Limits rows take a number or a value; the Why trace says
'raised to 7 (never below Atmo min)'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pick option can cost an amount of a value (TableEntry.cost_value and
cost_amount, JSON "cost"; the inspector's Costs row). The pop-up shows
the cost, and greys the option out with the reason when there isn't
enough; Random never picks it. Picking it takes the amount away as an
ordinary change (RollCosts). A costly Reroll option that threads back to a
card gives spend-a-point rerolls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread with 'Wait for me first' (TableEntry.pipe_pause, JSON "pause")
stops the roll before it runs (Roller.OP_PAUSE, a "pause" request). The
tray shows Continue ▸ and Stop here; starting another roll sets the paused
one aside with its chip kept, and Continue makes it the current roll again
(RollPauses; each roll's token lives in a holder so it can be revived).
Stop here ends the roll and the chip says where it stopped. Headless rolls
continue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rolls the card's whole chain a chosen number of times (up to 100) and
shows every result together, with Copy all. Each run asks its questions,
changes values and decks, and goes into Earlier like a normal roll.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread that rolls its card more than once gets a 'then' choice
(TableEntry.pipe_combine, JSON "combine"): keep every roll (as before),
add them together, keep the highest or lowest, or let the player choose
(the choice pop-up). The repeats hold their own threads until the combine
step (Roller.OP_COMBINE, RollCombine) keeps one, which then follows its
threads; save-as keeps the total or the kept result. Set-aside rolls show
faded in the tray.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BookPage (text with BBCode, details, tags, a name) lives in the spread file
under "book"; a result linked to a page (TableEntry.page) follows its
text and details, so one edit reaches every copy. The Book panel (View ▾,
☰ or right-click) lists pages with search over names, text and tags, and
edits the selected page with a live preview. Drag a page onto a result to
link it, or onto a card to add it as a new result. The inspector offers
Save to the Book, or shows the page with Unlink; editing a result's own
text unlinks it; linked rows show a §. Undo covers the Book.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MobileLayout (Android, or --mobile to try it on a desktop): the List fills
the screen with a Spread/List swap; the bar drops the title, hint, zoom,
View, Help and Play/Build (the last three move into ☰); the tray hides its
Earlier column and shortens Roll again; DPI scaling. TouchInput (every
platform): a long press is a right-click, two fingers pan and pinch-zoom.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A left-docked panel (View ▾ → List view, ☰ or right-click the spread)
lists every card, with groups as folders. Rows show threads in and out
(hover for where they lead) and a Roll cell; click selects in Build,
double-click shows the card on the spread, right-click opens its menu.
Drag to reorder (the spread's own order, saved and undoable), onto a
folder to move in, folder into folder to nest. Own search, + Folder,
resizable edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TableGroup.parent (JSON "parent") puts a group inside another. Grouping a
selection that includes groups nests them (the new group goes in the group
they all share). A collapsed group hides every card and group inside it and
stands in for them on threads; moving, deleting, search, focus (opens every
collapsed group around a card), packing, undo and templates all work
through the nesting. Ungroup hands the contents to the outer group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deck-mode cards fade the results already drawn until the deck is shuffled.
The inspector gets a Deck mode section (Draw without repeats; when empty,
Shuffle by itself or Wait for Shuffle; the Empty result's text, saved as
deck_empty_text). A waiting empty deck gives its Empty result in normal
ink, not as an error. Reshuffle reads Shuffle everywhere.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tray chips name their card in bold, dark text; how it was rolled follows, muted.
- The card inspector lists Threads in (from which card and result) and
Threads out (from which result, to which card); click one to select it.
- A range typed backwards (start above end) is no longer swapped: the card
warns and its die is greyed out until it's fixed.
- Save as template… can replace one of your templates; the template list's
Rename became Edit… (name, description, fill-in labels).
- Spread ▾ export: the Table Tarot file first, other formats in a submenu.
- Test spread section hints in plain words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Below 45% zoom a CardShield covers each card and collapsed group: the name
shows as a tooltip, dragging moves it, right-click opens its menu, and in
Play a click rolls it. Zoom back in and the card's own controls return.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Actions builds the menu for a card, thread, group or the empty spread;
the card and group ⋯ buttons, right-click, and the top bar's ☰ menu all
use it. The spread menu adds a card where you clicked, groups the
selection, searches, shuffles all decks (new), fits the spread and opens
the theme. Cards and threads get a Colour ▸ submenu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grip in each card's bottom-right corner sets RollTable.width and
list_height (saved as "w" and "list_h"); with a height the results
list scrolls. Double-click the grip for the automatic size again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cards, selections, new cards and inserted templates may sit anywhere,
including left of or above the old edge. In Build a drag on empty space
draws a selection box (Ctrl/Shift adds); middle-drag or Space+drag pans
(a plain drag still pans in Play). The box also picks up collapsed groups
it touches and expanded groups it covers, and dragging any selected card
or group moves the whole selection (MainSelection). Ctrl-click a group's
title to add it to the selection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sparkles (CPU particles, mobile-safe) in the theme's GLOW colour: a trail
follows the pulse up each thread, and a short burst plays over a result as
it lands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User-facing text only; code names, JSON keys and the project's internal
name (and so the user:// folder) are unchanged. The Collection card kind
keeps its name until a new one is chosen. The window title says Table
Tarot; the top bar shows the theme's logo (the fortune teller, drawn from a
copy of the art without its background square); the app icon is the
mascot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CardFrame draws the user's frame_corner/frame_border art around each card,
tiling the bead strip so it fits any size; a small shader recolours the art
to the theme's trim (or the card's own colour). Themes choose the border
(Tarot: beaded, Felt: plain). Cards (RollTable.color) and threads
(TableEntry.pipe_color, JSON "color") can have their own colour from the
inspector's Colour row (presets, Theme, or any colour).
tools/run_tests.sh imports first and prints at most 8 lines per failing suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Style's colours become static vars named by role (BG, PANEL, CARD, THREAD,
ACCENT, TRIM, GLOW…) instead of materials (felt, copper, brass), so a theme
can replace them. Stray hard-coded colours moved into tokens.
ThemeStore applies built-in sets (Tarot, the new default: jewel-purple
cloth with a shine; Felt, the old look) and the user's own sets from
user://themes/. Fills for the background and panels can be gradients; the
background pattern (dots, stars, none) and logo are per set. View ▾ →
Theme… edits a set; changes to a built-in save as a new set. Using a theme
reloads the UI and keeps the open spread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DESIGN.md (read every session) keeps status, names and the agreed plan;
architecture and history move to ARCHITECTURE.md and HISTORY.md, read on
demand. tools/run_tests.sh runs the suites in parallel and fails on SCRIPT
ERROR as well as on a missing PASS line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping a pipe from a range on a ranged table replaced the range's
existing pipe. Ranges now add pipes like weighted results do, so one
result can feed several tables in one roll. DESIGN.md records the
change and the decision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Striped result rows (parchment tint, on by default, `striped_rows` setting).
- Top bar: View ▾ (Plain words / Rule text, Collapse/Expand all, Striped rows,
Minimap) and a "− 90% ▾ +" zoom control replace the Plain|Text switch,
Collapse all, −/Fit/+ and Map. Arrange ▾ folds into Board ▾; Search is an icon.
- Help ▾ and F1 open a Help window; the 17 topics live in help/topics.txt.
- Build cards get a ⋯ menu (settings, template, collapse, delete) instead of
the gear and footer Delete, sharing Style.overflow_button with group cards.
Row × buttons show only on hover, focus or selection.
- Sample: Luck value card, Make Camp (pick card) and Search the Ruins
(1d6 + Luck, with results only a modifier reaches).
- New test suite test_top_bar; Canvas/GraphML round-trip tests compare plain
tables only, since logic keys are JSON-only.
- DESIGN.md: open items, including the Card Mode UI redesign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ranged roll tables take a modifier (dice_mod, e.g. @luck). Ranges may run
past the dice (-3 to 24 on a d20); totals past the ends use the end result.
- Range and chance code moved from RollTable into RollRange; chances follow
the modifier's current value; plain wording and Why lines name it.
- ModifierEditor builds modifiers in plain words for roll and check cards;
the inspector's roll section is now InspectorRoll.
- The Earlier tab scrolls; the tray and inspector resize with drag handles
(PanelSplitter), sizes kept in local settings.
- Demo Room check uses 2d6 + Luck with a luck-only vault; new test_modifier
suite; docs updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open items for the next session (repo privacy waiting on the user, a
playtest of the renamed build, a stale worktree), the glossary as a
decision, built-in templates, the next files to split, uninvestigated
scanner warnings, and the parallel-split agent brief.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Describe.kind_label / choice_label / choice_labels replace six drifting
label tables. Search no longer calls Check and Router cards "Table", and
a Check card's dialog is titled "Check settings".
- Choice types read "Which option / How many / Open ended" everywhere
(menu, settings, inspector, card, preview, details).
- Plain dice read "2d6" / "d6" instead of the 2D-game "2D" / "1D".
- The built-in "2D skill check" template becomes "Skill check (2d6 vs
target)" (builtin:skill-check), a real Check card with Success and Failure.
- User text says "result" and "change" instead of "entry", "row" and "effect"
(Test board, settings dialog, lint, variables panel, pipe options).
- Pipes are deleted (link, toast, undo label), like cards and results; the
reset statement reads "Reset" in the builder and "Reset all X" for
prefixes. "Clear" stays for a value that really was erased.
- The template-saved toast points at "+ Card ▾".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Style.menu_button / font_colors / field_colors replace five copies of the
"copy a bar button's skin onto a MenuButton" block, nine single-colour
font loops and four field colour blocks.
- GroupCard uses TableCard.vbox/hbox instead of its own copies.
- InspectorKit.focused_tag / clear / refocus / as_text_link replace the
focus-keeping render frame and "Edit as text" link shared by the
condition and effects builders.
- InspectorCard._setting_line replaces three copies of a bound setting field.
- Main.file_dialog / export_dialog replace four FileDialog setups.
- JsonIO.entry_line / finish_import replace copies in canvas_io,
dot_exporter and graphml_io.
- Dead code: TableCard's unused inline-editor fields and the no-op
--edit-details / --edit-effects flags, an unused error counter in the
tray, and an unreachable "settings not available" fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main (3679 lines) becomes a shell: shared state, start-up, cards, input,
rules view and one-line delegators for the methods other files call. Each
area moves with its state into a RefCounted helper holding a back-reference
(m: Main):
main_cli.gd command-line and screenshot flags
main_top_bar.gd top bar, toast, endless-loop chip
main_editing.gd add/delete cards, results and pipes, selection bar
main_groups.gd groups and card drags
main_templates.gd templates
main_rolling.gd rolling, choice questions, playback, session seed, copy
main_collections.gd collections, import/export, table settings, test board
main_state.gd decks, variables, roll history (local state)
main_navigation.gd search, focus, minimap, arrange/pack
main_history.gd undo/redo and mark_dirty
main_inspector.gd inspector selection and refresh
Tests that reached moved private members now go through the helper
(main.undo_redo.edits, main.rolling.pending_choice(), ...).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ui/table_card.gd keeps the card node (setup, rebuild, styling, selection,
highlights API, geometry, drag input) and delegates to RefCounted helpers
that own their own state: TableCardHeader, TableCardRows, TableCardEditing,
TableCardValue, plus static TableCardText. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TableSettingsDialog keeps the common fields; its static editing rules move
to TableSettingsRules and the kind-specific fields to SettingsKindFields.
ResultTray keeps the layout and render loop; chip builders move to
TrayChips, captions and effect lines to TrayText, and the Earlier tab to
EarlierRolls. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The execution loop, node helpers and live display stay in Roller; every
Roller function and constant used elsewhere keeps a one-line delegator.
No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers what TableTower is and its product principles, the feature set
on main, the architecture and key implementation facts, storage, how
to run tests, the simulator and background test windows, decisions on
record, known gaps, the private Traveller test board, ranked
improvement ideas and a short history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cards read the inspector's selection ({kind, tid, eid}) and the
inspector marks the selected row on every card when it changes.
- A variable card's starting value now applies: before a top-level
roll, each declared variable that isn't set yet and has a starting
value is set to it (a "starts at 9" Strength no longer reads as 0).
- Check cards in Build no longer repeat "Success Success": a result
text equal to the outlet name shows as an empty field with a hint.
- test_options switches to the Text view through Main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- RulesView (ui/rules_view.gd): plain-or-text helpers over Describe, reading
Main.rules_plain() when present (else StateStore, else plain; --rules=text
for screenshots) and refreshing on Main.rules_view_changed.
- Cards: effect chips, router cases, option sources, show_if, loop rules,
expression dice and variable kinds read in plain words. Build cards drop the
inline effects / show_if / condition / details editors for plain chips;
result text and names stay inline. Row clicks call main.select_result();
the selected row gets a copper bar (set_selected_entry / inspector_selection).
- Check cards: 2D badge, the rule as a sentence, Success / Failure outlets.
Collection cards: live members and "+ Add" (main.select_card). Inputs:
a dashed "Input Tier · starts at 1" box.
- Pipe labels via Describe.pipe, nudged apart and cut to the gap.
- Tray: plain captions (inputs, checks, cases), effect lines from why facts,
and a "Why this?" button opening a WhyPopover; hovers show the same reasons.
- Previews and the choice pop-up read conditions, effects and option sources
in plain words. Style.rules_switch() for the Plain words / Text switch.
- Describe: empty text reads "empty" ("Loot is not empty").
- tests/test_plain_display.gd; option and choice tests pin the Text view
where they check stored text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implements docs/PLAIN.md sections 1-5 (the engine half of the usability pass):
- core/describe.gd (Describe): rules in plain words, labelled from variable
cards, collections and card inputs, falling back to the original text.
- core/builder.gd (Builder): effect and condition models that round-trip
with the rule text, a rule tokenizer, and known_values(board).
- Collections: variable cards with var_type "collection" label their
members and don't declare their stem.
- Check cards (kind "check"): dice + modifier vs target, Success/Failure,
chain values nat/total/effect, node "check" info, lint and static checks.
- Card inputs and pipe "with" values, scoped over the pipe's subtree on the
explicit work stack (OP_RESTORE frames), with defaults and snapshot
evaluation.
- nat on every roll-table roll; dice faces recorded through ctx.faces.
- Why trace: facts on nodes and steps (input, roll, check, case, show_if,
options_where, effect, when, otherwise).
- StateStore rules_view setting; JSON for the new keys; LOGIC.md and
PLAIN.md updated (deviations in PLAIN.md 5a).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With undo, redo, Test board and Arrange added, the Build-mode top bar
overflowed at 1440 px and pushed the zoom and Map buttons off screen.
Undo and Redo are now icon buttons whose tooltips name the step, Test
board is reached from Board ▾, and Build mode's hint moves to the hint
label's tooltip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Roller.endless_cycles walks the whole board (about 30 ms on an 800-card
board) and ran on every keystroke in Build mode. It now runs 0.4 s after
edits stop, so a change costs about 0.4 ms instead of 34 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EditHistory (ui/edit_history.gd) keeps an undo and a redo stack of
whole-board snapshots per collection. Each table and group is its own
JSON string, shared with the previous snapshot when unchanged, so a step
costs about the size of the cards it changed. Collapsed flags are kept
apart: collapsing isn't a step and undo leaves it as it is. Labels come
from diffing the snapshots ("Delete table Loot", "Add pipe Loot → Gems",
"Move 3 cards", "Group Careers"), or from the caller.
Main.mark_dirty records steps: typing commits when it pauses (0.8 s) and
merges until focus moves, other edits commit at the end of the frame (a
drag is one step), and quick edits to the same card or pipe merge.
Actions in main.gd bracket their changes with _begin_edit/_end_edit.
Undo patches only the changed tables and groups in place and rebuilds
their cards, keeping view, mode, search and lit results, then flashes
what changed. Ctrl+Z, Ctrl+Shift+Z / Ctrl+Y outside text fields (Play
too), Undo/Redo buttons with step tooltips in the Build bar, and the
toast's Undo now goes through the history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pick choice cards can take their options from variables (options_from:
@prefix_* or a @list, filtered by options_where with option, option_label
and option_value bound). A Chosen entry runs for whichever dynamic option
is picked; fixed entries stay as extras, listed first. Random weighs each
dynamic option as the Chosen entry and fixed ones by weight. Any pick
option can have show_if, which hides it from the pop-up and from Random;
with nothing offered the node stops with "No options available".
@[expr] reads or writes the variable named by expr in expressions,
effects (including reset) and text ({@[expr]}); bad computed names are
effect errors. JSON round trip, lint_options in lint_pipes, choice
pop-up value badges and previews, card and settings UI, docs, demo board
(Spend a find) and tests/test_options.gd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>