This package contains art, text, or software code produced using generative AI.
This project was developed with assistance from Claude (Anthropic). AI tools helped write portions of the JavaScript/ESM source code — including validation hooks, CSS enforcement, settings registration, and the GM management UI — as well as the README documentation. All AI-generated content was reviewed, tested, and edited by the author. Core concept, design decisions, feature scope, and final testing were performed entirely by the human author.
Lawful Sheets helps GMs maintain data integrity on dnd5e character sheets by making it significantly harder for players to make unauthorized changes — including naive attempts through the browser console.
Protection is applied in two layers: CSS enforcement disables and hides editable UI elements on the sheet, while hook-based validation intercepts and rejects unauthorized actor.update(), item.update(), item creation, and item deletion calls on the client before they are processed.
11 independently configurable lock categories: Edit Mode, Context Menus, HP & Hit Dice, Ability Scores, Currency, Inventory, Spell Slots, Experience Points, Death Saves, Token HUD, and the Refund Button.
The Subtraction Rule allows legitimate gameplay actions (using potions, spending gold, casting spells, rolling for rests) while blocking increases to protected values.
Cheat Detection Logging whispers a notification to the GM whenever a blocked change is attempted, including the field, old value, and attempted value.
The Lawful Manager (accessible from the Token Controls toolbar) provides per-user overrides — lock a specific player down or exempt a trusted one, independently for each category.
Compatible with Item Piles, the dnd5e rest system, and other modules via a configurable Module Whitelist. Requires Foundry VTT v13 and dnd5e 5.2.x.