@rpgm-tools/neo-angband-mod-sdk 1.17.0 → 1.18.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/standards.d.ts.map +1 -1
- package/dist/standards.js +30 -36
- package/dist/standards.js.map +1 -1
- package/docs/AUTHORING.md +50 -199
- package/docs/MOD_COMPATIBILITY.md +100 -412
- package/docs/MOD_LIFECYCLE.md +135 -582
- package/docs/MOD_REACH.md +275 -1153
- package/docs/MOD_SEAMS.md +216 -850
- package/docs/PLUGINS.md +214 -848
- package/docs/README.md +61 -211
- package/docs/REGION_INPUT.md +134 -456
- package/docs/REQUIREMENTS.md +9 -13
- package/docs/tutorials/06-add-an-option.md +7 -19
- package/docs/tutorials/07-add-an-artifact.md +14 -47
- package/package.json +1 -1
- package/src/standards.ts +30 -36
package/dist/standards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards.d.ts","sourceRoot":"","sources":["../src/standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,uDAAuD;AACvD,eAAO,MAAM,WAAW,cAAc,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuB5D;AAED,wFAAwF;AACxF,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,CAAC;AAE1D,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,sEAAsE;IACtE,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,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A2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;CACtB;AAkBD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAwSlD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,WAAW,CAoBvD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA+B7C"}
|
package/dist/standards.js
CHANGED
|
@@ -150,7 +150,8 @@ export const MOD_REQUIREMENTS = [
|
|
|
150
150
|
level: "required",
|
|
151
151
|
title: "Declare id, name, version and shape, and nothing malformed",
|
|
152
152
|
why: "These four are what the manager lists and what the loader keys everything by. " +
|
|
153
|
-
"The check
|
|
153
|
+
"The check uses the game's own validator, so a manifest that passes here passes " +
|
|
154
|
+
"at install too.",
|
|
154
155
|
check: (mod) => {
|
|
155
156
|
const m = manifestObject(mod);
|
|
156
157
|
if (m === null)
|
|
@@ -172,14 +173,13 @@ export const MOD_REQUIREMENTS = [
|
|
|
172
173
|
id: "declare-a-repository",
|
|
173
174
|
level: "required",
|
|
174
175
|
title: "Say where the mod lives, in `repository`",
|
|
175
|
-
why: "It
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"itself than the same files fetched from a repository would.",
|
|
176
|
+
why: "It identifies the mod however it was obtained. The game pins an installed mod to " +
|
|
177
|
+
"the repository it came from and will not let a different one replace it, so a " +
|
|
178
|
+
"mod that names no repository can be quietly overwritten by anything claiming its " +
|
|
179
|
+
"id. It is also the only way an update can ever be offered, and the only place a " +
|
|
180
|
+
"player can go to read about the mod. Archives need it just as checkouts do: a " +
|
|
181
|
+
"mod handed over as a zip is the same mod, and it should carry the same " +
|
|
182
|
+
"information about itself as the files fetched from its repository.",
|
|
183
183
|
check: (mod) => {
|
|
184
184
|
const m = manifestObject(mod);
|
|
185
185
|
if (m === null)
|
|
@@ -207,10 +207,9 @@ export const MOD_REQUIREMENTS = [
|
|
|
207
207
|
level: "required",
|
|
208
208
|
title: "Name the author",
|
|
209
209
|
why: "The game shows it beside the mod's name, so a player can tell two mods of the " +
|
|
210
|
-
"same name apart and knows whose work they are about to run.
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"short; anything longer belongs in `description`.",
|
|
210
|
+
"same name apart and knows whose work they are about to run. Use the name you " +
|
|
211
|
+
"want shown. It shares a line with the mod's name and version, so keep it short " +
|
|
212
|
+
"and put anything longer in `description`.",
|
|
214
213
|
check: (mod) => {
|
|
215
214
|
const m = manifestObject(mod);
|
|
216
215
|
if (m === null)
|
|
@@ -229,10 +228,9 @@ export const MOD_REQUIREMENTS = [
|
|
|
229
228
|
level: "required",
|
|
230
229
|
title: "Declare the engine range the mod was written against",
|
|
231
230
|
why: "Without it the mod is offered to every version of the game forever, including " +
|
|
232
|
-
"the one that changes
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"were the ones nothing had checked.",
|
|
231
|
+
"the one that changes something it depends on. With it, a player is told the mod " +
|
|
232
|
+
"is too old instead of watching it misbehave. Every mod that has shipped declared " +
|
|
233
|
+
"one, and the mods without one were the ones no check had covered.",
|
|
236
234
|
check: (mod) => {
|
|
237
235
|
const m = manifestObject(mod);
|
|
238
236
|
if (m === null)
|
|
@@ -258,12 +256,12 @@ export const MOD_REQUIREMENTS = [
|
|
|
258
256
|
id: "capabilities-recognized",
|
|
259
257
|
level: "required",
|
|
260
258
|
title: "Request only capabilities the game knows",
|
|
261
|
-
why: "A capability string is the
|
|
262
|
-
"runtime
|
|
263
|
-
"that cannot
|
|
264
|
-
"player has already installed it. This check
|
|
265
|
-
"the same function the loader calls, so a typo
|
|
266
|
-
"fail
|
|
259
|
+
why: "A capability string is what the player reads before agreeing to install, and it " +
|
|
260
|
+
"is the gate the runtime opens. An unrecognized string, or a capability on a pack " +
|
|
261
|
+
"that cannot run code, is refused when the game loads the plugin, which is after " +
|
|
262
|
+
"the player has already installed it. This check calls " +
|
|
263
|
+
"CapabilitySet.fromManifest, the same function the loader calls, so a typo cannot " +
|
|
264
|
+
"pass here and then fail at load.",
|
|
267
265
|
check: (mod) => {
|
|
268
266
|
const m = manifestObject(mod);
|
|
269
267
|
if (m === null)
|
|
@@ -292,10 +290,10 @@ export const MOD_REQUIREMENTS = [
|
|
|
292
290
|
id: "plugin-declares-modapi",
|
|
293
291
|
level: "required",
|
|
294
292
|
title: `Declare modApi if the mod ships ${PLUGIN_FILE}`,
|
|
295
|
-
why: "The host refuses an incompatible plugin
|
|
296
|
-
"
|
|
297
|
-
"module's top-level code already
|
|
298
|
-
"against, and the mod's code is loaded
|
|
293
|
+
why: "The host refuses an incompatible plugin before importing it, and it can only do " +
|
|
294
|
+
"that from the manifest, because a version check inside the module would run " +
|
|
295
|
+
"after the module's top-level code already had. Without modApi there is nothing " +
|
|
296
|
+
"to check against, and the mod's code is loaded unchecked.",
|
|
299
297
|
check: (mod) => {
|
|
300
298
|
if (!hasFile(mod, PLUGIN_FILE))
|
|
301
299
|
return null;
|
|
@@ -334,9 +332,9 @@ export const MOD_REQUIREMENTS = [
|
|
|
334
332
|
id: "archives-declared",
|
|
335
333
|
level: "required",
|
|
336
334
|
title: "Declare committed .zip archives in payload.archives",
|
|
337
|
-
why: "
|
|
338
|
-
"
|
|
339
|
-
"
|
|
335
|
+
why: "Only the manifest can say whether a .zip is a pack to unpack or a file to store " +
|
|
336
|
+
"as it is; a file list cannot. An undeclared archive is installed unopened, so " +
|
|
337
|
+
"the mod is present, listed and enabled, and does nothing.",
|
|
340
338
|
check: (mod) => {
|
|
341
339
|
/* Asked of the REPOSITORY, because after unpacking the zips are gone and the
|
|
342
340
|
* question no longer has an answer. This is the rule that had already shipped
|
|
@@ -399,7 +397,7 @@ export const MOD_REQUIREMENTS = [
|
|
|
399
397
|
level: "recommended",
|
|
400
398
|
title: "Write a description",
|
|
401
399
|
why: "It is the only thing a player has to decide by, since nothing else in the game " +
|
|
402
|
-
"knows what the mod does.
|
|
400
|
+
"knows what the mod does.",
|
|
403
401
|
check: (mod) => {
|
|
404
402
|
const m = manifestObject(mod);
|
|
405
403
|
if (m === null)
|
|
@@ -473,11 +471,7 @@ export function requirementsMarkdown() {
|
|
|
473
471
|
"",
|
|
474
472
|
"# What a mod must provide",
|
|
475
473
|
"",
|
|
476
|
-
"Every rule below is
|
|
477
|
-
"function that generated this page is the one the game runs when it installs a",
|
|
478
|
-
"mod, and the one `neo-angband-mod-check` runs for you before you publish. So",
|
|
479
|
-
"this page cannot fall behind the game: if a rule changes, this text changes with",
|
|
480
|
-
"it, and a test fails if it does not.",
|
|
474
|
+
"Every rule below is code in `packages/mod-sdk/src/standards.ts`. The same function generates these docs, runs when the game installs a mod, and runs when `neo-angband-mod-check` checks your mod before you publish. If a rule changes, the text here changes with it, and a test fails if the two ever disagree.",
|
|
481
475
|
"",
|
|
482
476
|
"Check your mod:",
|
|
483
477
|
"",
|
package/dist/standards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards.js","sourceRoot":"","sources":["../src/standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAqB,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,uDAAuD;AACvD,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,UAAU,CA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ACnB,gBAAgB;QAChB,EAAE;QACF,iFAAiF;QACjF,EAAE;QACF,OAAO,CAAC,aAAa,CAAC;KACvB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/docs/AUTHORING.md
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
# Authoring shortcuts: drafting a record that actually works
|
|
2
2
|
|
|
3
|
-
Adding a record to a pack
|
|
4
|
-
composition takes it. Adding a record that **works** is the hard part, and it is
|
|
5
|
-
hard in a way no error message reaches:
|
|
3
|
+
Adding a record to a pack is easy: it is JSON, and composition accepts it. Adding a record that works is harder, because the usual mistakes produce no error message:
|
|
6
4
|
|
|
7
|
-
- an object with no `alloc` is legal, loads cleanly, and never appears in the
|
|
8
|
-
|
|
9
|
-
- a
|
|
10
|
-
nothing;
|
|
11
|
-
- a forty-first potion is legal, loads cleanly, and consumes the last unused
|
|
12
|
-
flavour, so some other potion quietly stops being distinguishable.
|
|
5
|
+
- an object with no `alloc` is legal, loads cleanly, and never appears in the dungeon;
|
|
6
|
+
- a monster whose `base` is misspelled is legal, loads cleanly, and binds to nothing;
|
|
7
|
+
- a forty-first potion is legal, loads cleanly, and uses up the last unused flavour, so some other potion quietly stops being distinguishable.
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
knows what a working record looks like. Core's own 3,279 records know, and the
|
|
16
|
-
SDK asks them.
|
|
9
|
+
The pipeline cannot report any of that, because it has no model of what a working record looks like. Core's own 3,279 records are that model, and the SDK compares your drafts against them.
|
|
17
10
|
|
|
18
11
|
Everything on this page is in `@rpgm-tools/neo-angband-mod-sdk` and needs no
|
|
19
12
|
game running.
|
|
@@ -99,16 +92,9 @@ weight = 140 <- the median of the 7 core object records closest to level 20 wit
|
|
|
99
92
|
|
|
100
93
|
### Why "modelled on", not "assembled from defaults"
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
across the whole file, and produced a sword carrying an `armor` block, because
|
|
104
|
-
59% of core's objects have one. **Field frequency across a file is not a fact
|
|
105
|
-
about any record in it.** So the shape is taken from core's nearest comparable
|
|
106
|
-
record and only the numbers are averaged.
|
|
95
|
+
An earlier version built the shape from how often each field appears across the whole file, and produced a sword with an `armor` block because 59% of core's objects have one. How common a field is across a file says nothing about whether a particular record should have it, so the shape now comes from core's nearest comparable record and only the numbers are averaged.
|
|
107
96
|
|
|
108
|
-
|
|
109
|
-
`flags`, `values`, `slay`, `brand`, `curse`, `effect`, `act`, `blow`, `spells`,
|
|
110
|
-
`name`, `desc`, `msg`. A template that quietly grants powers hands you an item
|
|
111
|
-
that does things you never asked for and would not think to look for.
|
|
97
|
+
The model never lends the fields that confer behaviour or identity: `flags`, `values`, `slay`, `brand`, `curse`, `effect`, `act`, `blow`, `spells`, `name`, `desc`, `msg`. Copying those would hand you an item that does things you never asked for and would not think to look for.
|
|
112
98
|
|
|
113
99
|
---
|
|
114
100
|
|
|
@@ -129,52 +115,33 @@ Every step of `draftRecord` is callable on its own.
|
|
|
129
115
|
|
|
130
116
|
### "What should it cost?"
|
|
131
117
|
|
|
132
|
-
|
|
133
|
-
but it **is** derivable from precedent, and precedent is what core's 375 objects
|
|
134
|
-
are. `suggestFields` narrows twice: to the same item type, then to the seven
|
|
135
|
-
records nearest in level. Only numeric fields are suggested; a name, a
|
|
136
|
-
description or a set of flags is a design decision.
|
|
118
|
+
Angband's costs are set by hand, so there is no formula for a price, but core's 375 objects give plenty of precedent. `suggestFields` narrows twice: first to the same item type, then to the seven records nearest in level. It suggests numeric fields only; a name, a description or a set of flags is a design decision.
|
|
137
119
|
|
|
138
|
-
With no comparable record it falls back to the file-wide median and says so in
|
|
139
|
-
the evidence line, so a weak suggestion is never dressed up as a strong one.
|
|
120
|
+
With no comparable record it falls back to the file-wide median and says so in the evidence line, so you can tell a weak suggestion from a strong one.
|
|
140
121
|
|
|
141
122
|
---
|
|
142
123
|
|
|
143
124
|
## What `checkRecords` finds
|
|
144
125
|
|
|
145
|
-
|
|
126
|
+
`checkRecords` takes two arguments:
|
|
146
127
|
|
|
147
128
|
```ts
|
|
148
129
|
checkRecords(subject, all)
|
|
149
130
|
```
|
|
150
131
|
|
|
151
|
-
`subject` is
|
|
152
|
-
**resolve against**: core plus every loaded pack. Checking a mod against itself
|
|
153
|
-
would report every reference to core as broken.
|
|
132
|
+
`subject` is the set of records it reports on, meaning yours. `all` is what they may resolve against: core plus every loaded pack. Checking a mod against itself alone would report every reference to core as broken.
|
|
154
133
|
|
|
155
|
-
Findings are graded, and
|
|
156
|
-
the manifest validator and the declared-field rule, where the rules are the
|
|
157
|
-
engine's own.
|
|
134
|
+
Findings are graded, and `checkRecords` never refuses anything. Refusals happen in the manifest validator and the declared-field rule, which enforce the engine's own rules.
|
|
158
135
|
|
|
159
136
|
### It also runs when the GAME loads your mod
|
|
160
137
|
|
|
161
|
-
Since 2026-08-09
|
|
162
|
-
function every host composes through, runs the same check over every pack it
|
|
163
|
-
loads and puts what it finds on that mod's own row in the mod manager, so a
|
|
164
|
-
player who installs your mod from a zip sees the same sentences you do. Three
|
|
165
|
-
differences from `build()`, all deliberate:
|
|
138
|
+
Since 2026-08-09 the check also runs at load time. `composeContentPacks`, the function every host composes through, runs it over every pack it loads and puts the findings on that mod's own row in the mod manager, so a player who installs your mod from a zip sees the same sentences you do. It differs from `build()` in three ways:
|
|
166
139
|
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- **The base game is not reported on.** Core's own data raises warnings against
|
|
171
|
-
core's own blueprint; those are upstream warts the port keeps on purpose.
|
|
172
|
-
- **A patch is checked as the record it produced**, not as you wrote it, so
|
|
173
|
-
`{"speed": 120}` is not a record missing twenty fields.
|
|
140
|
+
- Only `warn` and above are shown. A `hint` is drafting advice for when you are looking at the draft, and dozens of them on a player's screen would bury the one line that matters.
|
|
141
|
+
- The base game is not reported on. Core's own data raises warnings against core's own blueprint, and those are upstream warts the port keeps.
|
|
142
|
+
- A patch is checked as the record it produced rather than as you wrote it, so `{"speed": 120}` is not reported as a record missing twenty fields.
|
|
174
143
|
|
|
175
|
-
|
|
176
|
-
If it is clean at `warn`, their mod manager is quiet. There is nothing extra to
|
|
177
|
-
run and nothing to opt into.
|
|
144
|
+
In practice, your users see what your `build()` output shows. If it is clean at `warn`, their mod manager stays quiet, and there is nothing extra to run or opt into.
|
|
178
145
|
|
|
179
146
|
| Level | Meaning | Examples |
|
|
180
147
|
|---|---|---|
|
|
@@ -249,35 +216,19 @@ build.problems; // composition's own refusals
|
|
|
249
216
|
build.ok; // false if anything is at `error`
|
|
250
217
|
```
|
|
251
218
|
|
|
252
|
-
|
|
219
|
+
- The builder touches no filesystem. `emit()` hands back paths and bytes and leaves the writing to you, so the same builder works from a CLI, from a test and from an in-game editor.
|
|
220
|
+
- It checks the composed result rather than the draft. A patch that breaks a reference is invisible in your own files, because your files do not contain the record it broke.
|
|
221
|
+
- It reports problems instead of throwing. A missing dependency is an `error` finding, not a stack trace.
|
|
253
222
|
|
|
254
|
-
|
|
255
|
-
The same builder works from a CLI, from a test, and from an in-game editor.
|
|
256
|
-
- **Checks the composed result**, not the draft. A patch that breaks a reference
|
|
257
|
-
is invisible in your own files, because your files do not contain the record
|
|
258
|
-
it broke.
|
|
259
|
-
- **Reports instead of throwing.** A missing dependency is an `error` finding,
|
|
260
|
-
not a stack trace.
|
|
261
|
-
|
|
262
|
-
`build.ok` ignores warnings on purpose: every warning it can produce is
|
|
263
|
-
something core's own data does somewhere, so a builder that refused on them
|
|
264
|
-
would refuse to build Angband.
|
|
223
|
+
`build.ok` ignores warnings because every warning it can produce is something core's own data does somewhere, so a builder that refused on warnings would refuse to build Angband.
|
|
265
224
|
|
|
266
225
|
---
|
|
267
226
|
|
|
268
227
|
## What a mod can add a record to: 41 of 44 files
|
|
269
228
|
|
|
270
|
-
|
|
271
|
-
file per record when every record has a ref no sibling claims, and it asks
|
|
272
|
-
`packages/mod-sdk/src/record-key.ts` what a ref is, which is `name` for most
|
|
273
|
-
files and something else where upstream's identity is something else.
|
|
229
|
+
That count is taken over the shipped pack; it used to be 24. Composition merges a file record by record when every record has a ref no sibling claims. `packages/mod-sdk/src/record-key.ts` defines what a ref is: `name` for most files, and something else where upstream identifies records another way.
|
|
274
230
|
|
|
275
|
-
Until 2026-08-08 the test was "a unique `name`", and three files failed it on
|
|
276
|
-
core's own data, because Angband's convention for a greater form is to reuse the
|
|
277
|
-
name with marks: `Acquirement` and `*Acquirement*`, `Little eruption` and
|
|
278
|
-
`Little eruption+`, and `ego_item` ships 23 names twice over. So a mod adding
|
|
279
|
-
one object replaced all 375 of core's, one ego replaced all 107, one vault all
|
|
280
|
-
162. Those were the three files most worth adding to. They now merge per record:
|
|
231
|
+
Until 2026-08-08 the test was "a unique `name`", and three files failed it on core's own data, because Angband names a greater form by reusing the name with marks: `Acquirement` and `*Acquirement*`, `Little eruption` and `Little eruption+`, and `ego_item` ships 23 names twice over. As a result a mod adding one object replaced all 375 of core's, one ego replaced all 107, and one vault all 162, in the three files most worth adding to. They now merge per record:
|
|
281
232
|
|
|
282
233
|
| File | Records | A mod adding one record... |
|
|
283
234
|
|---|---|---|
|
|
@@ -286,83 +237,35 @@ one object replaced all 375 of core's, one ego replaced all 107, one vault all
|
|
|
286
237
|
| `vault` | 162 | adds one, 163 |
|
|
287
238
|
| `store`, `flavor`, `brand`, `slay`, `object_base`, `trap`, `names`, ... | - | adds one, keyed by whatever upstream keys it by |
|
|
288
239
|
|
|
289
|
-
|
|
290
|
-
are config singletons: their identity *is* the file, the host binds exactly one,
|
|
291
|
-
and "I shipped `constants.json`" means "use mine". `history` has no per-record
|
|
292
|
-
identity at all: a history record is `{chart:{chart,next,roll}, phrase}` and
|
|
293
|
-
every part of that is a value a mod would legitimately change. For those three,
|
|
294
|
-
`ModProject.build` still raises `file/whole-file-replacement` as an `error`,
|
|
295
|
-
because replacing the base game's copy of a file is not something to discover
|
|
296
|
-
from a line in a list.
|
|
240
|
+
`constants`, `visuals` and `history` still take a whole file. `constants` and `visuals` are config singletons: the file is their identity, the host binds exactly one, and shipping `constants.json` means "use mine". `history` has no per-record identity at all: a history record is `{chart:{chart,next,roll}, phrase}`, and a mod could legitimately change any part of it. For those three, `ModProject.build` still raises `file/whole-file-replacement` as an `error`, so an author cannot replace the base game's copy of a file without noticing.
|
|
297
241
|
|
|
298
242
|
### What a record is called
|
|
299
243
|
|
|
300
|
-
Refs did not
|
|
301
|
-
`patchFields` / `replace` / `remove` used, so every ref that resolved before
|
|
302
|
-
still resolves:
|
|
244
|
+
Refs did not change. `patchFields`, `replace` and `remove` already used the per-record identity, so every ref that resolved before still resolves:
|
|
303
245
|
|
|
304
246
|
- `object` is `type + name`, so the Dagger is `core:sword--dagger`;
|
|
305
|
-
- `ego_item` is `name`, plus a `#` discriminator where core ships a name twice,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
*different* record's real name: `*Healing*`'s old ref is plain `Healing`'s
|
|
314
|
-
current one, and a record's own history must not cost another record its name.
|
|
315
|
-
|
|
316
|
-
That is **8 of the pack's 19 legacy aliases**, and it depends on core's data
|
|
317
|
-
rather than on the mark. `*Acquirement*` loses its alias, because core ships a
|
|
318
|
-
plain `Acquirement` scroll. `*Destruction*` keeps both of its, as a scroll and
|
|
319
|
-
as a staff, because core ships no plain `Destruction` at all, so there is
|
|
320
|
-
nothing for it to shadow. `of *Slay Orc*` loses its and `of *Slay Animal*` keeps
|
|
321
|
-
its, for the same reason. The full census is asserted row by row in
|
|
322
|
-
`record-key.test.ts`, so the count cannot drift back into prose.
|
|
323
|
-
|
|
324
|
-
None of the 8 cost anybody a working ref: every file carrying a legacy alias is
|
|
325
|
-
one that had *no* per-record addressing before the key table existed.
|
|
247
|
+
- `ego_item` is `name`, plus a `#` discriminator where core ships a name twice, as in `core:of-acid#shot-arrow`;
|
|
248
|
+
- `store` is its `STORE_*` code, `brand` and `slay` their `code`, `flavor` its base tval, and so on.
|
|
249
|
+
|
|
250
|
+
A record answers to several refs: its base key, its discriminated form, and, as an alias, the lossy slug used before 2026-08-08, so refs written against an older engine keep working. An alias is dropped where it would shadow a *different* record's real name. `*Healing*`'s old ref, for example, is plain `Healing`'s current one, and an old alias must not take a name away from another record.
|
|
251
|
+
|
|
252
|
+
That drops **8 of the pack's 19 legacy aliases**, and which ones depends on core's data rather than on the mark. `*Acquirement*` loses its alias because core ships a plain `Acquirement` scroll. `*Destruction*` keeps both of its, as a scroll and as a staff, because core has no plain `Destruction` for them to shadow. `of *Slay Orc*` loses its alias and `of *Slay Animal*` keeps its own, for the same reason. `record-key.test.ts` asserts the full census row by row.
|
|
253
|
+
|
|
254
|
+
None of the 8 breaks a working ref: every file carrying a legacy alias had no per-record addressing before the key table existed.
|
|
326
255
|
|
|
327
256
|
### Where a new record lands, and why it matters
|
|
328
257
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
the file. Appended, every one of core's 375 objects keeps its index, name, tval
|
|
333
|
-
and sval, and the new one takes the next free sval of its own base. Prepended,
|
|
334
|
-
every sword in the game would shift by one.
|
|
335
|
-
|
|
336
|
-
Composition appends because core is pack zero and a mod that declares `core` as
|
|
337
|
-
a dependency loads after it. `packages/web/src/mod-added-record.test.ts` binds
|
|
338
|
-
core's pack with and without one added object and asserts the whole table, not a
|
|
339
|
-
sample. The one thing that does move is the tail of dummy kinds `bindCore`
|
|
340
|
-
creates for special artifacts whose base sval `object.txt` never defines (the
|
|
341
|
-
Phial, the Star, the rings of power); their array index shifts by one and
|
|
342
|
-
nothing depends on it, because a savefile stores a namespaced string `kindId`
|
|
343
|
-
rather than a `kidx`.
|
|
258
|
+
New records are appended after core's, and the position matters. In upstream, `sval` is a counter rather than a field in the data: it is bumped per object base in file order (`parse_object_type`, `reference/src/obj-init.c`), and `kidx` is the record's position in the file. Appended, every one of core's 375 objects keeps its index, name, tval and sval, and the new object takes the next free sval of its own base. Prepended, every sword in the game would shift by one.
|
|
259
|
+
|
|
260
|
+
Composition appends because core is pack zero and a mod that declares `core` as a dependency loads after it. `packages/web/src/mod-added-record.test.ts` binds core's pack with and without one added object and asserts the whole table, not a sample. The one thing that does move is the tail of dummy kinds `bindCore` creates for special artifacts whose base sval `object.txt` never defines (the Phial, the Star, the rings of power). Their array index shifts by one, and nothing depends on it, because a savefile stores a namespaced string `kindId` rather than a `kidx`.
|
|
344
261
|
|
|
345
262
|
### Your artifact and the `birth_randarts` option
|
|
346
263
|
|
|
347
|
-
An artifact your mod adds
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
is worth knowing WHY, because the mechanism is position rather than a rule.
|
|
353
|
-
Upstream's `design_artifact` looks up an artifact's base kind once and its
|
|
354
|
-
skip-the-fixed-artifacts loop never refreshes that lookup, so the moment the loop
|
|
355
|
-
starts on a quest artifact it keeps skipping to the end of the array. Angband's
|
|
356
|
-
two quest artifacts are the last two records in the file, and your records are
|
|
357
|
-
appended after core's, which puts them behind the point where the skipping
|
|
358
|
-
starts. The port reproduces the quirk exactly, because a behavioural wart a
|
|
359
|
-
player can observe is core's to keep.
|
|
360
|
-
|
|
361
|
-
Two consequences for an author. Your artifact is not a random artifact even in a
|
|
362
|
-
random-artifact game, so a player who chose that option to be surprised will
|
|
363
|
-
still meet yours as you designed it. And nothing about that is a guarantee the
|
|
364
|
-
port makes on purpose, so the test above also measures the converse case: if the
|
|
365
|
-
order records are bound in ever changes, it fails and names the reason.
|
|
264
|
+
An artifact your mod adds survives a character born with random artifacts turned on. Every other artifact in the game is redesigned into a different item, but yours keeps the name, the base object and the numbers you wrote.
|
|
265
|
+
|
|
266
|
+
`packages/core/src/obj/randart-mod-artifact.test.ts` tests this, and the cause is where your records sit in the file. Upstream's `design_artifact` looks up an artifact's base kind once, and its skip-the-fixed-artifacts loop never refreshes that lookup, so once the loop starts on a quest artifact it keeps skipping to the end of the array. Angband's two quest artifacts are the last two records in the file, and your records are appended after core's, which puts them past the point where the skipping starts. The port reproduces this quirk exactly, since core keeps every behavioural wart a player can observe.
|
|
267
|
+
|
|
268
|
+
This has two consequences for you. Your artifact is not randomized even in a random-artifact game, so players who chose that option to be surprised will still meet yours as you designed it. And the port does not promise this behaviour, so the same test also checks the converse: if the order records are bound in ever changes, it fails and names the reason.
|
|
366
269
|
|
|
367
270
|
---
|
|
368
271
|
|
|
@@ -540,15 +443,9 @@ translated. Those are worth reporting.
|
|
|
540
443
|
|
|
541
444
|
## Renaming a player-toggleable rule
|
|
542
445
|
|
|
543
|
-
A rule `flag` is durable
|
|
544
|
-
is stored against that exact string in the host's own store, so replacing a flag
|
|
545
|
-
outright orphans their answer: the lookup misses, the rule falls back to its
|
|
546
|
-
declared `default`, and someone who deliberately turned your fix OFF gets it
|
|
547
|
-
back ON without being told. For a bug-fixes mod, whose defaults are all on, that
|
|
548
|
-
is the game quietly re-applying a change they had rejected.
|
|
446
|
+
A rule `flag` is durable player state. The player's choice is stored against that exact string in the host's own store, so replacing a flag outright orphans the choice: the lookup misses, the rule falls back to its declared `default`, and someone who turned your fix off gets it back on without being told. For a bug-fixes mod, whose defaults are all on, that means the game quietly re-applies a change the player had rejected.
|
|
549
447
|
|
|
550
|
-
So
|
|
551
|
-
`renamedRuleFlags`:
|
|
448
|
+
So instead of simply replacing a flag, map each retired flag to its current rule under `renamedRuleFlags`:
|
|
552
449
|
|
|
553
450
|
```json
|
|
554
451
|
"renamedRuleFlags": {
|
|
@@ -557,18 +454,9 @@ So do not simply replace one. Map each retired flag to its current rule under
|
|
|
557
454
|
}
|
|
558
455
|
```
|
|
559
456
|
|
|
560
|
-
Every destination must be one of this manifest's current `rules`.
|
|
561
|
-
must NOT be: a flag you still declare is live, and consuming its stored choice
|
|
562
|
-
as retired would destroy a setting you are still exposing. Renaming a flag to
|
|
563
|
-
itself is refused for the same reason.
|
|
457
|
+
Every destination must be one of this manifest's current `rules`. A source must not be one: a flag you still declare is live, and treating its stored choice as retired would destroy a setting you still expose. Renaming a flag to itself is refused for the same reason.
|
|
564
458
|
|
|
565
|
-
The host migrates
|
|
566
|
-
resolves defaults. Where several retired flags become one rule, the result is on
|
|
567
|
-
if ANY of them was on: turning off a fix the player had on would reintroduce a
|
|
568
|
-
bug they had chosen to be rid of, and re-enabling a sibling is the smaller
|
|
569
|
-
surprise: they can still turn the whole rule off. A choice already recorded for
|
|
570
|
-
the current flag wins outright, since it was made against the new release. The
|
|
571
|
-
old entries are then consumed, so loading again changes nothing.
|
|
459
|
+
The host migrates saved choices when it loads your enabled mod, before it resolves defaults. When several retired flags become one rule, the result is on if any of them was on. Turning off a fix the player had on would bring back a bug they chose to be rid of, whereas re-enabling a sibling is the smaller surprise, and they can still turn the whole rule off. A choice already recorded for the current flag wins outright, since it was made against the new release. The old entries are then consumed, so loading again changes nothing.
|
|
572
460
|
|
|
573
461
|
---
|
|
574
462
|
|
|
@@ -607,48 +495,11 @@ declared `default` as usual.
|
|
|
607
495
|
|
|
608
496
|
## Front-end groundwork
|
|
609
497
|
|
|
610
|
-
The host draws through a renderer-neutral `GridSurface`, and
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
small scalar `semantic.data`, so an alternative layout works from meaning rather
|
|
616
|
-
than parsing its label. Call `host.menus.handlerFor(id)` before registering when
|
|
617
|
-
you need to wrap a transformer installed by an earlier mod. A failed transform
|
|
618
|
-
is reported and the unmodified menu stays openable.
|
|
619
|
-
|
|
620
|
-
`ModPlugin.frontend?(ctx)` is now the one map-display slot. The later enabled
|
|
621
|
-
frontend wins, and only that factory is invoked; return a `WorldFrameSink` or
|
|
622
|
-
`undefined` to preserve the glyph terminal. The host invokes the extracted
|
|
623
|
-
world-render-data producer from its actual map repaint and passes the winner a
|
|
624
|
-
frozen, renderer-neutral `WorldFrame` snapshot: grids retain semantic
|
|
625
|
-
terrain, trap, object, monster, and path ids plus seen/remembered/unknown state,
|
|
626
|
-
while the glyph projection is only the current terminal fallback (including its
|
|
627
|
-
terrain-under-foreground tile inputs, even for a path over otherwise bare seen
|
|
628
|
-
terrain). That makes the
|
|
629
|
-
world data ready for an isometric or 3D consumer. TypeScript mods can write
|
|
630
|
-
`import type { WorldFrame, WorldFrameSink } from
|
|
631
|
-
"@rpgm-tools/neo-angband-mod-sdk"`; it is type-only, so it does not violate the
|
|
632
|
-
folder-plugin no-bare-runtime-import rule. Its Phase-4 control
|
|
633
|
-
executes the same producer `main.ts` calls, checks the unmodded glyph sink's
|
|
634
|
-
pre-frame `term.put` tuples, and proves an independently owned host sink
|
|
635
|
-
receives that exact frame in the same call. The Phase-5 disk fixture proves the
|
|
636
|
-
later plugin receives it and an unmodded control preserves glyph painting. The
|
|
637
|
-
snapshot has no mutable player-grid alias, so a frontend can retain a frame
|
|
638
|
-
without retaining live game state.
|
|
639
|
-
|
|
640
|
-
Input follows the same staged rule. `UiInput` is available to host code through
|
|
641
|
-
the one input door and can represent a continuous direction (vector, magnitude,
|
|
642
|
-
angle) without translating it to a keyboard arrow. A plugin declaring
|
|
643
|
-
`keymap:write` receives `ctx.keymaps` during a live game: `bind(trigger, action)`
|
|
644
|
-
claims a free keyboard trigger, `entries()` lists only that mod's claims, and
|
|
645
|
-
`rebind()` and `remove()` operate only on those claims. It cannot inspect,
|
|
646
|
-
replace, or remove player bindings or another mod's bindings. A player edit takes
|
|
647
|
-
ownership back, and host teardown removes bindings still owned by a mod before it
|
|
648
|
-
is disabled or reloaded. `input-door.ts` remains host infrastructure rather than
|
|
649
|
-
a capability. Player keymaps keep precedence over any later input consumer while
|
|
650
|
-
the root owns input; an active modal, score screen, or run interruption continues
|
|
651
|
-
to receive the player's literal key first.
|
|
498
|
+
The host draws through a renderer-neutral `GridSurface`, and the existing canvas terminal is one implementation of it. Menus are declarative front-end data. Request `registry:menu` and call `host.menus.register("core:game-menu", fn)` to rewrite one named menu's rows. The id is stable and is never a localized title. Each row carries a stable id plus `semantic.kind`, an optional `semantic.ref` and small scalar `semantic.data`, so an alternative layout can work from what a row means instead of parsing its label. If you need to wrap a transformer an earlier mod installed, call `host.menus.handlerFor(id)` before registering. A failed transform is reported, and the unmodified menu still opens.
|
|
499
|
+
|
|
500
|
+
`ModPlugin.frontend?(ctx)` is the single map-display slot. The frontend enabled later in load order wins, and only its factory is invoked; return a `WorldFrameSink`, or `undefined` to keep the glyph terminal. The host runs the world-render-data producer from its real map repaint and passes the winning frontend a frozen, renderer-neutral `WorldFrame` snapshot. Grids keep semantic terrain, trap, object, monster and path ids plus seen, remembered or unknown state. The glyph projection is only the current terminal fallback, including its terrain-under-foreground tile inputs, even for a path over otherwise bare seen terrain. The world data is therefore ready for an isometric or 3D consumer. TypeScript mods can write `import type { WorldFrame, WorldFrameSink } from "@rpgm-tools/neo-angband-mod-sdk"`; the import is type-only, so it does not break the folder-plugin rule against bare runtime imports. A control test runs the same producer `main.ts` calls, checks the unmodded glyph sink's pre-frame `term.put` tuples, and confirms that an independently owned host sink receives that exact frame in the same call. A disk fixture confirms that the later plugin receives the frame and that an unmodded control still paints glyphs. The snapshot has no mutable player-grid alias, so a frontend can keep a frame without keeping live game state.
|
|
501
|
+
|
|
502
|
+
Input is staged the same way. `UiInput` is available to host code through the single input door and can represent a continuous direction (vector, magnitude, angle) without translating it into a keyboard arrow. A plugin that declares `keymap:write` receives `ctx.keymaps` during a live game: `bind(trigger, action)` claims a free keyboard trigger, `entries()` lists only that mod's claims, and `rebind()` and `remove()` act only on those claims. A mod cannot inspect, replace or remove player bindings or another mod's bindings. A player edit takes ownership back, and when a mod is disabled or reloaded, host teardown first removes any bindings it still owns. `input-door.ts` stays host infrastructure and is not a capability. Player keymaps take precedence over any later input consumer while the root owns input; an active modal, score screen or run interruption still receives the player's literal key first.
|
|
652
503
|
|
|
653
504
|
## Knowing which mod a record came from
|
|
654
505
|
|