rpg-engine 0.9.1 → 0.10.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/adventures/source.js +6 -5
- package/dist/commands/package.d.ts +3 -3
- package/dist/commands/package.js +72 -35
- package/dist/commands/shared/adventures.js +20 -11
- package/dist/commands/shared/library.js +13 -5
- package/dist/commands/shared/packages/catalog.d.ts +2 -0
- package/dist/commands/shared/packages/catalog.js +1 -0
- package/dist/commands/view/place.d.ts +2 -0
- package/dist/commands/view/place.js +8 -2
- package/dist/core/context.d.ts +2 -0
- package/dist/core/refusal.d.ts +12 -0
- package/dist/core/refusal.js +17 -0
- package/dist/dashboard/api.js +37 -81
- package/dist/dashboard/app.js +10 -3
- package/dist/dashboard/asked.js +6 -3
- package/dist/dashboard/assets/master.svg +1 -2
- package/dist/dashboard/card.js +1 -1
- package/dist/dashboard/dice/load.js +6 -1
- package/dist/dashboard/dice/throw.js +5 -1
- package/dist/dashboard/dice/tray.js +5 -1
- package/dist/dashboard/footer.js +2 -2
- package/dist/dashboard/game-words.js +32 -32
- package/dist/dashboard/guide/ar.md +5 -5
- package/dist/dashboard/guide/cs.md +7 -7
- package/dist/dashboard/guide/da.md +5 -5
- package/dist/dashboard/guide/de.md +5 -5
- package/dist/dashboard/guide/el.md +7 -7
- package/dist/dashboard/guide/en.md +2 -2
- package/dist/dashboard/guide/es.md +6 -6
- package/dist/dashboard/guide/fi.md +5 -5
- package/dist/dashboard/guide/fr.md +6 -6
- package/dist/dashboard/guide/he.md +7 -7
- package/dist/dashboard/guide/hi.md +6 -6
- package/dist/dashboard/guide/hu.md +7 -7
- package/dist/dashboard/guide/is.md +7 -7
- package/dist/dashboard/guide/it.md +5 -5
- package/dist/dashboard/guide/ja.md +7 -7
- package/dist/dashboard/guide/ko.md +9 -9
- package/dist/dashboard/guide/nb.md +6 -6
- package/dist/dashboard/guide/nl.md +7 -7
- package/dist/dashboard/guide/pl.md +7 -7
- package/dist/dashboard/guide/pt.md +5 -5
- package/dist/dashboard/guide/ro.md +8 -8
- package/dist/dashboard/guide/ru.md +7 -7
- package/dist/dashboard/guide/sv.md +6 -6
- package/dist/dashboard/guide/tr.md +8 -8
- package/dist/dashboard/guide/uk.md +6 -6
- package/dist/dashboard/guide/zh.md +8 -8
- package/dist/dashboard/help/blocks.js +6 -0
- package/dist/dashboard/help/help.js +15 -3
- package/dist/dashboard/help/markdown.js +2 -1
- package/dist/dashboard/i18n/ar.json +53 -1
- package/dist/dashboard/i18n/cs.json +53 -1
- package/dist/dashboard/i18n/da.json +53 -1
- package/dist/dashboard/i18n/de.json +53 -1
- package/dist/dashboard/i18n/el.json +53 -1
- package/dist/dashboard/i18n/es.json +53 -1
- package/dist/dashboard/i18n/fi.json +53 -1
- package/dist/dashboard/i18n/fr.json +53 -1
- package/dist/dashboard/i18n/he.json +53 -1
- package/dist/dashboard/i18n/hi.json +53 -1
- package/dist/dashboard/i18n/hu.json +53 -1
- package/dist/dashboard/i18n/is.json +53 -1
- package/dist/dashboard/i18n/it.json +56 -4
- package/dist/dashboard/i18n/ja.json +53 -1
- package/dist/dashboard/i18n/ko.json +53 -1
- package/dist/dashboard/i18n/nb.json +53 -1
- package/dist/dashboard/i18n/nl.json +53 -1
- package/dist/dashboard/i18n/pl.json +53 -1
- package/dist/dashboard/i18n/pt.json +53 -1
- package/dist/dashboard/i18n/ro.json +53 -1
- package/dist/dashboard/i18n/ru.json +53 -1
- package/dist/dashboard/i18n/sv.json +53 -1
- package/dist/dashboard/i18n/tr.json +53 -1
- package/dist/dashboard/i18n/uk.json +53 -1
- package/dist/dashboard/i18n/zh.json +53 -1
- package/dist/dashboard/icons.js +2 -2
- package/dist/dashboard/journal.js +9 -4
- package/dist/dashboard/labels.js +5 -4
- package/dist/dashboard/language-choice.js +3 -3
- package/dist/dashboard/markdown.js +11 -4
- package/dist/dashboard/notes.js +4 -2
- package/dist/dashboard/notices.js +2 -2
- package/dist/dashboard/packages/ask-card.js +1 -1
- package/dist/dashboard/packages/packages.js +14 -10
- package/dist/dashboard/packages/page-code.js +11 -3
- package/dist/dashboard/packages/widgets.js +5 -5
- package/dist/dashboard/pages.js +3 -3
- package/dist/dashboard/place/map-sheet.js +4 -3
- package/dist/dashboard/place/map-view.js +17 -5
- package/dist/dashboard/refusals.js +61 -0
- package/dist/dashboard/rolls.js +3 -3
- package/dist/dashboard/settings.js +19 -5
- package/dist/dashboard/sheet.js +26 -7
- package/dist/dashboard/status.js +19 -13
- package/dist/dashboard/style.css +113 -16
- package/dist/dashboard/text.js +6 -2
- package/dist/dashboard/top.js +7 -9
- package/dist/dashboard/turns.js +7 -2
- package/dist/dashboard/world/lore.js +16 -15
- package/dist/dashboard/world/map.js +43 -1
- package/dist/dashboard/world/world.js +50 -15
- package/dist/extensions/extension.js +4 -1
- package/dist/packages/npm.js +4 -2
- package/dist/packages/tarball.js +8 -4
- package/dist/server/dashboard/writes.js +22 -13
- package/dist/systems/system-code.js +5 -0
- package/package.json +1 -1
package/dist/dashboard/api.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { refusalText } from "./refusals.js";
|
|
1
2
|
import { t } from "./text.js";
|
|
2
3
|
/** A picture's address, with when its file last changed, so that it comes again only when it changes. */
|
|
3
4
|
export function pictureAddress(picture) {
|
|
@@ -6,20 +7,11 @@ export function pictureAddress(picture) {
|
|
|
6
7
|
/** What view gives: the party, with the last rolls, as many as asked, and the place of the player character `focus` names (VIEW-12); or a page. */
|
|
7
8
|
export async function readView(page, rolls, focus) {
|
|
8
9
|
const query = new URLSearchParams({ ...(page === undefined ? {} : { page }), ...(rolls === undefined ? {} : { rolls: String(rolls) }), ...(focus === undefined ? {} : { focus }) });
|
|
9
|
-
|
|
10
|
-
const body = await response.json();
|
|
11
|
-
if ("error" in body) {
|
|
12
|
-
throw new Error(body.error);
|
|
13
|
-
}
|
|
14
|
-
return body;
|
|
10
|
+
return await readJson(query.size === 0 ? "/api/view" : `/api/view?${query}`);
|
|
15
11
|
}
|
|
16
12
|
/** The world map as the player character knows it (VIEW-7). */
|
|
17
13
|
export async function readMap() {
|
|
18
|
-
const
|
|
19
|
-
const body = await response.json();
|
|
20
|
-
if ("error" in body) {
|
|
21
|
-
throw new Error(body.error);
|
|
22
|
-
}
|
|
14
|
+
const body = await readJson("/api/view?map=true");
|
|
23
15
|
if (body.kind !== "map") {
|
|
24
16
|
throw new Error(t("There is no player character yet: the map starts with one."));
|
|
25
17
|
}
|
|
@@ -27,20 +19,12 @@ export async function readMap() {
|
|
|
27
19
|
}
|
|
28
20
|
/** The player's settings, with their values and what each means (D-341). */
|
|
29
21
|
export async function readSettings() {
|
|
30
|
-
const
|
|
31
|
-
const body = await response.json();
|
|
32
|
-
if ("error" in body) {
|
|
33
|
-
throw new Error(body.error);
|
|
34
|
-
}
|
|
22
|
+
const body = await readJson("/api/view?settings=true");
|
|
35
23
|
return body.kind === "settings" ? body.settings : [];
|
|
36
24
|
}
|
|
37
25
|
/** The campaign's setup: its mode and name, what the next mode needs, and the setup's questions (D-370). */
|
|
38
26
|
export async function readSetup() {
|
|
39
|
-
const
|
|
40
|
-
const body = await response.json();
|
|
41
|
-
if ("error" in body) {
|
|
42
|
-
throw new Error(body.error);
|
|
43
|
-
}
|
|
27
|
+
const body = await readJson("/api/view?setup=true");
|
|
44
28
|
if (body.kind !== "setup") {
|
|
45
29
|
throw new Error(t("The game gave no setup: reload the page."));
|
|
46
30
|
}
|
|
@@ -58,29 +42,17 @@ export async function sendSetupWord(word) {
|
|
|
58
42
|
}
|
|
59
43
|
/** The quests the character knows and the story by scenes (D-367); none before there is a player character. */
|
|
60
44
|
export async function readJournal() {
|
|
61
|
-
const
|
|
62
|
-
const body = await response.json();
|
|
63
|
-
if ("error" in body) {
|
|
64
|
-
throw new Error(body.error);
|
|
65
|
-
}
|
|
45
|
+
const body = await readJson("/api/view?journal=true");
|
|
66
46
|
return body.kind === "journal" ? body : undefined;
|
|
67
47
|
}
|
|
68
48
|
/** What the character knows, its documents and the calendar; none before there is a player character, or from a server older than the page. */
|
|
69
49
|
export async function readWorld() {
|
|
70
|
-
const
|
|
71
|
-
const body = await response.json();
|
|
72
|
-
if ("error" in body) {
|
|
73
|
-
throw new Error(body.error);
|
|
74
|
-
}
|
|
50
|
+
const body = await readJson("/api/view?world=true");
|
|
75
51
|
return body.kind === "world" ? body : undefined;
|
|
76
52
|
}
|
|
77
53
|
/** The player's notes, the last written first (D-371), and those shared that the master has not heard yet, which may be taken back (D-381). */
|
|
78
54
|
export async function readNotes() {
|
|
79
|
-
const
|
|
80
|
-
const body = await response.json().catch(() => ({ error: t("The notes did not come ({status}): reload the page.", { status: response.status }) }));
|
|
81
|
-
if ("error" in body) {
|
|
82
|
-
throw new Error(body.error);
|
|
83
|
-
}
|
|
55
|
+
const body = await readJson("/api/notes");
|
|
84
56
|
return { notes: body.notes, pending: body.pending ?? [] };
|
|
85
57
|
}
|
|
86
58
|
// The notes reach the game one after another, in the order they were written.
|
|
@@ -123,11 +95,7 @@ export async function readStory(who) {
|
|
|
123
95
|
}
|
|
124
96
|
/** The campaign's saves, newest first, and what the mode lets the player do with them (D-359). */
|
|
125
97
|
export async function readSaves() {
|
|
126
|
-
const
|
|
127
|
-
const body = await response.json();
|
|
128
|
-
if ("error" in body) {
|
|
129
|
-
throw new Error(body.error);
|
|
130
|
-
}
|
|
98
|
+
const body = await readJson("/api/view?saves=true");
|
|
131
99
|
if (body.kind !== "saves") {
|
|
132
100
|
throw new Error(t("The game gave no saves: reload the page."));
|
|
133
101
|
}
|
|
@@ -150,10 +118,10 @@ export async function changeSaves(change) {
|
|
|
150
118
|
/** RPG Engine and what npm has of it; undefined where the page is not served by the game's own server, which alone updates it. */
|
|
151
119
|
export async function readEngine() {
|
|
152
120
|
const response = await fetch("/api/engine");
|
|
153
|
-
const body = await response.json();
|
|
154
121
|
if (response.status === 400) {
|
|
155
122
|
return undefined;
|
|
156
123
|
}
|
|
124
|
+
const body = await response.json();
|
|
157
125
|
if ("error" in body) {
|
|
158
126
|
throw new Error(body.error);
|
|
159
127
|
}
|
|
@@ -167,7 +135,7 @@ export async function updateEngine() {
|
|
|
167
135
|
if (response.status === 202 && body.version !== undefined) {
|
|
168
136
|
return { done: true, version: body.version, restart: body.restart === "app" ? "app" : "chat" };
|
|
169
137
|
}
|
|
170
|
-
return { done: false, error: body
|
|
138
|
+
return { done: false, error: refusalText(body, t("It did not reach the game: try again.")), ...(body.code === "busy" ? { code: body.code } : {}) };
|
|
171
139
|
}
|
|
172
140
|
catch {
|
|
173
141
|
return { done: false, error: t("It did not reach the game: try again.") };
|
|
@@ -175,21 +143,11 @@ export async function updateEngine() {
|
|
|
175
143
|
}
|
|
176
144
|
/** The packages here, at once: without npm. */
|
|
177
145
|
export async function readPackages() {
|
|
178
|
-
|
|
179
|
-
const body = await response.json();
|
|
180
|
-
if ("error" in body) {
|
|
181
|
-
throw new Error(body.error);
|
|
182
|
-
}
|
|
183
|
-
return body;
|
|
146
|
+
return await readJson("/api/packages");
|
|
184
147
|
}
|
|
185
148
|
/** The widgets of the campaign's extensions (D-502), each where it stands and with what it shows now. */
|
|
186
149
|
export async function readWidgets() {
|
|
187
|
-
|
|
188
|
-
const body = await response.json();
|
|
189
|
-
if ("error" in body) {
|
|
190
|
-
throw new Error(body.error);
|
|
191
|
-
}
|
|
192
|
-
return body.widgets;
|
|
150
|
+
return (await readJson("/api/widgets")).widgets;
|
|
193
151
|
}
|
|
194
152
|
/** What a package's widget shows for a card or a page of its page code, for who (D-514): nothing when the package or the widget is not the campaign's. */
|
|
195
153
|
export async function readWidgetData(owner, widget, who) {
|
|
@@ -203,30 +161,15 @@ export async function readWidgetData(owner, widget, who) {
|
|
|
203
161
|
}
|
|
204
162
|
/** The theme of the campaign's game system (D-528): its CSS, icons and name; nothing when it names none, or refused when it does not pass its checks. */
|
|
205
163
|
export async function readGameTheme() {
|
|
206
|
-
|
|
207
|
-
const body = await response.json();
|
|
208
|
-
if ("error" in body) {
|
|
209
|
-
throw new Error(body.error);
|
|
210
|
-
}
|
|
211
|
-
return body;
|
|
164
|
+
return await readJson("/api/theme");
|
|
212
165
|
}
|
|
213
166
|
/** The page modules of the campaign's system and extensions whose code runs (D-510, D-511), the system's first. */
|
|
214
167
|
export async function readModules() {
|
|
215
|
-
|
|
216
|
-
const body = await response.json();
|
|
217
|
-
if ("error" in body) {
|
|
218
|
-
throw new Error(body.error);
|
|
219
|
-
}
|
|
220
|
-
return body.modules;
|
|
168
|
+
return (await readJson("/api/modules")).modules;
|
|
221
169
|
}
|
|
222
170
|
/** The catalog (D-486), as the server keeps it for ten minutes; `fresh` asks npm and GitHub again. */
|
|
223
171
|
export async function readCatalog(fresh) {
|
|
224
|
-
|
|
225
|
-
const body = await response.json();
|
|
226
|
-
if ("error" in body) {
|
|
227
|
-
throw new Error(body.error);
|
|
228
|
-
}
|
|
229
|
-
return body;
|
|
172
|
+
return await readJson(fresh ? "/api/catalog?fresh=true" : "/api/catalog");
|
|
230
173
|
}
|
|
231
174
|
/** Adds what the player wrote (D-485 (1)): a link, a GitHub repository's too, an npm name or a folder of this computer; the engine tells its kind. */
|
|
232
175
|
export async function addSource(source) {
|
|
@@ -247,7 +190,8 @@ async function packageWork(send) {
|
|
|
247
190
|
if (response.status === 202) {
|
|
248
191
|
return { done: true, ...(body.kind === undefined ? {} : { kind: body.kind }) };
|
|
249
192
|
}
|
|
250
|
-
|
|
193
|
+
const code = body.code === "declined" || body.code === "no-window" || body.code === "busy" ? body.code : undefined;
|
|
194
|
+
return { done: false, error: refusalText(body, t("It did not reach the game: try again.")), ...(code === undefined ? {} : { code }) };
|
|
251
195
|
}
|
|
252
196
|
catch {
|
|
253
197
|
return { done: false, error: t("It did not reach the game: try again.") };
|
|
@@ -255,12 +199,7 @@ async function packageWork(send) {
|
|
|
255
199
|
}
|
|
256
200
|
/** This computer's library, with what this campaign uses, at once. */
|
|
257
201
|
export async function readLibrary() {
|
|
258
|
-
|
|
259
|
-
const body = await response.json();
|
|
260
|
-
if ("error" in body) {
|
|
261
|
-
throw new Error(body.error);
|
|
262
|
-
}
|
|
263
|
-
return body;
|
|
202
|
+
return await readJson("/api/library");
|
|
264
203
|
}
|
|
265
204
|
/**
|
|
266
205
|
* Turns a folder or a book of this computer on in the campaign's library, adding it to the computer first with the player's yes in a window; off; or takes it
|
|
@@ -274,7 +213,7 @@ export async function exportCampaign(credits) {
|
|
|
274
213
|
try {
|
|
275
214
|
const response = await fetch("/api/export", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(credits) });
|
|
276
215
|
const body = await response.json().catch(() => ({}));
|
|
277
|
-
return body.file === undefined ? { error: body
|
|
216
|
+
return body.file === undefined ? { error: refusalText(body, t("It did not reach the game: try again.")) } : { download: `/api/export?file=${encodeURIComponent(body.file)}`, file: body.file };
|
|
278
217
|
}
|
|
279
218
|
catch {
|
|
280
219
|
return { error: t("It did not reach the game: try again.") };
|
|
@@ -384,3 +323,20 @@ export async function runCommand(command, input = {}) {
|
|
|
384
323
|
}
|
|
385
324
|
return body.text ?? "";
|
|
386
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* What the server answers at an address, as JSON: it throws what the server says went wrong, or, when the game cannot be reached or answers no JSON, says so
|
|
328
|
+
* in the page's words rather than the browser's.
|
|
329
|
+
*/
|
|
330
|
+
async function readJson(address) {
|
|
331
|
+
let body;
|
|
332
|
+
try {
|
|
333
|
+
body = await (await fetch(address)).json();
|
|
334
|
+
}
|
|
335
|
+
catch {
|
|
336
|
+
throw new Error(t("It did not reach the game: try again."));
|
|
337
|
+
}
|
|
338
|
+
if (typeof body === "object" && body !== null && "error" in body && typeof body.error === "string") {
|
|
339
|
+
throw new Error(body.error);
|
|
340
|
+
}
|
|
341
|
+
return body;
|
|
342
|
+
}
|
package/dist/dashboard/app.js
CHANGED
|
@@ -40,7 +40,7 @@ import { SetupView, useSetup } from "./setup.js";
|
|
|
40
40
|
import { MemberSheet } from "./sheet.js";
|
|
41
41
|
import { gameStyleChanged, takeSystemStyle } from "./system-style.js";
|
|
42
42
|
import { PlayTable, tableBeside, TableTab, useTableAway } from "./table.js";
|
|
43
|
-
import { browserLanguage, pageDirection, setLanguage, setSystemWords, t } from "./text.js";
|
|
43
|
+
import { browserLanguage, pageDirection, pageLocale, setLanguage, setSystemWords, t } from "./text.js";
|
|
44
44
|
import { restoreTheme } from "./theme.js";
|
|
45
45
|
import { SetupCorner, Top } from "./top.js";
|
|
46
46
|
import { hasTurns, TurnsCard, turnWords } from "./turns.js";
|
|
@@ -176,7 +176,14 @@ function App() {
|
|
|
176
176
|
const page = member === undefined ? undefined : await readView(member.name);
|
|
177
177
|
// The page's words in the campaign's language (D-394), its file read once; its dates and screen readers follow the language too.
|
|
178
178
|
const language = (overview.kind === "overview" || overview.kind === "none" ? overview.language : undefined) ?? browserLanguage();
|
|
179
|
+
// A reading a newer one overtook sets no language: the newer one's stays, with its words.
|
|
180
|
+
if (number !== reading.current) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
179
183
|
await setLanguage(language);
|
|
184
|
+
if (number !== reading.current) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
180
187
|
setSystemWords(overview.kind === "overview" ? overview.words : undefined);
|
|
181
188
|
setSystemVerbs(overview.kind === "overview" ? overview.verbs : undefined);
|
|
182
189
|
if (number === reading.current) {
|
|
@@ -582,7 +589,7 @@ function App() {
|
|
|
582
589
|
const notices = [
|
|
583
590
|
...(shown.problem === undefined ? [] : [{ kind: "problem", text: shown.problem }]),
|
|
584
591
|
...(!live && shown.readAt !== undefined
|
|
585
|
-
? [{ kind: "away", text: t("Not connected: the sheet as of {time}. It comes back when the game does.", { time: shown.readAt.toLocaleTimeString(
|
|
592
|
+
? [{ kind: "away", text: t("Not connected: the sheet as of {time}. It comes back when the game does.", { time: shown.readAt.toLocaleTimeString(pageLocale(), { hour: "2-digit", minute: "2-digit" }) }) }]
|
|
586
593
|
: []),
|
|
587
594
|
...(shown.noCharacter && !inSetup ? [{ kind: "info", text: t("There is no player character yet: the sheet comes when the master writes one.") }] : []),
|
|
588
595
|
...gameNotices(shown.problems),
|
|
@@ -607,7 +614,7 @@ function App() {
|
|
|
607
614
|
return taken;
|
|
608
615
|
} }, shown.asked.id)), live && shown.pack === undefined && shown.asked && shown.asked.spend === undefined && !inCard(shown.asked) && (_jsx(AskedBanner, { asked: shown.asked, yourTurn: yourTurn && (asker === undefined || asker.name === turnOf?.name), who: asker, turnName: turnName, map: shown.place?.map, place: shown.place?.name, answered: answering === shown.asked.id, onAnswered: () => void read() })), inSetup
|
|
609
616
|
? _jsx(SetupView, { setup: setup })
|
|
610
|
-
: (_jsxs(_Fragment, { children: [live && yourTurn && address.section !== "scene" && shown.asked === undefined && shown.pack === undefined && (_jsxs("a", { class: "turn-notice", href: sectionAddress("scene"), children: [_jsx(Icon, { name: "combat" }),
|
|
617
|
+
: (_jsxs(_Fragment, { children: [live && yourTurn && address.section !== "scene" && shown.asked === undefined && shown.pack === undefined && (_jsxs("a", { class: "turn-notice", href: sectionAddress("scene"), children: [_jsx(Icon, { name: "combat" }), _jsxs("span", { children: [turnWords(turnName), shown.openScene?.round !== undefined && _jsx("span", { class: "turn-notice-round", children: ` · ${t("Round {round}", { round: shown.openScene.round })}` })] }), _jsx("span", { class: "turn-notice-go", children: t("Go to the scene") })] })), _jsx(Notices, { notices: importing }), !table && _jsx(QuestEndings, { version: shown.version, campaign: shown.campaign }), address.section === "party" && _jsx(PartyStrip, { party: shown.party, chosen: shown.chosen, scene: shown.openScene }), _jsxs("div", { class: "body", children: [_jsxs("main", { children: [address.section === "about" && _jsx(About, { product: productName, system: shown.system }), address.section === "help" && _jsx(Help, {}), !table && address.section === "scene" && _jsx(FollowedQuests, { version: shown.version, campaign: shown.campaign }), address.section === "scene" && (_jsx(SceneView, { place: shown.place, scene: shown.openScene, actor: actor, foreground: shown.foreground, several: several, party: shown.party, turnsBeside: table, onShowCard: (name) => {
|
|
611
618
|
handed.current = { who: name, turn: turnKey(shown.openScene) };
|
|
612
619
|
void read();
|
|
613
620
|
}, own: {
|
package/dist/dashboard/asked.js
CHANGED
|
@@ -297,8 +297,11 @@ export function AskedBanner({ asked, yourTurn, who, turnName, map, place, answer
|
|
|
297
297
|
setPicking(false);
|
|
298
298
|
setProblem(undefined);
|
|
299
299
|
try {
|
|
300
|
-
// A click that comes too late counts for nothing: the page reads what the master asks now.
|
|
301
|
-
await answer(asked.id, given)
|
|
300
|
+
// A click that comes too late counts for nothing: the page reads what the master asks now. One the game refuses can be given again.
|
|
301
|
+
if (!await answer(asked.id, given)) {
|
|
302
|
+
setSent(undefined);
|
|
303
|
+
setProblem(t("The answer did not reach the game: try again."));
|
|
304
|
+
}
|
|
302
305
|
}
|
|
303
306
|
catch {
|
|
304
307
|
setSent(undefined);
|
|
@@ -332,7 +335,7 @@ export function AskedBanner({ asked, yourTurn, who, turnName, map, place, answer
|
|
|
332
335
|
const shown = asked.labels.map((label, index) => answerButton(label, index, !roomy)).filter((button) => button !== null);
|
|
333
336
|
return (_jsxs("section", { ref: banner, class: classes, "aria-label": t("What the master asks"), children: [who === undefined ? _jsx("img", { class: "asked-robot", src: "/assets/favicon.svg", alt: "" }) : _jsx(AskedWho, { member: who }), _jsxs("p", { class: "asked-bar-question", children: [who !== undefined && (_jsxs(_Fragment, { children: [_jsx("b", { class: "asked-bar-name", children: who.name }), " · "] })), asked.question] }), shown.length > 0 && _jsx("div", { class: "asked-buttons", children: shown }), toggle] }));
|
|
334
337
|
}
|
|
335
|
-
return (_jsxs("section", { ref: banner, class: classes, "aria-labelledby": `asked-${asked.id}`, children: [toggle, who === undefined ? _jsx("img", { class: "asked-robot", src: "/assets/favicon.svg", alt: "" }) : _jsx(AskedWho, { member: who }), _jsxs("div", { class: "asked-body", children: [yourTurn ? _jsx("p", { class: "eyebrow asked-turn", children: turnWords(who?.name ?? turnName) }) : who !== undefined && _jsx("p", { class: "eyebrow asked-turn", children: t("For {name}", { name: who.name }) }), _jsx("h2", { class: "asked-title", children: asked.title }), _jsxs("p", { id: `asked-${asked.id}`, class: "asked-question", role: "alert", children: [who !== undefined && _jsx("span", { class: "visually-hidden", children: `${who.name}: ` }), asked.question] }), named.length > 0 && byHand && (_jsxs("p", { class: "asked-hand-note", children: [_jsx(Icon, { name: "hand" }), _jsx("span", { children: tParts("Roll {checks} yourself, on {sheet} or with the dice.", {
|
|
338
|
+
return (_jsxs("section", { ref: banner, class: classes, "aria-labelledby": `asked-${asked.id}`, children: [toggle, who === undefined ? _jsx("img", { class: "asked-robot", src: "/assets/favicon.svg", alt: "" }) : _jsx(AskedWho, { member: who }), _jsxs("div", { class: "asked-body", children: [yourTurn ? _jsx("p", { class: "eyebrow asked-turn", children: turnWords(who?.name ?? turnName) }) : who !== undefined && _jsx("p", { class: "eyebrow asked-turn", children: t("For {name}", { name: who.name }) }), _jsx("h2", { class: "asked-title", children: asked.title }), _jsxs("p", { id: `asked-${asked.id}`, class: "asked-question", dir: "auto", role: "alert", children: [who !== undefined && _jsx("span", { class: "visually-hidden", children: `${who.name}: ` }), asked.question] }), named.length > 0 && byHand && (_jsxs("p", { class: "asked-hand-note", children: [_jsx(Icon, { name: "hand" }), _jsx("span", { children: tParts("Roll {checks} yourself, on {sheet} or with the dice.", {
|
|
336
339
|
checks: named.map((check, index) => (_jsxs(Fragment, { children: [index > 0 && (index === named.length - 1 ? ` ${t("or")} ` : ", "), _jsxs("a", { class: "asked-hand-check", href: sheetAddress(asked.who ?? ""), onClick: () => showRow(asked.fields?.[asked.labels.findIndex((label) => checkOf(label, asked.title)?.check === check.check)]), children: [_jsx(NotationIcons, { notation: check.dice }), check.check] })] }, check.check))),
|
|
337
340
|
sheet: _jsx("a", { href: sheetAddress(asked.who ?? ""), children: who === undefined ? t("your sheet") : t("{name}'s sheet", { name: who.name }) }),
|
|
338
341
|
}).map((part, index) => _jsx(Fragment, { children: part }, index)) })] })), _jsxs("div", { class: "asked-buttons", children: [asked.square && map !== undefined && (_jsxs("button", { type: "button", class: sent === "square" ? "asked-check sent" : "asked-check", disabled: gone, onClick: () => setPicking(true), children: [_jsx(Icon, { name: "world" }), _jsx("span", { class: "asked-check-name", children: t("Choose on the map") })] })), asked.labels.map((label, index) => answerButton(label, index))] }), _jsxs("div", { class: "asked-foot", children: [_jsxs("form", { class: "asked-own", onSubmit: own, children: [_jsx("input", { type: "text", value: words, maxLength: mostWords, placeholder: t("Or write what you do…"), "aria-label": t("Or write what you do"), disabled: gone, onInput: (event) => setWords(event.currentTarget.value) }), _jsx("button", { type: "submit", class: "icon-button", "aria-label": t("Send"), "data-tip": t("Send"), disabled: gone || words.trim() === "", children: _jsx(Icon, { name: "send" }) })] }), roll && (_jsxs("label", { class: "asked-hand", children: [_jsx("input", { type: "checkbox", role: "switch", checked: byHand, onChange: (event) => setByHand(event.currentTarget.checked) }), _jsx(Icon, { name: "hand" }), t("By hand")] }))] }), problem && _jsx("p", { class: "asked-problem", role: "alert", children: problem })] }), picking && map !== undefined && _jsx(MapSheet, { map: map, place: place ?? "", question: asked.question, onPick: (square) => void reply({ square }), onClose: () => setPicking(false) })] }));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<svg class="robot" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
|
|
2
|
-
<title>Robot game master</title>
|
|
1
|
+
<svg class="robot" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" aria-hidden="true">
|
|
3
2
|
<g class="robot-head">
|
|
4
3
|
<g class="robot-antenna" fill="#DCAA32"><rect x="409" y="47" width="14" height="117" rx="7"/><circle cx="416" cy="45" r="19"/></g>
|
|
5
4
|
<g class="robot-ears" fill="#DCAA32"><rect x="74" y="154" width="64" height="91" rx="20"/><rect x="374" y="154" width="64" height="91" rx="20"/></g>
|
package/dist/dashboard/card.js
CHANGED
|
@@ -34,7 +34,7 @@ export function useMedia(query) {
|
|
|
34
34
|
* says what a click does; a card that stays open has no chevron and does not close.
|
|
35
35
|
*/
|
|
36
36
|
export function CardHeader({ icon, title, preview, note, open, onToggle, fixed }) {
|
|
37
|
-
return (_jsxs("summary", { class: fixed ? "fixed" : undefined, onClick: fixed ? (event) => event.preventDefault() : onToggle, children: [_jsx("svg", { class: "card-icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: icon }) }), title, !open && preview !== undefined && _jsx("span", { class: "preview", "aria-hidden": "true", children: preview }), note !== undefined && _jsx("span", { class: "card-head-note", children: note }), !fixed && (_jsx("span", { class: "chevron-tip tip-left", "aria-hidden": "true", "data-tip": open ? t("Close") : t("Open"), children: _jsx("svg", { class: "chevron", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: chevronPath }) }) }))] }));
|
|
37
|
+
return (_jsxs("summary", { class: fixed ? "fixed" : undefined, onClick: fixed ? (event) => event.preventDefault() : onToggle, children: [_jsx("svg", { class: "card-icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: icon }) }), title, !open && preview !== undefined && _jsx("span", { class: "preview", dir: "auto", "aria-hidden": "true", children: preview }), note !== undefined && _jsx("span", { class: "card-head-note", children: note }), !fixed && (_jsx("span", { class: "chevron-tip tip-left", "aria-hidden": "true", "data-tip": open ? t("Close") : t("Open"), children: _jsx("svg", { class: "chevron", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: chevronPath }) }) }))] }));
|
|
38
38
|
}
|
|
39
39
|
/** The header of a card that is always open (D-419): the look of a card's header, its icon, its title, a note at its end, and its own buttons after it; no toggle. */
|
|
40
40
|
export function CardHead({ icon, title, note, children }) {
|
|
@@ -7,7 +7,12 @@ import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
|
|
7
7
|
import { coinKind, faceNormals } from "./models.js";
|
|
8
8
|
/** Loads the dice's shapes and values, and the meshes of the edges given at once, the others when first asked. */
|
|
9
9
|
export async function loadDice(edges) {
|
|
10
|
-
const read = (file) => fetch(`/assets/dice/${file}`).then(async (response) =>
|
|
10
|
+
const read = (file) => fetch(`/assets/dice/${file}`).then(async (response) => {
|
|
11
|
+
if (!response.ok) {
|
|
12
|
+
throw new Error(`/assets/dice/${file} did not come (${response.status}).`);
|
|
13
|
+
}
|
|
14
|
+
return await response.json();
|
|
15
|
+
});
|
|
11
16
|
const [dice, coin] = await Promise.all([read("dice.json"), read("coin.json")]);
|
|
12
17
|
const data = { ...dice, [coinKind]: coin };
|
|
13
18
|
const meshes = new Map();
|
|
@@ -47,7 +47,11 @@ const floorBounce = 0.25;
|
|
|
47
47
|
let loading;
|
|
48
48
|
/** Loads the physics, once: a throw needs it. */
|
|
49
49
|
export function loadPhysics() {
|
|
50
|
-
|
|
50
|
+
// One that failed is tried again the next time.
|
|
51
|
+
const loaded = loading ?? RAPIER.init().catch((error) => {
|
|
52
|
+
loading = undefined;
|
|
53
|
+
throw error;
|
|
54
|
+
});
|
|
51
55
|
loading = loaded;
|
|
52
56
|
return loaded;
|
|
53
57
|
}
|
|
@@ -102,7 +102,11 @@ export function DiceTray({ requested, sheetThrow, party, campaign, onLanded, onS
|
|
|
102
102
|
/** The dice and their stage, loaded once; undefined when the browser cannot draw them, and then the plate comes alone. */
|
|
103
103
|
const loadRoller = () => {
|
|
104
104
|
const surface = canvas.current;
|
|
105
|
-
|
|
105
|
+
// A load that failed, as the game away for a moment, is tried again at the next throw.
|
|
106
|
+
roller.current ??= surface === null ? Promise.resolve(undefined) : import("./roller.js").then((module) => module.makeRoller(surface)).catch(() => {
|
|
107
|
+
roller.current = undefined;
|
|
108
|
+
return undefined;
|
|
109
|
+
});
|
|
106
110
|
return roller.current;
|
|
107
111
|
};
|
|
108
112
|
/** Throws these dice, each landing on its value, then shows the plate, and fades it all after a while; the plate alone when the dice cannot be thrown. */
|
package/dist/dashboard/footer.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
|
2
2
|
// The page's foot, under a line across the whole page as the head's: our copyright, the code on GitHub and the package on npm, a heart to support the project,
|
|
3
3
|
// and the game system with the credit its source asks for (PLAN, phase 2).
|
|
4
4
|
import { Icon } from "./icons.js";
|
|
5
|
-
import { systemTitleLabel } from "./labels.js";
|
|
5
|
+
import { systemNameLabel, systemTitleLabel } from "./labels.js";
|
|
6
6
|
import { t } from "./text.js";
|
|
7
7
|
/** Where the project lives, and how to support it. */
|
|
8
8
|
export const footLinks = {
|
|
@@ -13,5 +13,5 @@ export const footLinks = {
|
|
|
13
13
|
};
|
|
14
14
|
/** The foot of the page: who made it and where it lives, how to support it, and the game system's credits. */
|
|
15
15
|
export function PageFoot({ product, system }) {
|
|
16
|
-
return (_jsxs("footer", { class: "page-foot", children: [_jsxs("p", { class: "foot-own", children: [_jsxs("span", { children: ["© 2026 ", _jsx("a", { href: footLinks.author, target: "_blank", rel: "noreferrer", children: "Stefano Caronia" }), ` · ${product}`] }), _jsx("a", { href: footLinks.github, target: "_blank", rel: "noreferrer", "aria-label": t("{product} on GitHub", { product }), "data-tip": "GitHub", children: _jsx(Icon, { name: "github" }) }), _jsx("a", { href: footLinks.npm, target: "_blank", rel: "noreferrer", "aria-label": t("{product} on npm", { product }), "data-tip": "npm", children: _jsx(Icon, { name: "npm" }) }), _jsxs("a", { class: "foot-support", href: footLinks.support, target: "_blank", rel: "noreferrer", children: [_jsx(Icon, { name: "heart" }), t("Support {product}", { product })] })] }), system && (_jsxs("p", { class: "foot-system", children: [_jsx("span", { children: `${system.name} · ${systemTitleLabel(system.title)}` }), system.attribution && (_jsxs("details", { children: [_jsx("summary", { children: t("Credits") }), _jsx("p", { children: system.attribution })] }))] }))] }));
|
|
16
|
+
return (_jsxs("footer", { class: "page-foot", children: [_jsxs("p", { class: "foot-own", children: [_jsxs("span", { children: ["© 2026 ", _jsx("a", { href: footLinks.author, target: "_blank", rel: "noreferrer", children: "Stefano Caronia" }), ` · ${product}`] }), _jsx("a", { href: footLinks.github, target: "_blank", rel: "noreferrer", "aria-label": t("{product} on GitHub", { product }), "data-tip": "GitHub", children: _jsx(Icon, { name: "github" }) }), _jsx("a", { href: footLinks.npm, target: "_blank", rel: "noreferrer", "aria-label": t("{product} on npm", { product }), "data-tip": "npm", children: _jsx(Icon, { name: "npm" }) }), _jsxs("a", { class: "foot-support", href: footLinks.support, target: "_blank", rel: "noreferrer", children: [_jsx(Icon, { name: "heart" }), t("Support {product}", { product })] })] }), system && (_jsxs("p", { class: "foot-system", children: [_jsx("span", { children: `${systemNameLabel(system.name)} · ${systemTitleLabel(system.title)}` }), system.attribution && (_jsxs("details", { children: [_jsx("summary", { children: t("Credits") }), _jsx("p", { children: system.attribution })] }))] }))] }));
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { fieldLabel, phraseLabel } from "./labels.js";
|
|
2
|
-
import { isolated, listText, systemWord, systemWordAnyCase, t } from "./text.js";
|
|
1
|
+
import { fieldLabel, phraseLabel, strangerLabel } from "./labels.js";
|
|
2
|
+
import { isolated, listText, pageLocale, systemWord, systemWordAnyCase, t } from "./text.js";
|
|
3
3
|
/** A game date in the page's language: day 3, 06:00, or day 3; any other text as it is. */
|
|
4
4
|
export function gameDateLabel(date) {
|
|
5
5
|
const read = readDate(date);
|
|
@@ -31,7 +31,7 @@ export function calendarMonthLabel(month, year) {
|
|
|
31
31
|
at.setUTCFullYear(year);
|
|
32
32
|
}
|
|
33
33
|
const options = { month: "long", timeZone: "UTC", ...(year === undefined ? {} : { year: "numeric" }) };
|
|
34
|
-
return new Intl.DateTimeFormat(
|
|
34
|
+
return new Intl.DateTimeFormat(pageLocale(), options).format(at);
|
|
35
35
|
}
|
|
36
36
|
// The core's real months (TIM-8), which the page's language names on its own, as it bends them: 1 мая, 1. května.
|
|
37
37
|
const realMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
@@ -42,7 +42,7 @@ function realDayLabel(date, month) {
|
|
|
42
42
|
at.setUTCFullYear(date.year);
|
|
43
43
|
}
|
|
44
44
|
const options = { day: "numeric", month: "long", timeZone: "UTC", ...(date.year === undefined ? {} : { year: "numeric" }) };
|
|
45
|
-
return new Intl.DateTimeFormat(
|
|
45
|
+
return new Intl.DateTimeFormat(pageLocale(), options).format(at);
|
|
46
46
|
}
|
|
47
47
|
// A date within a phrase is put in it by its day and hour, which each language bends as the phrase needs: до дня 3, jusqu'au jour 3.
|
|
48
48
|
/** Until a game date, in the page's language: until day 3, 06:00. */
|
|
@@ -66,7 +66,9 @@ export function effectEndLabel(end) {
|
|
|
66
66
|
return untilDateLabel(end.date);
|
|
67
67
|
}
|
|
68
68
|
if ("round" in end) {
|
|
69
|
-
|
|
69
|
+
// A copy the character does not know by name, as creature B2, as the scene names it: Creatura B2.
|
|
70
|
+
const turn = /^creature \S+$/.test(end.turn) ? strangerLabel(end.turn) : nameLabel(end.turn);
|
|
71
|
+
return t("until {name}'s turn in round {round}", { name: turn, round: end.round });
|
|
70
72
|
}
|
|
71
73
|
return "scene" in end ? t("until the scene ends") : systemWord("words", `until ${end.occasion}`) ?? t("until {occasion}", { occasion: systemWord("words", end.occasion) ?? end.occasion });
|
|
72
74
|
}
|
|
@@ -127,7 +129,8 @@ export function memberPlaceLabel(place) {
|
|
|
127
129
|
}
|
|
128
130
|
/** A region's terrain in the page's language, as the game system says it: difficult terrain. */
|
|
129
131
|
export function terrainLabel(terrain) {
|
|
130
|
-
|
|
132
|
+
// The page's own word for difficult ground, where the game has none, as free play.
|
|
133
|
+
return systemWord("words", `${terrain} terrain`) ?? t("{terrain} terrain", { terrain: systemWord("words", terrain) ?? (terrain === "difficult" ? t("difficult") : terrain) });
|
|
131
134
|
}
|
|
132
135
|
/** A name of the story as the character knows it, in the page's language: someone, a creature, somewhere for those it does not know. */
|
|
133
136
|
export function nameLabel(name) {
|
|
@@ -136,32 +139,29 @@ export function nameLabel(name) {
|
|
|
136
139
|
}
|
|
137
140
|
/** A fact of the story in the page's language, as a sentence: Ettore: PF 14 → 12. */
|
|
138
141
|
export function factLabel(fact) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
})();
|
|
164
|
-
return told;
|
|
142
|
+
switch (fact.kind) {
|
|
143
|
+
case "counter":
|
|
144
|
+
// A stack goes by the name its entry gives it (STK-12), never a field's word.
|
|
145
|
+
return t("{who}: {field} {before} → {after}", { who: subjectLabel(fact.who), field: fact.stack === true ? fact.field : fieldLabel(fact.field), before: fact.before, after: fact.after });
|
|
146
|
+
case "time":
|
|
147
|
+
return fact.from === undefined
|
|
148
|
+
? storyStartLabel(fact.to)
|
|
149
|
+
: t("Time passes: {from} → {to}", { from: gameDateLabel(fact.from), to: gameDateLabel(fact.to) });
|
|
150
|
+
case "moved":
|
|
151
|
+
return fact.to === undefined
|
|
152
|
+
? t("{who} to the open", { who: listText(fact.who.map((name, index) => (index === 0 ? subjectLabel(name) : nameLabel(name)))) })
|
|
153
|
+
: t("{who} to {place}", { who: listText(fact.who.map((name, index) => (index === 0 ? subjectLabel(name) : nameLabel(name)))), place: nameLabel(fact.to) });
|
|
154
|
+
case "learned":
|
|
155
|
+
return t("{who} learned: {what}", { who: fact.who, what: listText(fact.what.map((link) => link.replace("#", " › "))) });
|
|
156
|
+
case "effect":
|
|
157
|
+
return t("{who}: {effect}", { who: subjectLabel(fact.who), effect: effectLabel(fact) });
|
|
158
|
+
case "effect-ended":
|
|
159
|
+
return t("{who}: {effect} ended", { who: subjectLabel(fact.who), effect: effectName(fact.effect) });
|
|
160
|
+
case "back":
|
|
161
|
+
return t("Back to save {save}: what came after it is gone", { save: fact.save });
|
|
162
|
+
case "quest":
|
|
163
|
+
return fact.status === "open" ? t("Quest taken: {quest}", { quest: fact.quest }) : fact.status === "done" ? t("Quest completed: {quest}", { quest: fact.quest }) : t("Quest failed: {quest}", { quest: fact.quest });
|
|
164
|
+
}
|
|
165
165
|
}
|
|
166
166
|
/** When the story starts: on day 1, 18:00. */
|
|
167
167
|
function storyStartLabel(date) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae
|
|
1
|
+
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae 423af5fa 17577253 f699a840 2731ea0e 59c1a762. Change the English, then run it again. -->
|
|
2
2
|
# RPG Engine: الدليل الكامل
|
|
3
3
|
|
|
4
4
|
يتيح لك **RPG Engine** لعب لعبة أدوار على الطاولة مع **ذكاء اصطناعي في دور مدير اللعبة**. تتحدث مع مدير اللعبة في **محادثة**. أما RPG Engine فيعمل خلف الكواليس: **يتذكر العالم**، و**يرمي النرد**، و**يمسك الحسابات**. بجانب المحادثة تُبقي صفحة مفتوحة في المتصفح، هي **لوحة التحكم**، وفيها ورقة شخصيتك والنرد والخرائط وسجلك.
|
|
@@ -242,7 +242,7 @@ rpg init "The Salt Isles"
|
|
|
242
242
|
|
|
243
243
|
## 6. الإضافات <!-- icon: plus -->
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
تضيف الإضافة شيئًا إلى الحملة فوق نظام اللعبة: ميزة مثل الطقس الذي يتغير مع كل فجر، أو فتح قفل بالنرد. تُضاف الإضافة من الحزم › إضافة، من القائمة أو باسمها على npm أو من مجلد أو ملف. الإضافة التي ليست منّا تحمل شيفرة برمجية، ولا تُضاف إلا بموافقتك، في نافذة على حاسوبك. وإذا كانت الإضافة مصنوعة لنظام لعبة آخر، فإنها تذكر ذلك ولا تُضاف. من الحزم › المثبتة تحدّث إضافة أو تزيلها. ويستطيع مدير اللعبة أن يضيف إضافة أيضًا، عندما تطلب منه ذلك.
|
|
246
246
|
|
|
247
247
|
---
|
|
248
248
|
|
|
@@ -276,9 +276,9 @@ rpg init "The Salt Isles"
|
|
|
276
276
|
|
|
277
277
|
- **أنت مدير اللعبة**، والذكاء الاصطناعي يلعب دور الفريق.
|
|
278
278
|
- **وضع المؤلف**: اكتب مغامرة مع الذكاء الاصطناعي، ثم صدّرها وشاركها.
|
|
279
|
-
- **عدة لاعبين على الحاسوب نفسه**، لكل
|
|
280
|
-
-
|
|
281
|
-
- **ألعاب أخرى**: مزيد من أنظمة
|
|
279
|
+
- **عدة لاعبين على الحاسوب نفسه**، لكل لاعب شخصيته، ويتناوبون الأدوار في المحادثة نفسها.
|
|
280
|
+
- **المزيد من الإضافات**: عوالم وميزات وقواعد خاصة للمشاركة.
|
|
281
|
+
- **ألعاب أخرى**: مزيد من أنظمة الألعاب، ونظامك الخاص.
|
|
282
282
|
|
|
283
283
|
---
|
|
284
284
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae
|
|
1
|
+
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae 423af5fa 17577253 f699a840 2731ea0e 59c1a762. Change the English, then run it again. -->
|
|
2
2
|
# RPG Engine: kompletní průvodce
|
|
3
3
|
|
|
4
4
|
**RPG Engine** ti umožní hrát stolní hru na hrdiny s **AI jako Pánem jeskyně**. S Pánem jeskyně si povídáš v **chatu**. RPG Engine pracuje v pozadí: **pamatuje si svět**, **hází kostkami** a **vede účty**. Vedle chatu máš v prohlížeči otevřenou stránku, **dashboard**, s deníkem postavy, kostkami, mapami a kronikou.
|
|
@@ -242,7 +242,7 @@ Herní systém je balíček: Pán jeskyně nainstaluje jeden z npm, ze složky n
|
|
|
242
242
|
|
|
243
243
|
## 6. Rozšíření <!-- icon: plus -->
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
Rozšíření přidá do kampaně něco navíc k jejímu hernímu systému: například počasí, které se mění každý úsvit, nebo páčení zámků kostkami. Přidáš ho v Packages › Add, buď ze seznamu, nebo podle názvu na npm, ze složky či ze souboru. Rozšíření, které nepochází od nás, obsahuje kód. Přidá se proto až s tvým souhlasem v okně tvého počítače. Rozšíření vytvořené pro jiný herní systém to oznámí a nepřidá se. V Packages › Installed rozšíření aktualizuješ nebo odebereš. Pán jeskyně může rozšíření přidat také, když o to požádáš.
|
|
246
246
|
|
|
247
247
|
---
|
|
248
248
|
|
|
@@ -272,13 +272,13 @@ Každý příkaz, který Pán jeskyně používá, lze spustit i ve složce kamp
|
|
|
272
272
|
|
|
273
273
|
---
|
|
274
274
|
|
|
275
|
-
## 9.
|
|
275
|
+
## 9. Co přijde později <!-- icon: hourglass -->
|
|
276
276
|
|
|
277
|
-
- **Ty jako Pán jeskyně**, zatímco
|
|
278
|
-
- **Režim autora**: napiš
|
|
277
|
+
- **Ty jako Pán jeskyně**, zatímco družinu bude hrát AI.
|
|
278
|
+
- **Režim autora**: napiš s AI dobrodružství, pak ho exportuj a sdílej.
|
|
279
279
|
- **Více hráčů na jednom počítači**, každý s vlastní postavou, střídající se ve stejném chatu.
|
|
280
|
-
- **
|
|
281
|
-
- **
|
|
280
|
+
- **Další rozšíření**: světy, funkce a domácí pravidla ke sdílení.
|
|
281
|
+
- **Další hry**: více herních systémů i tvoje vlastní.
|
|
282
282
|
|
|
283
283
|
---
|
|
284
284
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae
|
|
1
|
+
<!-- Translated from en.md, part by part, by npm run translate: c38df721 53ff5eaa 9f1774ef 4c5cd093 019e9516 8e136927 7da791ae 423af5fa 17577253 f699a840 2731ea0e 59c1a762. Change the English, then run it again. -->
|
|
2
2
|
# RPG Engine: den komplette guide
|
|
3
3
|
|
|
4
4
|
**RPG Engine** lader dig spille et bordrollespil med **en AI som spilleder**. Du taler med spillederen i en **chat**. RPG Engine arbejder i baggrunden: det **husker verdenen**, **slår med terningerne** og **fører regnskabet**. Ved siden af chatten har du en side åben i din browser, **dashboardet**, med dit karakterark, terningerne, kortene og din dagbog.
|
|
@@ -242,7 +242,7 @@ Et spilsystem er en pakke: Spillederen installerer et fra npm, en mappe eller en
|
|
|
242
242
|
|
|
243
243
|
## 6. Udvidelser <!-- icon: plus -->
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
En udvidelse tilføjer noget til en kampagne oveni dens spilsystem: en funktion som vejret, der skifter ved hver daggry, eller det at dirke en lås op med terninger. Tilføj en under Packages › Add, fra listen eller med navnet på npm, en mappe eller en fil. En udvidelse, der ikke er fra os, har kode med sig og kommer kun med dit ja i et vindue på din computer. En udvidelse, der er lavet til et andet spilsystem, siger hvilket og bliver ikke tilføjet. Under Packages › Installed opdaterer du en udvidelse eller fjerner den. Spillederen kan også tilføje en, når du beder om det.
|
|
246
246
|
|
|
247
247
|
---
|
|
248
248
|
|
|
@@ -275,9 +275,9 @@ Hver kommando, spilleder bruger, kan også køres i kampagnemappen: `rpg --help`
|
|
|
275
275
|
## 9. Kommer senere <!-- icon: hourglass -->
|
|
276
276
|
|
|
277
277
|
- **Dig som spilleder**, mens AI'en spiller gruppen.
|
|
278
|
-
- **Forfattertilstand**: skriv et eventyr sammen med AI'en, eksportér
|
|
279
|
-
- **Flere spillere på samme computer**, hver med sin egen karakter, som skiftes til at
|
|
280
|
-
- **
|
|
278
|
+
- **Forfattertilstand**: skriv et eventyr sammen med AI'en, og eksportér og del det bagefter.
|
|
279
|
+
- **Flere spillere på samme computer**, hver med sin egen karakter, som skiftes til at bruge den samme chat.
|
|
280
|
+
- **Flere udvidelser**: verdener, funktioner og husregler, som du kan dele.
|
|
281
281
|
- **Andre spil**: flere spilsystemer og dine egne.
|
|
282
282
|
|
|
283
283
|
---
|