Installation
tilttek/character-sheetcomposer require tilttek/character-sheet
The package needs PHP 8.5 or later and tilttek/rpg-systems, whose game systems give the sheets their attributes and
bounds.
An application gives CharacterSheets:
- a
Contract\SheetStorethat keeps the sheets in its database; - a
Contract\RuleBookthat gives theSheetRulesof each system it knows, such asRules\StaticRuleBook, built once from the systemstilttek/rpg-systemsreads; - a
Contract\SheetObserver, to send its messages, or nothing.
The service keeps no state between calls, so one instance serves every request of a long-running worker. The rules hold the system and its parsed formulas: build them once, at warm-up, rather than at each request.
Store\InMemorySheetStore keeps the sheets in memory, for tests.