rpg-engine 0.14.1 → 0.15.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 (78) hide show
  1. package/dist/campaign/index.d.ts +1 -1
  2. package/dist/campaign/index.js +1 -1
  3. package/dist/campaign/last-choices.js +1 -1
  4. package/dist/campaign/settings.d.ts +19 -5
  5. package/dist/campaign/settings.js +16 -8
  6. package/dist/commands/config.d.ts +2 -2
  7. package/dist/commands/config.js +42 -11
  8. package/dist/commands/find.d.ts +4 -4
  9. package/dist/commands/instructions.js +12 -1
  10. package/dist/commands/mode.js +10 -2
  11. package/dist/commands/shared/mode.js +6 -2
  12. package/dist/commands/shared/parts.d.ts +7 -0
  13. package/dist/commands/shared/parts.js +23 -0
  14. package/dist/commands/show.d.ts +1 -1
  15. package/dist/commands/status.js +6 -1
  16. package/dist/commands/write/write.d.ts +1 -1
  17. package/dist/commands/write/write.js +2 -2
  18. package/dist/dashboard/guide/ar.md +6 -3
  19. package/dist/dashboard/guide/cs.md +6 -3
  20. package/dist/dashboard/guide/da.md +6 -3
  21. package/dist/dashboard/guide/de.md +6 -3
  22. package/dist/dashboard/guide/el.md +6 -3
  23. package/dist/dashboard/guide/en.md +5 -2
  24. package/dist/dashboard/guide/es.md +6 -3
  25. package/dist/dashboard/guide/fi.md +6 -3
  26. package/dist/dashboard/guide/fr.md +6 -3
  27. package/dist/dashboard/guide/he.md +6 -3
  28. package/dist/dashboard/guide/hi.md +6 -3
  29. package/dist/dashboard/guide/hu.md +7 -4
  30. package/dist/dashboard/guide/is.md +6 -3
  31. package/dist/dashboard/guide/it.md +7 -4
  32. package/dist/dashboard/guide/ja.md +6 -3
  33. package/dist/dashboard/guide/ko.md +7 -4
  34. package/dist/dashboard/guide/nb.md +6 -3
  35. package/dist/dashboard/guide/nl.md +6 -3
  36. package/dist/dashboard/guide/pl.md +6 -3
  37. package/dist/dashboard/guide/pt.md +6 -3
  38. package/dist/dashboard/guide/ro.md +6 -3
  39. package/dist/dashboard/guide/ru.md +6 -3
  40. package/dist/dashboard/guide/sv.md +6 -3
  41. package/dist/dashboard/guide/tr.md +6 -3
  42. package/dist/dashboard/guide/uk.md +6 -3
  43. package/dist/dashboard/guide/zh.md +6 -3
  44. package/dist/dashboard/i18n/ar.json +16 -0
  45. package/dist/dashboard/i18n/cs.json +16 -0
  46. package/dist/dashboard/i18n/da.json +16 -0
  47. package/dist/dashboard/i18n/de.json +16 -0
  48. package/dist/dashboard/i18n/el.json +16 -0
  49. package/dist/dashboard/i18n/es.json +16 -0
  50. package/dist/dashboard/i18n/fi.json +16 -0
  51. package/dist/dashboard/i18n/fr.json +16 -0
  52. package/dist/dashboard/i18n/he.json +16 -0
  53. package/dist/dashboard/i18n/hi.json +16 -0
  54. package/dist/dashboard/i18n/hu.json +16 -0
  55. package/dist/dashboard/i18n/is.json +16 -0
  56. package/dist/dashboard/i18n/it.json +16 -0
  57. package/dist/dashboard/i18n/ja.json +16 -0
  58. package/dist/dashboard/i18n/ko.json +16 -0
  59. package/dist/dashboard/i18n/nb.json +16 -0
  60. package/dist/dashboard/i18n/nl.json +16 -0
  61. package/dist/dashboard/i18n/pl.json +16 -0
  62. package/dist/dashboard/i18n/pt.json +16 -0
  63. package/dist/dashboard/i18n/ro.json +16 -0
  64. package/dist/dashboard/i18n/ru.json +16 -0
  65. package/dist/dashboard/i18n/sv.json +16 -0
  66. package/dist/dashboard/i18n/tr.json +16 -0
  67. package/dist/dashboard/i18n/uk.json +16 -0
  68. package/dist/dashboard/i18n/zh.json +16 -0
  69. package/dist/dashboard/labels.js +6 -0
  70. package/dist/dashboard/setup.js +1 -1
  71. package/dist/dashboard/style.css +16 -6
  72. package/dist/library/books.js +2 -0
  73. package/dist/server/dashboard/writes.js +1 -1
  74. package/instructions/length-a-few-sessions.md +1 -0
  75. package/instructions/length-one-evening.md +1 -0
  76. package/instructions/session-zero.md +1 -1
  77. package/instructions/setup.md +1 -1
  78. package/package.json +1 -1
@@ -10263,15 +10263,20 @@
10263
10263
  border-color: color-mix(in srgb, var(--gold) 60%, var(--rule));
10264
10264
  }
10265
10265
 
10266
- /* Each dot is drawn at 12 pixels in a target of 24; where the player is, a wider pill. */
10266
+ /* Each dot is drawn at 12 pixels in a target of 24; where the player is, a wider pill. The dots wrap as words do, balanced: when one row is too narrow
10267
+ for them, two even rows, never one dot alone. */
10267
10268
  .setup-dots {
10268
- display: flex;
10269
- flex-wrap: wrap;
10270
- justify-content: center;
10271
- gap: 0;
10269
+ justify-self: stretch;
10272
10270
  margin: 0;
10273
10271
  padding: 0;
10274
10272
  list-style: none;
10273
+ text-align: center;
10274
+ text-wrap: balance;
10275
+ }
10276
+
10277
+ .setup-dots > li {
10278
+ display: inline-block;
10279
+ vertical-align: top;
10275
10280
  }
10276
10281
 
10277
10282
  .setup-dots button {
@@ -10328,8 +10333,13 @@
10328
10333
  }
10329
10334
 
10330
10335
  @media (pointer: coarse) {
10336
+ /* Touch targets as large as one row of questions allows, never under 24px; the list spans the column, so the share is of a known width. */
10337
+ .setup-dots > li {
10338
+ width: clamp(24px, calc(100% / var(--count, 12)), 30px);
10339
+ }
10340
+
10331
10341
  .setup-dots button {
10332
- width: 30px;
10342
+ width: 100%;
10333
10343
  height: 30px;
10334
10344
  }
10335
10345
 
@@ -277,6 +277,8 @@ function writeIndex(folder, index) {
277
277
  mkdirSync(dirname(file), { recursive: true });
278
278
  writeFileSync(`${file}.part`, JSON.stringify(index));
279
279
  replaceFile(`${file}.part`, file);
280
+ // Two writes of one size within a tick of the file clock look the same: the index read before is no longer it.
281
+ loaded.delete(file);
280
282
  }
281
283
  const pause = new Int32Array(new SharedArrayBuffer(4));
282
284
  /**
@@ -86,7 +86,7 @@ export async function changeSetting(request, response, served) {
86
86
  const change = parsed.data;
87
87
  const refused = withFiles(served.session, () => {
88
88
  const root = requireCampaign(served.context.folder);
89
- // In the setup, how companions come, the preparation and the name are the player's too (D-370).
89
+ // In the setup, how the character and the companions come, the preparation, the length and the name are the player's too (D-370).
90
90
  const setup = campaignMode(root, campaignWorld(root, served.context)) === "setup";
91
91
  // Where the page shows the extensions' widgets is the page's own: the master hears nothing of it (D-502).
92
92
  if (change.setting.trim() === "widgets" && !("add" in change)) {
@@ -0,0 +1 @@
1
+ The campaign plays a few sessions, about a week of evenings: size each adventure for three to five sessions, its goal clear in the first, a turn halfway, its climax in the last. Give each session one step of the goal, and when the player ends it, close on that step and a hook to the next; keep the threads to what this adventure can close. A written adventure keeps its own size. Once it closes, give an epilogue of what the character changed, then ask the player whether to go on: if so, the next adventure has the same length unless they change it, which you set with config length.
@@ -0,0 +1 @@
1
+ The campaign plays one evening: size each adventure for one session of two or three hours, about five scenes. One place and what lies close to it, three or four people who each want something, the hook in the first scene, a hard choice halfway, and a climax that ends it that night; at most two fights, the bigger one at the climax. Session zero is part of the evening: make the character in a few questions. Cut what does not lead to the end; when the scenes run out, bring the climax. A written adventure keeps its own size. Once it closes, give an epilogue of what the character changed, then ask the player whether to go on: if so, the next adventure has the same length unless they change it, which you set with config length.
@@ -1,3 +1,3 @@
1
1
  ## Session zero
2
2
 
3
- Play, as with a human game master, in the second person, present tense, unless the player asks otherwise. Make the player character with the player, as the system says below, and the companions as the setup agreed: made with the player, or by you, each with its sheet. Every choice about the player character is the player's, unless they ask you to make it. A player character taken from the world's pages, as a book's, keeps their past, bonds and nature: make the sheet from their page, the player confirming each choice, then make them the player character with role pc, and reveal what they knew, their plans too, told as theirs to keep or change; what the story had them do next is no longer written anywhere. Their story is never required: write it in the player's words and read it back to them once; behind the scenes, tie its people, places and bonds to the world where they fit, what the character does not know in secrets. Once the player character is made, ask the player for a picture of them: a file of theirs, given with image and file, or one made from how they describe the character, with image and describe: their people as this world has them, then the look the player gives, or yours if they leave it to you; where the campaign makes pictures.
3
+ Play, as with a human game master, in the second person, present tense, unless the player asks otherwise. Make the player character as the setup agreed in character, and the companions as it agreed in companions: made with the player, or by you, each with its sheet, as the system says below. Made with the player, every choice about the player character is theirs, unless they ask you to make it. Made by you, ask for a few words of what they want, make it all, and read it back once. The player's own, they bring a character they already have, pasted in the chat, as a file on their computer, a photo or a PDF of a sheet too, or as its page: read it whole, write its sheet as the system says, at the level it has, and check it against the rules and this campaign; what does not hold, such as a score, an item or a power the world lacks, tell them and agree the change, never change it silently; what it lacks, as when they bring only a description, make with them, choice by choice. In a game with levels, ask from which level a character made here starts, the first unless the player wants another; the adventures fit the level they play. A player character taken from the world's pages, as a book's, keeps their past, bonds and nature: make the sheet from their page, the player confirming each choice, then make them the player character with role pc, and reveal what they knew, their plans too, told as theirs to keep or change; what the story had them do next is no longer written anywhere. Their story is never required: write it in the player's words and read it back to them once; behind the scenes, tie its people, places and bonds to the world where they fit, what the character does not know in secrets. Once the player character is made, ask the player for a picture of them: a file of theirs, given with image and file, or one made from how they describe the character, with image and describe: their people as this world has them, then the look the player gives, or yours if they leave it to you; where the campaign makes pictures.
@@ -1,3 +1,3 @@
1
1
  ## Setup
2
2
 
3
- Out of the game, without brackets. The game system comes first, in the chat: offer those status names, installed or to install, free always among them, and say that the campaign keeps the one chosen once its first character is made; install it with package install if it is not here, then config system, and ask its version of the rules when it has more than one. If it cannot be installed, give the player both ways its answer names, and free as a third. Then ask the player for what status says is still missing, at most three questions per message, the minimum to start first: give each choice with what its values mean, and offer the usual ones together, so that one answer can settle several. Take the language from how the player writes and save it with config at once, without asking, so the page speaks it too; change it only if they ask for another. "You decide" is an answer: then choose, and say what you chose. Save any other setting with config only once the player has confirmed it. Without a written world, the player chooses its genre, tone and a few elements, and in the same question what they enjoy most in a game, such as fights, mysteries, talk or exploring: all of it is the premise. You build the rest, at the start or as it is needed, as the preparation says, with several factions whose wants clash, so that many stories can start, never one plot.
3
+ Out of the game, without brackets. The game system comes first, in the chat: offer those status names, installed or to install, free always among them, and say that the campaign keeps the one chosen once its first character is made; install it with package install if it is not here, then config system, and ask its version of the rules when it has more than one. If it cannot be installed, give the player both ways its answer names, and free as a third. Then ask the player for what status says is still missing, at most three questions per message, the minimum to start first: give each choice with what its values mean, and offer the usual ones together, so that one answer can settle several. Take the language from how the player writes and save it with config at once, without asking, so the page speaks it too; change it only if they ask for another. "You decide" is an answer: then choose, and say what you chose. Save any other setting with config only once the player has confirmed it. Without a written world, the player chooses its genre, tone and a few elements, and in the same question what they enjoy most in a game, such as fights, mysteries, talk or exploring: all of it is the premise. You build the rest, at the start or as it is needed, as the preparation says, and as big as the length needs: several factions whose wants clash, so that many stories can start, never one plot; for one evening, only what its adventure needs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpg-engine",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "description": "Play a tabletop role-playing game with an AI as your game master: the AI tells the story; RPG Engine remembers the world, rolls the dice and keeps the accounts.",
5
5
  "type": "module",
6
6
  "bin": {