rpg-engine 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/adventures/index.d.ts +3 -0
- package/dist/adventures/index.js +5 -0
- package/dist/adventures/manifest.d.ts +39 -0
- package/dist/adventures/manifest.js +89 -0
- package/dist/adventures/placement.d.ts +4 -0
- package/dist/adventures/placement.js +14 -0
- package/dist/adventures/source.d.ts +21 -0
- package/dist/adventures/source.js +108 -0
- package/dist/bell-listener.d.ts +9 -0
- package/dist/bell-listener.js +83 -0
- package/dist/campaign/create-campaign.d.ts +3 -2
- package/dist/campaign/create-campaign.js +5 -5
- package/dist/campaign/host-files.d.ts +23 -6
- package/dist/campaign/host-files.js +130 -40
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +2 -2
- package/dist/campaign/settings.d.ts +43 -3
- package/dist/campaign/settings.js +58 -14
- package/dist/cli.js +10 -1
- package/dist/command-line.js +26 -3
- package/dist/commands/advance.js +6 -2
- package/dist/commands/ask.d.ts +11 -4
- package/dist/commands/ask.js +249 -23
- package/dist/commands/change.d.ts +29 -0
- package/dist/commands/change.js +260 -41
- package/dist/commands/config.d.ts +6 -3
- package/dist/commands/config.js +217 -83
- package/dist/commands/effect.js +38 -9
- package/dist/commands/game-advance.d.ts +11 -2
- package/dist/commands/game-advance.js +22 -7
- package/dist/commands/game-adventures.d.ts +70 -0
- package/dist/commands/game-adventures.js +418 -0
- package/dist/commands/game-bonds.d.ts +9 -0
- package/dist/commands/game-bonds.js +84 -0
- package/dist/commands/game-catalog.d.ts +36 -0
- package/dist/commands/game-catalog.js +122 -0
- package/dist/commands/game-checks.d.ts +17 -0
- package/dist/commands/game-checks.js +128 -0
- package/dist/commands/game-damage.d.ts +18 -0
- package/dist/commands/game-damage.js +74 -0
- package/dist/commands/game-effects.d.ts +5 -0
- package/dist/commands/game-effects.js +2 -2
- package/dist/commands/game-events.js +8 -4
- package/dist/commands/game-experience.js +2 -2
- package/dist/commands/game-extensions.d.ts +8 -1
- package/dist/commands/game-extensions.js +8 -3
- package/dist/commands/game-grid-moves.d.ts +4 -1
- package/dist/commands/game-grid-moves.js +8 -2
- package/dist/commands/game-hit-dice.d.ts +39 -0
- package/dist/commands/game-hit-dice.js +120 -0
- package/dist/commands/game-import.d.ts +11 -0
- package/dist/commands/game-import.js +154 -0
- package/dist/commands/game-journey.d.ts +6 -2
- package/dist/commands/game-journey.js +17 -6
- package/dist/commands/game-knowledge.d.ts +56 -6
- package/dist/commands/game-knowledge.js +152 -23
- package/dist/commands/game-library.d.ts +112 -0
- package/dist/commands/game-library.js +388 -0
- package/dist/commands/game-limits.d.ts +7 -0
- package/dist/commands/game-limits.js +67 -0
- package/dist/commands/game-master-rolls.d.ts +15 -0
- package/dist/commands/game-master-rolls.js +34 -0
- package/dist/commands/game-mode.js +5 -4
- package/dist/commands/game-moves.d.ts +14 -1
- package/dist/commands/game-moves.js +24 -9
- package/dist/commands/game-recipe-pace.d.ts +6 -0
- package/dist/commands/game-recipe-pace.js +25 -0
- package/dist/commands/game-recipes.js +10 -3
- package/dist/commands/game-reminders.d.ts +3 -3
- package/dist/commands/game-reminders.js +10 -5
- package/dist/commands/game-roads.d.ts +11 -4
- package/dist/commands/game-roads.js +89 -26
- package/dist/commands/game-saves.d.ts +12 -0
- package/dist/commands/game-saves.js +44 -5
- package/dist/commands/game-scene.js +3 -1
- package/dist/commands/game-stacks.d.ts +78 -0
- package/dist/commands/game-stacks.js +198 -0
- package/dist/commands/game-system-code.d.ts +25 -0
- package/dist/commands/game-system-code.js +172 -0
- package/dist/commands/game-tables.d.ts +7 -0
- package/dist/commands/game-tables.js +40 -0
- package/dist/commands/game-thoughts.d.ts +25 -0
- package/dist/commands/game-thoughts.js +57 -0
- package/dist/commands/game-turn-uses.d.ts +33 -0
- package/dist/commands/game-turn-uses.js +137 -0
- package/dist/commands/game-upkeep.d.ts +20 -0
- package/dist/commands/game-upkeep.js +190 -0
- package/dist/commands/game-view-journal.d.ts +14 -1
- package/dist/commands/game-view-journal.js +5 -2
- package/dist/commands/game-view-map.d.ts +3 -0
- package/dist/commands/game-view-map.js +5 -1
- package/dist/commands/game-view-place.d.ts +22 -3
- package/dist/commands/game-view-place.js +61 -24
- package/dist/commands/game-view-world.d.ts +98 -0
- package/dist/commands/game-view-world.js +98 -0
- package/dist/commands/game-voices.d.ts +5 -0
- package/dist/commands/game-voices.js +13 -0
- package/dist/commands/game-widgets.d.ts +66 -0
- package/dist/commands/game-widgets.js +274 -0
- package/dist/commands/game-world.d.ts +8 -1
- package/dist/commands/game-world.js +23 -3
- package/dist/commands/image.js +2 -3
- package/dist/commands/import.d.ts +47 -0
- package/dist/commands/import.js +390 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +2 -1
- package/dist/commands/instructions.js +26 -1
- package/dist/commands/mode.js +3 -1
- package/dist/commands/move.d.ts +2 -0
- package/dist/commands/move.js +86 -12
- package/dist/commands/package.d.ts +57 -3
- package/dist/commands/package.js +308 -51
- package/dist/commands/parts.d.ts +3 -0
- package/dist/commands/parts.js +5 -0
- package/dist/commands/problems.js +6 -0
- package/dist/commands/rename.js +3 -0
- package/dist/commands/reveal.js +12 -7
- package/dist/commands/roll.d.ts +6 -0
- package/dist/commands/roll.js +95 -24
- package/dist/commands/route.js +4 -5
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.js +38 -6
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene.d.ts +10 -1
- package/dist/commands/scene.js +146 -29
- package/dist/commands/sheet.d.ts +47 -6
- package/dist/commands/sheet.js +179 -33
- package/dist/commands/show.d.ts +33 -0
- package/dist/commands/show.js +19 -2
- package/dist/commands/status.d.ts +9 -3
- package/dist/commands/status.js +59 -17
- package/dist/commands/thoughts.d.ts +11 -0
- package/dist/commands/thoughts.js +54 -0
- package/dist/commands/trade.d.ts +17 -0
- package/dist/commands/trade.js +273 -0
- package/dist/commands/travel.d.ts +2 -0
- package/dist/commands/travel.js +40 -14
- package/dist/commands/validate.js +2 -1
- package/dist/commands/view.d.ts +99 -2
- package/dist/commands/view.js +273 -57
- package/dist/commands/worked-out.d.ts +16 -0
- package/dist/commands/worked-out.js +108 -13
- package/dist/commands/write.d.ts +1 -0
- package/dist/commands/write.js +93 -21
- package/dist/confirm/confirm.d.ts +35 -0
- package/dist/confirm/confirm.js +94 -0
- package/dist/confirm/index.d.ts +1 -0
- package/dist/confirm/index.js +3 -0
- package/dist/core/archive-paths.d.ts +8 -0
- package/dist/core/archive-paths.js +39 -0
- package/dist/core/context.d.ts +127 -5
- package/dist/core/context.js +4 -3
- package/dist/core/download.d.ts +2 -0
- package/dist/core/download.js +31 -0
- package/dist/core/field-kind.d.ts +4 -3
- package/dist/core/field-kind.js +4 -3
- package/dist/core/files.d.ts +10 -0
- package/dist/core/files.js +58 -2
- package/dist/core/formula.d.ts +3 -1
- package/dist/core/formula.js +13 -2
- package/dist/core/progression-rule.d.ts +2 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +7 -0
- package/dist/dashboard/act-names.js +27 -0
- package/dist/dashboard/act-sheet.js +100 -0
- package/dist/dashboard/act-strip.js +49 -0
- package/dist/dashboard/acts.js +140 -0
- package/dist/dashboard/address.js +16 -12
- package/dist/dashboard/api.js +140 -10
- package/dist/dashboard/app.js +370 -41
- package/dist/dashboard/asked.js +297 -19
- package/dist/dashboard/calendar.js +56 -0
- package/dist/dashboard/card.js +13 -12
- package/dist/dashboard/coins.js +13 -0
- package/dist/dashboard/death-save.js +67 -0
- package/dist/dashboard/dice/pool.js +22 -0
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/stage.js +12 -4
- package/dist/dashboard/dice/tray.js +28 -15
- package/dist/dashboard/dying.js +46 -0
- package/dist/dashboard/extension-widgets.js +160 -0
- package/dist/dashboard/game-words.js +33 -4
- package/dist/dashboard/guide/ar.md +105 -100
- package/dist/dashboard/guide/cs.md +111 -106
- package/dist/dashboard/guide/da.md +95 -90
- package/dist/dashboard/guide/de.md +93 -88
- package/dist/dashboard/guide/el.md +110 -105
- package/dist/dashboard/guide/en.md +21 -16
- package/dist/dashboard/guide/es.md +79 -74
- package/dist/dashboard/guide/fi.md +99 -94
- package/dist/dashboard/guide/fr.md +83 -78
- package/dist/dashboard/guide/he.md +109 -104
- package/dist/dashboard/guide/hi.md +103 -98
- package/dist/dashboard/guide/hu.md +113 -108
- package/dist/dashboard/guide/is.md +102 -97
- package/dist/dashboard/guide/it.md +22 -17
- package/dist/dashboard/guide/ja.md +108 -103
- package/dist/dashboard/guide/ko.md +113 -108
- package/dist/dashboard/guide/nb.md +95 -90
- package/dist/dashboard/guide/nl.md +89 -84
- package/dist/dashboard/guide/pl.md +104 -99
- package/dist/dashboard/guide/pt.md +82 -77
- package/dist/dashboard/guide/ro.md +113 -108
- package/dist/dashboard/guide/ru.md +109 -104
- package/dist/dashboard/guide/sv.md +96 -91
- package/dist/dashboard/guide/tr.md +102 -97
- package/dist/dashboard/guide/uk.md +113 -108
- package/dist/dashboard/guide/zh.md +110 -105
- package/dist/dashboard/guide-markdown.js +4 -0
- package/dist/dashboard/help.js +4 -5
- package/dist/dashboard/i18n/ar.json +367 -16
- package/dist/dashboard/i18n/cs.json +367 -16
- package/dist/dashboard/i18n/da.json +367 -16
- package/dist/dashboard/i18n/de.json +367 -16
- package/dist/dashboard/i18n/el.json +367 -16
- package/dist/dashboard/i18n/es.json +367 -16
- package/dist/dashboard/i18n/fi.json +367 -16
- package/dist/dashboard/i18n/fr.json +367 -16
- package/dist/dashboard/i18n/he.json +367 -16
- package/dist/dashboard/i18n/hi.json +367 -16
- package/dist/dashboard/i18n/hu.json +367 -16
- package/dist/dashboard/i18n/is.json +367 -16
- package/dist/dashboard/i18n/it.json +369 -18
- package/dist/dashboard/i18n/ja.json +367 -16
- package/dist/dashboard/i18n/ko.json +367 -16
- package/dist/dashboard/i18n/nb.json +367 -16
- package/dist/dashboard/i18n/nl.json +367 -16
- package/dist/dashboard/i18n/pl.json +367 -16
- package/dist/dashboard/i18n/pt.json +367 -16
- package/dist/dashboard/i18n/ro.json +367 -16
- package/dist/dashboard/i18n/ru.json +367 -16
- package/dist/dashboard/i18n/sv.json +367 -16
- package/dist/dashboard/i18n/tr.json +367 -16
- package/dist/dashboard/i18n/uk.json +367 -16
- package/dist/dashboard/i18n/zh.json +367 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +45 -4
- package/dist/dashboard/languages.js +2 -2
- package/dist/dashboard/layout.js +35 -0
- package/dist/dashboard/lore.js +44 -0
- package/dist/dashboard/markdown.js +136 -30
- package/dist/dashboard/master.js +2 -2
- package/dist/dashboard/notes.js +5 -5
- package/dist/dashboard/notices.js +24 -4
- package/dist/dashboard/packages.js +678 -0
- package/dist/dashboard/pages.js +0 -8
- package/dist/dashboard/party.js +17 -4
- package/dist/dashboard/place-map-view.js +47 -9
- package/dist/dashboard/rolls.js +35 -93
- package/dist/dashboard/save-outcome.js +42 -0
- package/dist/dashboard/saves.js +14 -11
- package/dist/dashboard/scene.js +114 -20
- package/dist/dashboard/settings.js +71 -13
- package/dist/dashboard/setup.js +4 -4
- package/dist/dashboard/sheet.js +123 -19
- package/dist/dashboard/spend.js +115 -0
- package/dist/dashboard/status.js +22 -10
- package/dist/dashboard/story.js +6 -6
- package/dist/dashboard/style.css +8047 -3468
- package/dist/dashboard/table.js +145 -0
- package/dist/dashboard/tabs.js +34 -0
- package/dist/dashboard/text.js +19 -1
- package/dist/dashboard/top.js +91 -31
- package/dist/dashboard/turns.js +150 -0
- package/dist/dashboard/widgets.js +21 -14
- package/dist/dashboard/world-calendar.js +101 -0
- package/dist/dashboard/world-lore.js +231 -0
- package/dist/dashboard/world.js +87 -29
- package/dist/dashboard-server.d.ts +10 -1
- package/dist/dashboard-server.js +738 -26
- package/dist/dice/index.d.ts +2 -0
- package/dist/dice/index.js +3 -1
- package/dist/dice/oracle.d.ts +19 -0
- package/dist/dice/oracle.js +22 -0
- package/dist/dice/tables.d.ts +29 -0
- package/dist/dice/tables.js +123 -0
- package/dist/documents/index.d.ts +2 -0
- package/dist/documents/index.js +5 -0
- package/dist/documents/markup.d.ts +10 -0
- package/dist/documents/markup.js +124 -0
- package/dist/documents/ocr.d.ts +9 -0
- package/dist/documents/ocr.js +101 -0
- package/dist/documents/png.d.ts +9 -0
- package/dist/documents/png.js +75 -0
- package/dist/documents/read.d.ts +54 -0
- package/dist/documents/read.js +375 -0
- package/dist/extensions/api.d.ts +91 -9
- package/dist/extensions/extension.d.ts +28 -2
- package/dist/extensions/extension.js +49 -11
- package/dist/extensions/index.d.ts +5 -3
- package/dist/extensions/index.js +4 -2
- package/dist/extensions/packages.d.ts +13 -4
- package/dist/extensions/packages.js +114 -16
- package/dist/extensions/tarball.d.ts +6 -0
- package/dist/extensions/tarball.js +87 -0
- package/dist/extensions/words.d.ts +13 -0
- package/dist/extensions/words.js +42 -0
- package/dist/importer/index.d.ts +1 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/work.d.ts +132 -0
- package/dist/importer/work.js +306 -0
- package/dist/index.d.ts +3 -1
- package/dist/instructions/index.d.ts +7 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/language-pack.d.ts +32 -0
- package/dist/languages/language-pack.js +86 -0
- package/dist/library/books.d.ts +76 -0
- package/dist/library/books.js +378 -0
- package/dist/library/folders.d.ts +11 -0
- package/dist/library/folders.js +70 -0
- package/dist/library/index.d.ts +3 -0
- package/dist/library/index.js +5 -0
- package/dist/library/language.d.ts +2 -0
- package/dist/library/language.js +40 -0
- package/dist/library-reader.d.ts +7 -0
- package/dist/library-reader.js +36 -0
- package/dist/mcp-server.js +90 -7
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +1 -1
- package/dist/money/money.d.ts +6 -0
- package/dist/money/money.js +11 -0
- package/dist/page-words.js +4 -1
- package/dist/pages/check.d.ts +5 -0
- package/dist/pages/check.js +111 -5
- package/dist/pages/containers.d.ts +19 -1
- package/dist/pages/containers.js +50 -7
- package/dist/pages/index.d.ts +8 -5
- package/dist/pages/index.js +8 -5
- package/dist/pages/load.d.ts +11 -0
- package/dist/pages/load.js +69 -0
- package/dist/pages/markdown.d.ts +15 -0
- package/dist/pages/markdown.js +54 -3
- package/dist/pages/page-file.d.ts +2 -0
- package/dist/pages/page-file.js +28 -5
- package/dist/pages/rename-page.js +3 -2
- package/dist/pages/stack-entry.d.ts +47 -0
- package/dist/pages/stack-entry.js +83 -0
- package/dist/pages/stack-writes.d.ts +22 -0
- package/dist/pages/stack-writes.js +128 -0
- package/dist/pages/stacks.d.ts +52 -0
- package/dist/pages/stacks.js +168 -0
- package/dist/pages/standard-fields.js +1 -1
- package/dist/pages/system-pages.d.ts +5 -2
- package/dist/pages/system-pages.js +11 -5
- package/dist/pages/world.d.ts +29 -3
- package/dist/pages/world.js +66 -12
- package/dist/pages/write-page.js +15 -6
- package/dist/pictures/chosen.d.ts +5 -1
- package/dist/pictures/chosen.js +12 -3
- package/dist/pictures/claude.d.ts +3 -1
- package/dist/pictures/claude.js +38 -0
- package/dist/pictures/codex.d.ts +3 -1
- package/dist/pictures/codex.js +32 -0
- package/dist/pictures/helpers.d.ts +10 -0
- package/dist/pictures/helpers.js +53 -6
- package/dist/pictures/index.d.ts +5 -4
- package/dist/pictures/index.js +5 -4
- package/dist/pictures/stop.d.ts +2 -0
- package/dist/pictures/stop.js +18 -0
- package/dist/player-acts.d.ts +27 -0
- package/dist/player-acts.js +56 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -1
- package/dist/rules/page-search.d.ts +36 -0
- package/dist/rules/page-search.js +216 -0
- package/dist/rules/search.d.ts +7 -0
- package/dist/rules/search.js +2 -2
- package/dist/scene/scene.d.ts +2 -0
- package/dist/scene/scene.js +1 -0
- package/dist/systems/game-system.d.ts +161 -4
- package/dist/systems/game-system.js +237 -34
- package/dist/systems/index.d.ts +3 -1
- package/dist/systems/index.js +3 -1
- package/dist/systems/system-code.d.ts +97 -0
- package/dist/systems/system-code.js +62 -0
- package/dist/systems/system-folders.d.ts +11 -0
- package/dist/systems/system-folders.js +11 -0
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +3 -3
- package/instructions/author.md +1 -1
- package/instructions/buttons-physical-dice.md +1 -1
- package/instructions/buttons.md +1 -1
- package/instructions/character.md +15 -0
- package/instructions/combat.md +3 -1
- package/instructions/core.md +5 -5
- package/instructions/dashboard.md +4 -4
- package/instructions/import.md +14 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/party.md +11 -0
- package/instructions/play.md +6 -6
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/instructions/voices-always.md +1 -0
- package/instructions/voices-important.md +1 -0
- package/instructions/voices.md +14 -0
- package/package.json +7 -3
- package/systems/5e/LICENSE.md +1 -1
- package/systems/5e/dist/dying.js +193 -0
- package/systems/5e/dist/index.js +3 -0
- package/systems/5e/images/abacus.svg +1 -0
- package/systems/5e/images/acid-tube.svg +1 -0
- package/systems/5e/images/animal-hide.svg +1 -0
- package/systems/5e/images/anvil.svg +1 -0
- package/systems/5e/images/arrow-cluster.svg +1 -0
- package/systems/5e/images/backpack.svg +1 -0
- package/systems/5e/images/bagpipes.svg +1 -0
- package/systems/5e/images/barbed-spear.svg +1 -0
- package/systems/5e/images/barrel.svg +1 -0
- package/systems/5e/images/basket.svg +1 -0
- package/systems/5e/images/battle-axe.svg +1 -0
- package/systems/5e/images/beer-horn.svg +1 -0
- package/systems/5e/images/belt-buckles.svg +1 -0
- package/systems/5e/images/bird-scepter.svg +1 -0
- package/systems/5e/images/blanket.svg +1 -0
- package/systems/5e/images/book-cover.svg +1 -0
- package/systems/5e/images/boots.svg +1 -0
- package/systems/5e/images/bottle-vapors.svg +1 -0
- package/systems/5e/images/bow-arrow.svg +1 -0
- package/systems/5e/images/bowl-spiral.svg +1 -0
- package/systems/5e/images/bracer.svg +1 -0
- package/systems/5e/images/broadsword.svg +1 -0
- package/systems/5e/images/broom.svg +1 -0
- package/systems/5e/images/bullets.svg +1 -0
- package/systems/5e/images/caltrops.svg +1 -0
- package/systems/5e/images/camp-cooking-pot.svg +1 -0
- package/systems/5e/images/campfire.svg +1 -0
- package/systems/5e/images/camping-tent.svg +1 -0
- package/systems/5e/images/candle-flame.svg +1 -0
- package/systems/5e/images/candle-light.svg +1 -0
- package/systems/5e/images/canoe.svg +1 -0
- package/systems/5e/images/cape.svg +1 -0
- package/systems/5e/images/caravel.svg +1 -0
- package/systems/5e/images/card-pick.svg +1 -0
- package/systems/5e/images/chain-mail.svg +1 -0
- package/systems/5e/images/chained-arrow-heads.svg +1 -0
- package/systems/5e/images/chariot.svg +1 -0
- package/systems/5e/images/chest.svg +1 -0
- package/systems/5e/images/chisel.svg +1 -0
- package/systems/5e/images/claw-hammer.svg +1 -0
- package/systems/5e/images/colombian-statue.svg +1 -0
- package/systems/5e/images/cooking-pot.svg +1 -0
- package/systems/5e/images/crescent-staff.svg +1 -0
- package/systems/5e/images/crossbow.svg +1 -0
- package/systems/5e/images/crossed-chains.svg +1 -0
- package/systems/5e/images/crowbar.svg +1 -0
- package/systems/5e/images/crystal-ball.svg +1 -0
- package/systems/5e/images/crystal-cluster.svg +1 -0
- package/systems/5e/images/crystal-eye.svg +1 -0
- package/systems/5e/images/cubes.svg +1 -0
- package/systems/5e/images/dart.svg +1 -0
- package/systems/5e/images/dice-six-faces-five.svg +1 -0
- package/systems/5e/images/dragon-orb.svg +1 -0
- package/systems/5e/images/drakkar.svg +1 -0
- package/systems/5e/images/drum.svg +1 -0
- package/systems/5e/images/empty-wood-bucket-handle.svg +1 -0
- package/systems/5e/images/eye-shield.svg +1 -0
- package/systems/5e/images/fairy-wand.svg +1 -0
- package/systems/5e/images/feather.svg +1 -0
- package/systems/5e/images/feathered-wing.svg +1 -0
- package/systems/5e/images/fire-bottle.svg +1 -0
- package/systems/5e/images/fire-gem.svg +1 -0
- package/systems/5e/images/first-aid-kit.svg +1 -0
- package/systems/5e/images/fishing-hook.svg +1 -0
- package/systems/5e/images/fishing-net.svg +1 -0
- package/systems/5e/images/fishing-pole.svg +1 -0
- package/systems/5e/images/fist.svg +1 -0
- package/systems/5e/images/flail.svg +1 -0
- package/systems/5e/images/flanged-mace.svg +1 -0
- package/systems/5e/images/flat-hammer.svg +1 -0
- package/systems/5e/images/flint-spark.svg +1 -0
- package/systems/5e/images/floating-crystal.svg +1 -0
- package/systems/5e/images/flute.svg +1 -0
- package/systems/5e/images/galleon.svg +1 -0
- package/systems/5e/images/gauntlet.svg +1 -0
- package/systems/5e/images/gem-necklace.svg +1 -0
- package/systems/5e/images/gem-pendant.svg +1 -0
- package/systems/5e/images/gems.svg +1 -0
- package/systems/5e/images/gladius.svg +1 -0
- package/systems/5e/images/glaive.svg +1 -0
- package/systems/5e/images/glass-ball.svg +1 -0
- package/systems/5e/images/gloves.svg +1 -0
- package/systems/5e/images/gold-scarab.svg +1 -0
- package/systems/5e/images/grain-bundle.svg +1 -0
- package/systems/5e/images/halberd.svg +1 -0
- package/systems/5e/images/hand-saw.svg +1 -0
- package/systems/5e/images/handheld-fan.svg +1 -0
- package/systems/5e/images/harp.svg +1 -0
- package/systems/5e/images/hatchet.svg +1 -0
- package/systems/5e/images/headband-knot.svg +1 -0
- package/systems/5e/images/health-potion.svg +1 -0
- package/systems/5e/images/heart-bottle.svg +1 -0
- package/systems/5e/images/herbs-bundle.svg +1 -0
- package/systems/5e/images/hole-ladder.svg +1 -0
- package/systems/5e/images/holy-symbol.svg +1 -0
- package/systems/5e/images/holy-water.svg +1 -0
- package/systems/5e/images/honey-jar.svg +1 -0
- package/systems/5e/images/hood.svg +1 -0
- package/systems/5e/images/horseshoe.svg +1 -0
- package/systems/5e/images/hourglass.svg +1 -0
- package/systems/5e/images/hunting-horn.svg +1 -0
- package/systems/5e/images/jester-hat.svg +1 -0
- package/systems/5e/images/jug.svg +1 -0
- package/systems/5e/images/katana.svg +1 -0
- package/systems/5e/images/key-lock.svg +1 -0
- package/systems/5e/images/kitchen-scale.svg +1 -0
- package/systems/5e/images/knapsack.svg +1 -0
- package/systems/5e/images/ladder.svg +1 -0
- package/systems/5e/images/lantern.svg +1 -0
- package/systems/5e/images/leather-armor.svg +1 -0
- package/systems/5e/images/leather-boot.svg +1 -0
- package/systems/5e/images/leather-vest.svg +1 -0
- package/systems/5e/images/light-backpack.svg +1 -0
- package/systems/5e/images/light-helm.svg +1 -0
- package/systems/5e/images/locked-box.svg +1 -0
- package/systems/5e/images/locked-fortress.svg +1 -0
- package/systems/5e/images/lockpicks.svg +1 -0
- package/systems/5e/images/lunar-wand.svg +1 -0
- package/systems/5e/images/lyre.svg +1 -0
- package/systems/5e/images/magic-lamp.svg +1 -0
- package/systems/5e/images/magnifying-glass.svg +1 -0
- package/systems/5e/images/mail-shirt.svg +1 -0
- package/systems/5e/images/manacles.svg +1 -0
- package/systems/5e/images/marbles.svg +1 -0
- package/systems/5e/images/meat.svg +1 -0
- package/systems/5e/images/medal.svg +1 -0
- package/systems/5e/images/mirror-mirror.svg +1 -0
- package/systems/5e/images/mountain-climbing.svg +1 -0
- package/systems/5e/images/oil-can.svg +1 -0
- package/systems/5e/images/old-lantern.svg +1 -0
- package/systems/5e/images/old-wagon.svg +1 -0
- package/systems/5e/images/orb-wand.svg +1 -0
- package/systems/5e/images/oyster-pearl.svg +1 -0
- package/systems/5e/images/paint-brush.svg +1 -0
- package/systems/5e/images/painted-pottery.svg +1 -0
- package/systems/5e/images/palette.svg +1 -0
- package/systems/5e/images/paper.svg +1 -0
- package/systems/5e/images/pencil.svg +1 -0
- package/systems/5e/images/perfume-bottle.svg +1 -0
- package/systems/5e/images/pilgrim-hat.svg +1 -0
- package/systems/5e/images/pipes.svg +1 -0
- package/systems/5e/images/plain-arrow.svg +1 -0
- package/systems/5e/images/plain-dagger.svg +1 -0
- package/systems/5e/images/poison-bottle.svg +1 -0
- package/systems/5e/images/powder-bag.svg +1 -0
- package/systems/5e/images/prayer-beads.svg +1 -0
- package/systems/5e/images/pulley-hook.svg +1 -0
- package/systems/5e/images/quill-ink.svg +1 -0
- package/systems/5e/images/quill.svg +1 -0
- package/systems/5e/images/quiver.svg +1 -0
- package/systems/5e/images/red-carpet.svg +1 -0
- package/systems/5e/images/ring.svg +1 -0
- package/systems/5e/images/ringing-bell.svg +1 -0
- package/systems/5e/images/robe.svg +1 -0
- package/systems/5e/images/rope-coil.svg +1 -0
- package/systems/5e/images/round-bottom-flask.svg +1 -0
- package/systems/5e/images/round-potion.svg +1 -0
- package/systems/5e/images/rune-stone.svg +1 -0
- package/systems/5e/images/saddle.svg +1 -0
- package/systems/5e/images/scale-mail.svg +1 -0
- package/systems/5e/images/scroll-unfurled.svg +1 -0
- package/systems/5e/images/secret-book.svg +1 -0
- package/systems/5e/images/sewing-needle.svg +1 -0
- package/systems/5e/images/shield.svg +1 -0
- package/systems/5e/images/shirt-button.svg +1 -0
- package/systems/5e/images/sickle.svg +1 -0
- package/systems/5e/images/siege-ram.svg +1 -0
- package/systems/5e/images/skull-staff.svg +1 -0
- package/systems/5e/images/sleeping-bag.svg +1 -0
- package/systems/5e/images/sling.svg +1 -0
- package/systems/5e/images/slippers.svg +1 -0
- package/systems/5e/images/small-fishing-sailboat.svg +1 -0
- package/systems/5e/images/smoking-orb.svg +1 -0
- package/systems/5e/images/soap.svg +1 -0
- package/systems/5e/images/spade.svg +1 -0
- package/systems/5e/images/sparkling-sabre.svg +1 -0
- package/systems/5e/images/spell-book.svg +1 -0
- package/systems/5e/images/spiked-armor.svg +1 -0
- package/systems/5e/images/spiked-mace.svg +1 -0
- package/systems/5e/images/spikes.svg +1 -0
- package/systems/5e/images/spinning-wheel.svg +1 -0
- package/systems/5e/images/spyglass.svg +1 -0
- package/systems/5e/images/steampunk-goggles.svg +1 -0
- package/systems/5e/images/stone-block.svg +1 -0
- package/systems/5e/images/stone-pile.svg +1 -0
- package/systems/5e/images/stone-sphere.svg +1 -0
- package/systems/5e/images/straight-pipe.svg +1 -0
- package/systems/5e/images/swap-bag.svg +1 -0
- package/systems/5e/images/thor-hammer.svg +1 -0
- package/systems/5e/images/thrown-spear.svg +1 -0
- package/systems/5e/images/tiara.svg +1 -0
- package/systems/5e/images/tied-scroll.svg +1 -0
- package/systems/5e/images/tinker.svg +1 -0
- package/systems/5e/images/torch.svg +1 -0
- package/systems/5e/images/totem.svg +1 -0
- package/systems/5e/images/trap-mask.svg +1 -0
- package/systems/5e/images/treasure-map.svg +1 -0
- package/systems/5e/images/tribal-pendant.svg +1 -0
- package/systems/5e/images/trident.svg +1 -0
- package/systems/5e/images/two-handed-sword.svg +1 -0
- package/systems/5e/images/vial.svg +1 -0
- package/systems/5e/images/violin.svg +1 -0
- package/systems/5e/images/war-axe.svg +1 -0
- package/systems/5e/images/war-pick.svg +1 -0
- package/systems/5e/images/warhammer.svg +1 -0
- package/systems/5e/images/water-bottle.svg +1 -0
- package/systems/5e/images/waterskin.svg +1 -0
- package/systems/5e/images/wavy-chains.svg +1 -0
- package/systems/5e/images/wax-seal.svg +1 -0
- package/systems/5e/images/wheelbarrow.svg +1 -0
- package/systems/5e/images/whip.svg +1 -0
- package/systems/5e/images/whistle.svg +1 -0
- package/systems/5e/images/wing-cloak.svg +1 -0
- package/systems/5e/images/winged-scepter.svg +1 -0
- package/systems/5e/images/wizard-staff.svg +1 -0
- package/systems/5e/images/wolf-trap.svg +1 -0
- package/systems/5e/images/wood-canoe.svg +1 -0
- package/systems/5e/images/wood-club.svg +1 -0
- package/systems/5e/instructions/import.md +1 -0
- package/systems/5e/instructions/play.md +6 -0
- package/systems/5e/instructions/session-zero.md +1 -1
- package/systems/5e/package.json +11 -0
- package/systems/5e/system.yaml +231 -31
- package/systems/5e/words/ar.yaml +74 -0
- package/systems/5e/words/cs.yaml +74 -0
- package/systems/5e/words/da.yaml +74 -0
- package/systems/5e/words/de.yaml +74 -0
- package/systems/5e/words/el.yaml +74 -0
- package/systems/5e/words/en.yaml +20 -0
- package/systems/5e/words/es.yaml +74 -0
- package/systems/5e/words/fi.yaml +74 -0
- package/systems/5e/words/fr.yaml +74 -0
- package/systems/5e/words/he.yaml +74 -0
- package/systems/5e/words/hi.yaml +74 -0
- package/systems/5e/words/hu.yaml +74 -0
- package/systems/5e/words/is.yaml +74 -0
- package/systems/5e/words/it.yaml +84 -1
- package/systems/5e/words/ja.yaml +74 -0
- package/systems/5e/words/ko.yaml +74 -0
- package/systems/5e/words/nb.yaml +74 -0
- package/systems/5e/words/nl.yaml +74 -0
- package/systems/5e/words/pl.yaml +74 -0
- package/systems/5e/words/pt.yaml +74 -0
- package/systems/5e/words/ro.yaml +74 -0
- package/systems/5e/words/ru.yaml +74 -0
- package/systems/5e/words/sv.yaml +74 -0
- package/systems/5e/words/tr.yaml +74 -0
- package/systems/5e/words/uk.yaml +74 -0
- package/systems/5e/words/zh.yaml +74 -0
- package/systems/5e/world/creatures/Aboleth.md +1 -0
- package/systems/5e/world/creatures/Adult Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult White Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient White Dragon.md +2 -0
- package/systems/5e/world/creatures/Androsphinx.md +1 -0
- package/systems/5e/world/creatures/Dwarf.md +1 -0
- package/systems/5e/world/creatures/Gynosphinx.md +1 -0
- package/systems/5e/world/creatures/Kraken.md +1 -0
- package/systems/5e/world/creatures/Lich.md +2 -0
- package/systems/5e/world/creatures/Mummy Lord.md +1 -0
- package/systems/5e/world/creatures/Solar.md +1 -0
- package/systems/5e/world/creatures/Tarrasque.md +2 -0
- package/systems/5e/world/creatures/Unicorn.md +1 -0
- package/systems/5e/world/creatures/Vampire.md +2 -0
- package/systems/5e/world/items/Abacus.md +1 -0
- package/systems/5e/world/items/Acid.md +1 -0
- package/systems/5e/world/items/Adamantine Armor.md +1 -0
- package/systems/5e/world/items/Alchemist's Fire.md +1 -0
- package/systems/5e/world/items/Alchemist's Supplies.md +1 -0
- package/systems/5e/world/items/Ammunition, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Amulet of Health.md +2 -0
- package/systems/5e/world/items/Amulet of Proof against Detection and Location.md +1 -0
- package/systems/5e/world/items/Amulet of the Planes.md +1 -0
- package/systems/5e/world/items/Amulet.md +1 -0
- package/systems/5e/world/items/Animated Shield.md +1 -0
- package/systems/5e/world/items/Antitoxin.md +1 -0
- package/systems/5e/world/items/Apparatus of the Crab.md +1 -0
- package/systems/5e/world/items/Armor of Invulnerability.md +2 -0
- package/systems/5e/world/items/Armor of Resistance.md +1 -0
- package/systems/5e/world/items/Armor of Vulnerability.md +1 -0
- package/systems/5e/world/items/Armor, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Arrow of Slaying.md +1 -0
- package/systems/5e/world/items/Arrow-Catching Shield.md +1 -0
- package/systems/5e/world/items/Arrows.md +2 -0
- package/systems/5e/world/items/Backpack.md +1 -0
- package/systems/5e/world/items/Bag of Beans.md +1 -0
- package/systems/5e/world/items/Bag of Devouring.md +1 -0
- package/systems/5e/world/items/Bag of Holding.md +3 -0
- package/systems/5e/world/items/Bag of Tricks.md +1 -0
- package/systems/5e/world/items/Bagpipes.md +1 -0
- package/systems/5e/world/items/Ball Bearings.md +1 -0
- package/systems/5e/world/items/Barding.md +1 -0
- package/systems/5e/world/items/Barrel.md +1 -0
- package/systems/5e/world/items/Basic Poison.md +1 -0
- package/systems/5e/world/items/Basket.md +1 -0
- package/systems/5e/world/items/Battleaxe.md +1 -0
- package/systems/5e/world/items/Bead of Force.md +1 -0
- package/systems/5e/world/items/Bedroll.md +1 -0
- package/systems/5e/world/items/Bell.md +1 -0
- package/systems/5e/world/items/Belt of Dwarvenkind.md +1 -0
- package/systems/5e/world/items/Belt of Giant Strength.md +1 -0
- package/systems/5e/world/items/Berserker Axe.md +1 -0
- package/systems/5e/world/items/Bit and Bridle.md +1 -0
- package/systems/5e/world/items/Blanket.md +1 -0
- package/systems/5e/world/items/Block and Tackle.md +1 -0
- package/systems/5e/world/items/Blowgun Needles.md +2 -0
- package/systems/5e/world/items/Blowgun.md +1 -0
- package/systems/5e/world/items/Book.md +1 -0
- package/systems/5e/world/items/Boots of Elvenkind.md +1 -0
- package/systems/5e/world/items/Boots of Levitation.md +1 -0
- package/systems/5e/world/items/Boots of Speed.md +1 -0
- package/systems/5e/world/items/Boots of Striding and Springing.md +1 -0
- package/systems/5e/world/items/Boots of the Winterlands.md +2 -0
- package/systems/5e/world/items/Bowl of Commanding Water Elementals.md +1 -0
- package/systems/5e/world/items/Bracers of Archery.md +1 -0
- package/systems/5e/world/items/Bracers of Defense.md +1 -0
- package/systems/5e/world/items/Brazier of Commanding Fire Elementals.md +1 -0
- package/systems/5e/world/items/Breastplate.md +1 -0
- package/systems/5e/world/items/Brewer's Supplies.md +1 -0
- package/systems/5e/world/items/Brooch of Shielding.md +2 -0
- package/systems/5e/world/items/Broom of Flying.md +1 -0
- package/systems/5e/world/items/Bucket.md +1 -0
- package/systems/5e/world/items/Bullseye Lantern.md +1 -0
- package/systems/5e/world/items/Burglar's Pack.md +3 -0
- package/systems/5e/world/items/Calligrapher's Supplies.md +1 -0
- package/systems/5e/world/items/Caltrops.md +1 -0
- package/systems/5e/world/items/Candle of Invocation.md +1 -0
- package/systems/5e/world/items/Candle.md +1 -0
- package/systems/5e/world/items/Cape of the Mountebank.md +1 -0
- package/systems/5e/world/items/Carpenter's Tools.md +1 -0
- package/systems/5e/world/items/Carpet of Flying.md +1 -0
- package/systems/5e/world/items/Carriage.md +1 -0
- package/systems/5e/world/items/Cart.md +1 -0
- package/systems/5e/world/items/Cartographer's Tools.md +1 -0
- package/systems/5e/world/items/Censer of Controlling Air Elementals.md +1 -0
- package/systems/5e/world/items/Chain Mail.md +2 -0
- package/systems/5e/world/items/Chain Shirt.md +1 -0
- package/systems/5e/world/items/Chain.md +1 -0
- package/systems/5e/world/items/Chalk.md +1 -0
- package/systems/5e/world/items/Chariot.md +1 -0
- package/systems/5e/world/items/Chest.md +1 -0
- package/systems/5e/world/items/Chime of Opening.md +1 -0
- package/systems/5e/world/items/Circlet of Blasting.md +1 -0
- package/systems/5e/world/items/Climber's Kit.md +1 -0
- package/systems/5e/world/items/Cloak of Arachnida.md +2 -0
- package/systems/5e/world/items/Cloak of Displacement.md +1 -0
- package/systems/5e/world/items/Cloak of Elvenkind.md +1 -0
- package/systems/5e/world/items/Cloak of Protection.md +3 -0
- package/systems/5e/world/items/Cloak of the Bat.md +1 -0
- package/systems/5e/world/items/Cloak of the Manta Ray.md +1 -0
- package/systems/5e/world/items/Club.md +1 -0
- package/systems/5e/world/items/Cobbler's Tools.md +1 -0
- package/systems/5e/world/items/Common Clothes.md +1 -0
- package/systems/5e/world/items/Component Pouch.md +1 -0
- package/systems/5e/world/items/Cook's Utensils.md +1 -0
- package/systems/5e/world/items/Costume Clothes.md +1 -0
- package/systems/5e/world/items/Crossbow Bolt Case.md +1 -0
- package/systems/5e/world/items/Crossbow Bolts.md +2 -0
- package/systems/5e/world/items/Crowbar.md +1 -0
- package/systems/5e/world/items/Crystal Ball.md +1 -0
- package/systems/5e/world/items/Crystal.md +1 -0
- package/systems/5e/world/items/Cube of Force.md +2 -0
- package/systems/5e/world/items/Cubic Gate.md +2 -0
- package/systems/5e/world/items/Dagger of Venom.md +1 -0
- package/systems/5e/world/items/Dagger.md +1 -0
- package/systems/5e/world/items/Dancing Sword.md +1 -0
- package/systems/5e/world/items/Dart.md +1 -0
- package/systems/5e/world/items/Decanter of Endless Water.md +1 -0
- package/systems/5e/world/items/Deck of Illusions.md +1 -0
- package/systems/5e/world/items/Deck of Many Things.md +1 -0
- package/systems/5e/world/items/Defender.md +1 -0
- package/systems/5e/world/items/Demon Armor.md +1 -0
- package/systems/5e/world/items/Dice Set.md +1 -0
- package/systems/5e/world/items/Dimensional Shackles.md +1 -0
- package/systems/5e/world/items/Diplomat's Pack.md +3 -0
- package/systems/5e/world/items/Disguise Kit.md +1 -0
- package/systems/5e/world/items/Dragon Scale Mail.md +1 -0
- package/systems/5e/world/items/Dragon Slayer.md +1 -0
- package/systems/5e/world/items/Drum.md +1 -0
- package/systems/5e/world/items/Dulcimer.md +1 -0
- package/systems/5e/world/items/Dungeoneer's Pack.md +3 -0
- package/systems/5e/world/items/Dust of Disappearance.md +1 -0
- package/systems/5e/world/items/Dust of Dryness.md +1 -0
- package/systems/5e/world/items/Dust of Sneezing and Choking.md +1 -0
- package/systems/5e/world/items/Dwarven Plate.md +1 -0
- package/systems/5e/world/items/Dwarven Thrower.md +1 -0
- package/systems/5e/world/items/Efficient Quiver.md +1 -0
- package/systems/5e/world/items/Efreeti Bottle.md +1 -0
- package/systems/5e/world/items/Elemental Gem.md +1 -0
- package/systems/5e/world/items/Elven Chain.md +1 -0
- package/systems/5e/world/items/Emblem.md +1 -0
- package/systems/5e/world/items/Entertainer's Pack.md +3 -0
- package/systems/5e/world/items/Eversmoking Bottle.md +1 -0
- package/systems/5e/world/items/Exotic Saddle.md +1 -0
- package/systems/5e/world/items/Explorer's Pack.md +3 -0
- package/systems/5e/world/items/Eyes of Charming.md +1 -0
- package/systems/5e/world/items/Eyes of Minute Seeing.md +1 -0
- package/systems/5e/world/items/Eyes of the Eagle.md +1 -0
- package/systems/5e/world/items/Feather Token.md +1 -0
- package/systems/5e/world/items/Feed.md +1 -0
- package/systems/5e/world/items/Figurine of Wondrous Power.md +1 -0
- package/systems/5e/world/items/Fine Clothes.md +1 -0
- package/systems/5e/world/items/Fishing Tackle.md +1 -0
- package/systems/5e/world/items/Flail.md +1 -0
- package/systems/5e/world/items/Flame Tongue.md +1 -0
- package/systems/5e/world/items/Flask or Tankard.md +1 -0
- package/systems/5e/world/items/Flute.md +1 -0
- package/systems/5e/world/items/Folding Boat.md +1 -0
- package/systems/5e/world/items/Forgery Kit.md +1 -0
- package/systems/5e/world/items/Frost Brand.md +2 -0
- package/systems/5e/world/items/Galley.md +1 -0
- package/systems/5e/world/items/Gauntlets of Ogre Power.md +2 -0
- package/systems/5e/world/items/Gem of Brightness.md +2 -0
- package/systems/5e/world/items/Gem of Seeing.md +2 -0
- package/systems/5e/world/items/Giant Slayer.md +1 -0
- package/systems/5e/world/items/Glaive.md +1 -0
- package/systems/5e/world/items/Glamoured Studded Leather.md +1 -0
- package/systems/5e/world/items/Glass Bottle.md +1 -0
- package/systems/5e/world/items/Glassblower's Tools.md +1 -0
- package/systems/5e/world/items/Gloves of Missile Snaring.md +1 -0
- package/systems/5e/world/items/Gloves of Swimming and Climbing.md +1 -0
- package/systems/5e/world/items/Goggles of Night.md +1 -0
- package/systems/5e/world/items/Grappling Hook.md +1 -0
- package/systems/5e/world/items/Greataxe.md +1 -0
- package/systems/5e/world/items/Greatclub.md +1 -0
- package/systems/5e/world/items/Greatsword.md +1 -0
- package/systems/5e/world/items/Halberd.md +1 -0
- package/systems/5e/world/items/Half Plate Armor.md +1 -0
- package/systems/5e/world/items/Hammer of Thunderbolts.md +2 -0
- package/systems/5e/world/items/Hammer.md +1 -0
- package/systems/5e/world/items/Hand Crossbow.md +1 -0
- package/systems/5e/world/items/Handaxe.md +1 -0
- package/systems/5e/world/items/Handy Haversack.md +3 -0
- package/systems/5e/world/items/Hat of Disguise.md +1 -0
- package/systems/5e/world/items/Headband of Intellect.md +2 -0
- package/systems/5e/world/items/Healer's Kit.md +1 -0
- package/systems/5e/world/items/Heavy Crossbow.md +1 -0
- package/systems/5e/world/items/Helm of Brilliance.md +1 -0
- package/systems/5e/world/items/Helm of Comprehending Languages.md +1 -0
- package/systems/5e/world/items/Helm of Telepathy.md +1 -0
- package/systems/5e/world/items/Helm of Teleportation.md +2 -0
- package/systems/5e/world/items/Hempen Rope.md +1 -0
- package/systems/5e/world/items/Herbalism Kit.md +1 -0
- package/systems/5e/world/items/Hide Armor.md +1 -0
- package/systems/5e/world/items/Holy Avenger.md +1 -0
- package/systems/5e/world/items/Holy Water.md +1 -0
- package/systems/5e/world/items/Hooded Lantern.md +1 -0
- package/systems/5e/world/items/Horn of Blasting.md +1 -0
- package/systems/5e/world/items/Horn of Valhalla.md +1 -0
- package/systems/5e/world/items/Horn.md +1 -0
- package/systems/5e/world/items/Horseshoes of Speed.md +1 -0
- package/systems/5e/world/items/Horseshoes of a Zephyr.md +1 -0
- package/systems/5e/world/items/Hourglass.md +1 -0
- package/systems/5e/world/items/Hunting Trap.md +1 -0
- package/systems/5e/world/items/Immovable Rod.md +1 -0
- package/systems/5e/world/items/Ink Pen.md +1 -0
- package/systems/5e/world/items/Ink.md +1 -0
- package/systems/5e/world/items/Instant Fortress.md +1 -0
- package/systems/5e/world/items/Ioun Stone.md +1 -0
- package/systems/5e/world/items/Iron Bands of Binding.md +1 -0
- package/systems/5e/world/items/Iron Flask.md +1 -0
- package/systems/5e/world/items/Iron Pot.md +1 -0
- package/systems/5e/world/items/Iron Spikes.md +2 -0
- package/systems/5e/world/items/Javelin of Lightning.md +1 -0
- package/systems/5e/world/items/Javelin.md +1 -0
- package/systems/5e/world/items/Jeweler's Tools.md +1 -0
- package/systems/5e/world/items/Jug or Pitcher.md +1 -0
- package/systems/5e/world/items/Keelboat.md +1 -0
- package/systems/5e/world/items/Ladder.md +1 -0
- package/systems/5e/world/items/Lamp.md +1 -0
- package/systems/5e/world/items/Lance.md +1 -0
- package/systems/5e/world/items/Lantern of Revealing.md +1 -0
- package/systems/5e/world/items/Leather Armor.md +1 -0
- package/systems/5e/world/items/Leatherworker's Tools.md +1 -0
- package/systems/5e/world/items/Light Crossbow.md +1 -0
- package/systems/5e/world/items/Light Hammer.md +1 -0
- package/systems/5e/world/items/Lock.md +1 -0
- package/systems/5e/world/items/Longbow.md +1 -0
- package/systems/5e/world/items/Longship.md +1 -0
- package/systems/5e/world/items/Longsword.md +1 -0
- package/systems/5e/world/items/Luck Blade.md +1 -0
- package/systems/5e/world/items/Lute.md +1 -0
- package/systems/5e/world/items/Lyre.md +1 -0
- package/systems/5e/world/items/Mace of Disruption.md +1 -0
- package/systems/5e/world/items/Mace of Smiting.md +1 -0
- package/systems/5e/world/items/Mace of Terror.md +2 -0
- package/systems/5e/world/items/Mace.md +1 -0
- package/systems/5e/world/items/Magnifying Glass.md +1 -0
- package/systems/5e/world/items/Manacles.md +1 -0
- package/systems/5e/world/items/Mantle of Spell Resistance.md +1 -0
- package/systems/5e/world/items/Manual of Bodily Health.md +1 -0
- package/systems/5e/world/items/Manual of Gainful Exercise.md +1 -0
- package/systems/5e/world/items/Manual of Golems.md +1 -0
- package/systems/5e/world/items/Manual of Quickness of Action.md +1 -0
- package/systems/5e/world/items/Map or Scroll Case.md +1 -0
- package/systems/5e/world/items/Marvelous Pigments.md +1 -0
- package/systems/5e/world/items/Mason's Tools.md +1 -0
- package/systems/5e/world/items/Maul.md +1 -0
- package/systems/5e/world/items/Medallion of Thoughts.md +2 -0
- package/systems/5e/world/items/Merchant's Scale.md +1 -0
- package/systems/5e/world/items/Mess Kit.md +1 -0
- package/systems/5e/world/items/Military Saddle.md +1 -0
- package/systems/5e/world/items/Miner's Pick.md +1 -0
- package/systems/5e/world/items/Mirror of Life Trapping.md +1 -0
- package/systems/5e/world/items/Mithral Armor.md +1 -0
- package/systems/5e/world/items/Morningstar.md +1 -0
- package/systems/5e/world/items/Navigator's Tools.md +1 -0
- package/systems/5e/world/items/Necklace of Adaptation.md +1 -0
- package/systems/5e/world/items/Necklace of Fireballs.md +1 -0
- package/systems/5e/world/items/Necklace of Prayer Beads.md +1 -0
- package/systems/5e/world/items/Net.md +1 -0
- package/systems/5e/world/items/Nine Lives Stealer.md +1 -0
- package/systems/5e/world/items/Oathbow.md +1 -0
- package/systems/5e/world/items/Oil of Etherealness.md +1 -0
- package/systems/5e/world/items/Oil of Sharpness.md +1 -0
- package/systems/5e/world/items/Oil of Slipperiness.md +1 -0
- package/systems/5e/world/items/Oil.md +1 -0
- package/systems/5e/world/items/Orb of Dragonkind.md +2 -0
- package/systems/5e/world/items/Orb.md +1 -0
- package/systems/5e/world/items/Pack Saddle.md +1 -0
- package/systems/5e/world/items/Padded Armor.md +1 -0
- package/systems/5e/world/items/Painter's Supplies.md +1 -0
- package/systems/5e/world/items/Pan Flute.md +1 -0
- package/systems/5e/world/items/Paper.md +1 -0
- package/systems/5e/world/items/Parchment.md +1 -0
- package/systems/5e/world/items/Pearl of Power.md +1 -0
- package/systems/5e/world/items/Perfume.md +1 -0
- package/systems/5e/world/items/Periapt of Health.md +1 -0
- package/systems/5e/world/items/Periapt of Proof against Poison.md +1 -0
- package/systems/5e/world/items/Periapt of Wound Closure.md +1 -0
- package/systems/5e/world/items/Philter of Love.md +1 -0
- package/systems/5e/world/items/Pike.md +1 -0
- package/systems/5e/world/items/Pipes of Haunting.md +1 -0
- package/systems/5e/world/items/Pipes of the Sewers.md +1 -0
- package/systems/5e/world/items/Piton.md +1 -0
- package/systems/5e/world/items/Plate Armor of Etherealness.md +1 -0
- package/systems/5e/world/items/Plate Armor.md +2 -0
- package/systems/5e/world/items/Playing Card Set.md +1 -0
- package/systems/5e/world/items/Poisoner's Kit.md +1 -0
- package/systems/5e/world/items/Pole.md +1 -0
- package/systems/5e/world/items/Portable Hole.md +2 -0
- package/systems/5e/world/items/Portable Ram.md +1 -0
- package/systems/5e/world/items/Potion of Animal Friendship.md +1 -0
- package/systems/5e/world/items/Potion of Clairvoyance.md +1 -0
- package/systems/5e/world/items/Potion of Climbing.md +1 -0
- package/systems/5e/world/items/Potion of Diminution.md +1 -0
- package/systems/5e/world/items/Potion of Flying.md +1 -0
- package/systems/5e/world/items/Potion of Gaseous Form.md +1 -0
- package/systems/5e/world/items/Potion of Giant Strength.md +1 -0
- package/systems/5e/world/items/Potion of Growth.md +1 -0
- package/systems/5e/world/items/Potion of Healing.md +1 -0
- package/systems/5e/world/items/Potion of Heroism.md +1 -0
- package/systems/5e/world/items/Potion of Invisibility.md +1 -0
- package/systems/5e/world/items/Potion of Mind Reading.md +1 -0
- package/systems/5e/world/items/Potion of Poison.md +1 -0
- package/systems/5e/world/items/Potion of Resistance.md +1 -0
- package/systems/5e/world/items/Potion of Speed.md +1 -0
- package/systems/5e/world/items/Potion of Water Breathing.md +1 -0
- package/systems/5e/world/items/Potter's Tools.md +1 -0
- package/systems/5e/world/items/Pouch.md +1 -0
- package/systems/5e/world/items/Priest's Pack.md +3 -0
- package/systems/5e/world/items/Quarterstaff.md +1 -0
- package/systems/5e/world/items/Quiver.md +1 -0
- package/systems/5e/world/items/Rapier.md +1 -0
- package/systems/5e/world/items/Rations.md +1 -0
- package/systems/5e/world/items/Reliquary.md +1 -0
- package/systems/5e/world/items/Restorative Ointment.md +1 -0
- package/systems/5e/world/items/Riding Saddle.md +1 -0
- package/systems/5e/world/items/Ring Mail.md +1 -0
- package/systems/5e/world/items/Ring of Animal Influence.md +2 -0
- package/systems/5e/world/items/Ring of Djinni Summoning.md +1 -0
- package/systems/5e/world/items/Ring of Elemental Command.md +2 -0
- package/systems/5e/world/items/Ring of Evasion.md +2 -0
- package/systems/5e/world/items/Ring of Feather Falling.md +1 -0
- package/systems/5e/world/items/Ring of Free Action.md +1 -0
- package/systems/5e/world/items/Ring of Invisibility.md +1 -0
- package/systems/5e/world/items/Ring of Jumping.md +1 -0
- package/systems/5e/world/items/Ring of Mind Shielding.md +1 -0
- package/systems/5e/world/items/Ring of Protection.md +3 -0
- package/systems/5e/world/items/Ring of Regeneration.md +1 -0
- package/systems/5e/world/items/Ring of Resistance.md +1 -0
- package/systems/5e/world/items/Ring of Shooting Stars.md +2 -0
- package/systems/5e/world/items/Ring of Spell Storing.md +1 -0
- package/systems/5e/world/items/Ring of Spell Turning.md +1 -0
- package/systems/5e/world/items/Ring of Swimming.md +1 -0
- package/systems/5e/world/items/Ring of Telekinesis.md +1 -0
- package/systems/5e/world/items/Ring of Three Wishes.md +1 -0
- package/systems/5e/world/items/Ring of Warmth.md +2 -0
- package/systems/5e/world/items/Ring of Water Walking.md +1 -0
- package/systems/5e/world/items/Ring of X-ray Vision.md +1 -0
- package/systems/5e/world/items/Ring of the Ram.md +2 -0
- package/systems/5e/world/items/Robe of Eyes.md +1 -0
- package/systems/5e/world/items/Robe of Scintillating Colors.md +2 -0
- package/systems/5e/world/items/Robe of Stars.md +1 -0
- package/systems/5e/world/items/Robe of Useful Items.md +1 -0
- package/systems/5e/world/items/Robe of the Archmagi.md +3 -0
- package/systems/5e/world/items/Robes.md +1 -0
- package/systems/5e/world/items/Rod of Absorption.md +1 -0
- package/systems/5e/world/items/Rod of Alertness.md +1 -0
- package/systems/5e/world/items/Rod of Lordly Might.md +1 -0
- package/systems/5e/world/items/Rod of Rulership.md +1 -0
- package/systems/5e/world/items/Rod of Security.md +1 -0
- package/systems/5e/world/items/Rod.md +1 -0
- package/systems/5e/world/items/Rope of Climbing.md +1 -0
- package/systems/5e/world/items/Rope of Entanglement.md +1 -0
- package/systems/5e/world/items/Rowboat.md +1 -0
- package/systems/5e/world/items/Sack.md +1 -0
- package/systems/5e/world/items/Saddlebags.md +1 -0
- package/systems/5e/world/items/Sailing Ship.md +1 -0
- package/systems/5e/world/items/Scale Mail.md +1 -0
- package/systems/5e/world/items/Scarab of Protection.md +2 -0
- package/systems/5e/world/items/Scholar's Pack.md +3 -0
- package/systems/5e/world/items/Scimitar of Speed.md +1 -0
- package/systems/5e/world/items/Scimitar.md +1 -0
- package/systems/5e/world/items/Sealing Wax.md +1 -0
- package/systems/5e/world/items/Shawm.md +1 -0
- package/systems/5e/world/items/Shield of Missile Attraction.md +2 -0
- package/systems/5e/world/items/Shield, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Shield.md +1 -0
- package/systems/5e/world/items/Shortbow.md +1 -0
- package/systems/5e/world/items/Shortsword.md +1 -0
- package/systems/5e/world/items/Shovel.md +1 -0
- package/systems/5e/world/items/Sickle.md +1 -0
- package/systems/5e/world/items/Signal Whistle.md +1 -0
- package/systems/5e/world/items/Signet Ring.md +1 -0
- package/systems/5e/world/items/Silk Rope.md +1 -0
- package/systems/5e/world/items/Sled.md +1 -0
- package/systems/5e/world/items/Sledgehammer.md +1 -0
- package/systems/5e/world/items/Sling Bullets.md +2 -0
- package/systems/5e/world/items/Sling.md +1 -0
- package/systems/5e/world/items/Slippers of Spider Climbing.md +1 -0
- package/systems/5e/world/items/Smith's Tools.md +1 -0
- package/systems/5e/world/items/Soap.md +1 -0
- package/systems/5e/world/items/Sovereign Glue.md +1 -0
- package/systems/5e/world/items/Spear.md +1 -0
- package/systems/5e/world/items/Spell Scroll.md +1 -0
- package/systems/5e/world/items/Spellbook.md +1 -0
- package/systems/5e/world/items/Spellguard Shield.md +1 -0
- package/systems/5e/world/items/Sphere of Annihilation.md +1 -0
- package/systems/5e/world/items/Splint Armor.md +2 -0
- package/systems/5e/world/items/Sprig of Mistletoe.md +1 -0
- package/systems/5e/world/items/Spyglass.md +1 -0
- package/systems/5e/world/items/Staff of Charming.md +1 -0
- package/systems/5e/world/items/Staff of Fire.md +3 -0
- package/systems/5e/world/items/Staff of Frost.md +3 -0
- package/systems/5e/world/items/Staff of Healing.md +2 -0
- package/systems/5e/world/items/Staff of Power.md +5 -0
- package/systems/5e/world/items/Staff of Striking.md +2 -0
- package/systems/5e/world/items/Staff of Swarming Insects.md +2 -0
- package/systems/5e/world/items/Staff of Thunder and Lightning.md +1 -0
- package/systems/5e/world/items/Staff of Withering.md +2 -0
- package/systems/5e/world/items/Staff of the Magi.md +3 -0
- package/systems/5e/world/items/Staff of the Python.md +1 -0
- package/systems/5e/world/items/Staff of the Woodlands.md +2 -0
- package/systems/5e/world/items/Staff.md +1 -0
- package/systems/5e/world/items/Steel Mirror.md +1 -0
- package/systems/5e/world/items/Stone of Controlling Earth Elementals.md +1 -0
- package/systems/5e/world/items/Stone of Good Luck.md +4 -0
- package/systems/5e/world/items/Studded Leather Armor.md +1 -0
- package/systems/5e/world/items/Sun Blade.md +1 -0
- package/systems/5e/world/items/Sword of Life Stealing.md +1 -0
- package/systems/5e/world/items/Sword of Sharpness.md +1 -0
- package/systems/5e/world/items/Sword of Wounding.md +1 -0
- package/systems/5e/world/items/Talisman of Pure Good.md +2 -0
- package/systems/5e/world/items/Talisman of Ultimate Evil.md +2 -0
- package/systems/5e/world/items/Talisman of the Sphere.md +1 -0
- package/systems/5e/world/items/Thieves' Tools.md +1 -0
- package/systems/5e/world/items/Tinderbox.md +1 -0
- package/systems/5e/world/items/Tinker's Tools.md +1 -0
- package/systems/5e/world/items/Tome of Clear Thought.md +1 -0
- package/systems/5e/world/items/Tome of Leadership and Influence.md +1 -0
- package/systems/5e/world/items/Tome of Understanding.md +1 -0
- package/systems/5e/world/items/Torch.md +1 -0
- package/systems/5e/world/items/Totem.md +1 -0
- package/systems/5e/world/items/Traveler's Clothes.md +1 -0
- package/systems/5e/world/items/Trident of Fish Command.md +2 -0
- package/systems/5e/world/items/Trident.md +1 -0
- package/systems/5e/world/items/Two-Person Tent.md +1 -0
- package/systems/5e/world/items/Unarmed Strike.md +1 -0
- package/systems/5e/world/items/Universal Solvent.md +1 -0
- package/systems/5e/world/items/Vial.md +1 -0
- package/systems/5e/world/items/Vicious Weapon.md +1 -0
- package/systems/5e/world/items/Viol.md +1 -0
- package/systems/5e/world/items/Vorpal Sword.md +1 -0
- package/systems/5e/world/items/Wagon.md +1 -0
- package/systems/5e/world/items/Wand of Binding.md +2 -0
- package/systems/5e/world/items/Wand of Enemy Detection.md +2 -0
- package/systems/5e/world/items/Wand of Fear.md +2 -0
- package/systems/5e/world/items/Wand of Fireballs.md +2 -0
- package/systems/5e/world/items/Wand of Lightning Bolts.md +2 -0
- package/systems/5e/world/items/Wand of Magic Detection.md +2 -0
- package/systems/5e/world/items/Wand of Magic Missiles.md +2 -0
- package/systems/5e/world/items/Wand of Paralysis.md +2 -0
- package/systems/5e/world/items/Wand of Polymorph.md +2 -0
- package/systems/5e/world/items/Wand of Secrets.md +2 -0
- package/systems/5e/world/items/Wand of Web.md +2 -0
- package/systems/5e/world/items/Wand of Wonder.md +2 -0
- package/systems/5e/world/items/Wand of the War Mage, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Wand.md +1 -0
- package/systems/5e/world/items/War Pick.md +1 -0
- package/systems/5e/world/items/Warhammer.md +1 -0
- package/systems/5e/world/items/Warship.md +1 -0
- package/systems/5e/world/items/Waterskin.md +1 -0
- package/systems/5e/world/items/Weapon, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Weaver's Tools.md +1 -0
- package/systems/5e/world/items/Well of Many Worlds.md +1 -0
- package/systems/5e/world/items/Whetstone.md +1 -0
- package/systems/5e/world/items/Whip.md +1 -0
- package/systems/5e/world/items/Wind Fan.md +1 -0
- package/systems/5e/world/items/Winged Boots.md +1 -0
- package/systems/5e/world/items/Wings of Flying.md +1 -0
- package/systems/5e/world/items/Woodcarver's Tools.md +1 -0
- package/systems/5e/world/items/Wooden Staff.md +1 -0
- package/systems/5e/world/items/Yew Wand.md +1 -0
- package/systems/free/instructions/play.md +5 -0
- package/systems/free/instructions/session-zero.md +1 -0
- package/systems/free/system.yaml +12 -0
- package/dist/dashboard/combat.js +0 -72
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
// What an AI host reads in a campaign besides .mcp.json: AGENTS.md, opening with the start lines (D-97); CLAUDE.md, which imports it; Claude Code's settings,
|
|
2
|
-
// with its auto memory off, so that the master keeps nothing outside the campaign (D-242),
|
|
3
|
-
//
|
|
2
|
+
// with its auto memory off, so that the master keeps nothing outside the campaign (D-242), the rpg server approved with its tools allowed (D-412) and no tasks in
|
|
3
|
+
// the background, so that the character agent answers within the master's turn (D-490), and the doorbell of the player's sentences (D-495); Codex's, with
|
|
4
|
+
// the rpg server and its memories off (D-362); Claude Code's character agent, the agent the master calls to voice a character (D-490). Gemini CLI is no
|
|
5
|
+
// longer set up (D-493): a campaign's .gemini/ stays as it is.
|
|
4
6
|
import { join } from "node:path";
|
|
5
7
|
import { files } from "../core/store.js";
|
|
6
|
-
|
|
8
|
+
import { efforts, readTextSetting } from "./settings.js";
|
|
9
|
+
/** The files of the AI hosts at the top of a campaign, which are not the game's: a save leaves them as they are (SAV-2), Gemini CLI's of an older campaign too. */
|
|
7
10
|
export const hostFileNames = ["AGENTS.md", "CLAUDE.md", "CLAUDE.local.md", "GEMINI.md"];
|
|
11
|
+
/** Writes a host file, or takes it away when it has no text. */
|
|
12
|
+
export function writeHostFile(file) {
|
|
13
|
+
if (file.text === undefined) {
|
|
14
|
+
files().remove(file.path);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
files().write(file.path, file.text);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
8
20
|
// The marks around the start lines in AGENTS.md: rpg rewrites what lies between them, and the player's own text stays around them.
|
|
9
21
|
const startMark = "<!-- rpg: rpg keeps the lines up to the end mark up to date; the player's own instructions go after it. -->";
|
|
10
22
|
const endMark = "<!-- rpg: end -->";
|
|
@@ -13,17 +25,17 @@ const markedBlock = /^<!-- rpg: (?!end)[^\n]*\n[\s\S]*?^<!-- rpg: end[^\n]*$/m;
|
|
|
13
25
|
export function rpgServer(platform) {
|
|
14
26
|
return platform === "win32" ? { command: "cmd", args: ["/c", "rpg", "mcp"] } : { command: "rpg", args: ["mcp"] };
|
|
15
27
|
}
|
|
16
|
-
/** The host files of a campaign that are missing or out of date, with the
|
|
17
|
-
export function hostFileChanges(root,
|
|
18
|
-
return hostFiles(root,
|
|
28
|
+
/** The host files of a campaign that are missing or out of date, with the engine's texts given; a broken settings file of a host stops it with how to fix it. */
|
|
29
|
+
export function hostFileChanges(root, instructions, platform) {
|
|
30
|
+
return hostFiles(root, instructions, platform).map((file) => file()).filter((file) => file !== undefined);
|
|
19
31
|
}
|
|
20
32
|
/** Brings the host files of a campaign up to date, as the MCP server starts: a file that cannot be read or written stays as it is. */
|
|
21
|
-
export function refreshHostFiles(root,
|
|
22
|
-
for (const change of hostFiles(root,
|
|
33
|
+
export function refreshHostFiles(root, instructions, platform) {
|
|
34
|
+
for (const change of hostFiles(root, instructions, platform)) {
|
|
23
35
|
try {
|
|
24
36
|
const file = change();
|
|
25
37
|
if (file !== undefined) {
|
|
26
|
-
|
|
38
|
+
writeHostFile(file);
|
|
27
39
|
}
|
|
28
40
|
}
|
|
29
41
|
catch {
|
|
@@ -31,8 +43,38 @@ export function refreshHostFiles(root, startLines, platform) {
|
|
|
31
43
|
}
|
|
32
44
|
}
|
|
33
45
|
}
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Writes the master's effort the player chose where each host reads it, as config sets it (D-462); with `cleared`, takes it away, and each app keeps its own.
|
|
48
|
+
* What could not be written, by file.
|
|
49
|
+
*/
|
|
50
|
+
export function writeEffortFiles(root, platform, cleared = false) {
|
|
51
|
+
const effort = cleared ? "app" : chosenEffort(root);
|
|
52
|
+
return [() => claudeSettingsFile(root, effort), () => codexConfigFile(root, platform, effort)].flatMap((change) => {
|
|
53
|
+
try {
|
|
54
|
+
const file = change();
|
|
55
|
+
if (file !== undefined) {
|
|
56
|
+
writeHostFile(file);
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
return [error instanceof Error ? error.message : String(error)];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function hostFiles(root, instructions, platform) {
|
|
66
|
+
return [
|
|
67
|
+
() => agentsFile(root, instructions.start),
|
|
68
|
+
() => claudeFile(root),
|
|
69
|
+
() => claudeSettingsFile(root),
|
|
70
|
+
() => characterAgentFile(root, instructions.character),
|
|
71
|
+
() => codexConfigFile(root, platform),
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
/** The master's effort the player chose (D-462), for each host's file; undefined when unset, and what the files hold stays. */
|
|
75
|
+
function chosenEffort(root) {
|
|
76
|
+
const effort = readTextSetting(root, "effort");
|
|
77
|
+
return efforts.find((one) => one === effort);
|
|
36
78
|
}
|
|
37
79
|
/** AGENTS.md with the start lines between rpg's marks: rewritten when they changed, put first when the file has none, as in a folder that already had one. */
|
|
38
80
|
function agentsFile(root, startLines) {
|
|
@@ -46,6 +88,41 @@ function agentsFile(root, startLines) {
|
|
|
46
88
|
const updated = markedBlock.test(lines) ? lines.replace(markedBlock, () => block) : `${block}\n\n${lines}`;
|
|
47
89
|
return updated === lines ? undefined : { path, text: text.includes("\r\n") ? updated.replace(/\n/g, "\r\n") : updated };
|
|
48
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Whether the campaign has the character agent as a Claude Code agent (D-490): looked at as the MCP server starts, before it writes its host files, it says whether
|
|
93
|
+
* the chat found the agent, as Claude Code reads its agents only when a chat starts.
|
|
94
|
+
*/
|
|
95
|
+
export function hasCharacterAgent(root) {
|
|
96
|
+
return files().fresh(characterAgentPath(root)) !== undefined;
|
|
97
|
+
}
|
|
98
|
+
function characterAgentPath(root) {
|
|
99
|
+
return join(root, ".claude", "agents", "rpg-character.md");
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The character agent as a Claude Code agent (D-490): the engine's, rewritten when it changed. It reads only its character's view, and not the campaign's CLAUDE.md,
|
|
103
|
+
* the master's instructions.
|
|
104
|
+
*/
|
|
105
|
+
function characterAgentFile(root, instructions) {
|
|
106
|
+
const path = characterAgentPath(root);
|
|
107
|
+
// The player wants the master to voice every character.
|
|
108
|
+
if (readTextSetting(root, "voices") === "master") {
|
|
109
|
+
return files().fresh(path) === undefined ? undefined : { path };
|
|
110
|
+
}
|
|
111
|
+
const text = [
|
|
112
|
+
"---",
|
|
113
|
+
"# Written by rpg, which writes it again as the game starts: a change made here does not last.",
|
|
114
|
+
"name: rpg-character",
|
|
115
|
+
"description: Voices one character of the campaign at a key moment, knowing only what they know. Begin with their name, then the moment, as Voices says.",
|
|
116
|
+
"tools: mcp__rpg__view",
|
|
117
|
+
"model: inherit",
|
|
118
|
+
"omitClaudeMd: true",
|
|
119
|
+
"---",
|
|
120
|
+
"",
|
|
121
|
+
instructions,
|
|
122
|
+
"",
|
|
123
|
+
].join("\n");
|
|
124
|
+
return files().fresh(path)?.replace(/\r\n/g, "\n") === text ? undefined : { path, text };
|
|
125
|
+
}
|
|
49
126
|
/** CLAUDE.md, which Claude Code reads, importing AGENTS.md: added first to one that does not. */
|
|
50
127
|
function claudeFile(root) {
|
|
51
128
|
const path = join(root, "CLAUDE.md");
|
|
@@ -57,60 +134,73 @@ function claudeFile(root) {
|
|
|
57
134
|
}
|
|
58
135
|
/**
|
|
59
136
|
* Claude Code's settings for the campaign: its auto memory off, and the rpg server of .mcp.json approved with its tools allowed, so that the first chat neither
|
|
60
|
-
* asks whether to use it, with "continue without" chosen, nor asks for each tool (D-412); a value already written there is the player's, and stays
|
|
137
|
+
* asks whether to use it, with "continue without" chosen, nor asks for each tool (D-412); a value already written there is the player's, and stays, but the
|
|
138
|
+
* effort the player chose in the campaign (D-462).
|
|
61
139
|
*/
|
|
62
|
-
function claudeSettingsFile(root) {
|
|
140
|
+
function claudeSettingsFile(root, effort = chosenEffort(root)) {
|
|
63
141
|
const path = join(root, ".claude", "settings.json");
|
|
64
142
|
const text = files().fresh(path);
|
|
65
143
|
const settings = text === undefined ? {} : jsonObject(path, text, "Claude Code cannot be set up for the game in it");
|
|
66
144
|
const permissions = isObject(settings.permissions) ? settings.permissions : {};
|
|
145
|
+
const environment = isObject(settings.env) ? settings.env : {};
|
|
146
|
+
const hooks = isObject(settings.hooks) ? settings.hooks : {};
|
|
147
|
+
const stops = Array.isArray(hooks.Stop) ? hooks.Stop : [];
|
|
148
|
+
const belled = stops.some((entry) => isObject(entry) && Array.isArray(entry.hooks) && entry.hooks.some((hook) => isObject(hook) && hook.command === bellHook.command));
|
|
67
149
|
const wanted = {
|
|
68
150
|
...settings,
|
|
69
151
|
autoMemoryEnabled: settings.autoMemoryEnabled ?? false,
|
|
70
152
|
enabledMcpjsonServers: settings.enabledMcpjsonServers ?? ["rpg"],
|
|
71
153
|
permissions: { ...permissions, allow: permissions.allow ?? ["mcp__rpg"] },
|
|
154
|
+
// The character agent answers within the master's turn, never after it (D-490): no task of the chat runs in the background.
|
|
155
|
+
env: { ...environment, CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: environment.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS ?? "1" },
|
|
156
|
+
// The doorbell of the player's sentences on the dashboard (D-495), put back beside the player's own hooks whenever it is missing; a Stop of theirs
|
|
157
|
+
// that is no list stays theirs.
|
|
158
|
+
hooks: hooks.Stop !== undefined && !Array.isArray(hooks.Stop) ? hooks : { ...hooks, Stop: belled ? stops : [...stops, { hooks: [bellHook] }] },
|
|
159
|
+
...(effort === undefined || effort === "app" ? {} : { effortLevel: effort }),
|
|
72
160
|
};
|
|
161
|
+
if (effort === "app") {
|
|
162
|
+
delete wanted.effortLevel;
|
|
163
|
+
}
|
|
73
164
|
return text !== undefined && JSON.stringify(wanted) === JSON.stringify(settings) ? undefined : { path, text: settingsText(wanted) };
|
|
74
165
|
}
|
|
166
|
+
// Claude Code's Stop hook for the doorbell (D-495): it waits in the background from the end of each turn, and wakes the chat only for a sentence the player
|
|
167
|
+
// said on the dashboard; a day at most, until the next turn starts another.
|
|
168
|
+
const bellHook = { type: "command", command: "rpg --listen", asyncRewake: true, timeout: 86_400 };
|
|
75
169
|
/**
|
|
76
170
|
* Codex's settings for the campaign, read when the player trusts the folder: the rpg server, its tools approved and its calls waiting for the player's click
|
|
77
|
-
* as long as the server does (D-412),
|
|
171
|
+
* as long as the server does (D-412), with Codex's own home, where its queue takes the player's sentences (D-495), and its memories off; a table already
|
|
172
|
+
* written is the player's, and stays. The effort the player chose (D-462) is a key
|
|
173
|
+
* of the top, before the first table, where Codex reads it; under a table it would belong to that table, and be ignored.
|
|
78
174
|
*/
|
|
79
|
-
function codexConfigFile(root, platform) {
|
|
175
|
+
function codexConfigFile(root, platform, effort = chosenEffort(root)) {
|
|
80
176
|
const path = join(root, ".codex", "config.toml");
|
|
81
|
-
const
|
|
177
|
+
const before = files().fresh(path) ?? "";
|
|
178
|
+
const text = effort === undefined ? before : withTopKey(before, "model_reasoning_effort", effort === "app" ? undefined : effort);
|
|
82
179
|
const server = rpgServer(platform);
|
|
83
180
|
const tables = [
|
|
84
|
-
["mcp_servers.rpg", `command = ${JSON.stringify(server.command)}\nargs = [${server.args.map((arg) => JSON.stringify(arg)).join(", ")}]\ntool_timeout_sec = 1800\ndefault_tools_approval_mode = "approve"`],
|
|
181
|
+
["mcp_servers.rpg", `command = ${JSON.stringify(server.command)}\nargs = [${server.args.map((arg) => JSON.stringify(arg)).join(", ")}]\ntool_timeout_sec = 1800\ndefault_tools_approval_mode = "approve"\nenv_vars = ["CODEX_HOME"]`],
|
|
85
182
|
["memories", "generate_memories = false\nuse_memories = false"],
|
|
86
183
|
];
|
|
87
|
-
|
|
184
|
+
// A table's header with a comment after it is that table all the same.
|
|
185
|
+
const missing = tables.filter(([name]) => !text.split(/\r?\n/).some((line) => line.replace(/#.*$/, "").trim() === `[${name}]`));
|
|
88
186
|
const parts = [text.trimEnd(), ...missing.map(([name, body]) => `[${name}]\n${body}`)].filter((part) => part !== "");
|
|
89
|
-
return missing.length === 0 ? undefined : { path, text: `${parts.join("\n\n")}\n` };
|
|
187
|
+
return missing.length === 0 && text === before ? undefined : { path, text: `${parts.join("\n\n")}\n` };
|
|
90
188
|
}
|
|
91
189
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* already wrote there stays, a trust they set included.
|
|
190
|
+
* A TOML text with a key of its top set to a value, before the first table, in place of the one there, quoted or not; without a value, the key taken away.
|
|
191
|
+
* As it is when nothing changes.
|
|
95
192
|
*/
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
const wanted = {
|
|
108
|
-
...settings,
|
|
109
|
-
mcpServers: { ...servers, rpg: "trust" in rpg ? rpg : { ...rpg, trust: true } },
|
|
110
|
-
context: withDefault("context", "fileName", ["AGENTS.md"]),
|
|
111
|
-
tools: withDefault("tools", "exclude", ["write_file", "replace"]),
|
|
112
|
-
};
|
|
113
|
-
return text !== undefined && JSON.stringify(wanted) === JSON.stringify(settings) ? undefined : { path, text: settingsText(wanted) };
|
|
193
|
+
function withTopKey(text, key, value) {
|
|
194
|
+
const plain = text.replace(/^/, "").replace(/\r\n/g, "\n");
|
|
195
|
+
const lines = plain.split("\n");
|
|
196
|
+
// A table's header, not a line of an array that begins with a bracket.
|
|
197
|
+
const firstTable = lines.findIndex((line) => /^\s*\[\[?[A-Za-z0-9_."-]+\]\]?\s*(#.*)?$/.test(line));
|
|
198
|
+
const keyLine = new RegExp(`^\\s*"?${key}"?\\s*=`);
|
|
199
|
+
const top = (firstTable === -1 ? lines : lines.slice(0, firstTable)).filter((line) => !keyLine.test(line));
|
|
200
|
+
const rest = firstTable === -1 ? [] : lines.slice(firstTable);
|
|
201
|
+
const head = [...(value === undefined ? [] : [`${key} = ${JSON.stringify(value)}`]), ...top].join("\n").trimEnd();
|
|
202
|
+
const joined = [head, rest.join("\n")].filter((part) => part.trim() !== "").join("\n\n");
|
|
203
|
+
return joined.trimEnd() === plain.trimEnd() ? text : joined;
|
|
114
204
|
}
|
|
115
205
|
/** A host's settings file read as a JSON object; refused, with how to fix it, when it is not one. */
|
|
116
206
|
function jsonObject(path, text, cannot) {
|
package/dist/campaign/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createCampaign } from "./create-campaign.ts";
|
|
2
2
|
export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign } from "./find-campaign.ts";
|
|
3
|
-
export { hostFileNames, refreshHostFiles } from "./host-files.ts";
|
|
4
|
-
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, companionWays, diceWays, difficulties, lethalities, listSettingNames, mapSettingNames, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readCoinsSetting, readListSetting, readOneSetting, readSettings, readTextSetting, rigors, saveModes, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, } from "./settings.ts";
|
|
3
|
+
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.ts";
|
|
4
|
+
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, companionWays, type CountedByGame, diceWays, difficulties, efforts, entrySettingNames, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readCoinsSetting, readListSetting, readOneSetting, readSettings, readTextSetting, rigors, saveModes, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.ts";
|
|
5
5
|
export { type CampaignState, changeState, changeStateAt, readState, readStateValues } from "./state.ts";
|
package/dist/campaign/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The campaign: a folder with campaign.yaml, its settings, the present, the sessions and the files an AI host reads.
|
|
2
2
|
export { createCampaign } from "./create-campaign.js";
|
|
3
3
|
export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign } from "./find-campaign.js";
|
|
4
|
-
export { hostFileNames, refreshHostFiles } from "./host-files.js";
|
|
5
|
-
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, companionWays, diceWays, difficulties, lethalities, listSettingNames, mapSettingNames, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readCoinsSetting, readListSetting, readOneSetting, readSettings, readTextSetting, rigors, saveModes, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, } from "./settings.js";
|
|
4
|
+
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.js";
|
|
5
|
+
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, companionWays, diceWays, difficulties, efforts, entrySettingNames, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readCoinsSetting, readListSetting, readOneSetting, readSettings, readTextSetting, rigors, saveModes, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.js";
|
|
6
6
|
export { changeState, changeStateAt, readState, readStateValues } from "./state.js";
|
|
@@ -13,17 +13,34 @@ export declare const rigors: readonly ["smooth", "rules", "simulation"];
|
|
|
13
13
|
export declare const difficultyMeanings: Record<(typeof difficulties)[number], string>;
|
|
14
14
|
/** What each rigor means in play (D-42, D-263): what the master counts, which status and config give for the chosen one. */
|
|
15
15
|
export declare const rigorMeanings: Record<(typeof rigors)[number], string>;
|
|
16
|
+
/** What the game system counts itself (UPK-1, UPK-3): the day's food, and what burns as it is lit, by its first name; what a rigor's meaning adds of them. */
|
|
17
|
+
export interface CountedByGame {
|
|
18
|
+
upkeep: boolean;
|
|
19
|
+
burning?: string;
|
|
20
|
+
}
|
|
16
21
|
/** How much the master teaches the game, out of the story (D-347): the story alone, a hint now and then, or each rule as it first comes up. */
|
|
17
22
|
export declare const mentorWays: readonly ["off", "hints", "tutorial"];
|
|
18
23
|
/** What each way of the mentor means to the master, which config gives for the chosen one, and the player's change of it on the dashboard (D-347). */
|
|
19
24
|
export declare const mentorMeanings: Record<(typeof mentorWays)[number], string>;
|
|
20
|
-
/**
|
|
21
|
-
|
|
25
|
+
/**
|
|
26
|
+
* What the chosen difficulty, rigor or mentor means, as status and config give it, the rigor with what the game counts itself; undefined for another setting
|
|
27
|
+
* or a value it does not take.
|
|
28
|
+
*/
|
|
29
|
+
export declare function settingMeaning(name: string, value: unknown, counted?: CountedByGame): string | undefined;
|
|
22
30
|
/** Who rolls the player character's dice (D-241): rpg, or the player with their own, telling the values; the master's are always rolled by rpg. */
|
|
23
31
|
export declare const diceWays: readonly ["digital", "physical"];
|
|
32
|
+
/** Whether the master's rolls for anyone outside the party are hidden (D-287): behind the screen, unset too, or in view; the party's are always shown. */
|
|
33
|
+
export declare const masterRollWays: readonly ["behind the screen", "in view"];
|
|
34
|
+
/**
|
|
35
|
+
* Who voices the characters (D-490), where the AI app has subagents: a character as a subagent of its own at key moments, the master chooses (auto); the master
|
|
36
|
+
* always; always for the companions and the main characters; always for everyone.
|
|
37
|
+
*/
|
|
38
|
+
export declare const voiceWays: readonly ["master", "auto", "important", "always"];
|
|
24
39
|
export { unitSystems };
|
|
25
40
|
/** Which pictures the engine has made, where it can (D-308, D-388, D-420): none, only those the player asks for, or one for each new place, quest and one met. */
|
|
26
41
|
export declare const pictureWays: readonly ["none", "on request", "new elements"];
|
|
42
|
+
/** How much the master thinks before each answer, written for each AI app in the campaign's folder (D-462). */
|
|
43
|
+
export declare const efforts: readonly ["low", "medium", "high"];
|
|
27
44
|
/** How the companions come (D-76, D-221): none, made in session zero with the player or by the master, or met in play. */
|
|
28
45
|
export declare const companionWays: readonly ["none", "made with the player", "made by the master", "met in play"];
|
|
29
46
|
/** How far ahead a world without a written campaign is made (D-80): as it is needed, or all at the start. */
|
|
@@ -92,10 +109,20 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
92
109
|
digital: "digital";
|
|
93
110
|
physical: "physical";
|
|
94
111
|
}>>;
|
|
112
|
+
"master-rolls": z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
"behind the screen": "behind the screen";
|
|
114
|
+
"in view": "in view";
|
|
115
|
+
}>>;
|
|
95
116
|
units: z.ZodOptional<z.ZodEnum<{
|
|
96
117
|
metric: "metric";
|
|
97
118
|
imperial: "imperial";
|
|
98
119
|
}>>;
|
|
120
|
+
voices: z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
master: "master";
|
|
122
|
+
auto: "auto";
|
|
123
|
+
important: "important";
|
|
124
|
+
always: "always";
|
|
125
|
+
}>>;
|
|
99
126
|
companions: z.ZodOptional<z.ZodEnum<{
|
|
100
127
|
none: "none";
|
|
101
128
|
"made with the player": "made with the player";
|
|
@@ -108,11 +135,17 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
108
135
|
"on request": "on request";
|
|
109
136
|
"new elements": "new elements";
|
|
110
137
|
}>, unknown>>;
|
|
138
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
low: "low";
|
|
140
|
+
medium: "medium";
|
|
141
|
+
high: "high";
|
|
142
|
+
}>>;
|
|
111
143
|
lines: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
112
144
|
veils: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
113
145
|
table: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
114
146
|
precedents: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
115
147
|
learned: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
148
|
+
library: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
116
149
|
coins: z.ZodOptional<z.ZodUnknown>;
|
|
117
150
|
calendar: z.ZodOptional<z.ZodUnknown>;
|
|
118
151
|
fields: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -122,6 +155,8 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
122
155
|
recipes: z.ZodOptional<z.ZodUnknown>;
|
|
123
156
|
"status-line": z.ZodOptional<z.ZodUnknown>;
|
|
124
157
|
travel: z.ZodOptional<z.ZodUnknown>;
|
|
158
|
+
values: z.ZodOptional<z.ZodUnknown>;
|
|
159
|
+
widgets: z.ZodOptional<z.ZodUnknown>;
|
|
125
160
|
}, z.core.$loose>;
|
|
126
161
|
export type CampaignSettings = z.infer<typeof settingsSchema>;
|
|
127
162
|
export type SettingName = keyof typeof settingsSchema.shape;
|
|
@@ -131,7 +166,12 @@ export declare const settingNames: SettingName[];
|
|
|
131
166
|
export declare const listSettingNames: SettingName[];
|
|
132
167
|
/** The settings that hold entries by name, what the campaign adds to its game system (CAM-1): given or removed one entry at a time. */
|
|
133
168
|
export declare const mapSettingNames: SettingName[];
|
|
134
|
-
/**
|
|
169
|
+
/** The settings that hold entries by name: what the campaign adds to its game system, and where the dashboard shows the extensions' widgets (D-502). */
|
|
170
|
+
export declare const entrySettingNames: SettingName[];
|
|
171
|
+
/**
|
|
172
|
+
* What only the setup asks (D-241, MOD-3, D-347, D-287): how much the master teaches the game, whether the master's rolls are shown, how the companions come,
|
|
173
|
+
* when the story starts, and the lines and veils, which "none" answers too.
|
|
174
|
+
*/
|
|
135
175
|
export declare const setupSettingNames: SettingName[];
|
|
136
176
|
/** What the setup asks only of a campaign without a written world (D-79, D-80, MOD-3). */
|
|
137
177
|
export declare const premiseSettingNames: SettingName[];
|
|
@@ -27,11 +27,24 @@ export const difficultyMeanings = {
|
|
|
27
27
|
};
|
|
28
28
|
/** What each rigor means in play (D-42, D-263): what the master counts, which status and config give for the chosen one. */
|
|
29
29
|
export const rigorMeanings = {
|
|
30
|
-
smooth: "you gloss over food and water, light, encumbrance, fatigue
|
|
31
|
-
rules: "as written: charge with change what is used up,
|
|
32
|
-
+ "encumbrance, fatigue and spell components as the rules say; warn before something runs out, and once it has, the rule applies",
|
|
30
|
+
smooth: "you gloss over food and water, light, encumbrance, fatigue and the like: count them only when the story turns on them",
|
|
31
|
+
rules: "as written: charge with change what is used up; encumbrance, fatigue and the like as the rules say; warn before something runs out, and once it has, the rule applies",
|
|
33
32
|
simulation: "as rules, and beyond what is written: wear, spoilage, weather and the like",
|
|
34
33
|
};
|
|
34
|
+
/** A rigor's meaning with what the game counts itself said (review of 17 October): a game that counts no food is never promised it. */
|
|
35
|
+
function rigorMeaning(rigor, counted) {
|
|
36
|
+
const meaning = rigorMeanings[rigor];
|
|
37
|
+
const burns = counted?.burning === undefined ? "" : `an effect named after what burns, such as ${counted.burning}, spends it as it is lit`;
|
|
38
|
+
if (meaning === undefined || rigor === "simulation" || counted === undefined) {
|
|
39
|
+
return meaning;
|
|
40
|
+
}
|
|
41
|
+
if (rigor === "smooth") {
|
|
42
|
+
return burns === "" ? meaning : `${meaning}; a light you put on as an effect, as a ${counted.burning}, still spends one`;
|
|
43
|
+
}
|
|
44
|
+
const food = counted.upkeep ? "advance spends the day's food outside a settlement; water, lifestyle and wages are yours to charge" : "";
|
|
45
|
+
const counts = [food, burns].filter((part) => part !== "").join("; ");
|
|
46
|
+
return counts === "" ? meaning : meaning.replace("charge with change what is used up; ", `charge with change what is used up; ${counts}; `);
|
|
47
|
+
}
|
|
35
48
|
/** How much the master teaches the game, out of the story (D-347): the story alone, a hint now and then, or each rule as it first comes up. */
|
|
36
49
|
export const mentorWays = ["off", "hints", "tutorial"];
|
|
37
50
|
/** What each way of the mentor means to the master, which config gives for the chosen one, and the player's change of it on the dashboard (D-347). */
|
|
@@ -41,17 +54,32 @@ export const mentorMeanings = {
|
|
|
41
54
|
tutorial: "each mechanic explained the first time it comes up, the whole sum of a roll shown, a debrief after fights and at the end of a session, "
|
|
42
55
|
+ "as the mentor's part of your instructions says",
|
|
43
56
|
};
|
|
44
|
-
/**
|
|
45
|
-
|
|
57
|
+
/**
|
|
58
|
+
* What the chosen difficulty, rigor or mentor means, as status and config give it, the rigor with what the game counts itself; undefined for another setting
|
|
59
|
+
* or a value it does not take.
|
|
60
|
+
*/
|
|
61
|
+
export function settingMeaning(name, value, counted) {
|
|
62
|
+
if (name === "rigor" && typeof value === "string") {
|
|
63
|
+
return rigorMeaning(value, counted);
|
|
64
|
+
}
|
|
46
65
|
const meanings = { difficulty: difficultyMeanings, rigor: rigorMeanings, mentor: mentorMeanings, ...styleMeanings };
|
|
47
66
|
const own = Object.hasOwn(meanings, name) ? meanings[name] : undefined;
|
|
48
67
|
return typeof value === "string" && own !== undefined && Object.hasOwn(own, value) ? own[value] : undefined;
|
|
49
68
|
}
|
|
50
69
|
/** Who rolls the player character's dice (D-241): rpg, or the player with their own, telling the values; the master's are always rolled by rpg. */
|
|
51
70
|
export const diceWays = ["digital", "physical"];
|
|
71
|
+
/** Whether the master's rolls for anyone outside the party are hidden (D-287): behind the screen, unset too, or in view; the party's are always shown. */
|
|
72
|
+
export const masterRollWays = ["behind the screen", "in view"];
|
|
73
|
+
/**
|
|
74
|
+
* Who voices the characters (D-490), where the AI app has subagents: a character as a subagent of its own at key moments, the master chooses (auto); the master
|
|
75
|
+
* always; always for the companions and the main characters; always for everyone.
|
|
76
|
+
*/
|
|
77
|
+
export const voiceWays = ["master", "auto", "important", "always"];
|
|
52
78
|
export { unitSystems };
|
|
53
79
|
/** Which pictures the engine has made, where it can (D-308, D-388, D-420): none, only those the player asks for, or one for each new place, quest and one met. */
|
|
54
80
|
export const pictureWays = ["none", "on request", "new elements"];
|
|
81
|
+
/** How much the master thinks before each answer, written for each AI app in the campaign's folder (D-462). */
|
|
82
|
+
export const efforts = ["low", "medium", "high"];
|
|
55
83
|
/** How the companions come (D-76, D-221): none, made in session zero with the player or by the master, or met in play. */
|
|
56
84
|
export const companionWays = ["none", "made with the player", "made by the master", "met in play"];
|
|
57
85
|
/** How far ahead a world without a written campaign is made (D-80): as it is needed, or all at the start. */
|
|
@@ -100,20 +128,28 @@ export const settingsSchema = z.object({
|
|
|
100
128
|
difficulty: z.enum(difficulties).optional().describe(`how hard the world plays: ${difficulties.join(", ")}`),
|
|
101
129
|
lethality: z.enum(lethalities).optional().describe("what a fall means: narrative (the character never dies), epic (only when it matters) or dice (the dice decide)"),
|
|
102
130
|
saves: z.enum(saveModes).optional().describe("when the game may go back: permadeath (never, but to the start, the campaign starting over), checkpoint (to the last end of a scene, once the player character dies) or free (to any save, and saves when the player asks)"),
|
|
103
|
-
rigor: z.enum(rigors).optional().describe("how closely travel, fatigue, food
|
|
131
|
+
rigor: z.enum(rigors).optional().describe("how closely travel, fatigue, food and the like follow the rules: smooth (the master glosses over them), rules (as written) or simulation (beyond them)"),
|
|
104
132
|
dice: z.enum(diceWays).optional().describe("the player character's dice: digital (rpg rolls them) or physical (the player rolls their own and tells the values)"),
|
|
133
|
+
"master-rolls": z.enum(masterRollWays).optional().describe("the master's rolls for foes and anyone else outside the party: behind the screen (roll hides them, the master telling only the outcome) or in view (roll shows them); "
|
|
134
|
+
+ "the party's rolls are always shown; unset, behind the screen"),
|
|
105
135
|
units: z.enum(unitSystems).optional().describe("the units of measure of the story: metric or imperial"),
|
|
136
|
+
voices: z.enum(voiceWays).optional().describe("who voices the characters, where the AI app has subagents, from the master to the characters: master (the master, always), auto (at key moments, as the master chooses, "
|
|
137
|
+
+ "a character answers as a subagent of its own, knowing only what it knows), important (always a subagent for the companions and the characters with kind main), "
|
|
138
|
+
+ "always (always a subagent, for everyone); unset, auto"),
|
|
106
139
|
companions: z.enum(companionWays).optional().describe("how the companions come: none, made with the player or made by the master in session zero, or met in play"),
|
|
107
140
|
// Checked by the time module against the calendar (TIM-8).
|
|
108
141
|
"calendar-start": z.string().min(1).optional().describe("when the story starts: day 1 to count only the days, or the day of the world's calendar that is day 1, such as 14 April 1491"),
|
|
109
142
|
// new places and new places and quests, as campaigns wrote it before quests and then those met had pictures, are read as the value that took their place (D-388, D-420).
|
|
110
143
|
pictures: z.preprocess((value) => (value === "new places" || value === "new places and quests" ? "new elements" : value), z.enum(pictureWays)).optional().describe("the pictures of places, quests and those met the engine has made on this computer, which spend the player's plan, Codex's or Claude's: none, on request (those the player asks for) "
|
|
111
144
|
+ "or new elements (one for each new place and quest, and for each character and kind of creature the character meets)"),
|
|
145
|
+
effort: z.enum(efforts).optional().describe("how much the master thinks before each answer, the player's to choose: low, medium or high, written where Claude Code and Codex read it in the campaign's folder; "
|
|
146
|
+
+ "unset, each app keeps its own"),
|
|
112
147
|
lines: listSetting.describe("what never appears in the game"),
|
|
113
148
|
veils: listSetting.describe("what happens only off screen, without details"),
|
|
114
149
|
table: listSetting.describe("the table's agreements: what the master promised about how the game is played"),
|
|
115
150
|
precedents: listSetting.describe("the rulings made without the text, each starting with the name of the rule in the system's language: Poisoned: …"),
|
|
116
151
|
learned: listSetting.describe("the game's mechanics the master has explained, by their names in the system's language: explained again only when the player gets one wrong"),
|
|
152
|
+
library: listSetting.describe("the player's library (D-491): folders of their books, or books, by full path, which rules searches after the game system"),
|
|
117
153
|
// Checked by the money module (MON-1): coins written wrongly by hand must not stop the other settings from being read.
|
|
118
154
|
coins: z.unknown().optional().describe("the coins, for a game with money: each with its value in the smallest coin, such as gp 100, sp 10, cp 1"),
|
|
119
155
|
// Checked by the time module (TIM-8): a mistake there never stops the game, whose date stays day N.
|
|
@@ -121,28 +157,36 @@ export const settingsSchema = z.object({
|
|
|
121
157
|
// What the campaign adds to its game system (CAM-1): checked by the systems module when it reads the system with them, so that a mistake there never hides the
|
|
122
158
|
// other settings.
|
|
123
159
|
fields: z.unknown().optional().describe("fields the campaign adds to its game system, by name with their kind, such as portent: rolls"),
|
|
124
|
-
tables: z.unknown().optional().describe("tables the campaign adds to its game system, by name, such as
|
|
160
|
+
tables: z.unknown().optional().describe("tables the campaign adds to its game system, by name, such as bulwark-dice-by-level: {3: 4, 7: 5, 15: 6}"),
|
|
125
161
|
computed: z.unknown().optional().describe("formulas the campaign adds to its game system or puts in place of its own, as a house rule, by field"),
|
|
126
162
|
counters: z.unknown().optional().describe("counters the campaign adds to its game system or changes: their limits and what comes back with a rest, by name"),
|
|
127
|
-
recipes: z.unknown().optional().describe("what the campaign adds to the rests of its game system, by recipe, such as short rest: {set: {
|
|
163
|
+
recipes: z.unknown().optional().describe("what the campaign adds to the rests of its game system, by recipe, such as short rest: {set: {bulwark-dice: max}}"),
|
|
128
164
|
"status-line": z.unknown().optional().describe("fields the campaign adds to the line of the player character and the companions, such as portent?"),
|
|
129
165
|
travel: z.unknown().optional().describe("what the campaign adds to how its game system travels, by key: paces, hours, terrain and kinds of road, such as kinds: {canal: {}}"),
|
|
166
|
+
values: z.unknown().optional().describe("names the campaign adds to the closed lists of its game system, by field, such as languages: [Lingua dei Guadi]"),
|
|
167
|
+
// Checked against the campaign's extensions when it is written (D-502): one written wrongly by hand leaves the extension's place.
|
|
168
|
+
widgets: z.unknown().optional().describe("where the dashboard shows the extensions' widgets, by extension.widget: top, side, scene, sheet, world, journal or off, such as weather.today: side"),
|
|
130
169
|
}).loose();
|
|
131
170
|
/** The settings that the config command shows and changes. */
|
|
132
171
|
export const settingNames = Object.keys(settingsSchema.shape);
|
|
133
172
|
/** The settings that hold a list, changed one item at a time; none of them is ever missing in play. */
|
|
134
|
-
export const listSettingNames = ["lines", "veils", "table", "precedents", "learned", "status-line"];
|
|
173
|
+
export const listSettingNames = ["lines", "veils", "table", "precedents", "learned", "library", "status-line"];
|
|
135
174
|
/** The settings that hold entries by name, what the campaign adds to its game system (CAM-1): given or removed one entry at a time. */
|
|
136
|
-
export const mapSettingNames = ["fields", "tables", "computed", "counters", "recipes", "travel"];
|
|
137
|
-
/**
|
|
138
|
-
export const
|
|
175
|
+
export const mapSettingNames = ["fields", "tables", "computed", "counters", "recipes", "travel", "values"];
|
|
176
|
+
/** The settings that hold entries by name: what the campaign adds to its game system, and where the dashboard shows the extensions' widgets (D-502). */
|
|
177
|
+
export const entrySettingNames = [...mapSettingNames, "widgets"];
|
|
178
|
+
/**
|
|
179
|
+
* What only the setup asks (D-241, MOD-3, D-347, D-287): how much the master teaches the game, whether the master's rolls are shown, how the companions come,
|
|
180
|
+
* when the story starts, and the lines and veils, which "none" answers too.
|
|
181
|
+
*/
|
|
182
|
+
export const setupSettingNames = ["mentor", "master-rolls", "companions", "calendar-start", "lines", "veils"];
|
|
139
183
|
/** What the setup asks only of a campaign without a written world (D-79, D-80, MOD-3). */
|
|
140
184
|
export const premiseSettingNames = ["premise", "preparation"];
|
|
141
185
|
// Settings that only some games have, or that only the setup asks: never asked for in play when missing.
|
|
142
186
|
// The pictures: status asks for them once, only where they can be made (D-308).
|
|
143
187
|
// How the master writes: the core's own until the player chooses (D-395).
|
|
144
188
|
const styleSettingNames = ["prose", "story", "author", "style"];
|
|
145
|
-
const optionalSettingNames = ["coins", "pictures", "calendar", "calendar-start", ...
|
|
189
|
+
const optionalSettingNames = ["coins", "pictures", "effort", "voices", "calendar", "calendar-start", ...entrySettingNames, ...setupSettingNames, ...premiseSettingNames, ...styleSettingNames];
|
|
146
190
|
export function readSettings(root) {
|
|
147
191
|
return validateSettings(readYamlValues(join(root, campaignFileName), settingsHold));
|
|
148
192
|
}
|
|
@@ -302,7 +346,7 @@ export function readCampaignData(root) {
|
|
|
302
346
|
*/
|
|
303
347
|
export function changeMapSetting(root, name, change) {
|
|
304
348
|
const setting = checkSettingName(name);
|
|
305
|
-
if (!
|
|
349
|
+
if (!entrySettingNames.includes(setting)) {
|
|
306
350
|
throw new Error(`"${setting}" holds no entries by name: ${listSettingNames.includes(setting) ? "change it with add and remove" : "give the new value"}.`);
|
|
307
351
|
}
|
|
308
352
|
const document = readSettingsDocument(root);
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { runCommandLine } from "./command-line.js";
|
|
3
3
|
const args = process.argv.slice(2);
|
|
4
|
-
// "rpg mcp" turns the process into a server for an AI host;
|
|
4
|
+
// "rpg mcp" turns the process into a server for an AI host; "rpg --read-library" reads the player's books apart, as rules starts it (LIB-3); "rpg --listen"
|
|
5
|
+
// is Claude Code's doorbell for the player's sentences on the dashboard (D-495); everything else is a command.
|
|
5
6
|
if (args.length === 1 && args[0] === "mcp") {
|
|
6
7
|
// The server and its SDK load only here: every other command starts faster without them (D-194).
|
|
7
8
|
const { startMcpServer } = await import("./mcp-server.js");
|
|
8
9
|
await startMcpServer();
|
|
9
10
|
}
|
|
11
|
+
else if (args[0] === "--read-library") {
|
|
12
|
+
const { readLibraryHere } = await import("./library-reader.js");
|
|
13
|
+
await readLibraryHere();
|
|
14
|
+
}
|
|
15
|
+
else if (args.length === 1 && args[0] === "--listen") {
|
|
16
|
+
const { listenHere } = await import("./bell-listener.js");
|
|
17
|
+
await listenHere();
|
|
18
|
+
}
|
|
10
19
|
else {
|
|
11
20
|
const { output, exitCode } = await runCommandLine(args);
|
|
12
21
|
if (exitCode === 0) {
|
package/dist/command-line.js
CHANGED
|
@@ -3,17 +3,35 @@ import { z } from "zod";
|
|
|
3
3
|
import { findCampaign } from "./campaign/index.js";
|
|
4
4
|
import { extensionCommands } from "./commands/game-extensions.js";
|
|
5
5
|
import { commands } from "./commands/index.js";
|
|
6
|
+
import { systemConfirm } from "./confirm/index.js";
|
|
6
7
|
import { defaultContext, packagesFolder } from "./core/context.js";
|
|
8
|
+
import { downloadBytes } from "./core/download.js";
|
|
7
9
|
import { baseType, isBoolean, isList } from "./core/registry.js";
|
|
8
10
|
import { FileStore, withFiles } from "./core/store.js";
|
|
9
11
|
import { firstSentence } from "./core/text.js";
|
|
10
12
|
import { getVersion } from "./core/version.js";
|
|
13
|
+
import { systemPageReader } from "./documents/index.js";
|
|
11
14
|
import { npmPackages } from "./extensions/index.js";
|
|
12
|
-
import {
|
|
15
|
+
import { libraryRunner } from "./library-reader.js";
|
|
16
|
+
import { hostPictures, hostReader } from "./pictures/index.js";
|
|
17
|
+
import { loadSystemCode } from "./systems/index.js";
|
|
13
18
|
// The one command that exists only on the command line: cli.ts starts the server when it comes alone.
|
|
14
19
|
const mcpDescription = "Start the MCP server for an AI host. Through it the host uses these commands as tools; the host starts it, with no options.";
|
|
15
20
|
/** The `rpg` command line: finds the command, validates its input, runs it and renders the result. */
|
|
16
|
-
export async function runCommandLine(argv, context = {
|
|
21
|
+
export async function runCommandLine(argv, context = {
|
|
22
|
+
...defaultContext(),
|
|
23
|
+
pictures: hostPictures(() => undefined),
|
|
24
|
+
// An import run apart by the MCP server uses the helper of the chat that started it.
|
|
25
|
+
reader: hostReader(() => process.env.RPG_HOST || undefined),
|
|
26
|
+
packages: npmPackages(packagesFolder()),
|
|
27
|
+
confirm: systemConfirm(process.platform, process.env),
|
|
28
|
+
ocr: systemPageReader(process.platform, process.env),
|
|
29
|
+
readLibrary: libraryRunner(),
|
|
30
|
+
download: downloadBytes,
|
|
31
|
+
terminal: true,
|
|
32
|
+
}) {
|
|
33
|
+
// The systems' code, loaded once, before any command may call its hooks (D-448).
|
|
34
|
+
context.systemCode ??= await loadSystemCode(context.systemFolders);
|
|
17
35
|
const [commandName, ...args] = argv;
|
|
18
36
|
if (commandName === undefined || commandName === "--help" || commandName === "-h") {
|
|
19
37
|
return success(generalHelp(await campaignCommands(context)));
|
|
@@ -55,11 +73,16 @@ function readArguments(command, args) {
|
|
|
55
73
|
const positionals = command.positionals ?? [];
|
|
56
74
|
const options = { json: { type: "boolean" } };
|
|
57
75
|
for (const [name, field] of inputFields(command)) {
|
|
76
|
+
// --no-x turns x off: a field named no-x would be lost, as an extension's might be (review of 25 October).
|
|
77
|
+
if (name.startsWith("no-")) {
|
|
78
|
+
throw new Error(`${command.name} has a field named ${name}, and none may start with no-, which the command line reads as turning ${name.slice(3)} off: rename it.`);
|
|
79
|
+
}
|
|
58
80
|
if (!positionals.includes(name)) {
|
|
59
81
|
options[name] = { type: isBoolean(field) ? "boolean" : "string", multiple: isList(field) };
|
|
60
82
|
}
|
|
61
83
|
}
|
|
62
|
-
|
|
84
|
+
// A flag is turned off as --no-hidden, where a setting would turn it on, as the MCP server takes hidden: false.
|
|
85
|
+
const parsed = parseArgs({ args, options, allowPositionals: true, allowNegative: true, strict: true, tokens: true });
|
|
63
86
|
// The last positional, when it is a list, takes the arguments left before the first option, as in rpg move Ettore Lena --to Ossario.
|
|
64
87
|
const last = positionals.at(-1);
|
|
65
88
|
const takesRest = last !== undefined && isList(command.input.shape[last]);
|