rpg-engine 0.15.0 → 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.
Files changed (486) hide show
  1. package/dist/campaign/index.d.ts +1 -1
  2. package/dist/campaign/index.js +1 -1
  3. package/dist/campaign/settings.d.ts +6 -0
  4. package/dist/campaign/settings.js +22 -1
  5. package/dist/cli/cli.js +1 -1
  6. package/dist/cli/command-line.js +1 -1
  7. package/dist/commands/advance.d.ts +1 -1
  8. package/dist/commands/advance.js +6 -6
  9. package/dist/commands/ask.js +7 -7
  10. package/dist/commands/change/amounts.d.ts +32 -0
  11. package/dist/commands/change/amounts.js +150 -0
  12. package/dist/commands/change/change.d.ts +4 -54
  13. package/dist/commands/change/change.js +19 -749
  14. package/dist/commands/change/damage.d.ts +30 -0
  15. package/dist/commands/change/damage.js +73 -2
  16. package/dist/commands/change/dice.d.ts +34 -0
  17. package/dist/commands/change/dice.js +59 -0
  18. package/dist/commands/change/fields.d.ts +37 -0
  19. package/dist/commands/change/fields.js +156 -0
  20. package/dist/commands/change/holder.d.ts +48 -0
  21. package/dist/commands/change/holder.js +162 -0
  22. package/dist/commands/change/recipe-pace.js +1 -1
  23. package/dist/commands/change/recipe.d.ts +58 -0
  24. package/dist/commands/change/recipe.js +179 -0
  25. package/dist/commands/choices.js +3 -3
  26. package/dist/commands/config/config.d.ts +15 -0
  27. package/dist/commands/config/config.js +355 -0
  28. package/dist/commands/config/custom-levels.d.ts +7 -0
  29. package/dist/commands/config/custom-levels.js +32 -0
  30. package/dist/commands/{config.d.ts → config/dashboard.d.ts} +2 -24
  31. package/dist/commands/config/dashboard.js +171 -0
  32. package/dist/commands/config/entries.d.ts +17 -0
  33. package/dist/commands/config/entries.js +76 -0
  34. package/dist/commands/config/news.d.ts +7 -0
  35. package/dist/commands/config/news.js +88 -0
  36. package/dist/commands/config/shown.d.ts +9 -0
  37. package/dist/commands/config/shown.js +80 -0
  38. package/dist/commands/config/words.d.ts +27 -0
  39. package/dist/commands/config/words.js +204 -0
  40. package/dist/commands/effect.js +9 -9
  41. package/dist/commands/find.js +1 -1
  42. package/dist/commands/image.js +6 -6
  43. package/dist/commands/import/import.d.ts +0 -2
  44. package/dist/commands/import/import.js +45 -44
  45. package/dist/commands/import/run.js +1 -1
  46. package/dist/commands/index.js +3 -3
  47. package/dist/commands/init.js +2 -2
  48. package/dist/commands/install.js +1 -1
  49. package/dist/commands/instructions.js +6 -6
  50. package/dist/commands/mode.d.ts +2 -2
  51. package/dist/commands/mode.js +8 -8
  52. package/dist/commands/mood.js +4 -4
  53. package/dist/commands/move.js +10 -10
  54. package/dist/commands/package/consent.d.ts +11 -0
  55. package/dist/commands/package/consent.js +52 -0
  56. package/dist/commands/package/here.d.ts +51 -0
  57. package/dist/commands/package/here.js +128 -0
  58. package/dist/commands/package/install.d.ts +10 -0
  59. package/dist/commands/package/install.js +337 -0
  60. package/dist/commands/package/package.d.ts +18 -0
  61. package/dist/commands/package/package.js +236 -0
  62. package/dist/commands/package/result.d.ts +90 -0
  63. package/dist/commands/package/result.js +1 -0
  64. package/dist/commands/package/uninstall.d.ts +6 -0
  65. package/dist/commands/package/uninstall.js +70 -0
  66. package/dist/commands/rename.js +3 -3
  67. package/dist/commands/reveal.js +5 -5
  68. package/dist/commands/roll/roll.js +11 -9
  69. package/dist/commands/roll/tables.js +1 -1
  70. package/dist/commands/rules.d.ts +2 -2
  71. package/dist/commands/rules.js +3 -3
  72. package/dist/commands/save.d.ts +1 -1
  73. package/dist/commands/save.js +2 -2
  74. package/dist/commands/scene/close.d.ts +18 -0
  75. package/dist/commands/scene/close.js +179 -0
  76. package/dist/commands/scene/members.d.ts +14 -0
  77. package/dist/commands/scene/members.js +32 -0
  78. package/dist/commands/scene/open.d.ts +6 -0
  79. package/dist/commands/scene/open.js +298 -0
  80. package/dist/commands/scene/result.d.ts +98 -0
  81. package/dist/commands/scene/result.js +2 -0
  82. package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
  83. package/dist/commands/scene/scene.js +210 -0
  84. package/dist/commands/scene/turns.d.ts +18 -0
  85. package/dist/commands/scene/turns.js +229 -0
  86. package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +5 -3
  87. package/dist/commands/shared/{adventures.js → books/adventures.js} +23 -19
  88. package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
  89. package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
  90. package/dist/commands/shared/{library.js → books/library.js} +9 -9
  91. package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
  92. package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
  93. package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
  94. package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
  95. package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
  96. package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
  97. package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
  98. package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
  99. package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
  100. package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
  101. package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
  102. package/dist/commands/shared/{mode.js → campaign/mode.js} +24 -13
  103. package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
  104. package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
  105. package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
  106. package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
  107. package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
  108. package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
  109. package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +3 -3
  110. package/dist/commands/shared/{parts.js → campaign/parts.js} +3 -3
  111. package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
  112. package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
  113. package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
  114. package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
  115. package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
  116. package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
  117. package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
  118. package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
  119. package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
  120. package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
  121. package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
  122. package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
  123. package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
  124. package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
  125. package/dist/commands/shared/characters/orders.d.ts +4 -0
  126. package/dist/commands/shared/characters/orders.js +10 -0
  127. package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +2 -2
  128. package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +3 -3
  129. package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
  130. package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
  131. package/dist/commands/shared/examples.js +2 -2
  132. package/dist/commands/shared/packages/catalog.js +2 -2
  133. package/dist/commands/shared/packages/code.d.ts +1 -1
  134. package/dist/commands/shared/packages/code.js +8 -8
  135. package/dist/commands/shared/packages/extensions.d.ts +1 -1
  136. package/dist/commands/shared/packages/extensions.js +1 -1
  137. package/dist/commands/shared/packages/hooks.d.ts +1 -1
  138. package/dist/commands/shared/packages/hooks.js +1 -1
  139. package/dist/commands/shared/packages/widgets.d.ts +3 -3
  140. package/dist/commands/shared/packages/widgets.js +3 -3
  141. package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
  142. package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
  143. package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
  144. package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
  145. package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
  146. package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
  147. package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
  148. package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
  149. package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
  150. package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
  151. package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
  152. package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
  153. package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
  154. package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
  155. package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
  156. package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
  157. package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
  158. package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
  159. package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
  160. package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
  161. package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
  162. package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
  163. package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
  164. package/dist/commands/shared/{scene.js → scene/scene.js} +7 -7
  165. package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
  166. package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
  167. package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
  168. package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
  169. package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
  170. package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
  171. package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
  172. package/dist/commands/shared/sheet/effect-values.js +69 -0
  173. package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
  174. package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
  175. package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
  176. package/dist/commands/shared/sheet/formula-problems.js +140 -0
  177. package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
  178. package/dist/commands/shared/sheet/formula-scope.js +235 -0
  179. package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
  180. package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
  181. package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
  182. package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
  183. package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +5 -5
  184. package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
  185. package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
  186. package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
  187. package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
  188. package/dist/commands/shared/sheet/system-fields.js +45 -0
  189. package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
  190. package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
  191. package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
  192. package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
  193. package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
  194. package/dist/commands/shared/sheet/worked-out.js +291 -0
  195. package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
  196. package/dist/commands/shared/sheet/worked-text.js +55 -0
  197. package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
  198. package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
  199. package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
  200. package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
  201. package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
  202. package/dist/commands/shared/{events.js → time/events.js} +10 -13
  203. package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
  204. package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
  205. package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
  206. package/dist/commands/shared/{time.js → time/time.js} +6 -6
  207. package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
  208. package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
  209. package/dist/commands/show.d.ts +3 -0
  210. package/dist/commands/show.js +28 -9
  211. package/dist/commands/status.d.ts +2 -1
  212. package/dist/commands/status.js +28 -22
  213. package/dist/commands/thoughts.js +3 -3
  214. package/dist/commands/trade.js +8 -8
  215. package/dist/commands/translate.d.ts +1 -1
  216. package/dist/commands/translate.js +3 -3
  217. package/dist/commands/travel/open.d.ts +1 -1
  218. package/dist/commands/travel/open.js +2 -2
  219. package/dist/commands/travel/route.js +7 -6
  220. package/dist/commands/travel/travel.d.ts +1 -1
  221. package/dist/commands/travel/travel.js +8 -8
  222. package/dist/commands/validate.js +3 -3
  223. package/dist/commands/view/journal.d.ts +2 -2
  224. package/dist/commands/view/journal.js +2 -2
  225. package/dist/commands/view/map.d.ts +1 -1
  226. package/dist/commands/view/map.js +6 -6
  227. package/dist/commands/view/memory.d.ts +16 -0
  228. package/dist/commands/view/memory.js +90 -0
  229. package/dist/commands/view/page.d.ts +32 -0
  230. package/dist/commands/view/page.js +163 -0
  231. package/dist/commands/view/place.d.ts +7 -2
  232. package/dist/commands/view/place.js +30 -12
  233. package/dist/commands/view/result.d.ts +245 -0
  234. package/dist/commands/view/result.js +1 -0
  235. package/dist/commands/view/saves.d.ts +6 -0
  236. package/dist/commands/view/saves.js +53 -0
  237. package/dist/commands/view/story.d.ts +32 -0
  238. package/dist/commands/view/story.js +227 -0
  239. package/dist/commands/view/view.d.ts +26 -292
  240. package/dist/commands/view/view.js +26 -534
  241. package/dist/commands/view/world.d.ts +1 -1
  242. package/dist/commands/view/world.js +3 -3
  243. package/dist/commands/write/checks.d.ts +42 -0
  244. package/dist/commands/write/checks.js +291 -0
  245. package/dist/commands/write/here.d.ts +1 -1
  246. package/dist/commands/write/here.js +5 -5
  247. package/dist/commands/write/inheritance.d.ts +40 -0
  248. package/dist/commands/write/inheritance.js +189 -0
  249. package/dist/commands/write/input.d.ts +29 -0
  250. package/dist/commands/write/input.js +124 -0
  251. package/dist/commands/write/layer.d.ts +36 -0
  252. package/dist/commands/write/layer.js +48 -0
  253. package/dist/commands/write/notes.d.ts +22 -0
  254. package/dist/commands/write/notes.js +76 -0
  255. package/dist/commands/write/progression.d.ts +27 -0
  256. package/dist/commands/write/progression.js +175 -0
  257. package/dist/commands/write/write.d.ts +1 -0
  258. package/dist/commands/write/write.js +32 -816
  259. package/dist/core/files.d.ts +2 -0
  260. package/dist/core/files.js +7 -0
  261. package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
  262. package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
  263. package/dist/core/session-store.js +3 -3
  264. package/dist/core/store.d.ts +2 -2
  265. package/dist/core/store.js +18 -4
  266. package/dist/dashboard/acts/acts.js +1 -1
  267. package/dist/dashboard/acts/sending.js +110 -0
  268. package/dist/dashboard/acts/sheet.js +2 -2
  269. package/dist/dashboard/acts/strip.js +1 -1
  270. package/dist/dashboard/address.js +6 -0
  271. package/dist/dashboard/api.js +1 -1
  272. package/dist/dashboard/app.js +47 -171
  273. package/dist/dashboard/dice/roller.js +1 -1
  274. package/dist/dashboard/dice/sets.js +2 -2
  275. package/dist/dashboard/dice/stage.js +1 -1
  276. package/dist/dashboard/dice/tray.js +6 -6
  277. package/dist/dashboard/guide/ar.md +5 -3
  278. package/dist/dashboard/guide/cs.md +5 -3
  279. package/dist/dashboard/guide/da.md +5 -3
  280. package/dist/dashboard/guide/de.md +5 -3
  281. package/dist/dashboard/guide/el.md +5 -3
  282. package/dist/dashboard/guide/en.md +2 -0
  283. package/dist/dashboard/guide/es.md +4 -2
  284. package/dist/dashboard/guide/fi.md +5 -3
  285. package/dist/dashboard/guide/fr.md +4 -2
  286. package/dist/dashboard/guide/he.md +4 -2
  287. package/dist/dashboard/guide/hi.md +6 -4
  288. package/dist/dashboard/guide/hu.md +4 -2
  289. package/dist/dashboard/guide/is.md +5 -3
  290. package/dist/dashboard/guide/it.md +3 -1
  291. package/dist/dashboard/guide/ja.md +7 -5
  292. package/dist/dashboard/guide/ko.md +6 -4
  293. package/dist/dashboard/guide/nb.md +4 -2
  294. package/dist/dashboard/guide/nl.md +5 -3
  295. package/dist/dashboard/guide/pl.md +4 -2
  296. package/dist/dashboard/guide/pt.md +4 -2
  297. package/dist/dashboard/guide/ro.md +5 -3
  298. package/dist/dashboard/guide/ru.md +5 -3
  299. package/dist/dashboard/guide/sv.md +5 -3
  300. package/dist/dashboard/guide/tr.md +6 -4
  301. package/dist/dashboard/guide/uk.md +4 -2
  302. package/dist/dashboard/guide/zh.md +5 -3
  303. package/dist/dashboard/help/help.js +3 -3
  304. package/dist/dashboard/i18n/ar.json +4 -0
  305. package/dist/dashboard/i18n/cs.json +4 -0
  306. package/dist/dashboard/i18n/da.json +4 -0
  307. package/dist/dashboard/i18n/de.json +4 -0
  308. package/dist/dashboard/i18n/el.json +4 -0
  309. package/dist/dashboard/i18n/es.json +4 -0
  310. package/dist/dashboard/i18n/fi.json +4 -0
  311. package/dist/dashboard/i18n/fr.json +4 -0
  312. package/dist/dashboard/i18n/he.json +4 -0
  313. package/dist/dashboard/i18n/hi.json +4 -0
  314. package/dist/dashboard/i18n/hu.json +4 -0
  315. package/dist/dashboard/i18n/is.json +4 -0
  316. package/dist/dashboard/i18n/it.json +4 -0
  317. package/dist/dashboard/i18n/ja.json +5 -1
  318. package/dist/dashboard/i18n/ko.json +4 -0
  319. package/dist/dashboard/i18n/nb.json +4 -0
  320. package/dist/dashboard/i18n/nl.json +4 -0
  321. package/dist/dashboard/i18n/pl.json +4 -0
  322. package/dist/dashboard/i18n/pt.json +4 -0
  323. package/dist/dashboard/i18n/ro.json +4 -0
  324. package/dist/dashboard/i18n/ru.json +4 -0
  325. package/dist/dashboard/i18n/sv.json +4 -0
  326. package/dist/dashboard/i18n/tr.json +4 -0
  327. package/dist/dashboard/i18n/uk.json +4 -0
  328. package/dist/dashboard/i18n/zh.json +4 -0
  329. package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
  330. package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
  331. package/dist/dashboard/kit.js +3 -3
  332. package/dist/dashboard/packages/ask-card.js +3 -3
  333. package/dist/dashboard/packages/catalog.js +196 -0
  334. package/dist/dashboard/packages/engine.js +87 -0
  335. package/dist/dashboard/packages/installed.js +53 -0
  336. package/dist/dashboard/packages/library.js +97 -0
  337. package/dist/dashboard/packages/outcomes.js +45 -0
  338. package/dist/dashboard/packages/packages.js +20 -576
  339. package/dist/dashboard/packages/page-code.js +15 -2
  340. package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
  341. package/dist/dashboard/packages/rows.js +84 -0
  342. package/dist/dashboard/packages/share.js +44 -0
  343. package/dist/dashboard/packages/widgets.js +3 -3
  344. package/dist/dashboard/{card.js → parts/card.js} +1 -1
  345. package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
  346. package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
  347. package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
  348. package/dist/dashboard/{labels.js → parts/labels.js} +2 -1
  349. package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
  350. package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
  351. package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
  352. package/dist/dashboard/{refusals.js → parts/refusals.js} +1 -1
  353. package/dist/dashboard/{status.js → parts/status.js} +4 -4
  354. package/dist/dashboard/{widgets.js → parts/widgets.js} +2 -2
  355. package/dist/dashboard/place/key.js +24 -0
  356. package/dist/dashboard/place/paper.js +67 -0
  357. package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
  358. package/dist/dashboard/place/things.js +129 -0
  359. package/dist/dashboard/place/tokens.js +93 -0
  360. package/dist/dashboard/place/view.js +124 -0
  361. package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
  362. package/dist/dashboard/{asked.js → play/asked.js} +10 -10
  363. package/dist/dashboard/{choices.js → play/choices.js} +9 -9
  364. package/dist/dashboard/{requested.js → play/requested.js} +1 -1
  365. package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
  366. package/dist/dashboard/{scene.js → play/scene.js} +14 -14
  367. package/dist/dashboard/{turns.js → play/turns.js} +12 -12
  368. package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
  369. package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
  370. package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
  371. package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
  372. package/dist/dashboard/{setup.js → settings/setup.js} +5 -5
  373. package/dist/dashboard/{party.js → sheet/party.js} +8 -8
  374. package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
  375. package/dist/dashboard/{sheet.js → sheet/sheet.js} +17 -17
  376. package/dist/dashboard/{story.js → sheet/story.js} +3 -3
  377. package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
  378. package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
  379. package/dist/dashboard/{master.js → shell/master.js} +2 -2
  380. package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
  381. package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
  382. package/dist/dashboard/shell/shown.js +37 -0
  383. package/dist/dashboard/{table.js → shell/table.js} +2 -2
  384. package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
  385. package/dist/dashboard/{top.js → shell/top.js} +7 -7
  386. package/dist/dashboard/style.css +74 -3
  387. package/dist/dashboard/world/calendar.js +4 -4
  388. package/dist/dashboard/world/drawing.js +92 -0
  389. package/dist/dashboard/world/key.js +21 -0
  390. package/dist/dashboard/world/lore.js +5 -5
  391. package/dist/dashboard/world/map-card.js +186 -0
  392. package/dist/dashboard/world/place-card.js +39 -0
  393. package/dist/dashboard/world/places.js +29 -0
  394. package/dist/dashboard/world/world.js +9 -341
  395. package/dist/extensions/extension.d.ts +1 -1
  396. package/dist/extensions/extension.js +1 -1
  397. package/dist/images/images.js +12 -9
  398. package/dist/index.d.ts +1 -1
  399. package/dist/languages/index.d.ts +1 -1
  400. package/dist/languages/index.js +1 -1
  401. package/dist/packages/npm.js +1 -1
  402. package/dist/page.d.ts +2 -2
  403. package/dist/page.js +1 -1
  404. package/dist/pages/check.js +23 -1
  405. package/dist/pages/containers.d.ts +1 -1
  406. package/dist/pages/containers.js +1 -1
  407. package/dist/pages/index.d.ts +4 -2
  408. package/dist/pages/index.js +4 -2
  409. package/dist/pages/inheritance.d.ts +2 -2
  410. package/dist/pages/layers.d.ts +50 -0
  411. package/dist/pages/layers.js +97 -0
  412. package/dist/pages/rename-page.js +1 -1
  413. package/dist/pages/stacks/writes.js +48 -22
  414. package/dist/pages/standard-fields.d.ts +1 -1
  415. package/dist/pages/system-pages.d.ts +5 -3
  416. package/dist/pages/system-pages.js +16 -7
  417. package/dist/pages/world.d.ts +8 -1
  418. package/dist/pages/world.js +16 -4
  419. package/dist/pages/write-layer.d.ts +18 -0
  420. package/dist/pages/write-layer.js +108 -0
  421. package/dist/pages/write-page.d.ts +2 -2
  422. package/dist/pages/write-page.js +2 -2
  423. package/dist/rules/index.d.ts +1 -1
  424. package/dist/rules/index.js +1 -1
  425. package/dist/rules/search.d.ts +1 -1
  426. package/dist/rules/shown.d.ts +1 -1
  427. package/dist/server/dashboard/choices.js +3 -3
  428. package/dist/server/dashboard/files.js +5 -5
  429. package/dist/server/dashboard/index.d.ts +2 -2
  430. package/dist/server/dashboard/index.js +2 -2
  431. package/dist/server/dashboard/news.js +4 -3
  432. package/dist/server/dashboard/player.js +1 -1
  433. package/dist/server/dashboard/writes.js +9 -7
  434. package/dist/server/mcp.js +28 -13
  435. package/dist/systems/campaign-data.d.ts +15 -0
  436. package/dist/systems/campaign-data.js +85 -0
  437. package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
  438. package/dist/systems/{system-code.js → code.js} +2 -2
  439. package/dist/systems/game-system.d.ts +7 -61
  440. package/dist/systems/game-system.js +1 -984
  441. package/dist/systems/index.d.ts +6 -3
  442. package/dist/systems/index.js +6 -3
  443. package/dist/systems/installed.d.ts +31 -0
  444. package/dist/systems/installed.js +89 -0
  445. package/dist/systems/maps.d.ts +3 -0
  446. package/dist/systems/maps.js +9 -0
  447. package/dist/systems/read.d.ts +3 -0
  448. package/dist/systems/read.js +471 -0
  449. package/dist/systems/schema.d.ts +289 -0
  450. package/dist/systems/schema.js +243 -0
  451. package/dist/systems/settings.d.ts +19 -0
  452. package/dist/systems/settings.js +78 -0
  453. package/dist/systems/versions.d.ts +12 -0
  454. package/dist/systems/versions.js +52 -0
  455. package/dist/testing/index.js +1 -1
  456. package/instructions/import.md +1 -1
  457. package/instructions/play.md +1 -1
  458. package/package.json +1 -1
  459. package/dist/commands/config.js +0 -948
  460. package/dist/commands/package.d.ts +0 -143
  461. package/dist/commands/package.js +0 -785
  462. package/dist/commands/scene.js +0 -894
  463. package/dist/commands/shared/worked-out.js +0 -805
  464. package/dist/dashboard/place/map-view.js +0 -417
  465. /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
  466. /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
  467. /package/dist/core/{package-api.js → packages/api.js} +0 -0
  468. /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
  469. /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
  470. /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
  471. /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
  472. /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
  473. /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
  474. /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
  475. /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
  476. /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
  477. /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
  478. /package/dist/languages/{language-pack.js → pack.js} +0 -0
  479. /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
  480. /package/dist/pages/{page-file.js → file.js} +0 -0
  481. /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
  482. /package/dist/pages/{page-types.js → types.js} +0 -0
  483. /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
  484. /package/dist/rules/{rule-book.js → book.js} +0 -0
  485. /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
  486. /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 "../../core/context.js";
5
- import { readDocument, systemPageReader } from "../../documents/index.js";
6
- import { claimLibrary, dropUnlisted, libraryFolders, readLibrary, releaseLibrary } from "../../library/index.js";
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 "../../core/context.ts";
2
- import { type LibraryScope, type LibraryState } from "../../library/index.ts";
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 "../../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.js";
12
- import { languageName } from "./world.js";
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 "../../rules/index.ts";
2
- import { type GameSystem } from "../../systems/index.ts";
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 "../../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";
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 "../../core/context.ts";
2
- import { type Page, type World } from "../../pages/index.ts";
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 "../../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, versionTranslations } from "../../pages/index.js";
11
- import { answerOf, isGarbled, languageName } from "./page-words.js";
12
- import { campaignSystem, ownTranslationFolder } from "./world.js";
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
- for (const one of page === undefined ? [] : [page, ...baseChain(world, page)]) {
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 "../../core/context.ts";
2
- import { type SystemWords } from "../../systems/index.ts";
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 "../../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";
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 "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type Page } from "../../pages/index.ts";
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 "../../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 { effectsOf } from "./effect-layer.js";
6
- import { keptEffects, systemNamed } from "./effects.js";
7
- import { readOpenScene } from "./scene.js";
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 "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type Page, type World } from "../../pages/index.ts";
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 "../../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";
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 "../../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";
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 { 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";
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"];
@@ -109,7 +109,9 @@ export function checklistLine(mode, root, context, world, brief = false) {
109
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. "
110
110
  + "Ask the rest only when they leave it to you, or once they say they are ready."
111
111
  : "";
112
- return `${missing.charAt(0).toUpperCase()}${missing.slice(1)}. When ${blocked === undefined ? "" : "none is left and "}the player confirms: ${modeCall(next)}.${name}${page}`;
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}`;
113
115
  }
114
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. */
115
117
  export function modePart(mode, system) {
@@ -130,16 +132,25 @@ function writtenMode(root) {
130
132
  }
131
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). */
132
134
  function setupMissing(root, context, world, brief) {
133
- const unanswered = unansweredSettings(readSettings(root), world.pages.length > 0, playerCharacters(world).length > 0);
134
135
  const label = (name) => (brief ? valueLabels[name] : undefined) ?? settingLabels[name];
135
- // The player's choice in their last campaign, which the setup offers first (T-134), when the game offers it.
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) {
136
147
  const last = lastChoices(context.home);
137
- const withLast = (name, text) => {
148
+ const chosen = setupMissingNames(root, context, world).flatMap((name) => {
138
149
  const value = last[name];
139
150
  const offered = offeredValues(root, context, name);
140
- return value === undefined || (offered !== undefined && !offered.includes(value)) ? text : `${text}, in their last campaign ${value}: offer it first`;
141
- };
142
- return missingWithSystems(root, unanswered, context).map((name) => withLast(name, offeredLabel(root, context, name) ?? label(name) ?? name));
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.`;
143
154
  }
144
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. */
145
156
  function sessionZeroMissing(root, context, world) {
@@ -1,6 +1,6 @@
1
- import type { Context } from "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type Coin } from "../../money/index.ts";
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 "../../campaign/index.js";
3
- import { coinList, coinsProblem, coinsText, readCoins } from "../../money/index.js";
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 "../../campaign/index.ts";
2
- import type { Context } from "../../core/context.ts";
3
- import { type SystemSetting } from "../../systems/index.ts";
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 "../../campaign/index.js";
3
- import { sameWord } from "../../core/text.js";
4
- import { engineOfferings, engineSettingValue, heldSettings, offeredEngineValues, playedValueOf, readableSystems } from "../../systems/index.js";
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 "../../core/context.ts";
2
- import type { OutsideChange } from "../../core/session-store.ts";
3
- import { type World } from "../../pages/index.ts";
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 "../../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 "./events.js";
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 "../../core/context.ts";
2
- import { type World } from "../../pages/index.ts";
3
- import type { GameSystem } from "../../systems/index.ts";
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. */
@@ -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 "../../campaign/index.js";
3
- import { corePart, layeredPart } from "../../instructions/index.js";
4
- import { playerCharacters } from "../../pages/index.js";
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) {
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type World } from "../../pages/index.ts";
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 "../../campaign/index.js";
2
- import { checkLog } from "../../core/log.js";
3
- import { checkWorld, mapProblems } from "../../pages/index.js";
4
- import { bondProblems } from "./bonds.js";
5
- import { effectProblems } from "./effects.js";
6
- import { eventProblems } from "./events.js";
7
- import { experienceProblems } from "./experience.js";
8
- import { gridProblems } from "./grids.js";
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 "../../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";
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 "../../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.js";
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 "../../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";
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 "../../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 "./knowledge.js";
12
- import { newDatedLogEntry, readPresent } from "./time.js";
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 "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type ThemeReading } from "../../themes/index.ts";
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;
@@ -1,6 +1,6 @@
1
1
  // The theme of the dashboard the campaign's game system names (D-528): read and checked as the system is, for validate and for the dashboard.
2
2
  import { relative } from "node:path";
3
- import { readTheme, themeFileName } from "../../themes/index.js";
3
+ import { readTheme, themeFileName } from "../../../themes/index.js";
4
4
  import { campaignSystem } from "./world.js";
5
5
  /** The theme of the campaign's game system, read and checked, with the system's name; undefined when it names none. */
6
6
  export function campaignTheme(root, context) {
@@ -1,8 +1,8 @@
1
- import { type CountedByGame } from "../../campaign/index.ts";
2
- import type { Context } from "../../core/context.ts";
3
- import type { Problem } from "../../core/problem.ts";
4
- import { type PageType, type World } from "../../pages/index.ts";
5
- import { type CampaignData, type GameSystem, type SystemLayer, type SystemSetting, type SystemWords } from "../../systems/index.ts";
1
+ import { type CountedByGame } from "../../../campaign/index.ts";
2
+ import type { Context } from "../../../core/context.ts";
3
+ import type { Problem } from "../../../core/problem.ts";
4
+ import { type PageType, type World } from "../../../pages/index.ts";
5
+ import { type CampaignData, type GameSystem, type SystemLayer, type SystemSetting, type SystemWords } from "../../../systems/index.ts";
6
6
  /** The world of the campaign in `root`, with the pages of its game system when campaign.yaml names one that is installed (SYS-1, SYS-3). */
7
7
  export declare function campaignWorld(root: string, context: Context): World;
8
8
  /** The folder of a game system's pages translated on this computer into a language (D-539), in the player's data folder; none without one. */