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.
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/last-choices.js +1 -1
- package/dist/campaign/settings.d.ts +19 -5
- package/dist/campaign/settings.js +16 -8
- package/dist/commands/config.d.ts +2 -2
- package/dist/commands/config.js +42 -11
- package/dist/commands/find.d.ts +4 -4
- package/dist/commands/instructions.js +12 -1
- package/dist/commands/mode.js +10 -2
- package/dist/commands/shared/mode.js +6 -2
- package/dist/commands/shared/parts.d.ts +7 -0
- package/dist/commands/shared/parts.js +23 -0
- package/dist/commands/show.d.ts +1 -1
- package/dist/commands/status.js +6 -1
- package/dist/commands/write/write.d.ts +1 -1
- package/dist/commands/write/write.js +2 -2
- package/dist/dashboard/guide/ar.md +6 -3
- package/dist/dashboard/guide/cs.md +6 -3
- package/dist/dashboard/guide/da.md +6 -3
- package/dist/dashboard/guide/de.md +6 -3
- package/dist/dashboard/guide/el.md +6 -3
- package/dist/dashboard/guide/en.md +5 -2
- package/dist/dashboard/guide/es.md +6 -3
- package/dist/dashboard/guide/fi.md +6 -3
- package/dist/dashboard/guide/fr.md +6 -3
- package/dist/dashboard/guide/he.md +6 -3
- package/dist/dashboard/guide/hi.md +6 -3
- package/dist/dashboard/guide/hu.md +7 -4
- package/dist/dashboard/guide/is.md +6 -3
- package/dist/dashboard/guide/it.md +7 -4
- package/dist/dashboard/guide/ja.md +6 -3
- package/dist/dashboard/guide/ko.md +7 -4
- package/dist/dashboard/guide/nb.md +6 -3
- package/dist/dashboard/guide/nl.md +6 -3
- package/dist/dashboard/guide/pl.md +6 -3
- package/dist/dashboard/guide/pt.md +6 -3
- package/dist/dashboard/guide/ro.md +6 -3
- package/dist/dashboard/guide/ru.md +6 -3
- package/dist/dashboard/guide/sv.md +6 -3
- package/dist/dashboard/guide/tr.md +6 -3
- package/dist/dashboard/guide/uk.md +6 -3
- package/dist/dashboard/guide/zh.md +6 -3
- package/dist/dashboard/i18n/ar.json +16 -0
- package/dist/dashboard/i18n/cs.json +16 -0
- package/dist/dashboard/i18n/da.json +16 -0
- package/dist/dashboard/i18n/de.json +16 -0
- package/dist/dashboard/i18n/el.json +16 -0
- package/dist/dashboard/i18n/es.json +16 -0
- package/dist/dashboard/i18n/fi.json +16 -0
- package/dist/dashboard/i18n/fr.json +16 -0
- package/dist/dashboard/i18n/he.json +16 -0
- package/dist/dashboard/i18n/hi.json +16 -0
- package/dist/dashboard/i18n/hu.json +16 -0
- package/dist/dashboard/i18n/is.json +16 -0
- package/dist/dashboard/i18n/it.json +16 -0
- package/dist/dashboard/i18n/ja.json +16 -0
- package/dist/dashboard/i18n/ko.json +16 -0
- package/dist/dashboard/i18n/nb.json +16 -0
- package/dist/dashboard/i18n/nl.json +16 -0
- package/dist/dashboard/i18n/pl.json +16 -0
- package/dist/dashboard/i18n/pt.json +16 -0
- package/dist/dashboard/i18n/ro.json +16 -0
- package/dist/dashboard/i18n/ru.json +16 -0
- package/dist/dashboard/i18n/sv.json +16 -0
- package/dist/dashboard/i18n/tr.json +16 -0
- package/dist/dashboard/i18n/uk.json +16 -0
- package/dist/dashboard/i18n/zh.json +16 -0
- package/dist/dashboard/labels.js +6 -0
- package/dist/dashboard/setup.js +1 -1
- package/dist/dashboard/style.css +16 -6
- package/dist/library/books.js +2 -0
- package/dist/server/dashboard/writes.js +1 -1
- package/instructions/length-a-few-sessions.md +1 -0
- package/instructions/length-one-evening.md +1 -0
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/package.json +1 -1
package/dist/campaign/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign }
|
|
|
4
4
|
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.ts";
|
|
5
5
|
export { lastChoices, rememberChoice, rememberedSettings } from "./last-choices.ts";
|
|
6
6
|
export { type CountedByGame, customLevel, customLevels, customSettings, difficulties, difficultyItems, itemMeaning, leveled, type LeveledSetting, rigorItems, rigors, startingLevels } from "./levels.ts";
|
|
7
|
-
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.ts";
|
|
7
|
+
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.ts";
|
|
8
8
|
export { type CampaignState, changeState, changeStateAt, readState, readStateValues } from "./state.ts";
|
package/dist/campaign/index.js
CHANGED
|
@@ -5,5 +5,5 @@ export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign }
|
|
|
5
5
|
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.js";
|
|
6
6
|
export { lastChoices, rememberChoice, rememberedSettings } from "./last-choices.js";
|
|
7
7
|
export { customLevel, customLevels, customSettings, difficulties, difficultyItems, itemMeaning, leveled, rigorItems, rigors, startingLevels } from "./levels.js";
|
|
8
|
-
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.js";
|
|
8
|
+
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.js";
|
|
9
9
|
export { changeState, changeStateAt, readState, readStateValues } from "./state.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
/** The settings whose last choice a new campaign's setup suggests: how the player likes to play, never what belongs to one game, as how well they know it. */
|
|
5
|
-
export const rememberedSettings = ["difficulty", "lethality", "saves", "rigor", "dice", "master-rolls", "units", "companions", "preparation"];
|
|
5
|
+
export const rememberedSettings = ["difficulty", "lethality", "saves", "rigor", "dice", "master-rolls", "units", "companions", "preparation", "length"];
|
|
6
6
|
const fileName = "last-choices.json";
|
|
7
7
|
/** The last choice of each remembered setting, from the player's folder on this computer; none when there is no folder or the file does not read. */
|
|
8
8
|
export function lastChoices(home) {
|
|
@@ -62,9 +62,9 @@ export declare function checkSettings(root: string): Problem[];
|
|
|
62
62
|
export declare function missingSettings(settings: CampaignSettings): SettingName[];
|
|
63
63
|
/**
|
|
64
64
|
* The settings the setup still has to ask, in order (MOD-3): those every campaign needs, how the companions come, the lines and veils until answered, even
|
|
65
|
-
* with none, and, for a campaign without a written world, its premise and
|
|
65
|
+
* with none, how the character comes until one exists, and, for a campaign without a written world, its premise, preparation and length.
|
|
66
66
|
*/
|
|
67
|
-
export declare function unansweredSettings(settings: CampaignSettings, writtenWorld: boolean): SettingName[];
|
|
67
|
+
export declare function unansweredSettings(settings: CampaignSettings, writtenWorld: boolean, characterMade?: boolean): SettingName[];
|
|
68
68
|
export declare function checkSettingName(name: string): SettingName;
|
|
69
69
|
/** How much the master teaches the game, out of the story (D-347): the story alone, a hint now and then, or each rule as it first comes up. */
|
|
70
70
|
export declare const mentorWays: readonly ["off", "hints", "tutorial"];
|
|
@@ -86,6 +86,10 @@ export declare const efforts: readonly ["low", "medium", "high"];
|
|
|
86
86
|
export declare const companionWays: readonly ["none", "made with the player", "made by the master", "met in play"];
|
|
87
87
|
/** How far ahead a world without a written campaign is made (D-80): as it is needed, or all at the start. */
|
|
88
88
|
export declare const preparations: readonly ["on the fly", "all at the start"];
|
|
89
|
+
/** How long a campaign without a written world plays (D-558): one evening, a few sessions, or open, its adventures one after another. */
|
|
90
|
+
export declare const lengths: readonly ["one evening", "a few sessions", "open"];
|
|
91
|
+
/** How the player character comes (D-557): made with the player, made by the master, or the player's own, a character they already have. */
|
|
92
|
+
export declare const characterWays: readonly ["made with the player", "made by the master", "the player's own"];
|
|
89
93
|
/** How the master writes (D-395): plain, the core's own, literary, pulp or wry; the tone stays in the premise, and an author takes its place. */
|
|
90
94
|
export declare const proseWays: readonly ["plain", "literary", "pulp", "wry"];
|
|
91
95
|
/** How the master builds what they invent (D-395): situations, the core's own, arcs, episodes or a mystery; a written adventure keeps its own. */
|
|
@@ -112,6 +116,11 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
112
116
|
"on the fly": "on the fly";
|
|
113
117
|
"all at the start": "all at the start";
|
|
114
118
|
}>>;
|
|
119
|
+
length: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
"one evening": "one evening";
|
|
121
|
+
"a few sessions": "a few sessions";
|
|
122
|
+
open: "open";
|
|
123
|
+
}>>;
|
|
115
124
|
prose: z.ZodOptional<z.ZodEnum<{
|
|
116
125
|
plain: "plain";
|
|
117
126
|
literary: "literary";
|
|
@@ -195,10 +204,15 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
195
204
|
important: "important";
|
|
196
205
|
always: "always";
|
|
197
206
|
}>>;
|
|
207
|
+
character: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
"made with the player": "made with the player";
|
|
209
|
+
"made by the master": "made by the master";
|
|
210
|
+
"the player's own": "the player's own";
|
|
211
|
+
}>>;
|
|
198
212
|
companions: z.ZodOptional<z.ZodEnum<{
|
|
199
|
-
none: "none";
|
|
200
213
|
"made with the player": "made with the player";
|
|
201
214
|
"made by the master": "made by the master";
|
|
215
|
+
none: "none";
|
|
202
216
|
"met in play": "met in play";
|
|
203
217
|
}>>;
|
|
204
218
|
"calendar-start": z.ZodOptional<z.ZodString>;
|
|
@@ -241,7 +255,7 @@ export declare const mapSettingNames: SettingName[];
|
|
|
241
255
|
/** The settings that hold entries by name: what the campaign adds to its game system, where the dashboard shows the extensions' widgets (D-502), and the items of a custom difficulty or rigor (T-132). */
|
|
242
256
|
export declare const entrySettingNames: SettingName[];
|
|
243
257
|
/**
|
|
244
|
-
* What only the setup asks (D-241, MOD-3, D-347, D-287): how much the master teaches the game, whether the master's rolls are shown, how the
|
|
245
|
-
* when the story starts, and the lines and veils, which "none" answers too.
|
|
258
|
+
* What only the setup asks (D-241, MOD-3, D-347, D-287, D-557): how much the master teaches the game, whether the master's rolls are shown, how the player
|
|
259
|
+
* character and the companions come, when the story starts, and the lines and veils, which "none" answers too.
|
|
246
260
|
*/
|
|
247
261
|
export declare const setupSettingNames: SettingName[];
|
|
@@ -241,10 +241,10 @@ export function missingSettings(settings) {
|
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
243
|
* The settings the setup still has to ask, in order (MOD-3): those every campaign needs, how the companions come, the lines and veils until answered, even
|
|
244
|
-
* with none, and, for a campaign without a written world, its premise and
|
|
244
|
+
* with none, how the character comes until one exists, and, for a campaign without a written world, its premise, preparation and length.
|
|
245
245
|
*/
|
|
246
|
-
export function unansweredSettings(settings, writtenWorld) {
|
|
247
|
-
const asked = [...setupSettingNames, ...(writtenWorld ? [] : premiseSettingNames)];
|
|
246
|
+
export function unansweredSettings(settings, writtenWorld, characterMade = false) {
|
|
247
|
+
const asked = [...setupSettingNames.filter((name) => !characterMade || name !== "character"), ...(writtenWorld ? [] : premiseSettingNames)];
|
|
248
248
|
return settingNames.filter((name) => missingSettings(settings).includes(name) || (asked.includes(name) && (settings[name] === undefined || settings[name] === null)));
|
|
249
249
|
}
|
|
250
250
|
export function checkSettingName(name) {
|
|
@@ -280,6 +280,10 @@ export const efforts = ["low", "medium", "high"];
|
|
|
280
280
|
export const companionWays = ["none", "made with the player", "made by the master", "met in play"];
|
|
281
281
|
/** How far ahead a world without a written campaign is made (D-80): as it is needed, or all at the start. */
|
|
282
282
|
export const preparations = ["on the fly", "all at the start"];
|
|
283
|
+
/** How long a campaign without a written world plays (D-558): one evening, a few sessions, or open, its adventures one after another. */
|
|
284
|
+
export const lengths = ["one evening", "a few sessions", "open"];
|
|
285
|
+
/** How the player character comes (D-557): made with the player, made by the master, or the player's own, a character they already have. */
|
|
286
|
+
export const characterWays = ["made with the player", "made by the master", "the player's own"];
|
|
283
287
|
/** How the master writes (D-395): plain, the core's own, literary, pulp or wry; the tone stays in the premise, and an author takes its place. */
|
|
284
288
|
export const proseWays = ["plain", "literary", "pulp", "wry"];
|
|
285
289
|
/** How the master builds what they invent (D-395): situations, the core's own, arcs, episodes or a mystery; a written adventure keeps its own. */
|
|
@@ -299,6 +303,8 @@ export const closedSettings = {
|
|
|
299
303
|
effort: efforts,
|
|
300
304
|
companions: companionWays,
|
|
301
305
|
preparation: preparations,
|
|
306
|
+
length: lengths,
|
|
307
|
+
character: characterWays,
|
|
302
308
|
prose: proseWays,
|
|
303
309
|
story: storyWays,
|
|
304
310
|
};
|
|
@@ -335,6 +341,7 @@ export const settingsSchema = z.object({
|
|
|
335
341
|
mentor: z.enum(mentorWays).optional().describe("how much the master teaches the game, out of the story: off, hints or tutorial; asked as how well the player knows the game: never played (tutorial), a little (hints), well (off)"),
|
|
336
342
|
premise: z.string().min(1).optional().describe("without a written campaign: the genre, the tone, a few elements of the world and what the player enjoys most in a game, such as fights, mysteries, talk or exploring, in the player's words"),
|
|
337
343
|
preparation: z.enum(preparations).optional().describe("without a written campaign: on the fly (the master makes the world just before it is needed) or all at the start"),
|
|
344
|
+
length: z.enum(lengths).optional().describe("without a written campaign: how long it plays, one evening, a few sessions or open; the master sizes each adventure to it, and at its end asks whether to go on"),
|
|
338
345
|
prose: z.enum(proseWays).optional().describe("how the master writes, as the player chose it: plain, literary, pulp or wry; the tone stays in the premise; an author takes its place"),
|
|
339
346
|
story: z.enum(storyWays).optional().describe("how the master builds what they invent: situations, arcs, episodes or mystery; a written adventure keeps its own"),
|
|
340
347
|
author: oneLine(styleTextLengths.author).optional().describe("an author the master writes like, as the player named them: their way, never their sentences, names or places"),
|
|
@@ -354,6 +361,7 @@ export const settingsSchema = z.object({
|
|
|
354
361
|
voices: z.enum(voiceWays).optional().describe("who voices the characters, where the AI app has subagents, from the master to the characters: master (the master, always), auto (at key moments, as the master chooses, "
|
|
355
362
|
+ "a character answers as a subagent of its own, knowing only what it knows), important (always a subagent for the companions and the characters with kind main), "
|
|
356
363
|
+ "always (always a subagent, for everyone); unset, auto"),
|
|
364
|
+
character: z.enum(characterWays).optional().describe("how the player character comes in session zero: made with the player, made by the master from a few words of theirs, or the player's own, a character they bring, at the level it has"),
|
|
357
365
|
companions: z.enum(companionWays).optional().describe("how the companions come: none, made with the player or made by the master in session zero, or met in play"),
|
|
358
366
|
// Checked by the time module against the calendar (TIM-8).
|
|
359
367
|
"calendar-start": z.string().min(1).optional().describe("when the story starts: day 1 to count only the days, or the day of the world's calendar that is day 1, such as 14 April 1491"),
|
|
@@ -397,12 +405,12 @@ export const mapSettingNames = ["fields", "tables", "computed", "counters", "rec
|
|
|
397
405
|
/** The settings that hold entries by name: what the campaign adds to its game system, where the dashboard shows the extensions' widgets (D-502), and the items of a custom difficulty or rigor (T-132). */
|
|
398
406
|
export const entrySettingNames = [...mapSettingNames, "widgets", "custom-difficulty", "custom-rigor"];
|
|
399
407
|
/**
|
|
400
|
-
* What only the setup asks (D-241, MOD-3, D-347, D-287): how much the master teaches the game, whether the master's rolls are shown, how the
|
|
401
|
-
* when the story starts, and the lines and veils, which "none" answers too.
|
|
408
|
+
* What only the setup asks (D-241, MOD-3, D-347, D-287, D-557): how much the master teaches the game, whether the master's rolls are shown, how the player
|
|
409
|
+
* character and the companions come, when the story starts, and the lines and veils, which "none" answers too.
|
|
402
410
|
*/
|
|
403
|
-
export const setupSettingNames = ["mentor", "master-rolls", "companions", "calendar-start", "lines", "veils"];
|
|
404
|
-
/** What the setup asks only of a campaign without a written world (D-79, D-80, MOD-3). */
|
|
405
|
-
const premiseSettingNames = ["premise", "preparation"];
|
|
411
|
+
export const setupSettingNames = ["mentor", "master-rolls", "character", "companions", "calendar-start", "lines", "veils"];
|
|
412
|
+
/** What the setup asks only of a campaign without a written world (D-79, D-80, D-558, MOD-3). */
|
|
413
|
+
const premiseSettingNames = ["premise", "preparation", "length"];
|
|
406
414
|
// Settings that only some games have, or that only the setup asks: never asked for in play when missing.
|
|
407
415
|
// The pictures: status asks for them once, only where they can be made (D-308).
|
|
408
416
|
// How the master writes: the core's own until the player chooses (D-395).
|
|
@@ -46,10 +46,10 @@ export interface PlayerSetting {
|
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* The setup's questions as the dashboard asks them (D-370), each with its value or items, if answered, and its values with what each means: the player's
|
|
49
|
-
* settings of the setup, how companions come, the preparation of a world not written, those the game system adds, then the lines and veils.
|
|
49
|
+
* settings of the setup, how the character and the companions come, the preparation and length of a world not written, those the game system adds, then the lines and veils.
|
|
50
50
|
*/
|
|
51
51
|
export declare function setupQuestions(root: string, context: Context, writtenWorld: boolean): PlayerSetting[];
|
|
52
|
-
/** A setting only the setup lets the dashboard change (D-370): how companions come, the preparation, the name; undefined for any other. */
|
|
52
|
+
/** A setting only the setup lets the dashboard change (D-370): how the character and the companions come, the preparation, the length, the name; undefined for any other. */
|
|
53
53
|
export declare function setupSettingNamed(root: string, name: string): PlayerSetting | undefined;
|
|
54
54
|
/** The player's settings as the dashboard shows them (D-341): with what this computer lacks, as pictures without Codex, asked again. */
|
|
55
55
|
export declare function shownPlayerSettings(root: string, context: Context): PlayerSetting[];
|
package/dist/commands/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { parse, stringify } from "yaml";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, checkSettingName, clearSetting, companionWays, customLevel, customLevels, customSettings, diceWays, difficulties, efforts, entrySettingNames, itemMeaning, lastChoices, lethalities, leveled, listSettingNames, mapSettingNames, masterRollWays, mentorWays, pictureWays, preparations, proseWays, readCampaignData, readOneSetting, readSettings, readTextSetting, refreshHostFiles, rememberChoice, requireCampaign, rigors, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, startingLevels, storyWays, styleTextLengths, unitSystems, voiceWays, writeEffortFiles, } from "../campaign/index.js";
|
|
4
|
+
import { changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, clearSetting, companionWays, customLevel, customLevels, customSettings, diceWays, difficulties, efforts, entrySettingNames, itemMeaning, lastChoices, lengths, lethalities, leveled, listSettingNames, mapSettingNames, masterRollWays, mentorWays, pictureWays, preparations, proseWays, readCampaignData, readOneSetting, readSettings, readTextSetting, refreshHostFiles, rememberChoice, requireCampaign, rigors, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, startingLevels, storyWays, styleTextLengths, unitSystems, voiceWays, writeEffortFiles, } from "../campaign/index.js";
|
|
5
5
|
import { engineSystemsFolder } from "../core/context.js";
|
|
6
6
|
import { appendLogEntry } from "../core/log.js";
|
|
7
7
|
import { defineCommand } from "../core/registry.js";
|
|
@@ -21,7 +21,7 @@ import { campaignCoins, coinsShown } from "./shared/money.js";
|
|
|
21
21
|
import { askedBy, heldSystemSettings, isFixedSetting, isLeading, offeredValues, offerRefusal, playedEngineSetting, unofferedLines, valuePart } from "./shared/offers.js";
|
|
22
22
|
import { loadNewSystemCode } from "./shared/packages/code.js";
|
|
23
23
|
import { checkWidgetSpots } from "./shared/packages/widgets.js";
|
|
24
|
-
import { mentorPart, stylePart } from "./shared/parts.js";
|
|
24
|
+
import { lengthPart, mentorPart, stylePart } from "./shared/parts.js";
|
|
25
25
|
import { readOpenScene } from "./shared/scene.js";
|
|
26
26
|
import { campaignCalendar, newDatedLogEntry } from "./shared/time.js";
|
|
27
27
|
import { campaignSystem, campaignWorld, countedByGame, installedSystemName, playedRules, playedSettingValue, playersOfTheGame, systemLayers, systemSetting, valuesText } from "./shared/world.js";
|
|
@@ -77,7 +77,7 @@ export const config = defineCommand({
|
|
|
77
77
|
});
|
|
78
78
|
/**
|
|
79
79
|
* The setup's questions as the dashboard asks them (D-370), each with its value or items, if answered, and its values with what each means: the player's
|
|
80
|
-
* settings of the setup, how companions come, the preparation of a world not written, those the game system adds, then the lines and veils.
|
|
80
|
+
* settings of the setup, how the character and the companions come, the preparation and length of a world not written, those the game system adds, then the lines and veils.
|
|
81
81
|
*/
|
|
82
82
|
export function setupQuestions(root, context, writtenWorld) {
|
|
83
83
|
const own = playerSettings(root, context);
|
|
@@ -96,7 +96,7 @@ export function setupQuestions(root, context, writtenWorld) {
|
|
|
96
96
|
const suggested = { ...suggestedValues, ...(difficulty === undefined ? {} : { lethality: suggestedLethality[difficulty] ?? "dice" }), ...systemSuggests, ...last };
|
|
97
97
|
// The system's settings others depend on right after the mentor, before what they change (DAT-16, DAT-17).
|
|
98
98
|
const leading = held.filter(isLeading).map((setting) => setting.name);
|
|
99
|
-
const order = setupOrder.filter((name) =>
|
|
99
|
+
const order = setupOrder.filter((name) => !writtenWorld || !worldSettingNames.includes(name));
|
|
100
100
|
const others = system.filter((name) => !leading.includes(name));
|
|
101
101
|
return [...order.slice(0, 1), ...leading, ...order.slice(1), ...others, "lines", "veils"].flatMap(named).map((question) => {
|
|
102
102
|
const suggestion = suggested[question.name];
|
|
@@ -107,7 +107,7 @@ export function setupQuestions(root, context, writtenWorld) {
|
|
|
107
107
|
return { ...(question.name === "mentor" ? mentorQuestion(asked) : unsetUnanswered(asked, settings)), ...(offered ? { suggested: suggestion } : {}), ...lastOne };
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
/** A setting only the setup lets the dashboard change (D-370): how companions come, the preparation, the name; undefined for any other. */
|
|
110
|
+
/** A setting only the setup lets the dashboard change (D-370): how the character and the companions come, the preparation, the length, the name; undefined for any other. */
|
|
111
111
|
export function setupSettingNamed(root, name) {
|
|
112
112
|
const key = Object.keys(setupWords).find((one) => comparableText(one) === comparableText(name));
|
|
113
113
|
if (key === undefined) {
|
|
@@ -119,7 +119,13 @@ export function setupSettingNamed(root, name) {
|
|
|
119
119
|
name: key,
|
|
120
120
|
about: words.about,
|
|
121
121
|
...(typeof value === "string" ? { value } : {}),
|
|
122
|
-
...(words.values === undefined ? {} : {
|
|
122
|
+
...(words.values === undefined ? {} : {
|
|
123
|
+
choices: words.values.map((one) => ({
|
|
124
|
+
value: one,
|
|
125
|
+
...(words.means?.[one] === undefined ? {} : { means: words.means[one] }),
|
|
126
|
+
...(words.labels?.[one] === undefined ? {} : { label: words.labels[one] }),
|
|
127
|
+
})),
|
|
128
|
+
}),
|
|
123
129
|
};
|
|
124
130
|
}
|
|
125
131
|
/** The player's settings as the dashboard shows them (D-341): with what this computer lacks, as pictures without Codex, asked again. */
|
|
@@ -354,11 +360,14 @@ function configure(input, context) {
|
|
|
354
360
|
const changed = input.value !== undefined && context.actor !== "player" ? input.setting?.trim() : undefined;
|
|
355
361
|
// And of how the master writes, the parts as they are now (D-395).
|
|
356
362
|
const style = styleSettingNames.includes(changed ?? "") ? stylePart(root, context) : "";
|
|
363
|
+
// And of the length, past the setup, how to size the adventures now (D-558); entering play gives it otherwise.
|
|
364
|
+
const sized = changed === "length" && campaignMode(root, campaignWorld(root, context)) !== "setup";
|
|
365
|
+
const length = !sized ? "" : settings.length === "open" ? "The campaign is open now: the adventures take the size the story asks, one after another." : lengthPart(root, context);
|
|
357
366
|
// An author or the player's words taken away: what holds now, as the dashboard's news says it.
|
|
358
367
|
const cleared = changed !== undefined && input.value?.trim().toLowerCase() === "none" ? wordsOf(changed)?.cleared : undefined;
|
|
359
368
|
const part = changed === "mentor"
|
|
360
369
|
? mentorPart(root, context, settings.mentor)
|
|
361
|
-
: [cleared === undefined ? "" : `${cleared.charAt(0).toUpperCase()}${cleared.slice(1)}.`, style].filter((text) => text !== "").join("\n\n");
|
|
370
|
+
: [cleared === undefined ? "" : `${cleared.charAt(0).toUpperCase()}${cleared.slice(1)}.`, style, length].filter((text) => text !== "").join("\n\n");
|
|
362
371
|
return {
|
|
363
372
|
settings: {
|
|
364
373
|
...Object.fromEntries(listed.map((name) => [name, offeredShown(root, context, name, shownValue(root, context, settings, name))])),
|
|
@@ -522,7 +531,8 @@ const playerWords = {
|
|
|
522
531
|
veils: { about: "what happens only off screen, without details" },
|
|
523
532
|
language: { about: "the language the master plays in, and the page's too when it is translated" },
|
|
524
533
|
};
|
|
525
|
-
// What the setup asks besides the player's settings (D-370): how the companions come, how far ahead a world is made
|
|
534
|
+
// What the setup asks besides the player's settings (D-370): how the player character and the companions come, how far ahead a world is made and how long it
|
|
535
|
+
// plays, the campaign's name.
|
|
526
536
|
const setupWords = {
|
|
527
537
|
companions: {
|
|
528
538
|
about: "how companions come to your side",
|
|
@@ -539,15 +549,36 @@ const setupWords = {
|
|
|
539
549
|
values: preparations,
|
|
540
550
|
means: { "on the fly": "just before it is needed, so the story can go anywhere", "all at the start": "all of it before the first scene" },
|
|
541
551
|
},
|
|
552
|
+
length: {
|
|
553
|
+
about: "how long the story you play lasts; at its end you can always go on",
|
|
554
|
+
values: lengths,
|
|
555
|
+
means: {
|
|
556
|
+
"one evening": "one adventure that begins and ends in an evening",
|
|
557
|
+
"a few sessions": "an adventure of three to five evenings",
|
|
558
|
+
open: "a campaign with no set end, one adventure after another",
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
character: {
|
|
562
|
+
about: "how your character is made in session zero",
|
|
563
|
+
values: characterWays,
|
|
564
|
+
means: {
|
|
565
|
+
"made with the player": "you make it with the master, choice by choice",
|
|
566
|
+
"made by the master": "the master makes it from a few words of yours",
|
|
567
|
+
"the player's own": "you bring one you already have, as a sheet, a file or a description, at its level",
|
|
568
|
+
},
|
|
569
|
+
labels: { "made with the player": "With the master", "made by the master": "The master makes it", "the player's own": "I already have one" },
|
|
570
|
+
},
|
|
542
571
|
name: { about: "the campaign's name" },
|
|
543
572
|
};
|
|
544
573
|
// The setup's questions, in the order the player meets them on the dashboard: how well they know the game, how it plays, how it is rolled, who comes along,
|
|
545
|
-
// then the limits.
|
|
546
|
-
const setupOrder = ["mentor", "difficulty", "lethality", "saves", "rigor", "dice", "master-rolls", "units", "companions", "preparation"];
|
|
574
|
+
// the world and how long it plays, then the limits.
|
|
575
|
+
const setupOrder = ["mentor", "difficulty", "lethality", "saves", "rigor", "dice", "master-rolls", "units", "character", "companions", "preparation", "length"];
|
|
547
576
|
// The mentor as the setup asks it (D-347): how well the player knows the game, each answer a way of the mentor, from the newest player's.
|
|
548
577
|
const mentorAnswers = { tutorial: "never played it", hints: "a little", off: "I know it" };
|
|
578
|
+
// What the setup asks only of a world not written (D-80, D-558): a written one has its own.
|
|
579
|
+
const worldSettingNames = ["preparation", "length"];
|
|
549
580
|
// The values the game suggests in the setup, as the design has them by default (D-370): never chosen for the player.
|
|
550
|
-
const suggestedValues = { saves: "checkpoint", rigor: "smooth", "master-rolls": "behind the screen", preparation: "on the fly" };
|
|
581
|
+
const suggestedValues = { saves: "checkpoint", rigor: "smooth", "master-rolls": "behind the screen", character: "made with the player", preparation: "on the fly", length: "one evening" };
|
|
551
582
|
// The lethality the difficulty suggests (D-141).
|
|
552
583
|
const suggestedLethality = { story: "narrative", easy: "epic" };
|
|
553
584
|
/** A question whose value is only the one shown while it is unset, as master-rolls behind the screen (D-287): still unanswered in the setup. */
|
package/dist/commands/find.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const find: import("../core/registry.ts").Command<z.ZodObject<{
|
|
3
3
|
text: z.ZodOptional<z.ZodString>;
|
|
4
4
|
type: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
character: "character";
|
|
5
6
|
place: "place";
|
|
6
7
|
quest: "quest";
|
|
7
8
|
creature: "creature";
|
|
8
9
|
item: "item";
|
|
9
|
-
character: "character";
|
|
10
10
|
faction: "faction";
|
|
11
11
|
event: "event";
|
|
12
12
|
topic: "topic";
|
|
@@ -19,16 +19,16 @@ export declare const find: import("../core/registry.ts").Command<z.ZodObject<{
|
|
|
19
19
|
systemMatches: {
|
|
20
20
|
page: string;
|
|
21
21
|
title: string | undefined;
|
|
22
|
-
type: "
|
|
22
|
+
type: "character" | "place" | "quest" | "creature" | "item" | "faction" | "event" | "topic" | undefined;
|
|
23
23
|
excerpt: string | undefined;
|
|
24
24
|
}[];
|
|
25
25
|
systemMore: number;
|
|
26
26
|
systemMoreByName: number;
|
|
27
27
|
withText: boolean;
|
|
28
|
-
type: "
|
|
28
|
+
type: "character" | "place" | "quest" | "creature" | "item" | "faction" | "event" | "topic" | undefined;
|
|
29
29
|
matches: {
|
|
30
30
|
page: string;
|
|
31
|
-
type: "
|
|
31
|
+
type: "character" | "place" | "quest" | "creature" | "item" | "faction" | "event" | "topic" | undefined;
|
|
32
32
|
path: string;
|
|
33
33
|
excerpt: string | undefined;
|
|
34
34
|
}[];
|
|
@@ -4,7 +4,7 @@ import { defineCommand } from "../core/registry.js";
|
|
|
4
4
|
import { buttonsInstructions, dashboardInstructions, masterInstructions } from "../instructions/index.js";
|
|
5
5
|
import { campaignMode, modePart } from "./shared/mode.js";
|
|
6
6
|
import { valueParts } from "./shared/offers.js";
|
|
7
|
-
import { mentorPart, partText, partyPart, situationPart, stylePart } from "./shared/parts.js";
|
|
7
|
+
import { lengthPart, mentorPart, partText, partyPart, situationPart, stylePart } from "./shared/parts.js";
|
|
8
8
|
import { readOpenScene } from "./shared/scene.js";
|
|
9
9
|
import { voicesPart } from "./shared/voices.js";
|
|
10
10
|
import { campaignSystem, campaignWorld } from "./shared/world.js";
|
|
@@ -36,6 +36,7 @@ export const instructions = defineCommand({
|
|
|
36
36
|
partyText(context.folder, context),
|
|
37
37
|
mentorText(context.folder, context),
|
|
38
38
|
styleText(context.folder, context),
|
|
39
|
+
lengthText(context.folder, context),
|
|
39
40
|
sceneText(context.folder, context),
|
|
40
41
|
buttons ? buttonsInstructions(physicalDice(context.folder)) : "",
|
|
41
42
|
// The dashboard, where the MCP server serves one, so that the master can tell the player how to use it (D-404).
|
|
@@ -114,6 +115,16 @@ function styleText(folder, context) {
|
|
|
114
115
|
return "";
|
|
115
116
|
}
|
|
116
117
|
}
|
|
118
|
+
/** How long the campaign plays (D-558), past the setup; none when open, unchosen, or outside a campaign. */
|
|
119
|
+
function lengthText(folder, context) {
|
|
120
|
+
const root = findCampaign(folder);
|
|
121
|
+
try {
|
|
122
|
+
return root === undefined || campaignMode(root, campaignWorld(root, context)) === "setup" ? "" : lengthPart(root, context);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return "";
|
|
126
|
+
}
|
|
127
|
+
}
|
|
117
128
|
/** Whether the player rolls their own dice (ASK-8): then the buttons are for choices alone. */
|
|
118
129
|
function physicalDice(folder) {
|
|
119
130
|
const root = findCampaign(folder);
|
package/dist/commands/mode.js
CHANGED
|
@@ -4,7 +4,7 @@ import { appendLogEntry } from "../core/log.js";
|
|
|
4
4
|
import { defineCommand } from "../core/registry.js";
|
|
5
5
|
import { blockingMode, campaignMode, missingText, modePart, modes } from "./shared/mode.js";
|
|
6
6
|
import { valueParts } from "./shared/offers.js";
|
|
7
|
-
import { adventurePart, situationPart } from "./shared/parts.js";
|
|
7
|
+
import { adventurePart, lengthPart, situationPart } from "./shared/parts.js";
|
|
8
8
|
import { adventureUnderWay } from "./shared/quests.js";
|
|
9
9
|
import { campaignSaves, makeSave, savesWhy, saveText } from "./shared/saves.js";
|
|
10
10
|
import { newDatedLogEntry, readPresent } from "./shared/time.js";
|
|
@@ -45,7 +45,15 @@ export const mode = defineCommand({
|
|
|
45
45
|
changed: true,
|
|
46
46
|
dateless: readPresent(root).date === undefined,
|
|
47
47
|
// Play's part with Voices, as instructions gives it, for a campaign that reaches play in the chat that made it (playtest 01).
|
|
48
|
-
part: [
|
|
48
|
+
part: [
|
|
49
|
+
modePart(input.to, system) ?? "",
|
|
50
|
+
input.to === "play" ? valueParts(root, context) : "",
|
|
51
|
+
input.to === "play" ? voicesPart(root, context) : "",
|
|
52
|
+
session,
|
|
53
|
+
adventure,
|
|
54
|
+
// How long the campaign plays, for the adventure built now (D-558).
|
|
55
|
+
input.to === "play" ? lengthPart(root, context, true) : "",
|
|
56
|
+
]
|
|
49
57
|
.filter((part) => part !== "")
|
|
50
58
|
.join("\n\n"),
|
|
51
59
|
...(start === undefined ? {} : { start }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The mode of the campaign, the main state of the game (D-77): setup, session zero or play, each opened by the checklist of the one before (D-221, D-241; MOD-1–MOD-7).
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import { companionWays, diceWays, difficulties, lastChoices, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "../../campaign/index.js";
|
|
3
|
+
import { characterWays, companionWays, diceWays, difficulties, lastChoices, lengths, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "../../campaign/index.js";
|
|
4
4
|
import { readLog } from "../../core/log.js";
|
|
5
5
|
import { comparableText } from "../../core/text.js";
|
|
6
6
|
import { isInParty, playerCharacters } from "../../pages/index.js";
|
|
@@ -17,6 +17,7 @@ const settingLabels = {
|
|
|
17
17
|
mentor: "mentor (ask how well the player knows the game: never played, tutorial; a little, hints; well, off)",
|
|
18
18
|
premise: "premise (the genre, the tone, a few elements of the world and what the player enjoys most in a game, such as fights, mysteries, talk or exploring, in the player's words)",
|
|
19
19
|
preparation: "preparation (on the fly: the world made just before it is needed; all at the start)",
|
|
20
|
+
length: "length (how long it plays: one evening; a few sessions; open, one adventure after another)",
|
|
20
21
|
difficulty: `difficulty (how hard the world plays: ${difficulties.join(", ")})`,
|
|
21
22
|
lethality: "lethality (what a fall means: narrative, the character never dies; epic, only when it matters; dice, the dice decide)",
|
|
22
23
|
saves: "saves (when the game may go back: permadeath, never but to the start; checkpoint, to the last end of a scene once the player character dies; free, to any save)",
|
|
@@ -24,6 +25,7 @@ const settingLabels = {
|
|
|
24
25
|
dice: "dice (who rolls the player character's dice: digital, rpg; physical, the player, who tells you the values)",
|
|
25
26
|
"master-rolls": `master-rolls (your rolls for foes and NPCs: ${masterRollWays.join(", ")}; suggest behind the screen)`,
|
|
26
27
|
units: `units (${unitSystems.join(", ")})`,
|
|
28
|
+
character: "character (made with the player; made by the master, from a few words; the player's own, one they bring)",
|
|
27
29
|
companions: `companions (${companionWays.join(", ")})`,
|
|
28
30
|
"calendar-start": "calendar-start (when the story starts: day 1 to count only the days, or a day of the world, such as 14 April 1491)",
|
|
29
31
|
lines: 'lines ("none" is an answer)',
|
|
@@ -32,6 +34,8 @@ const settingLabels = {
|
|
|
32
34
|
// The same settings by their values alone, as config's results give them in the setup: status gives their meanings (T-168).
|
|
33
35
|
const valueLabels = {
|
|
34
36
|
preparation: `preparation (${preparations.join(", ")})`,
|
|
37
|
+
length: `length (${lengths.join(", ")})`,
|
|
38
|
+
character: `character (${characterWays.join(", ")})`,
|
|
35
39
|
difficulty: `difficulty (${difficulties.join(", ")})`,
|
|
36
40
|
lethality: `lethality (${lethalities.join(", ")})`,
|
|
37
41
|
saves: `saves (${saveModes.join(", ")})`,
|
|
@@ -126,7 +130,7 @@ function writtenMode(root) {
|
|
|
126
130
|
}
|
|
127
131
|
/** What the setup still has to agree with the player, each setting with the values it takes, the system's own too (MOD-3). */
|
|
128
132
|
function setupMissing(root, context, world, brief) {
|
|
129
|
-
const unanswered = unansweredSettings(readSettings(root), world.pages.length > 0);
|
|
133
|
+
const unanswered = unansweredSettings(readSettings(root), world.pages.length > 0, playerCharacters(world).length > 0);
|
|
130
134
|
const label = (name) => (brief ? valueLabels[name] : undefined) ?? settingLabels[name];
|
|
131
135
|
// The player's choice in their last campaign, which the setup offers first (T-134), when the game offers it.
|
|
132
136
|
const last = lastChoices(context.home);
|
|
@@ -16,6 +16,13 @@ export declare function partyPart(context: Context, system: GameSystem | undefin
|
|
|
16
16
|
* mechanics already explained.
|
|
17
17
|
*/
|
|
18
18
|
export declare function mentorPart(root: string, context: Context, mentor: string | undefined): string;
|
|
19
|
+
/** What to do when the last quest ends (D-530 (8)): build the next adventure; with a length that has an end, first its epilogue and the player's word (D-558). */
|
|
20
|
+
export declare function nextAdventureLead(root: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* How long the campaign plays, when it has an end (D-558): how to size its adventures and close them; none for an open one or one not chosen. With once, not
|
|
23
|
+
* again in a chat that already has it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function lengthPart(root: string, context: Context, once?: boolean): string;
|
|
19
26
|
/**
|
|
20
27
|
* How the master writes, as the player chose it (D-395): the author's part in place of the prose's, the story's, and the player's own words, each with what
|
|
21
28
|
* was written in it; none for the core's own ways. Every time it is asked, as a change of them must reach the chat.
|
|
@@ -45,6 +45,29 @@ export function mentorPart(root, context, mentor) {
|
|
|
45
45
|
const learned = mentor === "tutorial" ? (readSettings(root).learned ?? []) : [];
|
|
46
46
|
return part === "" || learned.length === 0 ? part : `${part}\n\nAlready explained: ${learned.join(", ")}.`;
|
|
47
47
|
}
|
|
48
|
+
/** What to do when the last quest ends (D-530 (8)): build the next adventure; with a length that has an end, first its epilogue and the player's word (D-558). */
|
|
49
|
+
export function nextAdventureLead(root) {
|
|
50
|
+
const length = readSettings(root).length;
|
|
51
|
+
return length === undefined || length === "open"
|
|
52
|
+
? "No quest is open or planned now: build the next adventure."
|
|
53
|
+
: `No quest is open or planned now, and the campaign plays ${length}: give this adventure its epilogue, then ask the player whether to go on; if they do, build the next one, of the same length.`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* How long the campaign plays, when it has an end (D-558): how to size its adventures and close them; none for an open one or one not chosen. With once, not
|
|
57
|
+
* again in a chat that already has it.
|
|
58
|
+
*/
|
|
59
|
+
export function lengthPart(root, context, once = false) {
|
|
60
|
+
const length = readSettings(root).length;
|
|
61
|
+
if (length === undefined || length === "open") {
|
|
62
|
+
return "";
|
|
63
|
+
}
|
|
64
|
+
const name = `length-${length.replaceAll(" ", "-")}`;
|
|
65
|
+
if (once && context.told?.has(name)) {
|
|
66
|
+
return "";
|
|
67
|
+
}
|
|
68
|
+
context.told?.add(name);
|
|
69
|
+
return partText(name, campaignSystem(root, context)) ?? "";
|
|
70
|
+
}
|
|
48
71
|
/**
|
|
49
72
|
* How the master writes, as the player chose it (D-395): the author's part in place of the prose's, the story's, and the player's own words, each with what
|
|
50
73
|
* was written in it; none for the core's own ways. Every time it is asked, as a change of them must reach the chat.
|
package/dist/commands/show.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare const show: import("../core/registry.ts").Command<z.ZodObject<{
|
|
|
71
71
|
knows?: undefined;
|
|
72
72
|
} | {
|
|
73
73
|
page: string;
|
|
74
|
-
type: "
|
|
74
|
+
type: "character" | "place" | "quest" | "creature" | "item" | "faction" | "event" | "topic" | undefined;
|
|
75
75
|
path: string;
|
|
76
76
|
system: string | undefined;
|
|
77
77
|
title: string | undefined;
|
package/dist/commands/status.js
CHANGED
|
@@ -135,7 +135,7 @@ export const status = defineCommand({
|
|
|
135
135
|
? undefined
|
|
136
136
|
: `Game systems to install, if the player wants one: ${installable.map((one) => `${one.name} (${one.title}${one.verified ? "" : ", not verified"})`).join(", ")}. `
|
|
137
137
|
+ "Install the one chosen with package install and its name, then set it with config system: the campaign keeps it once it has a player character.",
|
|
138
|
-
premise: settings.premise === undefined ? undefined : `${settings.premise}${settings.preparation
|
|
138
|
+
premise: settings.premise === undefined ? undefined : `${settings.premise}${premiseWays(settings.preparation, settings.length)}`,
|
|
139
139
|
// How the master writes, as the player chose it, under the eyes at every start (D-395).
|
|
140
140
|
writing: [
|
|
141
141
|
named("prose", settings.author === undefined ? settings.prose : undefined),
|
|
@@ -262,6 +262,11 @@ function sessionParts(context, system, world, preparation) {
|
|
|
262
262
|
: undefined;
|
|
263
263
|
return [situationPart("session", context, system), lead === undefined ? "" : adventurePart(lead, context, system)].filter((part) => part !== "");
|
|
264
264
|
}
|
|
265
|
+
/** How a premise's world is made and how long it plays, as " (preparation on the fly, length one evening)"; nothing when neither is chosen. */
|
|
266
|
+
function premiseWays(preparation, length) {
|
|
267
|
+
const ways = [named("preparation", preparation), named("length", length)].filter((way) => way !== undefined);
|
|
268
|
+
return ways.length === 0 ? "" : ` (${ways.join(", ")})`;
|
|
269
|
+
}
|
|
265
270
|
/** The lines of the contradictions, marked told in the chat. */
|
|
266
271
|
function toldContradictions(context, found) {
|
|
267
272
|
markStateChecksTold(context, found);
|
|
@@ -30,11 +30,11 @@ interface WriteResult {
|
|
|
30
30
|
export declare const write: import("../../core/registry.ts").Command<z.ZodObject<{
|
|
31
31
|
page: z.ZodString;
|
|
32
32
|
type: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
character: "character";
|
|
33
34
|
place: "place";
|
|
34
35
|
quest: "quest";
|
|
35
36
|
creature: "creature";
|
|
36
37
|
item: "item";
|
|
37
|
-
character: "character";
|
|
38
38
|
faction: "faction";
|
|
39
39
|
event: "event";
|
|
40
40
|
topic: "topic";
|
|
@@ -19,7 +19,7 @@ import { fieldValues } from "../shared/inputs.js";
|
|
|
19
19
|
import { checkLimits } from "../shared/limits.js";
|
|
20
20
|
import { campaignCoins } from "../shared/money.js";
|
|
21
21
|
import { followersNote, keepersNote, skippedPagesNote } from "../shared/notes.js";
|
|
22
|
-
import { adventurePart, partText, partyPart, situationPart } from "../shared/parts.js";
|
|
22
|
+
import { adventurePart, nextAdventureLead, partText, partyPart, situationPart } from "../shared/parts.js";
|
|
23
23
|
import { mapLookNotes, shortRoadNotes } from "../shared/positions.js";
|
|
24
24
|
import { givenItems, progressionOf } from "../shared/progression.js";
|
|
25
25
|
import { adventureUnderWay, logQuestChange, newQuestNotes, tickedQuestNotes } from "../shared/quests.js";
|
|
@@ -171,7 +171,7 @@ export const write = defineCommand({
|
|
|
171
171
|
// A quest that ends is a time to write a diary (DIA-2).
|
|
172
172
|
const diary = changed && questEnds(existing, page) ? diaryDueLine(root, context, now) : "";
|
|
173
173
|
// The last quest ended: the next adventure is to build (D-530 (8)).
|
|
174
|
-
const next = changed && questEnds(existing, page) && !adventureUnderWay(now) ? adventurePart(
|
|
174
|
+
const next = changed && questEnds(existing, page) && !adventureUnderWay(now) ? adventurePart(nextAdventureLead(root), context, system) : "";
|
|
175
175
|
const quest = changed
|
|
176
176
|
? [...questEndNotes(context, system, existing, page), ...(diary === "" ? [] : [diary]), ...(next === "" ? [] : [next]), ...tickedQuestNotes(existing, page), ...opened, ...(picture === undefined ? [] : [picture])]
|
|
177
177
|
: [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Translated from en.md, paragraph by paragraph, by npm run translate: cdcc612c,e51b18d7,be38a186 f2f35057,51f49a5b 128c5761,5e6cbafc,48febcc7,f0f71376,b1381f21,cb3f91d5 5faea867,7780116a,afad321d,99406ef2,f831ecd8,b6a6bfff,b5544596,5c016bb1,3afa0abc,ef6b72c1,bc923cc3,07c079ea,30f9af2f,60051919,8619db5f,06d7d789,e6f82f9e,6def7d66,f27372ca,d904fdec,8da0dbd5,
|
|
1
|
+
<!-- Translated from en.md, paragraph by paragraph, by npm run translate: cdcc612c,e51b18d7,be38a186 f2f35057,51f49a5b 128c5761,5e6cbafc,48febcc7,f0f71376,b1381f21,cb3f91d5 5faea867,7780116a,afad321d,99406ef2,f831ecd8,b6a6bfff,b5544596,5c016bb1,3afa0abc,ef6b72c1,bc923cc3,07c079ea,30f9af2f,60051919,8619db5f,06d7d789,e6f82f9e,6def7d66,f27372ca,d904fdec,8da0dbd5,1c13fe15,de62cd09,1aa7894f,56b73d9b,d9fbeec2,74dc52f1,a2da9de6,cb3f91d5 09eaf555,63d0c1fb,27c765d2,46692547,e2d161a6,25f9bdf8,d8c01f15,b0846f60,602a5e46,6fee496f,71124663,4bed5644,c2bbeff9,3de0391e,15e36217,cb7d8189,b2a29c8a,056b4e29,2ef22287,d61653a8,e47ab79b,f4c26681,20018bab,6c58220c,5f7b18e6,6a64e757,ad3fa941,57283bd2,e9fa262a,44639926,86179abe,323d8fa3,f8d6b2fd,18bc17d2,3bbb14f4,2b2d7c37,65ff2775,623c2986,0fac97e5,d3afc486,cb3f91d5 ec2eeb06,92e343cc,aa0e26a1,da0fad21,cb3f91d5 5dafa85b,c5ec9f44,2e849e73,35a85f2e,607c7f74,95ffeabc,7687ded0,4ee5ae41,fd2934d1,177ddff0,025009be,c8315e19,cb3f91d5 40941750,f3b2d1f6,cb3f91d5 30c03e82,209b159b,6ea1911c,b8e71497,32482cb4,65c75baa,cb3f91d5 eac34391,4ee44b3b,487e04c0,c6ebe0c0,cb3f91d5 2f86bef9,9402592c,cb3f91d5 519ce5ee,de58bc03,b830ae6c,697b0622,180f77d8,e0f88bdb,1e0ccfed,05fde17f,5070d986,891d9bc7,5b0bb1d2,600db53a,6b115391,5db3836c,252805d8,df64a3bb,e214ff4a. Change the English, then run it again. -->
|
|
2
2
|
# RPG Engine: الدليل الكامل
|
|
3
3
|
|
|
4
4
|
يتيح لك **RPG Engine** لعب لعبة أدوار على الطاولة مع **ذكاء اصطناعي في دور مدير اللعبة**. تتحدث مع مدير اللعبة في **محادثة**. أما RPG Engine فيعمل خلف الكواليس: **يتذكر العالم**، و**يرمي النرد**، و**يمسك الحسابات**. بجانب المحادثة تُبقي صفحة مفتوحة في المتصفح، هي **لوحة التحكم**، وفيها ورقة شخصيتك والنرد والخرائط وسجلك.
|
|
@@ -94,6 +94,7 @@ rpg init "The Salt Isles"
|
|
|
94
94
|
| **النرد** | من يرمي نردك | رقمي، فعلي |
|
|
95
95
|
| **وحدات القياس** | المسافات والأوزان | متري، إمبراطوري |
|
|
96
96
|
| **أصوات الشخصيات** | من يتكلم عن الشخصيات التي تلتقيها، من مدير اللعبة إلى الشخصيات نفسها: مدير اللعبة دائمًا؛ أو في اللحظات المهمة تتكلم الشخصية نفسها، ولا تعرف إلا ما تعرفه، بحسب ما يراه مدير اللعبة؛ أو تتكلم الشخصية دائمًا، للرئيسية منها أو للجميع، بأبطأ وأغلى، حيثما يتيح ذلك تطبيق الذكاء الاصطناعي لديك | مدير اللعبة، أحيانًا، الشخصيات الرئيسية، الجميع |
|
|
97
|
+
| **شخصيتك** | كيف تُصنع شخصيتك في الجلسة صفر | مع مدير اللعبة، من مدير اللعبة، شخصيتك الخاصة ([2.7](#27-session-zero-your-character)) |
|
|
97
98
|
| **الرفاق** | من يسافر معك | لا أحد، يُصنعون معك، يصنعهم مدير اللعبة، يُلتقى بهم في اللعب |
|
|
98
99
|
| **الصور** | صور الأماكن والمهمات ومن تلتقيهم | بلا، عند الطلب، أماكن جديدة، المهمات ومن تلتقيهم ([3.11](#311-pictures)) |
|
|
99
100
|
| **خطوط حمراء** و**أستار** | ما لا يظهر أبدًا، وما يحدث خارج المشهد فقط | قوائم |
|
|
@@ -101,13 +102,15 @@ rpg init "The Salt Isles"
|
|
|
101
102
|
|
|
102
103
|
الإصدار الخامس يضيف **التقدّم**: نقاط الخبرة أو المراحل.
|
|
103
104
|
|
|
104
|
-
إن لم يكن للعالم نص مكتوب، يسأل مدير اللعبة أيضًا عن **الفكرة** (النوع، والنبرة، وبعض العناصر، وما تستمتع به أكثر في اللعبة، مثل القتال أو الألغاز أو الحوار أو الاستكشاف، بكلماتك) وعن **التهيئة**: بناء العالم أثناء اللعب شيئًا فشيئًا، أو كله في
|
|
105
|
+
إن لم يكن للعالم نص مكتوب، يسأل مدير اللعبة أيضًا عن **الفكرة** (النوع، والنبرة، وبعض العناصر، وما تستمتع به أكثر في اللعبة، مثل القتال أو الألغاز أو الحوار أو الاستكشاف، بكلماتك)، وعن **التهيئة**: بناء العالم أثناء اللعب شيئًا فشيئًا، أو كله في البداية، وعن **المدة**: أمسية واحدة، أو بضع جلسات (من ثلاث إلى خمس أمسيات)، أو مفتوحة، مغامرة بعد أخرى. وعند انتهاء قصة ذات مدة محددة، يمكنك دائمًا المتابعة.
|
|
105
106
|
|
|
106
107
|
**أسلوب مدير اللعبة** لا يُسأل عنه أبدًا، لكن يمكنك تغييره في الدردشة أو في **الإعدادات**: **النثر** (بسيط، أدبي، شعبي، ساخر)، و**القصص** التي يخترعها (مواقف، أقواس، حلقات، لغز)، وكاتب **يكتب على طريقته**، أو أي شيء آخر **بكلماتك**.
|
|
107
108
|
|
|
108
109
|
### 2.7 الجلسة صفر: شخصيتك
|
|
109
110
|
|
|
110
|
-
تصنع شخصيتك مع مدير اللعبة، كما على طاولة اللعب. كل خيار لك، إلا إن طلبت من مدير اللعبة أن يختار عنك. تعال بفكرة كاملة، أو غامضة، أو بلا
|
|
111
|
+
تصنع شخصيتك مع مدير اللعبة، كما على طاولة اللعب. كل خيار لك، إلا إن طلبت من مدير اللعبة أن يختار عنك. تعال بفكرة كاملة، أو غامضة، أو بلا فكرة، أو اطلب من مدير اللعبة أن يصنعها كلها من بضع كلمات. في لعبة ذات مستويات يسأل مدير اللعبة من أي مستوى تبدأ: من الأول، إلا إن أردت مستوى آخر. يخبرك مدير اللعبة كيف تُحدَّد قيم القدرات قبل أن يُرمى أي حجر نرد. قصتك ليست مطلوبة أبدًا. وإن قدمتَ قصة، يكتبها مدير اللعبة بكلماتك. بعد ذلك يطلب مدير اللعبة صورة لشخصيتك ([3.7](#37-your-characters-story-and-picture)). يحسب RPG Engine ورقة الشخصية، فلا تضطر أبدًا إلى إجراء العمليات الحسابية.
|
|
112
|
+
|
|
113
|
+
هل لديك شخصية جاهزة، من لعبة أخرى أو حملة أخرى؟ اختر **لدي واحدة بالفعل** في الإعداد وأعطها لمدير اللعبة: الصق ورقة الشخصية في الدردشة، أو قل أين يوجد ملفها على حاسوبك (ملف PDF، أو صورة، أو نص). يكتبها مدير اللعبة كما هي، بمستواها، ويفحصها وفق القواعد والعالم، ويتفق معك على كل ما لا يلائم.
|
|
111
114
|
|
|
112
115
|
---
|
|
113
116
|
|