Kotlin is a slightly nicer formatter
Document ternary and zoom
Document width/height sheet size params
Add `width:` and `height:` to the document parameters table with an example.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs: address fresh-audit findings + grammar-verified bug fixes
Audit-driven cleanup pass plus two real grammar bugs the auditor surfaced
indirectly. Verified each finding against the langium grammar before
fixing.
Grammar bugs fixed:
- 'choice<attribute>' is not in the grammar (the only choice<X> forms
are choice<string>, choice<damageType>, choice<DocumentType>). The
Your-first-System tutorial's Roller example used 'choice<attribute>
Attribute', which would fail to parse. Replaced with the real form
'self<attribute> Attribute', which is what the user actually wants
(picker over attributes on the same document).
- Ternary '?:' is not in the grammar - confirmed by grepping the
langium for any conditional/ternary expression rule. Interactivity.md
used ternary visibility throughout ('visibility: cond ? Visibility.X
: Visibility.Y'), which would not parse. Rewrote all six examples to
use the method-block form. The 'falling through with no return uses
default' pattern produces shorter code than the ternary anyway.
Wiki bugs fixed:
- Pinned Field example had two redundant 'string name' lines that were
also lowercase against PascalCase convention. Removed - documents
already have a built-in Name field.
- Document.md HP example referenced 'self.Endure', a field never
defined in the example. Changed to 'self.Fight' which is.
- Fields.md 'where:' filter examples used 'spell.X' for the iteration
alias when the alias is always 'item'. Fixed to 'item.X'.
- Home.md's 'Start with the Getting Started Guide' link was a hand-typed
full URL; switched to wiki-relative '[Getting Started](Getting-Started)'.
- Removed three suspicious-looking GitHub user-attachment URLs in the
money section (one is verifiably fake, the others are placeholder-
shaped) and the 'placeholder-inventory-image.png' 404'ing inventory
example image.
Documentation gaps closed:
- Visibility.default definition was inconsistent: Fields.md said
'displayed for all, only editable in Edit Mode' (correct per the
table); Interactivity.md said 'same as unlocked' (wrong - unlocked
always allows write). Reconciled to the Fields.md definition and
added a cross-link.
- Math.floor and Math.ceil added to Basic-Logic's common-math list
with a short note that floor is what you usually want for 'half
damage' patterns.
- Boolean field calculated values now show a method-block example
(computed boolean from another field's state), parallel to how
string and number already document calculated values.
- Getting-Started.md heal action uses bare 'amount' (matching the
bare-roll preference now established) and 'roll(d8)' for syntactic
consistency with Your-first-System.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
docs: address grammar-vs-wiki audit findings
Fixes broken examples and adds documentation for features that exist in
the langium grammar but were absent or misrepresented in the wiki.
Broken examples now corrected:
- Action params (Fields.md, Document.md): the wiki claimed
'action Heal(hidden: ...)' / 'action LevelUp(disabled: ...)' /
'action LevelUp(when: ...)' worked as conditional shorthands. They
do not - the grammar's ActionParam rule only accepts visibility,
icon, color, and label. Replaced with the two valid forms: static
visibility prefix and visibility: method block returning a
Visibility.X value.
- Status syntax (Keywords-and-Journals, Keywords-Quick-Reference): the
wiki used 'status X when: ... img: ...' (no parens, wrong key 'img:'
vs grammar's 'svg:', and 'death' as a trailing modifier). Per the
StatusProperty rule, params live in (...) parens, the icon param is
'svg:', and 'death' is a *prefix* on the declaration.
- Tracker style (Fields, Recipes): grammar accepts 'segmented'
(singular). Wiki used 'segments' (plural), which would not parse.
- Paperdoll size: (Fields): grammar takes a PX literal, not named
sizes. Wiki claimed small/medium/large.
New documentation for previously undocumented features:
- 'wounds resource' - the inverse-color sibling of 'health resource',
for damage-pool style tracking.
- Document-level parameters - actor and item declarations accept
icon:, svg:, background:, description:, creatable:, default:.
- chat (template: "...") - custom Handlebars template override for
chat cards.
- parent<type> supported types - mirrored the 14-type list from
self<type> with examples beyond just parent<attribute>.
- attribute style: and roll: parameters - both appear in grammar but
only roll: was glimpsed in the tutorial.
- choices<string> multi-select field - distinct from singular
choice<string>; supports max: and initial:.
- damage(roll:, type:) function - now has a Logic-Reference entry
alongside roll().
- Visibility prefix shorthand subsection - the nine prefix keywords
(gmOnly, secret, hidden, etc.) and what each enables.
- 'item.X' iteration alias inside where: clauses - the rule that lets
filters reference each item under test.
- 'pips' deprecation note pointing users to tracker(style: segmented).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
docs: address non-dev audit findings
Fixes raised by an audit conducted from a non-developer perspective.
Fields.md - self<type> section
- Replaced the stale 'roll: \"d20 + @primaryStat\" / chat: [ @primaryStat ]'
example syntax (which appears nowhere else and looks like an older
grammar) with modern action / fleeting / roll(...) / chat form.
- Switched the section's identifiers from camelCase (strength,
primaryAttribute) to PascalCase, matching the convention now stated
in Document.md and used everywhere else in the wiki.
- Cleaned up two inventory 'where:' filter examples that used raw
Foundry syntax ('where: {item.system.equipped == false}') to the
ISDL 'where: item.Equipped equals false' form.
Plain-English glosses
- Document.md intro reworded so 'Document' is introduced with a
plain-English explanation; 'datamodel' replaced with 'underlying data
fields Foundry needs to store its values'.
- Resource auto-clamping passage in Fields.md reworded to drop
're-derives' / 'derive' jargon; now reads as 'right after your action
runs and again every time the sheet refreshes'.
Operator consistency sweep
- Replaced '++' / '--' with '+= 1' / '-= 1' across active examples in
Document, Fields, Recipes, Advanced-Logic, and Interactivity. The
word forms ('equals', '!equals') and the readable assignment forms
are now used consistently in instructional code throughout the wiki.
- Reference tables on Basic-Logic, Logic-Reference, and Keywords-Quick-
Reference legitimately show both forms and were left as-is.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
docs: clarify scope, conventions, and undocumented behaviors
Driven by an outside review that exercised the wiki to build a small
PbtA-style system. Findings addressed:
Basic-Logic
- New 'Accessing Character Data' subsections for self / parent / target /
User, with one example each. Closes the biggest implicit-knowledge gap:
what those words actually mean inside an action.
- Chat block grammar formalized (flavor / tag / wide / plain expressions
/ roll variables, with a table of valid line forms).
- Comparison operators reorganized: word forms (equals, !equals) marked
as preferred; symbolic forms kept as alternatives.
- Roll properties: .total marked as the recommended idiom; bare-roll
shorthand documented as still valid.
- Assignment shortcuts: += 1 promoted as the readable form; ++ kept as
shorthand. Math examples updated to use .total consistently.
- roll(...) now links out to Foundry's dice modifier docs; ISDL field
substitution noted as the only ISDL-specific addition.
- Healing examples corrected: removed the misleading manual clamp now
that resource auto-clamping is documented properly.
- Forward-links to function (Advanced-Logic) and prompt (Interactivity)
added to 'Next Steps' so beginners discover them.
Fields
- Resource: clarified that auto-clamping happens on derive outside Edit
mode, with examples of when explicit clamping is still needed.
- Attribute: documented that mod: is optional and defaults to value -
PbtA-style 'attribute Bold(min: -1, max: 3)' works without a no-op
mod block.
Document
- Added a Naming Conventions section: PascalCase IDs, lowercase generated
system paths, and the role of label: for display strings.
Recipes
- New 'Class adds fields (Rage, Bloodlust, etc.)' recipe showing the
visibility-conditional pattern for class-injected fields and actions,
with a pointer to the Class-as-item variant.
Your-first-System
- 'What's next?' linked to the new class-recipe, the action-scope
reference, function, and prompt.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Updated Document (markdown)
Created Document (markdown)