rpg-engine 0.14.1 → 0.16.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/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/last-choices.js +1 -1
- package/dist/campaign/settings.d.ts +25 -5
- package/dist/campaign/settings.js +38 -9
- package/dist/cli/cli.js +1 -1
- package/dist/cli/command-line.js +1 -1
- package/dist/commands/advance.d.ts +1 -1
- package/dist/commands/advance.js +6 -6
- package/dist/commands/ask.js +7 -7
- package/dist/commands/change/amounts.d.ts +32 -0
- package/dist/commands/change/amounts.js +150 -0
- package/dist/commands/change/change.d.ts +4 -54
- package/dist/commands/change/change.js +19 -749
- package/dist/commands/change/damage.d.ts +30 -0
- package/dist/commands/change/damage.js +73 -2
- package/dist/commands/change/dice.d.ts +34 -0
- package/dist/commands/change/dice.js +59 -0
- package/dist/commands/change/fields.d.ts +37 -0
- package/dist/commands/change/fields.js +156 -0
- package/dist/commands/change/holder.d.ts +48 -0
- package/dist/commands/change/holder.js +162 -0
- package/dist/commands/change/recipe-pace.js +1 -1
- package/dist/commands/change/recipe.d.ts +58 -0
- package/dist/commands/change/recipe.js +179 -0
- package/dist/commands/choices.js +3 -3
- package/dist/commands/config/config.d.ts +15 -0
- package/dist/commands/config/config.js +355 -0
- package/dist/commands/config/custom-levels.d.ts +7 -0
- package/dist/commands/config/custom-levels.js +32 -0
- package/dist/commands/{config.d.ts → config/dashboard.d.ts} +4 -26
- package/dist/commands/config/dashboard.js +171 -0
- package/dist/commands/config/entries.d.ts +17 -0
- package/dist/commands/config/entries.js +76 -0
- package/dist/commands/config/news.d.ts +7 -0
- package/dist/commands/config/news.js +88 -0
- package/dist/commands/config/shown.d.ts +9 -0
- package/dist/commands/config/shown.js +80 -0
- package/dist/commands/config/words.d.ts +27 -0
- package/dist/commands/config/words.js +204 -0
- package/dist/commands/effect.js +9 -9
- package/dist/commands/find.d.ts +4 -4
- package/dist/commands/find.js +1 -1
- package/dist/commands/image.js +6 -6
- package/dist/commands/import/import.d.ts +0 -2
- package/dist/commands/import/import.js +45 -44
- package/dist/commands/import/run.js +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +1 -1
- package/dist/commands/instructions.js +17 -6
- package/dist/commands/mode.d.ts +2 -2
- package/dist/commands/mode.js +17 -9
- package/dist/commands/mood.js +4 -4
- package/dist/commands/move.js +10 -10
- package/dist/commands/package/consent.d.ts +11 -0
- package/dist/commands/package/consent.js +52 -0
- package/dist/commands/package/here.d.ts +51 -0
- package/dist/commands/package/here.js +128 -0
- package/dist/commands/package/install.d.ts +10 -0
- package/dist/commands/package/install.js +337 -0
- package/dist/commands/package/package.d.ts +18 -0
- package/dist/commands/package/package.js +236 -0
- package/dist/commands/package/result.d.ts +90 -0
- package/dist/commands/package/result.js +1 -0
- package/dist/commands/package/uninstall.d.ts +6 -0
- package/dist/commands/package/uninstall.js +70 -0
- package/dist/commands/rename.js +3 -3
- package/dist/commands/reveal.js +5 -5
- package/dist/commands/roll/roll.js +11 -9
- package/dist/commands/roll/tables.js +1 -1
- package/dist/commands/rules.d.ts +2 -2
- package/dist/commands/rules.js +3 -3
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene/close.d.ts +18 -0
- package/dist/commands/scene/close.js +179 -0
- package/dist/commands/scene/members.d.ts +14 -0
- package/dist/commands/scene/members.js +32 -0
- package/dist/commands/scene/open.d.ts +6 -0
- package/dist/commands/scene/open.js +298 -0
- package/dist/commands/scene/result.d.ts +98 -0
- package/dist/commands/scene/result.js +2 -0
- package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
- package/dist/commands/scene/scene.js +210 -0
- package/dist/commands/scene/turns.d.ts +18 -0
- package/dist/commands/scene/turns.js +229 -0
- package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +5 -3
- package/dist/commands/shared/{adventures.js → books/adventures.js} +23 -19
- package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
- package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
- package/dist/commands/shared/{library.js → books/library.js} +9 -9
- package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
- package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
- package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
- package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
- package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
- package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
- package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
- package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
- package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
- package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
- package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
- package/dist/commands/shared/{mode.js → campaign/mode.js} +28 -13
- package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
- package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
- package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
- package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
- package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
- package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
- package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +10 -3
- package/dist/commands/shared/{parts.js → campaign/parts.js} +26 -3
- package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
- package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
- package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
- package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
- package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
- package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
- package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
- package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
- package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
- package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
- package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
- package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
- package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
- package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
- package/dist/commands/shared/characters/orders.d.ts +4 -0
- package/dist/commands/shared/characters/orders.js +10 -0
- package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +2 -2
- package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +3 -3
- package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
- package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
- package/dist/commands/shared/examples.js +2 -2
- package/dist/commands/shared/packages/catalog.js +2 -2
- package/dist/commands/shared/packages/code.d.ts +1 -1
- package/dist/commands/shared/packages/code.js +8 -8
- package/dist/commands/shared/packages/extensions.d.ts +1 -1
- package/dist/commands/shared/packages/extensions.js +1 -1
- package/dist/commands/shared/packages/hooks.d.ts +1 -1
- package/dist/commands/shared/packages/hooks.js +1 -1
- package/dist/commands/shared/packages/widgets.d.ts +3 -3
- package/dist/commands/shared/packages/widgets.js +3 -3
- package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
- package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
- package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
- package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
- package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
- package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
- package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
- package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
- package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
- package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
- package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
- package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
- package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
- package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
- package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
- package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
- package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
- package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
- package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
- package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
- package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
- package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
- package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
- package/dist/commands/shared/{scene.js → scene/scene.js} +7 -7
- package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
- package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
- package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
- package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
- package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
- package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
- package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
- package/dist/commands/shared/sheet/effect-values.js +69 -0
- package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
- package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
- package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
- package/dist/commands/shared/sheet/formula-problems.js +140 -0
- package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
- package/dist/commands/shared/sheet/formula-scope.js +235 -0
- package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
- package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
- package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
- package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
- package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +5 -5
- package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
- package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
- package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
- package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
- package/dist/commands/shared/sheet/system-fields.js +45 -0
- package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
- package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
- package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
- package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
- package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
- package/dist/commands/shared/sheet/worked-out.js +291 -0
- package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
- package/dist/commands/shared/sheet/worked-text.js +55 -0
- package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
- package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
- package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
- package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
- package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
- package/dist/commands/shared/{events.js → time/events.js} +10 -13
- package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
- package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
- package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
- package/dist/commands/shared/{time.js → time/time.js} +6 -6
- package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
- package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
- package/dist/commands/show.d.ts +4 -1
- package/dist/commands/show.js +28 -9
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.js +34 -23
- package/dist/commands/thoughts.js +3 -3
- package/dist/commands/trade.js +8 -8
- package/dist/commands/translate.d.ts +1 -1
- package/dist/commands/translate.js +3 -3
- package/dist/commands/travel/open.d.ts +1 -1
- package/dist/commands/travel/open.js +2 -2
- package/dist/commands/travel/route.js +7 -6
- package/dist/commands/travel/travel.d.ts +1 -1
- package/dist/commands/travel/travel.js +8 -8
- package/dist/commands/validate.js +3 -3
- package/dist/commands/view/journal.d.ts +2 -2
- package/dist/commands/view/journal.js +2 -2
- package/dist/commands/view/map.d.ts +1 -1
- package/dist/commands/view/map.js +6 -6
- package/dist/commands/view/memory.d.ts +16 -0
- package/dist/commands/view/memory.js +90 -0
- package/dist/commands/view/page.d.ts +32 -0
- package/dist/commands/view/page.js +163 -0
- package/dist/commands/view/place.d.ts +7 -2
- package/dist/commands/view/place.js +30 -12
- package/dist/commands/view/result.d.ts +245 -0
- package/dist/commands/view/result.js +1 -0
- package/dist/commands/view/saves.d.ts +6 -0
- package/dist/commands/view/saves.js +53 -0
- package/dist/commands/view/story.d.ts +32 -0
- package/dist/commands/view/story.js +227 -0
- package/dist/commands/view/view.d.ts +26 -292
- package/dist/commands/view/view.js +26 -534
- package/dist/commands/view/world.d.ts +1 -1
- package/dist/commands/view/world.js +3 -3
- package/dist/commands/write/checks.d.ts +42 -0
- package/dist/commands/write/checks.js +291 -0
- package/dist/commands/write/here.d.ts +1 -1
- package/dist/commands/write/here.js +5 -5
- package/dist/commands/write/inheritance.d.ts +40 -0
- package/dist/commands/write/inheritance.js +189 -0
- package/dist/commands/write/input.d.ts +29 -0
- package/dist/commands/write/input.js +124 -0
- package/dist/commands/write/layer.d.ts +36 -0
- package/dist/commands/write/layer.js +48 -0
- package/dist/commands/write/notes.d.ts +22 -0
- package/dist/commands/write/notes.js +76 -0
- package/dist/commands/write/progression.d.ts +27 -0
- package/dist/commands/write/progression.js +175 -0
- package/dist/commands/write/write.d.ts +2 -1
- package/dist/commands/write/write.js +33 -817
- package/dist/core/files.d.ts +2 -0
- package/dist/core/files.js +7 -0
- package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
- package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
- package/dist/core/session-store.js +3 -3
- package/dist/core/store.d.ts +2 -2
- package/dist/core/store.js +18 -4
- package/dist/dashboard/acts/acts.js +1 -1
- package/dist/dashboard/acts/sending.js +110 -0
- package/dist/dashboard/acts/sheet.js +2 -2
- package/dist/dashboard/acts/strip.js +1 -1
- package/dist/dashboard/address.js +6 -0
- package/dist/dashboard/api.js +1 -1
- package/dist/dashboard/app.js +47 -171
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/sets.js +2 -2
- package/dist/dashboard/dice/stage.js +1 -1
- package/dist/dashboard/dice/tray.js +6 -6
- package/dist/dashboard/guide/ar.md +9 -4
- package/dist/dashboard/guide/cs.md +10 -5
- package/dist/dashboard/guide/da.md +9 -4
- package/dist/dashboard/guide/de.md +9 -4
- package/dist/dashboard/guide/el.md +10 -5
- package/dist/dashboard/guide/en.md +7 -2
- package/dist/dashboard/guide/es.md +9 -4
- package/dist/dashboard/guide/fi.md +9 -4
- package/dist/dashboard/guide/fr.md +9 -4
- package/dist/dashboard/guide/he.md +9 -4
- package/dist/dashboard/guide/hi.md +10 -5
- package/dist/dashboard/guide/hu.md +10 -5
- package/dist/dashboard/guide/is.md +9 -4
- package/dist/dashboard/guide/it.md +9 -4
- package/dist/dashboard/guide/ja.md +12 -7
- package/dist/dashboard/guide/ko.md +11 -6
- package/dist/dashboard/guide/nb.md +9 -4
- package/dist/dashboard/guide/nl.md +10 -5
- package/dist/dashboard/guide/pl.md +9 -4
- package/dist/dashboard/guide/pt.md +9 -4
- package/dist/dashboard/guide/ro.md +9 -4
- package/dist/dashboard/guide/ru.md +9 -4
- package/dist/dashboard/guide/sv.md +9 -4
- package/dist/dashboard/guide/tr.md +11 -6
- package/dist/dashboard/guide/uk.md +9 -4
- package/dist/dashboard/guide/zh.md +9 -4
- package/dist/dashboard/help/help.js +3 -3
- package/dist/dashboard/i18n/ar.json +20 -0
- package/dist/dashboard/i18n/cs.json +20 -0
- package/dist/dashboard/i18n/da.json +20 -0
- package/dist/dashboard/i18n/de.json +20 -0
- package/dist/dashboard/i18n/el.json +20 -0
- package/dist/dashboard/i18n/es.json +20 -0
- package/dist/dashboard/i18n/fi.json +20 -0
- package/dist/dashboard/i18n/fr.json +20 -0
- package/dist/dashboard/i18n/he.json +20 -0
- package/dist/dashboard/i18n/hi.json +20 -0
- package/dist/dashboard/i18n/hu.json +20 -0
- package/dist/dashboard/i18n/is.json +20 -0
- package/dist/dashboard/i18n/it.json +20 -0
- package/dist/dashboard/i18n/ja.json +21 -1
- package/dist/dashboard/i18n/ko.json +20 -0
- package/dist/dashboard/i18n/nb.json +20 -0
- package/dist/dashboard/i18n/nl.json +20 -0
- package/dist/dashboard/i18n/pl.json +20 -0
- package/dist/dashboard/i18n/pt.json +20 -0
- package/dist/dashboard/i18n/ro.json +20 -0
- package/dist/dashboard/i18n/ru.json +20 -0
- package/dist/dashboard/i18n/sv.json +20 -0
- package/dist/dashboard/i18n/tr.json +20 -0
- package/dist/dashboard/i18n/uk.json +20 -0
- package/dist/dashboard/i18n/zh.json +20 -0
- package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
- package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
- package/dist/dashboard/kit.js +3 -3
- package/dist/dashboard/packages/ask-card.js +3 -3
- package/dist/dashboard/packages/catalog.js +196 -0
- package/dist/dashboard/packages/engine.js +87 -0
- package/dist/dashboard/packages/installed.js +53 -0
- package/dist/dashboard/packages/library.js +97 -0
- package/dist/dashboard/packages/outcomes.js +45 -0
- package/dist/dashboard/packages/packages.js +20 -576
- package/dist/dashboard/packages/page-code.js +15 -2
- package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
- package/dist/dashboard/packages/rows.js +84 -0
- package/dist/dashboard/packages/share.js +44 -0
- package/dist/dashboard/packages/widgets.js +3 -3
- package/dist/dashboard/{card.js → parts/card.js} +1 -1
- package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
- package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
- package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
- package/dist/dashboard/{labels.js → parts/labels.js} +8 -1
- package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
- package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
- package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
- package/dist/dashboard/{refusals.js → parts/refusals.js} +1 -1
- package/dist/dashboard/{status.js → parts/status.js} +4 -4
- package/dist/dashboard/{widgets.js → parts/widgets.js} +2 -2
- package/dist/dashboard/place/key.js +24 -0
- package/dist/dashboard/place/paper.js +67 -0
- package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
- package/dist/dashboard/place/things.js +129 -0
- package/dist/dashboard/place/tokens.js +93 -0
- package/dist/dashboard/place/view.js +124 -0
- package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
- package/dist/dashboard/{asked.js → play/asked.js} +10 -10
- package/dist/dashboard/{choices.js → play/choices.js} +9 -9
- package/dist/dashboard/{requested.js → play/requested.js} +1 -1
- package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
- package/dist/dashboard/{scene.js → play/scene.js} +14 -14
- package/dist/dashboard/{turns.js → play/turns.js} +12 -12
- package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
- package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
- package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
- package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
- package/dist/dashboard/{setup.js → settings/setup.js} +6 -6
- package/dist/dashboard/{party.js → sheet/party.js} +8 -8
- package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
- package/dist/dashboard/{sheet.js → sheet/sheet.js} +17 -17
- package/dist/dashboard/{story.js → sheet/story.js} +3 -3
- package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
- package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
- package/dist/dashboard/{master.js → shell/master.js} +2 -2
- package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
- package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
- package/dist/dashboard/shell/shown.js +37 -0
- package/dist/dashboard/{table.js → shell/table.js} +2 -2
- package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
- package/dist/dashboard/{top.js → shell/top.js} +7 -7
- package/dist/dashboard/style.css +90 -9
- package/dist/dashboard/world/calendar.js +4 -4
- package/dist/dashboard/world/drawing.js +92 -0
- package/dist/dashboard/world/key.js +21 -0
- package/dist/dashboard/world/lore.js +5 -5
- package/dist/dashboard/world/map-card.js +186 -0
- package/dist/dashboard/world/place-card.js +39 -0
- package/dist/dashboard/world/places.js +29 -0
- package/dist/dashboard/world/world.js +9 -341
- package/dist/extensions/extension.d.ts +1 -1
- package/dist/extensions/extension.js +1 -1
- package/dist/images/images.js +12 -9
- package/dist/index.d.ts +1 -1
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.js +1 -1
- package/dist/library/books.js +2 -0
- package/dist/packages/npm.js +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/pages/check.js +23 -1
- package/dist/pages/containers.d.ts +1 -1
- package/dist/pages/containers.js +1 -1
- package/dist/pages/index.d.ts +4 -2
- package/dist/pages/index.js +4 -2
- package/dist/pages/inheritance.d.ts +2 -2
- package/dist/pages/layers.d.ts +50 -0
- package/dist/pages/layers.js +97 -0
- package/dist/pages/rename-page.js +1 -1
- package/dist/pages/stacks/writes.js +48 -22
- package/dist/pages/standard-fields.d.ts +1 -1
- package/dist/pages/system-pages.d.ts +5 -3
- package/dist/pages/system-pages.js +16 -7
- package/dist/pages/world.d.ts +8 -1
- package/dist/pages/world.js +16 -4
- package/dist/pages/write-layer.d.ts +18 -0
- package/dist/pages/write-layer.js +108 -0
- package/dist/pages/write-page.d.ts +2 -2
- package/dist/pages/write-page.js +2 -2
- package/dist/rules/index.d.ts +1 -1
- package/dist/rules/index.js +1 -1
- package/dist/rules/search.d.ts +1 -1
- package/dist/rules/shown.d.ts +1 -1
- package/dist/server/dashboard/choices.js +3 -3
- package/dist/server/dashboard/files.js +5 -5
- package/dist/server/dashboard/index.d.ts +2 -2
- package/dist/server/dashboard/index.js +2 -2
- package/dist/server/dashboard/news.js +4 -3
- package/dist/server/dashboard/player.js +1 -1
- package/dist/server/dashboard/writes.js +10 -8
- package/dist/server/mcp.js +28 -13
- package/dist/systems/campaign-data.d.ts +15 -0
- package/dist/systems/campaign-data.js +85 -0
- package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
- package/dist/systems/{system-code.js → code.js} +2 -2
- package/dist/systems/game-system.d.ts +7 -61
- package/dist/systems/game-system.js +1 -984
- package/dist/systems/index.d.ts +6 -3
- package/dist/systems/index.js +6 -3
- package/dist/systems/installed.d.ts +31 -0
- package/dist/systems/installed.js +89 -0
- package/dist/systems/maps.d.ts +3 -0
- package/dist/systems/maps.js +9 -0
- package/dist/systems/read.d.ts +3 -0
- package/dist/systems/read.js +471 -0
- package/dist/systems/schema.d.ts +289 -0
- package/dist/systems/schema.js +243 -0
- package/dist/systems/settings.d.ts +19 -0
- package/dist/systems/settings.js +78 -0
- package/dist/systems/versions.d.ts +12 -0
- package/dist/systems/versions.js +52 -0
- package/dist/testing/index.js +1 -1
- package/instructions/import.md +1 -1
- package/instructions/length-a-few-sessions.md +1 -0
- package/instructions/length-one-evening.md +1 -0
- package/instructions/play.md +1 -1
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/package.json +1 -1
- package/dist/commands/config.js +0 -917
- package/dist/commands/package.d.ts +0 -143
- package/dist/commands/package.js +0 -785
- package/dist/commands/scene.js +0 -894
- package/dist/commands/shared/worked-out.js +0 -805
- package/dist/dashboard/place/map-view.js +0 -417
- /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
- /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
- /package/dist/core/{package-api.js → packages/api.js} +0 -0
- /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
- /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
- /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
- /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
- /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
- /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
- /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
- /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
- /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
- /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
- /package/dist/languages/{language-pack.js → pack.js} +0 -0
- /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
- /package/dist/pages/{page-file.js → file.js} +0 -0
- /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
- /package/dist/pages/{page-types.js → types.js} +0 -0
- /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
- /package/dist/rules/{rule-book.js → book.js} +0 -0
- /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
- /package/dist/systems/{system-folders.js → folders.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// The reading of the player's books apart from the chat (D-491, LIB-3): rules and config start a process of its own, `rpg --read-library`, which reads each
|
|
2
2
|
// book of this computer's library still to read, its PDF pages without readable text by the system's OCR, and writes its index; one at a time on a computer.
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import { defaultContext } from "
|
|
5
|
-
import { readDocument, systemPageReader } from "
|
|
6
|
-
import { claimLibrary, dropUnlisted, libraryFolders, readLibrary, releaseLibrary } from "
|
|
4
|
+
import { defaultContext } from "../../../core/context.js";
|
|
5
|
+
import { readDocument, systemPageReader } from "../../../documents/index.js";
|
|
6
|
+
import { claimLibrary, dropUnlisted, libraryFolders, readLibrary, releaseLibrary } from "../../../library/index.js";
|
|
7
7
|
import { libraryScope } from "./library.js";
|
|
8
8
|
// The argument of the command line that reads the library, as cli.ts takes it: not a command, only what rules starts.
|
|
9
9
|
const readLibraryArgument = "--read-library";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import { type LibraryScope, type LibraryState } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import { type LibraryScope, type LibraryState } from "../../../library/index.ts";
|
|
3
3
|
/** What rules shows of the player's books (LIB-7). */
|
|
4
4
|
export interface LibraryAnswer {
|
|
5
5
|
/** The languages the books are in, by name, such as Italian. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// The player's library as the commands use it (D-491): the entries config adds, checked and allowed by the player; what config shows of each; and what rules
|
|
2
2
|
// finds in the books, after the game system's rules.
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
-
import { campaignFileName, findCampaign, readListSetting, readTextSetting } from "
|
|
5
|
-
import { Refusal } from "
|
|
6
|
-
import { comparableText } from "
|
|
7
|
-
import { documentAt, documentKinds } from "
|
|
8
|
-
import { dropUnlisted, foldersIn, isWithin, libraryFolders, libraryReader, libraryState, mostBooks, samePath, saveLibraryFolders } from "
|
|
9
|
-
import { bookHeadings, findPages, hasAllWords, pageExcerpt, pageTitle } from "
|
|
10
|
-
import { layeredSystemWords, systemContentFolders } from "
|
|
11
|
-
import { YesRefused } from "
|
|
12
|
-
import { languageName } from "
|
|
4
|
+
import { campaignFileName, findCampaign, readListSetting, readTextSetting } from "../../../campaign/index.js";
|
|
5
|
+
import { Refusal } from "../../../core/refusal.js";
|
|
6
|
+
import { comparableText } from "../../../core/text.js";
|
|
7
|
+
import { documentAt, documentKinds } from "../../../documents/index.js";
|
|
8
|
+
import { dropUnlisted, foldersIn, isWithin, libraryFolders, libraryReader, libraryState, mostBooks, samePath, saveLibraryFolders } from "../../../library/index.js";
|
|
9
|
+
import { bookHeadings, findPages, hasAllWords, pageExcerpt, pageTitle } from "../../../rules/index.js";
|
|
10
|
+
import { layeredSystemWords, systemContentFolders } from "../../../systems/index.js";
|
|
11
|
+
import { YesRefused } from "../../package/consent.js";
|
|
12
|
+
import { languageName } from "../campaign/world.js";
|
|
13
13
|
/** What a library takes: the documents the engine reads, outside every campaign (LIB-2). */
|
|
14
14
|
export const libraryScope = { kinds: documentKinds, skipFoldersWith: campaignFileName };
|
|
15
15
|
// About how many words each excerpt shows: the first, the second, and the only one when the system has answered (LIB-7); the other pages named.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type RuleSection } from "
|
|
2
|
-
import { type GameSystem } from "
|
|
1
|
+
import { type RuleSection } from "../../../rules/index.ts";
|
|
2
|
+
import { type GameSystem } from "../../../systems/index.ts";
|
|
3
3
|
/** The source of the campaign's own rules, in the campaign's rules folder. */
|
|
4
4
|
export declare const houseRules = "house rules";
|
|
5
5
|
/** What to do when a precedent and the book disagree (D-181). */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// A rule by its title, as rules finds it (D-179, DAT-3, DAT-6): a house rule of the campaign first, else the game system's, with the table's precedents on it.
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { houseRulesFolderName, readListSetting, readTextSetting } from "
|
|
4
|
-
import { translationFolder } from "
|
|
5
|
-
import { comparableText } from "
|
|
6
|
-
import { isTitled, readRuleBook } from "
|
|
7
|
-
import { layeredSystemWords, systemContentFolders } from "
|
|
3
|
+
import { houseRulesFolderName, readListSetting, readTextSetting } from "../../../campaign/index.js";
|
|
4
|
+
import { translationFolder } from "../../../core/files.js";
|
|
5
|
+
import { comparableText } from "../../../core/text.js";
|
|
6
|
+
import { isTitled, readRuleBook } from "../../../rules/index.js";
|
|
7
|
+
import { layeredSystemWords, systemContentFolders } from "../../../systems/index.js";
|
|
8
8
|
/** The source of the campaign's own rules, in the campaign's rules folder. */
|
|
9
9
|
export const houseRules = "house rules";
|
|
10
10
|
/** What to do when a precedent and the book disagree (D-181). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context, SystemTexts } from "
|
|
2
|
-
import { type Page, type World } from "
|
|
1
|
+
import type { Context, SystemTexts } from "../../../core/context.ts";
|
|
2
|
+
import { type Page, type World } from "../../../pages/index.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Asks for the game system's pages that these pages show the player in the campaign's language: themselves and their bases, and for a character the pages
|
|
5
5
|
* its fields link, as its class, its spells and its items (D-539); nothing where the system has its own translation, or nothing translates.
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
// translated again.
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { stringify } from "yaml";
|
|
6
|
-
import { translationFolder } from "
|
|
7
|
-
import { codeAndBase } from "
|
|
8
|
-
import { files } from "
|
|
9
|
-
import { textPrint } from "
|
|
10
|
-
import { baseChain, findPage, linksIn, versionTranslations } from "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
6
|
+
import { translationFolder } from "../../../core/files.js";
|
|
7
|
+
import { codeAndBase } from "../../../core/language.js";
|
|
8
|
+
import { files } from "../../../core/store.js";
|
|
9
|
+
import { textPrint } from "../../../core/text.js";
|
|
10
|
+
import { baseChain, findPage, linksIn, systemOriginal, versionTranslations } from "../../../pages/index.js";
|
|
11
|
+
import { campaignSystem, ownTranslationFolder } from "../campaign/world.js";
|
|
12
|
+
import { answerOf, isGarbled, languageName } from "./words.js";
|
|
13
13
|
// How much of the system's text goes in one request, in characters, and at most how many pages.
|
|
14
14
|
const batchLetters = 12_000;
|
|
15
15
|
const batchPages = 12;
|
|
@@ -34,7 +34,8 @@ export function wantTexts(root, context, world, shown) {
|
|
|
34
34
|
}
|
|
35
35
|
const wanted = new Map();
|
|
36
36
|
const add = (page) => {
|
|
37
|
-
|
|
37
|
+
// The system's own text, never the campaign's layer over it (SYS-11): the translation is of this computer, for every campaign.
|
|
38
|
+
for (const one of page === undefined ? [] : [page, ...baseChain(world, page)].map(systemOriginal)) {
|
|
38
39
|
// A page of the version of the system's rules is the version's, with a translation of its own (VER-3).
|
|
39
40
|
const version = found.version !== undefined && files().exists(join(found.version.folder, one.path)) ? found.version : undefined;
|
|
40
41
|
const path = version === undefined ? one.path : join(versionTranslations(version.name), one.path);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import { type SystemWords } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import { type SystemWords } from "../../../systems/index.ts";
|
|
3
3
|
/** What the page has of a language: its phrases so far, whether they are being translated, whether this computer can, and how many it still lacks. */
|
|
4
4
|
export interface PageWords {
|
|
5
5
|
phrases: Record<string, string>;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { stringify } from "yaml";
|
|
7
|
-
import { codeAndBase } from "
|
|
8
|
-
import { files } from "
|
|
9
|
-
import { languagePackFor, packPhrases } from "
|
|
10
|
-
import { layeredSystemWords, systemContentFolders, systemWords } from "
|
|
7
|
+
import { codeAndBase } from "../../../core/language.js";
|
|
8
|
+
import { files } from "../../../core/store.js";
|
|
9
|
+
import { languagePackFor, packPhrases } from "../../../languages/index.js";
|
|
10
|
+
import { layeredSystemWords, systemContentFolders, systemWords } from "../../../systems/index.js";
|
|
11
11
|
// How many phrases go in one request.
|
|
12
12
|
const batchSize = 130;
|
|
13
13
|
// How long a language whose translation stopped short waits before it is tried again, so that a writer that fails is not called at every reading.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type Page } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type Page } from "../../../pages/index.ts";
|
|
4
4
|
/** A contradiction in the state: the rule that found it, the page it is on, and the line for the master. */
|
|
5
5
|
export interface Contradiction {
|
|
6
6
|
rule: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { comparableText, sameWord, valueNamed } from "
|
|
2
|
-
import { formatCounter, readCounter } from "
|
|
3
|
-
import { keeperOf } from "
|
|
4
|
-
import { inheritedFields, isPartyMember, pagesWithName, parsePageReference } from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { comparableText, sameWord, valueNamed } from "../../../core/text.js";
|
|
2
|
+
import { formatCounter, readCounter } from "../../../counters/index.js";
|
|
3
|
+
import { keeperOf } from "../../../effects/index.js";
|
|
4
|
+
import { inheritedFields, isPartyMember, pagesWithName, parsePageReference } from "../../../pages/index.js";
|
|
5
|
+
import { keptEffects, systemNamed } from "../scene/effects.js";
|
|
6
|
+
import { readOpenScene } from "../scene/scene.js";
|
|
7
|
+
import { effectsOf } from "../sheet/effect-layer.js";
|
|
8
8
|
import { campaignSystem, campaignSystemWords, campaignWorld } from "./world.js";
|
|
9
9
|
/** Every contradiction now (CHK-3), for status and validate. */
|
|
10
10
|
export function allStateChecks(root, context) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type Page, type World } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type Page, type World } from "../../../pages/index.ts";
|
|
4
4
|
/**
|
|
5
5
|
* What the master hears of the places' pictures (D-308, PIC-4): where pictures can be made and the player has not chosen, to ask them once; with new elements, that
|
|
6
6
|
* the place the party is in, still without a picture, should get one. Nothing otherwise.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// The pictures of the world as several commands use them (D-308): what is missing one, where the campaign keeps them, and the file a page's image field names.
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import { readSettings } from "
|
|
4
|
-
import { files } from "
|
|
5
|
-
import { findImage, imageFileName } from "
|
|
6
|
-
import { baseChain, isPartyMember, ownField } from "
|
|
7
|
-
import { systemContentFolders } from "
|
|
3
|
+
import { readSettings } from "../../../campaign/index.js";
|
|
4
|
+
import { files } from "../../../core/store.js";
|
|
5
|
+
import { findImage, imageFileName } from "../../../images/index.js";
|
|
6
|
+
import { baseChain, isPartyMember, ownField } from "../../../pages/index.js";
|
|
7
|
+
import { systemContentFolders } from "../../../systems/index.js";
|
|
8
8
|
import { firstInChat } from "./parts.js";
|
|
9
9
|
import { campaignSystem } from "./world.js";
|
|
10
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type World } from "
|
|
4
|
-
import type { GameSystem } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type World } from "../../../pages/index.ts";
|
|
4
|
+
import type { GameSystem } from "../../../systems/index.ts";
|
|
5
5
|
/** The modes, in their order (D-75, D-77). */
|
|
6
6
|
export declare const modes: readonly ["setup", "session zero", "play"];
|
|
7
7
|
export type Mode = (typeof modes)[number];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// The mode of the campaign, the main state of the game (D-77): setup, session zero or play, each opened by the checklist of the one before (D-221, D-241; MOD-1–MOD-7).
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import { companionWays, diceWays, difficulties, lastChoices, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "
|
|
4
|
-
import { readLog } from "
|
|
5
|
-
import { comparableText } from "
|
|
6
|
-
import { isInParty, playerCharacters } from "
|
|
7
|
-
import { missingSettingsNote } from "
|
|
3
|
+
import { characterWays, companionWays, diceWays, difficulties, lastChoices, lengths, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "../../../campaign/index.js";
|
|
4
|
+
import { readLog } from "../../../core/log.js";
|
|
5
|
+
import { comparableText } from "../../../core/text.js";
|
|
6
|
+
import { isInParty, playerCharacters } from "../../../pages/index.js";
|
|
7
|
+
import { missingSettingsNote } from "../notes.js";
|
|
8
|
+
import { missingSheetFields } from "../sheet/sheet.js";
|
|
8
9
|
import { missingWithSystems, offeredLabel, offeredValues } from "./offers.js";
|
|
9
10
|
import { partText } from "./parts.js";
|
|
10
|
-
import { missingSheetFields } from "./sheet.js";
|
|
11
11
|
import { campaignSystem, campaignWorld } from "./world.js";
|
|
12
12
|
/** The modes, in their order (D-75, D-77). */
|
|
13
13
|
export const modes = ["setup", "session zero", "play"];
|
|
@@ -17,6 +17,7 @@ const settingLabels = {
|
|
|
17
17
|
mentor: "mentor (ask how well the player knows the game: never played, tutorial; a little, hints; well, off)",
|
|
18
18
|
premise: "premise (the genre, the tone, a few elements of the world and what the player enjoys most in a game, such as fights, mysteries, talk or exploring, in the player's words)",
|
|
19
19
|
preparation: "preparation (on the fly: the world made just before it is needed; all at the start)",
|
|
20
|
+
length: "length (how long it plays: one evening; a few sessions; open, one adventure after another)",
|
|
20
21
|
difficulty: `difficulty (how hard the world plays: ${difficulties.join(", ")})`,
|
|
21
22
|
lethality: "lethality (what a fall means: narrative, the character never dies; epic, only when it matters; dice, the dice decide)",
|
|
22
23
|
saves: "saves (when the game may go back: permadeath, never but to the start; checkpoint, to the last end of a scene once the player character dies; free, to any save)",
|
|
@@ -24,6 +25,7 @@ const settingLabels = {
|
|
|
24
25
|
dice: "dice (who rolls the player character's dice: digital, rpg; physical, the player, who tells you the values)",
|
|
25
26
|
"master-rolls": `master-rolls (your rolls for foes and NPCs: ${masterRollWays.join(", ")}; suggest behind the screen)`,
|
|
26
27
|
units: `units (${unitSystems.join(", ")})`,
|
|
28
|
+
character: "character (made with the player; made by the master, from a few words; the player's own, one they bring)",
|
|
27
29
|
companions: `companions (${companionWays.join(", ")})`,
|
|
28
30
|
"calendar-start": "calendar-start (when the story starts: day 1 to count only the days, or a day of the world, such as 14 April 1491)",
|
|
29
31
|
lines: 'lines ("none" is an answer)',
|
|
@@ -32,6 +34,8 @@ const settingLabels = {
|
|
|
32
34
|
// The same settings by their values alone, as config's results give them in the setup: status gives their meanings (T-168).
|
|
33
35
|
const valueLabels = {
|
|
34
36
|
preparation: `preparation (${preparations.join(", ")})`,
|
|
37
|
+
length: `length (${lengths.join(", ")})`,
|
|
38
|
+
character: `character (${characterWays.join(", ")})`,
|
|
35
39
|
difficulty: `difficulty (${difficulties.join(", ")})`,
|
|
36
40
|
lethality: `lethality (${lethalities.join(", ")})`,
|
|
37
41
|
saves: `saves (${saveModes.join(", ")})`,
|
|
@@ -105,7 +109,9 @@ export function checklistLine(mode, root, context, world, brief = false) {
|
|
|
105
109
|
? " The player can make the setup's choices on the dashboard, one at a time: offer it, and meanwhile ask in the chat only the game system, the premise, the language and when the story starts. "
|
|
106
110
|
+ "Ask the rest only when they leave it to you, or once they say they are ready."
|
|
107
111
|
: "";
|
|
108
|
-
|
|
112
|
+
// The player's last choices once, with the whole checklist, as the setup begins: never with config's brief one (T-134, T-168).
|
|
113
|
+
const last = mode === "setup" && !brief ? lastChoicesNote(root, context, world) : "";
|
|
114
|
+
return `${missing.charAt(0).toUpperCase()}${missing.slice(1)}.${last} When ${blocked === undefined ? "" : "none is left and "}the player confirms: ${modeCall(next)}.${name}${page}`;
|
|
109
115
|
}
|
|
110
116
|
/** The part of the instructions of a mode, the core's with the system's (MOD-5): the file setup, session-zero or play. */
|
|
111
117
|
export function modePart(mode, system) {
|
|
@@ -126,16 +132,25 @@ function writtenMode(root) {
|
|
|
126
132
|
}
|
|
127
133
|
/** What the setup still has to agree with the player, each setting with the values it takes, the system's own too (MOD-3). */
|
|
128
134
|
function setupMissing(root, context, world, brief) {
|
|
129
|
-
const unanswered = unansweredSettings(readSettings(root), world.pages.length > 0);
|
|
130
135
|
const label = (name) => (brief ? valueLabels[name] : undefined) ?? settingLabels[name];
|
|
131
|
-
|
|
136
|
+
return setupMissingNames(root, context, world).map((name) => offeredLabel(root, context, name) ?? label(name) ?? name);
|
|
137
|
+
}
|
|
138
|
+
/** The settings the setup still has to agree with the player, the system's own too (MOD-3). */
|
|
139
|
+
function setupMissingNames(root, context, world) {
|
|
140
|
+
return missingWithSystems(root, unansweredSettings(readSettings(root), world.pages.length > 0, playerCharacters(world).length > 0), context);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* " In their last campaign the player chose dice digital, units metric: offer those first.": the player's choices in their last campaign on this computer for
|
|
144
|
+
* the settings still missing, when the game offers them (T-134), said once with the whole checklist; empty when there are none.
|
|
145
|
+
*/
|
|
146
|
+
function lastChoicesNote(root, context, world) {
|
|
132
147
|
const last = lastChoices(context.home);
|
|
133
|
-
const
|
|
148
|
+
const chosen = setupMissingNames(root, context, world).flatMap((name) => {
|
|
134
149
|
const value = last[name];
|
|
135
150
|
const offered = offeredValues(root, context, name);
|
|
136
|
-
return value === undefined || (offered !== undefined && !offered.includes(value)) ?
|
|
137
|
-
};
|
|
138
|
-
return
|
|
151
|
+
return value === undefined || (offered !== undefined && !offered.includes(value)) ? [] : [`${name} ${value}`];
|
|
152
|
+
});
|
|
153
|
+
return chosen.length === 0 ? "" : ` In their last campaign the player chose ${chosen.join(", ")}: offer those first.`;
|
|
139
154
|
}
|
|
140
155
|
/** What session zero still has to make (MOD-4): a living player character, the companions the setup said are made in it, and the sheets they keep, whole. */
|
|
141
156
|
function sessionZeroMissing(root, context, world) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type Coin } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type Coin } from "../../../money/index.ts";
|
|
4
4
|
/**
|
|
5
5
|
* The coins of the campaign, or the problem that keeps campaign.yaml from giving them; neither when the game has no money (MON-1).
|
|
6
6
|
* They are read on their own, so that a mistake in another setting does not turn every purse into text. A campaign without coins of its own
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The coins of a campaign as several commands use them: from campaign.yaml, read on their own, or else from its game system (DAT-1); checked, and shown (D-126–D-129, D-182).
|
|
2
|
-
import { readOneSetting } from "
|
|
3
|
-
import { coinList, coinsProblem, coinsText, readCoins } from "
|
|
2
|
+
import { readOneSetting } from "../../../campaign/index.js";
|
|
3
|
+
import { coinList, coinsProblem, coinsText, readCoins } from "../../../money/index.js";
|
|
4
4
|
import { campaignSystem } from "./world.js";
|
|
5
5
|
/**
|
|
6
6
|
* The coins of the campaign, or the problem that keeps campaign.yaml from giving them; neither when the game has no money (MON-1).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type rigorItems, type SettingName } from "
|
|
2
|
-
import type { Context } from "
|
|
3
|
-
import { type SystemSetting } from "
|
|
1
|
+
import { type rigorItems, type SettingName } from "../../../campaign/index.ts";
|
|
2
|
+
import type { Context } from "../../../core/context.ts";
|
|
3
|
+
import { type SystemSetting } from "../../../systems/index.ts";
|
|
4
4
|
/** The settings of the system that hold in the campaign, in the system's order (DAT-17): those no value asks, and those a value it plays asks. */
|
|
5
5
|
export declare function heldSystemSettings(root: string, context: Context): SystemSetting[];
|
|
6
6
|
/** The values the game offers of an engine's setting (DAT-16): those the system and the values it plays share; undefined when none of them narrows it. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// What the campaign's game system offers of the engine's settings (DAT-16), the settings of its own that a value asks (DAT-17), and the parts its values choose (DAT-18).
|
|
2
|
-
import { customLevel, customLevels, customSettings, readOneSetting, readSettings, settingNames } from "
|
|
3
|
-
import { sameWord } from "
|
|
4
|
-
import { engineOfferings, engineSettingValue, heldSettings, offeredEngineValues, playedValueOf, readableSystems } from "
|
|
2
|
+
import { customLevel, customLevels, customSettings, readOneSetting, readSettings, settingNames } from "../../../campaign/index.js";
|
|
3
|
+
import { sameWord } from "../../../core/text.js";
|
|
4
|
+
import { engineOfferings, engineSettingValue, heldSettings, offeredEngineValues, playedValueOf, readableSystems } from "../../../systems/index.js";
|
|
5
5
|
import { partText } from "./parts.js";
|
|
6
6
|
import { campaignSystem, playedSettingValue, valuesText } from "./world.js";
|
|
7
7
|
/** The settings of the system that hold in the campaign, in the system's order (DAT-17): those no value asks, and those a value it plays asks. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { OutsideChange } from "
|
|
3
|
-
import { type World } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { OutsideChange } from "../../../core/session-store.ts";
|
|
3
|
+
import { type World } from "../../../pages/index.ts";
|
|
4
4
|
/**
|
|
5
5
|
* What changed outside the chat since its last call (OUT-1–OUT-3): each page with its fields before and after and whether its text changed, campaign.yaml and
|
|
6
6
|
* state.yaml with their keys, the other files named; a hidden line in the log; and the events it set off, fired from the world `before` it, when known.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// hears it at the head of the next call, the log keeps it hidden, and the planned events it sets off fire as after a command.
|
|
3
3
|
import { join, relative, sep } from "node:path";
|
|
4
4
|
import { parse } from "yaml";
|
|
5
|
-
import { campaignFileName } from "
|
|
6
|
-
import { filesIn } from "
|
|
7
|
-
import { appendLogEntry, logFileName, readLog } from "
|
|
8
|
-
import { files } from "
|
|
9
|
-
import { readFields, splitPageFile, worldFolderName } from "
|
|
10
|
-
import { fireEvents, nowDueNote } from "
|
|
5
|
+
import { campaignFileName } from "../../../campaign/index.js";
|
|
6
|
+
import { filesIn } from "../../../core/files.js";
|
|
7
|
+
import { appendLogEntry, logFileName, readLog } from "../../../core/log.js";
|
|
8
|
+
import { files } from "../../../core/store.js";
|
|
9
|
+
import { readFields, splitPageFile, worldFolderName } from "../../../pages/index.js";
|
|
10
|
+
import { fireEvents, nowDueNote } from "../time/events.js";
|
|
11
|
+
import { newDatedLogEntry, readPresent } from "../time/time.js";
|
|
11
12
|
import { isGameFile } from "./saves.js";
|
|
12
|
-
import { newDatedLogEntry, readPresent } from "./time.js";
|
|
13
13
|
import { campaignWorld } from "./world.js";
|
|
14
14
|
// At most this many changes are named; the rest are counted: a folder rewritten whole would fill the answer.
|
|
15
15
|
const mostNamed = 10;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import { type World } from "
|
|
3
|
-
import type { GameSystem } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import { type World } from "../../../pages/index.ts";
|
|
3
|
+
import type { GameSystem } from "../../../systems/index.ts";
|
|
4
4
|
/** A part of the instructions as the core and the system give it, with no regard to what was told; undefined when neither has it. */
|
|
5
5
|
export declare function partText(name: string, system: GameSystem | undefined): string | undefined;
|
|
6
6
|
/** A part of the instructions for a situation that opens: once in a chat where the MCP server keeps what it told, until instructions; every time elsewhere. Empty when there is none, or it was told. */
|
|
@@ -16,6 +16,13 @@ export declare function partyPart(context: Context, system: GameSystem | undefin
|
|
|
16
16
|
* mechanics already explained.
|
|
17
17
|
*/
|
|
18
18
|
export declare function mentorPart(root: string, context: Context, mentor: string | undefined): string;
|
|
19
|
+
/** What to do when the last quest ends (D-530 (8)): build the next adventure; with a length that has an end, first its epilogue and the player's word (D-558). */
|
|
20
|
+
export declare function nextAdventureLead(root: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* How long the campaign plays, when it has an end (D-558): how to size its adventures and close them; none for an open one or one not chosen. With once, not
|
|
23
|
+
* again in a chat that already has it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function lengthPart(root: string, context: Context, once?: boolean): string;
|
|
19
26
|
/**
|
|
20
27
|
* How the master writes, as the player chose it (D-395): the author's part in place of the prose's, the story's, and the player's own words, each with what
|
|
21
28
|
* was written in it; none for the core's own ways. Every time it is asked, as a change of them must reach the chat.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The parts of the master's instructions that the tools give when a situation opens, such as a fight or a new day (D-97, D-121).
|
|
2
|
-
import { readSettings } from "
|
|
3
|
-
import { corePart, layeredPart } from "
|
|
4
|
-
import { playerCharacters } from "
|
|
2
|
+
import { readSettings } from "../../../campaign/index.js";
|
|
3
|
+
import { corePart, layeredPart } from "../../../instructions/index.js";
|
|
4
|
+
import { playerCharacters } from "../../../pages/index.js";
|
|
5
5
|
import { campaignSystem } from "./world.js";
|
|
6
6
|
/** A part of the instructions as the core and the system give it, with no regard to what was told; undefined when neither has it. */
|
|
7
7
|
export function partText(name, system) {
|
|
@@ -45,6 +45,29 @@ export function mentorPart(root, context, mentor) {
|
|
|
45
45
|
const learned = mentor === "tutorial" ? (readSettings(root).learned ?? []) : [];
|
|
46
46
|
return part === "" || learned.length === 0 ? part : `${part}\n\nAlready explained: ${learned.join(", ")}.`;
|
|
47
47
|
}
|
|
48
|
+
/** What to do when the last quest ends (D-530 (8)): build the next adventure; with a length that has an end, first its epilogue and the player's word (D-558). */
|
|
49
|
+
export function nextAdventureLead(root) {
|
|
50
|
+
const length = readSettings(root).length;
|
|
51
|
+
return length === undefined || length === "open"
|
|
52
|
+
? "No quest is open or planned now: build the next adventure."
|
|
53
|
+
: `No quest is open or planned now, and the campaign plays ${length}: give this adventure its epilogue, then ask the player whether to go on; if they do, build the next one, of the same length.`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* How long the campaign plays, when it has an end (D-558): how to size its adventures and close them; none for an open one or one not chosen. With once, not
|
|
57
|
+
* again in a chat that already has it.
|
|
58
|
+
*/
|
|
59
|
+
export function lengthPart(root, context, once = false) {
|
|
60
|
+
const length = readSettings(root).length;
|
|
61
|
+
if (length === undefined || length === "open") {
|
|
62
|
+
return "";
|
|
63
|
+
}
|
|
64
|
+
const name = `length-${length.replaceAll(" ", "-")}`;
|
|
65
|
+
if (once && context.told?.has(name)) {
|
|
66
|
+
return "";
|
|
67
|
+
}
|
|
68
|
+
context.told?.add(name);
|
|
69
|
+
return partText(name, campaignSystem(root, context)) ?? "";
|
|
70
|
+
}
|
|
48
71
|
/**
|
|
49
72
|
* How the master writes, as the player chose it (D-395): the author's part in place of the prose's, the story's, and the player's own words, each with what
|
|
50
73
|
* was written in it; none for the core's own ways. Every time it is asked, as a change of them must reach the chat.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type World } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type World } from "../../../pages/index.ts";
|
|
4
4
|
/** Every problem in a campaign: its settings, its game system and coins, its log, its world, its pictures, its roads, its game time, its planned events, its effects and its open scene. */
|
|
5
5
|
export declare function campaignProblems(root: string, world: World, context: Context): Problem[];
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { checkSettings } from "
|
|
2
|
-
import { checkLog } from "
|
|
3
|
-
import { checkWorld, mapProblems } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { checkSettings } from "../../../campaign/index.js";
|
|
2
|
+
import { checkLog } from "../../../core/log.js";
|
|
3
|
+
import { checkWorld, mapProblems } from "../../../pages/index.js";
|
|
4
|
+
import { campaignExtensions } from "../packages/extensions.js";
|
|
5
|
+
import { extensionWordsProblems } from "../packages/widgets.js";
|
|
6
|
+
import { gridProblems } from "../places/grids.js";
|
|
7
|
+
import { shortRoadProblems } from "../places/positions.js";
|
|
8
|
+
import { passageProblems, roadProblems } from "../places/roads.js";
|
|
9
|
+
import { effectProblems } from "../scene/effects.js";
|
|
10
|
+
import { readOpenScene, sceneProblems } from "../scene/scene.js";
|
|
11
|
+
import { bondProblems } from "../sheet/bonds.js";
|
|
12
|
+
import { experienceProblems } from "../sheet/experience.js";
|
|
13
|
+
import { workedOutProblems } from "../sheet/formula-problems.js";
|
|
14
|
+
import { limitProblems } from "../sheet/limits.js";
|
|
15
|
+
import { listValueProblems } from "../sheet/sheet.js";
|
|
16
|
+
import { eventProblems } from "../time/events.js";
|
|
17
|
+
import { readPresent, timeProblems } from "../time/time.js";
|
|
9
18
|
import { imageProblems } from "./images.js";
|
|
10
|
-
import { limitProblems } from "./limits.js";
|
|
11
19
|
import { modeProblems } from "./mode.js";
|
|
12
20
|
import { moneyProblems } from "./money.js";
|
|
13
|
-
import { campaignExtensions } from "./packages/extensions.js";
|
|
14
|
-
import { extensionWordsProblems } from "./packages/widgets.js";
|
|
15
|
-
import { shortRoadProblems } from "./positions.js";
|
|
16
21
|
import { questProblems } from "./quests.js";
|
|
17
|
-
import { passageProblems, roadProblems } from "./roads.js";
|
|
18
|
-
import { readOpenScene, sceneProblems } from "./scene.js";
|
|
19
|
-
import { listValueProblems } from "./sheet.js";
|
|
20
22
|
import { themeProblems } from "./theme.js";
|
|
21
|
-
import { readPresent, timeProblems } from "./time.js";
|
|
22
|
-
import { workedOutProblems } from "./worked-out.js";
|
|
23
23
|
import { campaignSystem, systemOccasions, systemProblems, systemSettingProblems } from "./world.js";
|
|
24
24
|
/** Every problem in a campaign: its settings, its game system and coins, its log, its world, its pictures, its roads, its game time, its planned events, its effects and its open scene. */
|
|
25
25
|
export function campaignProblems(root, world, context) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type Page, type World } from "
|
|
4
|
-
import { type GameDate } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type Page, type World } from "../../../pages/index.ts";
|
|
4
|
+
import { type GameDate } from "../../../time/index.ts";
|
|
5
5
|
/** What a quest measures (D-367): its counters with a maximum, its clock with its name, its deadline with the game minutes left, and whether it is the main one. */
|
|
6
6
|
export interface QuestMeasures {
|
|
7
7
|
main: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { appendLogEntry } from "
|
|
2
|
-
import { comparableText } from "
|
|
3
|
-
import { readCounter } from "
|
|
4
|
-
import { everyGoalTicked, isEmptyField } from "
|
|
5
|
-
import { formatDuration, formatGameDate, minutesBetween, readGameDate } from "
|
|
6
|
-
import { newDatedLogEntry } from "
|
|
1
|
+
import { appendLogEntry } from "../../../core/log.js";
|
|
2
|
+
import { comparableText } from "../../../core/text.js";
|
|
3
|
+
import { readCounter } from "../../../counters/index.js";
|
|
4
|
+
import { everyGoalTicked, isEmptyField } from "../../../pages/index.js";
|
|
5
|
+
import { formatDuration, formatGameDate, minutesBetween, readGameDate } from "../../../time/index.js";
|
|
6
|
+
import { newDatedLogEntry } from "../time/time.js";
|
|
7
7
|
// What the master does with such a quest.
|
|
8
8
|
const advice = "if the story has ended it, write status done";
|
|
9
9
|
// The fields of a quest the journal shows apart; any other counter is a bar.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { saveModes } from "
|
|
2
|
-
import type { Context } from "
|
|
3
|
-
import { type World } from "
|
|
4
|
-
import { type Save } from "
|
|
1
|
+
import { saveModes } from "../../../campaign/index.ts";
|
|
2
|
+
import type { Context } from "../../../core/context.ts";
|
|
3
|
+
import { type World } from "../../../pages/index.ts";
|
|
4
|
+
import { type Save } from "../../../saves/index.ts";
|
|
5
5
|
/** The folder of the saves, at the top of the campaign. */
|
|
6
6
|
export declare const savesFolderName = ".saves";
|
|
7
7
|
/** The folder where an export writes its adventure's zip (ADV-7): no part of the game, so no save holds it. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// The saves of a campaign as commands use them (D-54, D-55): which files a save holds, a save made at the end of a scene or when asked, and given back.
|
|
2
2
|
import { join, relative, resolve, sep } from "node:path";
|
|
3
|
-
import { campaignFileName, hostFileNames, readSettings } from "
|
|
4
|
-
import { filesIn } from "
|
|
5
|
-
import { appendLogEntry, logFileName, logLine, readLog } from "
|
|
6
|
-
import { files, isInside } from "
|
|
7
|
-
import { comparableText } from "
|
|
8
|
-
import { locate, playerCharacters } from "
|
|
9
|
-
import { packFiles, readSaves, saveFileName, unpackFiles } from "
|
|
10
|
-
import { formatGameDate } from "
|
|
11
|
-
import { playerCharacter } from "
|
|
12
|
-
import { newDatedLogEntry, readPresent } from "
|
|
3
|
+
import { campaignFileName, hostFileNames, readSettings } from "../../../campaign/index.js";
|
|
4
|
+
import { filesIn } from "../../../core/files.js";
|
|
5
|
+
import { appendLogEntry, logFileName, logLine, readLog } from "../../../core/log.js";
|
|
6
|
+
import { files, isInside } from "../../../core/store.js";
|
|
7
|
+
import { comparableText } from "../../../core/text.js";
|
|
8
|
+
import { locate, playerCharacters } from "../../../pages/index.js";
|
|
9
|
+
import { packFiles, readSaves, saveFileName, unpackFiles } from "../../../saves/index.js";
|
|
10
|
+
import { formatGameDate } from "../../../time/index.js";
|
|
11
|
+
import { playerCharacter } from "../characters/knowledge.js";
|
|
12
|
+
import { newDatedLogEntry, readPresent } from "../time/time.js";
|
|
13
13
|
import { campaignWorld } from "./world.js";
|
|
14
14
|
/** The folder of the saves, at the top of the campaign. */
|
|
15
15
|
export const savesFolderName = ".saves";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "
|
|
2
|
-
import type { Problem } from "
|
|
3
|
-
import { type ThemeReading } from "
|
|
1
|
+
import type { Context } from "../../../core/context.ts";
|
|
2
|
+
import type { Problem } from "../../../core/problem.ts";
|
|
3
|
+
import { type ThemeReading } from "../../../themes/index.ts";
|
|
4
4
|
/** The theme of the campaign's game system, read and checked, with the system's name; undefined when it names none. */
|
|
5
5
|
export declare function campaignTheme(root: string, context: Context): (ThemeReading & {
|
|
6
6
|
system: string;
|