Skip to content

History / Basic Logic

Revisions

  • Kotlin is a slightly nicer formatter

    @cswendrowski cswendrowski committed Jun 6, 2026
  • Document ternary and zoom

    @cswendrowski cswendrowski committed Jun 6, 2026
  • docs: parent.* requires an 'if (parent is X)' type guard The Basic-Logic parent example used parent.Mana / parent.XP without the required type check, which fails with 'Could not resolve reference to Property' (an Item can be owned by any Actor type, so parent must be narrowed before its fields resolve). Verified the guarded form generates cleanly. Updated the Basic-Logic example + added a note to the Logic-Reference parent syntax. (Recipes already used the guard correctly.)

    @cswendrowski cswendrowski committed May 30, 2026
  • Tweak

    @cswendrowski cswendrowski committed May 26, 2026
  • Add new logic comparisons

    @cswendrowski cswendrowski committed May 26, 2026
  • 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>

    @cswendrowski cswendrowski committed Apr 27, 2026
  • docs: prefer bare roll variables, document auto-.total behavior ISDL automatically substitutes a roll's .total in numeric contexts (comparisons, math, assignments, string concatenation), so the readable form is to write the variable bare. Reverts the earlier consistency-pass choice that promoted explicit .total throughout - bare-roll is shorter, matches the language's intended ergonomics, and the auto-substitute is a feature worth highlighting rather than working around. - Roll Properties section rewritten: bare-roll examples first, callout note explaining the auto-resolve and the chat-block exception (where the full roll object is rendered intentionally). - All body examples (Attack, UseSkill, PerformSkill, CheckLevelUp, DrinkPotion, the action-scope target.HP example, the chat-block example) updated to bare-roll form. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

    @cswendrowski cswendrowski committed Apr 27, 2026
  • 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>

    @cswendrowski cswendrowski committed Apr 27, 2026
  • Wiki update

    @cswendrowski cswendrowski committed Aug 10, 2025
  • Wiki update

    @cswendrowski cswendrowski committed Aug 10, 2025