Commit graph

111 commits

Author SHA1 Message Date
fe883cbeda DESIGN.md: book tables merged; next steps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:36:12 -06:00
764811b858 Docs: book-tables status, history §12, size-audit list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:27:39 -06:00
0e45ea7abc Value pickers list the values columns save
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:26:55 -06:00
03bc168756 UI for scales: make, show and edit ordered-step values
- Making one: Scale (ordered steps) in + Card, the inspector's Type switch
  and the settings dialog; steps one per line and a starting step dropdown
  (InspectorScale); new scales get Low, Medium, High.
- Showing one: the variable card shows the current step and the steps in a
  row with the current one marked; the Variables tab stores a typed step
  number or name as the step.
- Plain words: Builder ops step_up, step_down, toward, at_least, at_most
  (BuilderScales; step_up/down need the board), DescribeScales phrases,
  scale effect rows (EffectsScaleRow) and step dropdowns in conditions.
- Help: a Scales topic after Values and changes.
- Tests: test_ui_scales, plus builder and describe cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:25:55 -06:00
446ad8ab17 Saved roll steps keep each column's result, so column highlights survive history and fast rolls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:25:48 -06:00
1377368428 UI for cards with columns: header and cells, inspector Columns section, help
- TableCardColumns: the column-name header, each row's cells after its text
  (Play: wrapping text; Build: a field per cell, edited inline), cards widen
  per column, and in "each" mode the cell each column landed on is lit
  (Main.lit_columns, from the rolled node's columns).
- InspectorColumns: Add columns, add/rename/move/remove (cells kept in step),
  one roll vs each column, Save as (value picker) and Only if (condition
  builder); the result inspector gets a field per extra column.
- Help: a Columns topic after Ranged tables and dice.
- tests/test_ui_columns.gd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:25:03 -06:00
8bbc7002a0 Thread dice must roll dice: Dice.roll_problem shared by the field and the board check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:19:36 -06:00
df03168382 Thread inspector: roll with other dice, roll again on some results
- InspectorThreadRolls (new helper): "Roll it with [ ] instead" for a card
  with numbered ranges (placeholder: the card's own dice), and a collapsible
  "Roll again if it comes up: …" tick list of the card's results (scrolls
  past 7 rows; open state kept across rebuilds).
- Inspector.set_pipe_dice / set_pipe_reroll delegators; edits go through
  Inspector.wrote like the other thread options, so undo covers them.
- Help: two short subsections in the Threads topic.
- tests/test_ui_threads.gd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:18:49 -06:00
a97709128c Docs: scales, columns, thread dice and rerolls (LOGIC §3e, §3f, §5.4; ARCHITECTURE §3c)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:18:49 -06:00
e3cc925e42 Engine: scale values, cards with columns, thread dice override and rerolls
- Scales: var_type scale with steps; stored as step names, read as step
  numbers in rules (a quoted step name beside a scale reads as its number);
  += / -= move steps and stop at the ends; toward().
- Columns: RollTable.columns / column_rolls (row or each), TableEntry.cells;
  RollColumns fills the other columns, saves each, honours a column's when.
- Threads: dice (roll with other dice instead) and reroll (result ids).
- RollTable save/load split into RollTableIO; Expr's base into ExprBase.
- RollLintBook checks; JSON canon keeps the new keys; tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:12:47 -06:00
650e24e9b7 Docs: DESIGN.md as a current-state page; 2026-11-10 history and module map
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:36:02 -06:00
99f4d21911 DESIGN.md: merged to main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:15:27 -06:00
8abe90b407 Splash screen: the fortune teller on the Tarot purple
The boot splash shows the mascot art on its own background colour
(#390853), so it blends edge to edge; the app icon is the mascot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:14:43 -06:00
c97a87d9c9 DESIGN.md: audits done; remaining size candidates; TestBase
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:57:08 -06:00
82d67eb64f Size audit: split ChoiceDialog and TableCard into helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:56:20 -06:00
29d6d4eae9 Tests: extract shared TestBase (guard, main loading, check helpers, summary)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:53:22 -06:00
03a192f47d Split inspector.gd: result, thread and sync helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:51:23 -06:00
97258b0d2b Size audit: split MainLayout out of Main, EditLabels out of EditHistory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:45:56 -06:00
b1525687ad Size audit: split Describe and JsonIO into helper files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:41:08 -06:00
9f06af9676 Fix: resize corner caught clicks far outside cards; left-drag selects in Play too
CardGrip._has_point only checked 'right of and below' the corner, and
Godot asks controls about points outside their box, so everything to the
bottom-right of every card acted as its resize handle. It's now bounded to
the corner square inside the card.

A left-drag on empty space now draws a selection box in Play as well as
Build, and selected cards move together in both; panning is middle-drag or
Space+drag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:38:15 -06:00
4a4dc62c3d DESIGN.md: all twelve plan steps done on tarot; decisions waiting on the user
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:25:06 -06:00
b1616373be Help: topics for every new feature, a cheat sheet, and Try a demo spreads
Twelve new Help topics (menus, selecting and resizing, nested groups,
themes, List view, the Book, rolling more than once, pausing, costs,
one table adjusting another, sheets and saving, pictures, phones), and a
Keyboard shortcuts topic split into keys, mouse and touch. Topics with
[demo]key[/demo] get a 'Try a demo spread' link: DemoSpreads builds a
small example, DemoMode shows it unsaved and unlisted with Keep a copy
and Back to my spread. --demo=KEY opens one from the command line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:24:57 -06:00
57041d41b3 Pictures on results and Book pages; export/import keeps everything new
A result or page can have a picture (TableEntry.image, BookPage.image),
chosen from a file, shrunk to 512 px and kept in the spread file as WebP
under "images" (BoardImages; only used pictures are saved). It shows as
a thumbnail on the card row and in the details pop-up, and comes with a
page. Imported BBCode still can't point at files.

Fix: the Table Tarot JSON export and import (JsonIO.canonical) dropped
every key it didn't know, losing the Book, pictures, card colours and
sizes, limits, nesting, costs and thread options. They now pass through;
a round-trip test covers them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:21:05 -06:00
8fd2b2b8c9 Sheets: a line-per-value helper and Save as a file (Text, Markdown, web page)
The Sheet card's inspector adds a 'Label: {@value}' line for any value
picked. The tray's Copy ▾ gets Save as a file: the roll's sheet (or one
line per result) as Text, Markdown, or an HTML page a browser can print
to PDF, with bold, italics and colours kept where the format allows
(SheetExport). The test runner prints a compile error shared by many
suites once, with the suite names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:17:27 -06:00
61395fa573 DESIGN.md: plan status after steps 7-9; suggested audits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:15:28 -06:00
ef1dc846d1 Adjust later rolls: Never below / Never above on ranged cards
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>
2026-11-10 19:15:09 -06:00
25018ebdf3 Costs on choice options
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>
2026-11-10 19:12:06 -06:00
fe133d3a94 Pause: a thread can wait for the player
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>
2026-11-10 19:10:11 -06:00
a527bf545c Batches: Roll several times… on a card's menu
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>
2026-11-10 19:07:37 -06:00
1ca38f35b6 Combine repeated rolls: add together, keep highest/lowest, or let me choose
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>
2026-11-10 19:06:55 -06:00
193794a9e0 The Book: reusable results (Pages) to drag onto tables
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>
2026-11-10 19:02:46 -06:00
2fe9317b27 Phone layout and touch gestures
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>
2026-11-10 18:58:33 -06:00
0ede1d7cd1 List view: the spread as a list with folders
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>
2026-11-10 18:50:32 -06:00
5d427d3856 Nested groups: groups can hold groups
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>
2026-11-10 18:47:05 -06:00
1199fafcf9 DESIGN.md: plan status after steps 1-6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:43:31 -06:00
f00f36b598 Deck mode: faded drawn results, Wait for Shuffle with an Empty result
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>
2026-11-10 18:43:16 -06:00
1358678889 Small UI items: bold chip sources, thread lists, backwards ranges, template replace
- 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>
2026-11-10 18:40:53 -06:00
608641df66 Zoomed-out cards: names as tooltips, drag, right-click, and click to roll in Play
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>
2026-11-10 18:37:26 -06:00
748ffad21a Right-click menus and a ☰ actions menu, from one shared action list
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>
2026-11-10 18:35:24 -06:00
d85a6018ce Resizable cards: drag the corner grip for width and list height
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>
2026-11-10 18:32:09 -06:00
9fcaf5c123 No more drag walls; drag box selects; middle/Space-drag pans; groups move with the selection
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>
2026-11-10 18:30:13 -06:00
781aaf1be8 Magic sparkles on the thread pulse and on landing results
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>
2026-11-10 18:26:02 -06:00
ea1e7a6492 Rename to Table Tarot in the UI: spreads, threads, deck mode, branch, repeat
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>
2026-11-10 18:24:23 -06:00
f9aa66d74d Beaded card frames and per-card / per-thread colours
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>
2026-11-10 18:20:46 -06:00
ebe81d9f1e Theme system: runtime colour tokens, theme sets and a Theme dialog
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>
2026-11-10 18:10:16 -06:00
0c9ab1aa71 Slim DESIGN.md to a status page; add parallel test runner
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>
2026-11-10 18:03:10 -06:00
97305889b9 Let ranged results pipe into several cards (fan-out)
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>
2026-11-09 12:22:56 -06:00
85ec548425 DESIGN.md: record the UI pass merge commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:36:43 -06:00
8f16d337cf UI pass: striped rows, View/Help menus, zoom control, card ⋯ menu, fuller sample
- 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>
2026-11-09 10:36:38 -06:00
540f995e2b DESIGN.md: open items after the roll-modifier merge
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:01:21 -06:00