rpg-engine 0.15.0 → 0.17.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 (503) hide show
  1. package/dist/adventures/source.d.ts +3 -1
  2. package/dist/adventures/source.js +31 -1
  3. package/dist/campaign/find-campaign.js +8 -4
  4. package/dist/campaign/index.d.ts +1 -1
  5. package/dist/campaign/index.js +1 -1
  6. package/dist/campaign/settings.d.ts +6 -0
  7. package/dist/campaign/settings.js +22 -1
  8. package/dist/cli/cli.js +1 -1
  9. package/dist/cli/command-line.js +1 -1
  10. package/dist/commands/advance.d.ts +1 -1
  11. package/dist/commands/advance.js +6 -6
  12. package/dist/commands/ask.js +7 -7
  13. package/dist/commands/change/amounts.d.ts +32 -0
  14. package/dist/commands/change/amounts.js +150 -0
  15. package/dist/commands/change/change.d.ts +4 -54
  16. package/dist/commands/change/change.js +19 -749
  17. package/dist/commands/change/damage.d.ts +30 -0
  18. package/dist/commands/change/damage.js +73 -2
  19. package/dist/commands/change/dice.d.ts +34 -0
  20. package/dist/commands/change/dice.js +59 -0
  21. package/dist/commands/change/fields.d.ts +37 -0
  22. package/dist/commands/change/fields.js +156 -0
  23. package/dist/commands/change/holder.d.ts +48 -0
  24. package/dist/commands/change/holder.js +162 -0
  25. package/dist/commands/change/recipe-pace.js +1 -1
  26. package/dist/commands/change/recipe.d.ts +58 -0
  27. package/dist/commands/change/recipe.js +179 -0
  28. package/dist/commands/choices.js +3 -3
  29. package/dist/commands/config/config.d.ts +15 -0
  30. package/dist/commands/config/config.js +355 -0
  31. package/dist/commands/config/custom-levels.d.ts +7 -0
  32. package/dist/commands/config/custom-levels.js +32 -0
  33. package/dist/commands/{config.d.ts → config/dashboard.d.ts} +2 -24
  34. package/dist/commands/config/dashboard.js +171 -0
  35. package/dist/commands/config/entries.d.ts +17 -0
  36. package/dist/commands/config/entries.js +76 -0
  37. package/dist/commands/config/news.d.ts +7 -0
  38. package/dist/commands/config/news.js +88 -0
  39. package/dist/commands/config/shown.d.ts +9 -0
  40. package/dist/commands/config/shown.js +80 -0
  41. package/dist/commands/config/words.d.ts +27 -0
  42. package/dist/commands/config/words.js +204 -0
  43. package/dist/commands/effect.js +9 -9
  44. package/dist/commands/find.js +1 -1
  45. package/dist/commands/image.js +6 -6
  46. package/dist/commands/import/import.d.ts +0 -2
  47. package/dist/commands/import/import.js +68 -45
  48. package/dist/commands/import/run.js +1 -1
  49. package/dist/commands/index.js +3 -3
  50. package/dist/commands/init.js +2 -2
  51. package/dist/commands/install.js +1 -1
  52. package/dist/commands/instructions.js +6 -6
  53. package/dist/commands/mode.d.ts +2 -2
  54. package/dist/commands/mode.js +8 -8
  55. package/dist/commands/mood.js +4 -4
  56. package/dist/commands/move.js +10 -10
  57. package/dist/commands/package/consent.d.ts +11 -0
  58. package/dist/commands/package/consent.js +52 -0
  59. package/dist/commands/package/here.d.ts +51 -0
  60. package/dist/commands/package/here.js +128 -0
  61. package/dist/commands/package/install.d.ts +10 -0
  62. package/dist/commands/package/install.js +337 -0
  63. package/dist/commands/package/package.d.ts +18 -0
  64. package/dist/commands/package/package.js +270 -0
  65. package/dist/commands/package/result.d.ts +89 -0
  66. package/dist/commands/package/result.js +1 -0
  67. package/dist/commands/package/uninstall.d.ts +6 -0
  68. package/dist/commands/package/uninstall.js +70 -0
  69. package/dist/commands/rename.js +3 -3
  70. package/dist/commands/reveal.js +5 -5
  71. package/dist/commands/roll/roll.js +11 -9
  72. package/dist/commands/roll/tables.js +1 -1
  73. package/dist/commands/rules.d.ts +2 -2
  74. package/dist/commands/rules.js +3 -3
  75. package/dist/commands/save.d.ts +2 -2
  76. package/dist/commands/save.js +2 -2
  77. package/dist/commands/scene/close.d.ts +18 -0
  78. package/dist/commands/scene/close.js +179 -0
  79. package/dist/commands/scene/members.d.ts +14 -0
  80. package/dist/commands/scene/members.js +32 -0
  81. package/dist/commands/scene/open.d.ts +6 -0
  82. package/dist/commands/scene/open.js +298 -0
  83. package/dist/commands/scene/result.d.ts +98 -0
  84. package/dist/commands/scene/result.js +2 -0
  85. package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
  86. package/dist/commands/scene/scene.js +210 -0
  87. package/dist/commands/scene/turns.d.ts +18 -0
  88. package/dist/commands/scene/turns.js +229 -0
  89. package/dist/commands/shared/books/adventure-layers.d.ts +89 -0
  90. package/dist/commands/shared/books/adventure-layers.js +201 -0
  91. package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +28 -9
  92. package/dist/commands/shared/{adventures.js → books/adventures.js} +77 -35
  93. package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
  94. package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
  95. package/dist/commands/shared/{library.js → books/library.js} +9 -9
  96. package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
  97. package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
  98. package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
  99. package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
  100. package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
  101. package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
  102. package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
  103. package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
  104. package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
  105. package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
  106. package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
  107. package/dist/commands/shared/{mode.js → campaign/mode.js} +24 -13
  108. package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
  109. package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
  110. package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
  111. package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
  112. package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
  113. package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
  114. package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +3 -3
  115. package/dist/commands/shared/{parts.js → campaign/parts.js} +3 -3
  116. package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
  117. package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
  118. package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
  119. package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
  120. package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
  121. package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
  122. package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
  123. package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
  124. package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
  125. package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
  126. package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
  127. package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
  128. package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
  129. package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
  130. package/dist/commands/shared/characters/orders.d.ts +4 -0
  131. package/dist/commands/shared/characters/orders.js +10 -0
  132. package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +9 -6
  133. package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +17 -7
  134. package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
  135. package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
  136. package/dist/commands/shared/examples.js +2 -2
  137. package/dist/commands/shared/packages/catalog.js +2 -2
  138. package/dist/commands/shared/packages/code.d.ts +1 -1
  139. package/dist/commands/shared/packages/code.js +8 -8
  140. package/dist/commands/shared/packages/extensions.d.ts +1 -1
  141. package/dist/commands/shared/packages/extensions.js +1 -1
  142. package/dist/commands/shared/packages/hooks.d.ts +1 -1
  143. package/dist/commands/shared/packages/hooks.js +1 -1
  144. package/dist/commands/shared/packages/widgets.d.ts +3 -3
  145. package/dist/commands/shared/packages/widgets.js +3 -3
  146. package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
  147. package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
  148. package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
  149. package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
  150. package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
  151. package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
  152. package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
  153. package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
  154. package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
  155. package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
  156. package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
  157. package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
  158. package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
  159. package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
  160. package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
  161. package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
  162. package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
  163. package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
  164. package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
  165. package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
  166. package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
  167. package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
  168. package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
  169. package/dist/commands/shared/{scene.js → scene/scene.js} +10 -8
  170. package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
  171. package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
  172. package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
  173. package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
  174. package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
  175. package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
  176. package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
  177. package/dist/commands/shared/sheet/effect-values.js +69 -0
  178. package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
  179. package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
  180. package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
  181. package/dist/commands/shared/sheet/formula-problems.js +140 -0
  182. package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
  183. package/dist/commands/shared/sheet/formula-scope.js +235 -0
  184. package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
  185. package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
  186. package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
  187. package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
  188. package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +7 -5
  189. package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
  190. package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
  191. package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
  192. package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
  193. package/dist/commands/shared/sheet/system-fields.js +45 -0
  194. package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
  195. package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
  196. package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
  197. package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
  198. package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
  199. package/dist/commands/shared/sheet/worked-out.js +291 -0
  200. package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
  201. package/dist/commands/shared/sheet/worked-text.js +55 -0
  202. package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
  203. package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
  204. package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
  205. package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
  206. package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
  207. package/dist/commands/shared/{events.js → time/events.js} +10 -13
  208. package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
  209. package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
  210. package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
  211. package/dist/commands/shared/{time.js → time/time.js} +6 -6
  212. package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
  213. package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
  214. package/dist/commands/show.d.ts +9 -0
  215. package/dist/commands/show.js +43 -10
  216. package/dist/commands/status.d.ts +2 -1
  217. package/dist/commands/status.js +28 -22
  218. package/dist/commands/thoughts.d.ts +1 -0
  219. package/dist/commands/thoughts.js +26 -18
  220. package/dist/commands/trade.js +8 -8
  221. package/dist/commands/translate.d.ts +1 -1
  222. package/dist/commands/translate.js +3 -3
  223. package/dist/commands/travel/open.d.ts +1 -1
  224. package/dist/commands/travel/open.js +2 -2
  225. package/dist/commands/travel/route.js +7 -6
  226. package/dist/commands/travel/travel.d.ts +1 -1
  227. package/dist/commands/travel/travel.js +8 -8
  228. package/dist/commands/validate.js +3 -3
  229. package/dist/commands/view/journal.d.ts +2 -2
  230. package/dist/commands/view/journal.js +2 -2
  231. package/dist/commands/view/layers.d.ts +34 -0
  232. package/dist/commands/view/layers.js +44 -0
  233. package/dist/commands/view/map.d.ts +1 -1
  234. package/dist/commands/view/map.js +6 -6
  235. package/dist/commands/view/memory.d.ts +16 -0
  236. package/dist/commands/view/memory.js +96 -0
  237. package/dist/commands/view/page.d.ts +32 -0
  238. package/dist/commands/view/page.js +166 -0
  239. package/dist/commands/view/place.d.ts +7 -2
  240. package/dist/commands/view/place.js +30 -12
  241. package/dist/commands/view/result.d.ts +252 -0
  242. package/dist/commands/view/result.js +1 -0
  243. package/dist/commands/view/saves.d.ts +6 -0
  244. package/dist/commands/view/saves.js +53 -0
  245. package/dist/commands/view/story.d.ts +32 -0
  246. package/dist/commands/view/story.js +227 -0
  247. package/dist/commands/view/view.d.ts +29 -292
  248. package/dist/commands/view/view.js +31 -536
  249. package/dist/commands/view/world.d.ts +1 -1
  250. package/dist/commands/view/world.js +3 -3
  251. package/dist/commands/write/checks.d.ts +42 -0
  252. package/dist/commands/write/checks.js +291 -0
  253. package/dist/commands/write/here.d.ts +1 -1
  254. package/dist/commands/write/here.js +5 -5
  255. package/dist/commands/write/inheritance.d.ts +40 -0
  256. package/dist/commands/write/inheritance.js +185 -0
  257. package/dist/commands/write/input.d.ts +29 -0
  258. package/dist/commands/write/input.js +124 -0
  259. package/dist/commands/write/layer.d.ts +44 -0
  260. package/dist/commands/write/layer.js +68 -0
  261. package/dist/commands/write/notes.d.ts +22 -0
  262. package/dist/commands/write/notes.js +76 -0
  263. package/dist/commands/write/progression.d.ts +27 -0
  264. package/dist/commands/write/progression.js +175 -0
  265. package/dist/commands/write/write.d.ts +2 -0
  266. package/dist/commands/write/write.js +36 -816
  267. package/dist/core/files.d.ts +2 -0
  268. package/dist/core/files.js +7 -0
  269. package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
  270. package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
  271. package/dist/core/session-store.js +3 -3
  272. package/dist/core/store.d.ts +2 -2
  273. package/dist/core/store.js +18 -4
  274. package/dist/core/text.d.ts +2 -0
  275. package/dist/core/text.js +4 -0
  276. package/dist/dashboard/acts/acts.js +1 -1
  277. package/dist/dashboard/acts/sending.js +110 -0
  278. package/dist/dashboard/acts/sheet.js +2 -2
  279. package/dist/dashboard/acts/strip.js +1 -1
  280. package/dist/dashboard/address.js +6 -0
  281. package/dist/dashboard/api.js +19 -1
  282. package/dist/dashboard/app.js +51 -171
  283. package/dist/dashboard/dice/roller.js +1 -1
  284. package/dist/dashboard/dice/sets.js +2 -2
  285. package/dist/dashboard/dice/stage.js +1 -1
  286. package/dist/dashboard/dice/tray.js +6 -6
  287. package/dist/dashboard/guide/ar.md +7 -3
  288. package/dist/dashboard/guide/cs.md +9 -5
  289. package/dist/dashboard/guide/da.md +9 -5
  290. package/dist/dashboard/guide/de.md +7 -3
  291. package/dist/dashboard/guide/el.md +9 -5
  292. package/dist/dashboard/guide/en.md +4 -0
  293. package/dist/dashboard/guide/es.md +8 -4
  294. package/dist/dashboard/guide/fi.md +9 -5
  295. package/dist/dashboard/guide/fr.md +8 -4
  296. package/dist/dashboard/guide/he.md +7 -3
  297. package/dist/dashboard/guide/hi.md +10 -6
  298. package/dist/dashboard/guide/hu.md +8 -4
  299. package/dist/dashboard/guide/is.md +9 -5
  300. package/dist/dashboard/guide/it.md +5 -1
  301. package/dist/dashboard/guide/ja.md +9 -5
  302. package/dist/dashboard/guide/ko.md +8 -4
  303. package/dist/dashboard/guide/nb.md +8 -4
  304. package/dist/dashboard/guide/nl.md +8 -4
  305. package/dist/dashboard/guide/pl.md +8 -4
  306. package/dist/dashboard/guide/pt.md +7 -3
  307. package/dist/dashboard/guide/ro.md +9 -5
  308. package/dist/dashboard/guide/ru.md +8 -4
  309. package/dist/dashboard/guide/sv.md +9 -5
  310. package/dist/dashboard/guide/tr.md +9 -5
  311. package/dist/dashboard/guide/uk.md +8 -4
  312. package/dist/dashboard/guide/zh.md +8 -4
  313. package/dist/dashboard/help/help.js +3 -3
  314. package/dist/dashboard/i18n/ar.json +29 -0
  315. package/dist/dashboard/i18n/cs.json +29 -0
  316. package/dist/dashboard/i18n/da.json +29 -0
  317. package/dist/dashboard/i18n/de.json +29 -0
  318. package/dist/dashboard/i18n/el.json +29 -0
  319. package/dist/dashboard/i18n/es.json +29 -0
  320. package/dist/dashboard/i18n/fi.json +29 -0
  321. package/dist/dashboard/i18n/fr.json +29 -0
  322. package/dist/dashboard/i18n/he.json +29 -0
  323. package/dist/dashboard/i18n/hi.json +29 -0
  324. package/dist/dashboard/i18n/hu.json +29 -0
  325. package/dist/dashboard/i18n/is.json +29 -0
  326. package/dist/dashboard/i18n/it.json +29 -0
  327. package/dist/dashboard/i18n/ja.json +30 -1
  328. package/dist/dashboard/i18n/ko.json +29 -0
  329. package/dist/dashboard/i18n/nb.json +29 -0
  330. package/dist/dashboard/i18n/nl.json +29 -0
  331. package/dist/dashboard/i18n/pl.json +29 -0
  332. package/dist/dashboard/i18n/pt.json +29 -0
  333. package/dist/dashboard/i18n/ro.json +29 -0
  334. package/dist/dashboard/i18n/ru.json +29 -0
  335. package/dist/dashboard/i18n/sv.json +29 -0
  336. package/dist/dashboard/i18n/tr.json +29 -0
  337. package/dist/dashboard/i18n/uk.json +29 -0
  338. package/dist/dashboard/i18n/zh.json +29 -0
  339. package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
  340. package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
  341. package/dist/dashboard/kit.js +3 -3
  342. package/dist/dashboard/packages/ask-card.js +3 -3
  343. package/dist/dashboard/packages/catalog.js +196 -0
  344. package/dist/dashboard/packages/changes.js +111 -0
  345. package/dist/dashboard/packages/engine.js +87 -0
  346. package/dist/dashboard/packages/installed.js +53 -0
  347. package/dist/dashboard/packages/library.js +97 -0
  348. package/dist/dashboard/packages/outcomes.js +45 -0
  349. package/dist/dashboard/packages/packages.js +27 -578
  350. package/dist/dashboard/packages/page-code.js +15 -2
  351. package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
  352. package/dist/dashboard/packages/rows.js +84 -0
  353. package/dist/dashboard/packages/share.js +44 -0
  354. package/dist/dashboard/packages/widgets.js +3 -3
  355. package/dist/dashboard/{card.js → parts/card.js} +1 -1
  356. package/dist/dashboard/parts/changed.js +37 -0
  357. package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
  358. package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
  359. package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
  360. package/dist/dashboard/{labels.js → parts/labels.js} +2 -1
  361. package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
  362. package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
  363. package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
  364. package/dist/dashboard/{refusals.js → parts/refusals.js} +5 -1
  365. package/dist/dashboard/{status.js → parts/status.js} +4 -4
  366. package/dist/dashboard/{widgets.js → parts/widgets.js} +5 -3
  367. package/dist/dashboard/place/key.js +24 -0
  368. package/dist/dashboard/place/paper.js +67 -0
  369. package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
  370. package/dist/dashboard/place/things.js +129 -0
  371. package/dist/dashboard/place/tokens.js +93 -0
  372. package/dist/dashboard/place/view.js +124 -0
  373. package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
  374. package/dist/dashboard/{asked.js → play/asked.js} +10 -10
  375. package/dist/dashboard/{choices.js → play/choices.js} +11 -10
  376. package/dist/dashboard/{requested.js → play/requested.js} +1 -1
  377. package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
  378. package/dist/dashboard/{scene.js → play/scene.js} +14 -14
  379. package/dist/dashboard/{turns.js → play/turns.js} +12 -12
  380. package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
  381. package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
  382. package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
  383. package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
  384. package/dist/dashboard/{setup.js → settings/setup.js} +5 -5
  385. package/dist/dashboard/{party.js → sheet/party.js} +8 -8
  386. package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
  387. package/dist/dashboard/{sheet.js → sheet/sheet.js} +27 -24
  388. package/dist/dashboard/{story.js → sheet/story.js} +3 -3
  389. package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
  390. package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
  391. package/dist/dashboard/{master.js → shell/master.js} +2 -2
  392. package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
  393. package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
  394. package/dist/dashboard/shell/shown.js +38 -0
  395. package/dist/dashboard/{table.js → shell/table.js} +2 -2
  396. package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
  397. package/dist/dashboard/{top.js → shell/top.js} +7 -7
  398. package/dist/dashboard/style.css +288 -4
  399. package/dist/dashboard/world/calendar.js +4 -4
  400. package/dist/dashboard/world/drawing.js +92 -0
  401. package/dist/dashboard/world/key.js +21 -0
  402. package/dist/dashboard/world/lore.js +10 -6
  403. package/dist/dashboard/world/map-card.js +186 -0
  404. package/dist/dashboard/world/place-card.js +39 -0
  405. package/dist/dashboard/world/places.js +29 -0
  406. package/dist/dashboard/world/world.js +9 -341
  407. package/dist/extensions/extension.d.ts +1 -1
  408. package/dist/extensions/extension.js +1 -1
  409. package/dist/images/images.js +12 -9
  410. package/dist/index.d.ts +1 -1
  411. package/dist/languages/index.d.ts +1 -1
  412. package/dist/languages/index.js +1 -1
  413. package/dist/packages/npm.js +1 -1
  414. package/dist/page.d.ts +2 -2
  415. package/dist/page.js +1 -1
  416. package/dist/pages/check.js +23 -1
  417. package/dist/pages/containers.d.ts +1 -1
  418. package/dist/pages/containers.js +1 -1
  419. package/dist/pages/index.d.ts +4 -2
  420. package/dist/pages/index.js +4 -2
  421. package/dist/pages/inheritance.d.ts +2 -2
  422. package/dist/pages/layers.d.ts +52 -0
  423. package/dist/pages/layers.js +105 -0
  424. package/dist/pages/markdown.d.ts +5 -1
  425. package/dist/pages/markdown.js +13 -1
  426. package/dist/pages/rename-page.js +1 -1
  427. package/dist/pages/stacks/writes.js +48 -22
  428. package/dist/pages/standard-fields.d.ts +1 -1
  429. package/dist/pages/system-pages.d.ts +5 -3
  430. package/dist/pages/system-pages.js +16 -7
  431. package/dist/pages/world.d.ts +8 -1
  432. package/dist/pages/world.js +16 -4
  433. package/dist/pages/write-layer.d.ts +23 -0
  434. package/dist/pages/write-layer.js +162 -0
  435. package/dist/pages/write-page.d.ts +2 -2
  436. package/dist/pages/write-page.js +2 -2
  437. package/dist/rules/index.d.ts +1 -1
  438. package/dist/rules/index.js +1 -1
  439. package/dist/rules/search.d.ts +1 -1
  440. package/dist/rules/shown.d.ts +1 -1
  441. package/dist/server/dashboard/choices.d.ts +2 -0
  442. package/dist/server/dashboard/choices.js +6 -4
  443. package/dist/server/dashboard/files.js +5 -5
  444. package/dist/server/dashboard/index.d.ts +2 -2
  445. package/dist/server/dashboard/index.js +7 -3
  446. package/dist/server/dashboard/news.js +4 -3
  447. package/dist/server/dashboard/player.js +1 -1
  448. package/dist/server/dashboard/writes.d.ts +7 -0
  449. package/dist/server/dashboard/writes.js +48 -7
  450. package/dist/server/mcp.js +28 -13
  451. package/dist/systems/campaign-data.d.ts +15 -0
  452. package/dist/systems/campaign-data.js +85 -0
  453. package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
  454. package/dist/systems/{system-code.js → code.js} +2 -2
  455. package/dist/systems/game-system.d.ts +7 -61
  456. package/dist/systems/game-system.js +1 -984
  457. package/dist/systems/index.d.ts +6 -3
  458. package/dist/systems/index.js +6 -3
  459. package/dist/systems/installed.d.ts +31 -0
  460. package/dist/systems/installed.js +89 -0
  461. package/dist/systems/maps.d.ts +3 -0
  462. package/dist/systems/maps.js +9 -0
  463. package/dist/systems/read.d.ts +3 -0
  464. package/dist/systems/read.js +471 -0
  465. package/dist/systems/schema.d.ts +289 -0
  466. package/dist/systems/schema.js +243 -0
  467. package/dist/systems/settings.d.ts +19 -0
  468. package/dist/systems/settings.js +78 -0
  469. package/dist/systems/versions.d.ts +12 -0
  470. package/dist/systems/versions.js +52 -0
  471. package/dist/testing/index.js +1 -1
  472. package/instructions/import.md +1 -1
  473. package/instructions/play.md +1 -1
  474. package/instructions/voices.md +1 -1
  475. package/package.json +1 -1
  476. package/dist/commands/config.js +0 -948
  477. package/dist/commands/package.d.ts +0 -143
  478. package/dist/commands/package.js +0 -785
  479. package/dist/commands/scene.js +0 -894
  480. package/dist/commands/shared/worked-out.js +0 -805
  481. package/dist/dashboard/place/map-view.js +0 -417
  482. /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
  483. /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
  484. /package/dist/core/{package-api.js → packages/api.js} +0 -0
  485. /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
  486. /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
  487. /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
  488. /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
  489. /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
  490. /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
  491. /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
  492. /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
  493. /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
  494. /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
  495. /package/dist/languages/{language-pack.js → pack.js} +0 -0
  496. /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
  497. /package/dist/pages/{page-file.js → file.js} +0 -0
  498. /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
  499. /package/dist/pages/{page-types.js → types.js} +0 -0
  500. /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
  501. /package/dist/rules/{rule-book.js → book.js} +0 -0
  502. /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
  503. /package/dist/systems/{system-folders.js → folders.js} +0 -0
@@ -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. */
@@ -1,21 +1,22 @@
1
1
  // The campaign's world and game system as the commands read them: the system with the layers over it, the settings it plays with, and the world built from both.
2
2
  import { join, resolve } from "node:path";
3
- import { campaignFileName, customLevel, customLevels, customSettings, readCampaignData, readOneSetting, readTextSetting } from "../../campaign/index.js";
4
- import { ourSystems } from "../../core/package-declarations.js";
5
- import { files, isInside } from "../../core/store.js";
6
- import { comparableText } from "../../core/text.js";
7
- import { extensionWords } from "../../extensions/index.js";
8
- import { languagePackFor, packSystemFolder } from "../../languages/index.js";
9
- import { loadWorld, playerCharacters, searchSystemPages, worldFolderName } from "../../pages/index.js";
10
- import { engineSettingValue, findCampaignSystem, findSystem, layeredSystemWords, readableSystems, rulesetSetting, systemContentFolders, systemWords, withSettings, } from "../../systems/index.js";
11
- import { campaignExtensions, extensionSources, layeredParts } from "./packages/extensions.js";
12
- import { homeSystemWords } from "./page-words.js";
3
+ import { campaignFileName, customLevel, customLevels, customSettings, readCampaignData, readOneSetting, readTextSetting } from "../../../campaign/index.js";
4
+ import { ourSystems } from "../../../core/packages/declarations.js";
5
+ import { files, isInside } from "../../../core/store.js";
6
+ import { comparableText } from "../../../core/text.js";
7
+ import { extensionWords } from "../../../extensions/index.js";
8
+ import { languagePackFor, packSystemFolder } from "../../../languages/index.js";
9
+ import { layerFolder, layersFolderName, loadWorld, playerCharacters, searchSystemPages, worldFolderName } from "../../../pages/index.js";
10
+ import { engineSettingValue, findCampaignSystem, findSystem, layeredSystemWords, readableSystems, rulesetSetting, systemContentFolders, systemWords, withSettings, } from "../../../systems/index.js";
11
+ import { homeSystemWords } from "../books/words.js";
12
+ import { campaignExtensions, extensionSources, layeredParts } from "../packages/extensions.js";
13
13
  /** 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). */
14
14
  export function campaignWorld(root, context) {
15
- // The same world until one of its pages, campaign.yaml or the system's pages translated on this computer change: in a session, across calls (D-137). A
16
- // game system does not change while the server runs.
17
- const from = [join(root, worldFolderName), join(root, campaignFileName), ...(context.home === undefined ? [] : [join(context.home, "systems")])].map((path) => resolve(path));
18
- const dependsOn = (path) => from.some((source) => source === path || isInside(source, path) || isInside(path, source));
15
+ // The same world until one of its pages, campaign.yaml or the system's pages translated on this computer change, or a folder of the packages is read again
16
+ // whole, as after npm installed the system in the chat: in a session, across calls (D-137).
17
+ const from = [join(root, worldFolderName), join(root, layersFolderName), join(root, campaignFileName), ...(context.home === undefined ? [] : [join(context.home, "systems")])].map((path) => resolve(path));
18
+ const packages = [...context.systemFolders, ...(context.extensionFolders ?? [])].map((path) => resolve(path));
19
+ const dependsOn = (path) => from.some((source) => source === path || isInside(source, path) || isInside(path, source)) || packages.some((folder) => folder === path || isInside(path, folder));
19
20
  return files().remember(`world ${resolve(root)}`, dependsOn, () => {
20
21
  const named = readTextSetting(root, "system");
21
22
  const system = campaignSystem(root, context);
@@ -25,6 +26,8 @@ export function campaignWorld(root, context) {
25
26
  system,
26
27
  language,
27
28
  ...(own === undefined ? {} : { ownTranslations: own }),
29
+ // The campaign's layers over the pages of its system (SYS-11).
30
+ ...(system === undefined ? {} : { layers: layerFolder(root, system.name) }),
28
31
  words: campaignSystemWords(root, context),
29
32
  missingSystem: system === undefined ? named : undefined,
30
33
  noSystem: named === undefined,
@@ -1,6 +1,6 @@
1
- import { type LogEntry } from "../../core/log.ts";
2
- import { type Link, type Page, type World } from "../../pages/index.ts";
3
- import type { Scene } from "../../scene/index.ts";
1
+ import { type LogEntry } from "../../../core/log.ts";
2
+ import { type Link, type Page, type World } from "../../../pages/index.ts";
3
+ import type { Scene } from "../../../scene/index.ts";
4
4
  /** What a character knows: the pages, and the secrets by the page that writes them. */
5
5
  export interface Knowledge {
6
6
  /** Whose knowledge it is: the player character, the one in the foreground when there are more (VIEW-12), or another character for the character agent voicing them (VIEW-10). */
@@ -1,9 +1,9 @@
1
1
  // What a character knows, as the player's view and a character agent's read it (D-250, VIEW-2, VIEW-3, VIEW-10): the pages it knows and the text of each as it knows it;
2
2
  // with more than one player character, what any of them knows, and who (VIEW-12).
3
- import { readLog } from "../../core/log.js";
4
- import { comparableText } from "../../core/text.js";
5
- import { baseChain, inheritedByBase, introductionText, isPartyMember, isPlayerCharacter, links, locate, pagesWithNameOrAlias, parsePageReference, partContent, playerCharacters, readSection, secretNames, stacksOf, systemPageNamed, textParts, textsIn, withLinksAsWords, withoutComments, withoutUnreadSecrets, } from "../../pages/index.js";
6
- import { readOpenScene } from "./scene.js";
3
+ import { readLog } from "../../../core/log.js";
4
+ import { comparableText } from "../../../core/text.js";
5
+ import { baseChain, inheritedByBase, introductionText, isPartyMember, isPlayerCharacter, links, locate, pagesWithNameOrAlias, parsePageReference, partContent, playerCharacters, readSection, secretNames, stacksOf, systemPageNamed, textParts, textsIn, withLinksAsWords, withoutComments, withoutUnreadSecrets, } from "../../../pages/index.js";
6
+ import { readOpenScene } from "../scene/scene.js";
7
7
  /** The player character: the first living character with role pc, else the first dead one; undefined before there is one. */
8
8
  export function playerCharacter(world) {
9
9
  const players = playerCharacters(world);
@@ -1,6 +1,6 @@
1
- import type { LogEntry } from "../../core/log.ts";
2
- import { type Mood } from "../../core/mood.ts";
3
- import { type Page } from "../../pages/index.ts";
1
+ import type { LogEntry } from "../../../core/log.ts";
2
+ import { type Mood } from "../../../core/mood.ts";
3
+ import { type Page } from "../../../pages/index.ts";
4
4
  /** The key of state.yaml that keeps the master's mood. */
5
5
  export declare const masterMoodKey = "master-mood";
6
6
  /** The log's types: a mood that stays, and a moment of the master's, which the dashboard shows for a few seconds. */
@@ -1,7 +1,7 @@
1
1
  // Where the moods are kept (MOOD-3, MOOD-4): the master's in state.yaml, a character's on its page, a moment of the master's only in the log.
2
- import { readStateValues } from "../../campaign/index.js";
3
- import { readMood } from "../../core/mood.js";
4
- import { ownField } from "../../pages/index.js";
2
+ import { readStateValues } from "../../../campaign/index.js";
3
+ import { readMood } from "../../../core/mood.js";
4
+ import { ownField } from "../../../pages/index.js";
5
5
  /** The key of state.yaml that keeps the master's mood. */
6
6
  export const masterMoodKey = "master-mood";
7
7
  /** The log's types: a mood that stays, and a moment of the master's, which the dashboard shows for a few seconds. */
@@ -0,0 +1,4 @@
1
+ /** The standing orders the player gave the companions, in their words; none when there are none or the settings cannot be read. */
2
+ export declare function standingOrders(root: string): string[];
3
+ /** The orders as the master reads them: the player's words in quotes, so that they are never taken for the engine's: "Leave one alive"; "…". */
4
+ export declare function quotedOrders(orders: string[]): string;
@@ -0,0 +1,10 @@
1
+ // The player's standing orders to the companions (D-38, D-563): kept in the campaign's settings, said to the master and to who voices a companion
2
+ import { readListSetting } from "../../../campaign/index.js";
3
+ /** The standing orders the player gave the companions, in their words; none when there are none or the settings cannot be read. */
4
+ export function standingOrders(root) {
5
+ return readListSetting(root, "orders");
6
+ }
7
+ /** The orders as the master reads them: the player's words in quotes, so that they are never taken for the engine's: "Leave one alive"; "…". */
8
+ export function quotedOrders(orders) {
9
+ return orders.map((order) => `"${order}"`).join("; ");
10
+ }
@@ -1,18 +1,21 @@
1
- import type { Context } from "../../core/context.ts";
2
- import { type Page, type World } from "../../pages/index.ts";
1
+ import type { Context } from "../../../core/context.ts";
2
+ import { type Page, type World } from "../../../pages/index.ts";
3
3
  /** The type of a diary's line in the log (DIA-1). */
4
4
  export declare const thoughtsType = "thoughts";
5
5
  /** How long a line of a diary may be, in characters (DIA-1). */
6
6
  export declare const thoughtsLength = 200;
7
- /** How many of their last lines a companion reads in view as (DIA-3). */
7
+ /** How many of their last lines a character reads in view as, and the master in show (DIA-3). */
8
8
  export declare const thoughtsShown = 3;
9
- /** What a companion writes of themselves, as the character agent and the master read it (DIA-3). */
10
- export declare const thoughtsRule = "how you took what happened, whom you trust or fear now, what you mean to do; never what happened (Lived keeps it), and nothing you hide from the others";
11
- /** A line of a diary: whose, its game date, its text. */
9
+ /** What a character writes of themselves, as the character agent and the master read it (DIA-3): a companion's the player reads too, another's no one but them. */
10
+ export declare function thoughtsRule(companion: boolean): string;
11
+ /** Whether a page keeps a diary (DIA-1): a character of the campaign, not the player's. */
12
+ export declare function keepsDiary(page: Page): boolean;
13
+ /** A line of a diary: whose, its game date, its text, and whether it is hidden from the player, as another character's than a companion (DIA-4). */
12
14
  export interface Thought {
13
15
  page: Page;
14
16
  date?: string;
15
17
  text: string;
18
+ hidden: boolean;
16
19
  }
17
20
  /** The lines of the diaries, oldest first (DIA-1); of one character when `page` is given. Lines of a page no longer there are left out. */
18
21
  export declare function thoughtsIn(root: string, world: World, page?: Page): Thought[];