@rpgm-tools/neo-angband-mod-sdk 1.1.1 → 1.1.2

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/README.md CHANGED
@@ -63,7 +63,7 @@ reads them.
63
63
  - [docs/MODS.md](https://github.com/neostryder/neo-angband/blob/master/docs/MODS.md): the full modding guide
64
64
  - First-party mods: [qol](https://github.com/neostryder/neo-angband-mod-qol),
65
65
  [bug-fixes](https://github.com/neostryder/neo-angband-mod-bug-fixes),
66
- [neo-linoleum](https://github.com/neostryder/neo-angband-mod-linoleum),
66
+ [linoleum](https://github.com/neostryder/neo-angband-mod-linoleum),
67
67
  [borg](https://github.com/neostryder/neo-angband-mod-borg)
68
68
 
69
69
  ## Versioning
@@ -24,7 +24,7 @@
24
24
  * enforced it, because validateManifest never sees whether plugin.js is there.
25
25
  * - a mod whose payload is committed .zip archives must DECLARE them, or the
26
26
  * installer stores the zips unopened and the mod is present and dead. Found on
27
- * neo-linoleum by a live canary, after it had shipped that way.
27
+ * Linoleum by a live canary, after it had shipped that way.
28
28
  *
29
29
  * A rule is either `required` - the mod cannot work, and an install is refused - or
30
30
  * `recommended`, which is advice and never blocks anything. Nothing in between: a
package/dist/standards.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * enforced it, because validateManifest never sees whether plugin.js is there.
25
25
  * - a mod whose payload is committed .zip archives must DECLARE them, or the
26
26
  * installer stores the zips unopened and the mod is present and dead. Found on
27
- * neo-linoleum by a live canary, after it had shipped that way.
27
+ * Linoleum by a live canary, after it had shipped that way.
28
28
  *
29
29
  * A rule is either `required` - the mod cannot work, and an install is refused - or
30
30
  * `recommended`, which is advice and never blocks anything. Nothing in between: a
package/docs/MOD_SEAMS.md CHANGED
@@ -109,6 +109,42 @@ reference. The Phase-5 disk fixture then loads two real plugin folders, proves
109
109
  only the later one receives that production frame, and keeps an unmodded glyph
110
110
  control.
111
111
 
112
+ ## 0c. `ctx.display` is geometry, not a zoom feature
113
+
114
+ `ModPluginContext.display` is present after the web shell has a live game
115
+ surface and absent during content composition. It is the narrow access point a
116
+ display-oriented mod needs to change geometry without reaching into private
117
+ module variables:
118
+
119
+ - `snapshot()` reports the real terminal cell metrics, current play or map
120
+ viewport, cave-space origin and size, level bounds, layout, and named screen
121
+ regions.
122
+ - `setGrid()` switches `GlyphTerm`'s existing reflow mode at runtime. The
123
+ supplied target cell height produces a different addressable grid, and the
124
+ resulting `WorldFrame.viewport.size` comes from that grid on the next paint.
125
+ Passing `null` restores the faithful fixed 80x24 term.
126
+ - `setCamera()` reads or replaces the normal play camera origin. A non-null
127
+ value remains pinned until the mod releases it with `null`; level changes and
128
+ the game's own center-panel command release it too.
129
+ - `setMapView()` selects an explicit cave-space window while the `M` overview is
130
+ active. The existing overview producer rebuilds that window for ASCII or
131
+ graphics and the existing modal repaints it.
132
+ - `setSidebarExtent()` reserves whole terminal columns or rows for a mod-owned
133
+ sidebar, and `setTileScaling()` selects the existing automatic sampler or
134
+ crisp nearest-neighbour sampling.
135
+ - `onKey()` subscribes through the one input door at capture priority, before
136
+ ordinary play and modal owners. It is delivery only; the mod decides which
137
+ combinations it owns and cancels only those events.
138
+
139
+ The seam contains no key binding, wheel or gesture handler, zoom ladder,
140
+ camera delta, animation, persistence key, or feature flag. Those are the mod's
141
+ behavior. With no call, every default is unchanged: fixed 80x24, the ordinary
142
+ panel camera, the full-level overview, the classic 13-column or one-row
143
+ sidebar, and automatic high-quality filtering only while a tile is downscaled.
144
+ It is ungated for the same reason `ctx.core` and `ctx.state` are ungated: an
145
+ in-process plugin already runs in the page realm, so a permission check here
146
+ would describe isolation the host does not provide.
147
+
112
148
  ## 1. `GameState.modHooks` - the behaviour seam
113
149
 
114
150
  The one seam behind both first-party behaviour mods. `GameState.modHooks`
package/docs/PLUGINS.md CHANGED
@@ -331,7 +331,7 @@ register(host, ctx) {
331
331
  - **The game has no opinion about who deserves a tile.** It used to: 0.22.0
332
332
  shipped a rule in core that drew a mod-added monster from a race sharing its
333
333
  `base`, and 0.23.0 removed it, because Angband 4.2.6 has no concept of a record
334
- a mod added and the port adds nothing. That rule now lives in `neo-linoleum`,
334
+ a mod added and the port adds nothing. That rule now lives in `linoleum`,
335
335
  which is the worked example. Note what it does NOT fill: rings, amulets,
336
336
  mushrooms and food are drawn by FLAVOUR and their kind slots are blank on
337
337
  purpose, and an older pack has no art for content added since it was drawn -
package/docs/README.md CHANGED
@@ -171,7 +171,7 @@ loaded). Each lives in its own repository and arrives through the mod manager's
171
171
  | --- | --- | --- | --- |
172
172
  | `qol` | content | [own repo](https://github.com/neostryder/neo-angband-mod-qol) | Genuinely new conveniences, currently just auto-dig on walk. Built-in Angband `=` options are NOT here: they ship in core at their upstream defaults. See `QOL.md`. |
173
173
  | `bug-fixes` | content | [own repo](https://github.com/neostryder/neo-angband-mod-bug-fixes) | An unofficial patch set for upstream bugs core deliberately keeps. See `BUG_FIXES.md`. |
174
- | `neo-linoleum` | tiles | [own repo](https://github.com/neostryder/neo-angband-mod-linoleum) | An ALTERNATIVE tile engine: the Linoleum loose-pack format (individual PNGs addressed by readable target maps, plus variant pools). It does NOT supply the game's graphics - all five upstream tile sets (Original / Adam Bolt / David Gervais / Nomad / Shockbolt Dark and Light) are core content (`grafmode.c` / `lib/tiles/list.txt`) and appear in the Graphics screen with no mod enabled. It ships all six converted to loose packs, so you can compare the two engines on identical art. Declare a pack with `{ "grafID": >=100, "engine": "linoleum", "menuname": "...", "path": "..." }` - note `engine` is the FORMAT name and stays `linoleum`; `neo-linoleum` is the mod. Since its 0.15.0 it also carries the one rule the GAME used to hold: content a mod added, with no tile anywhere, is drawn from its nearest relative with the colour turned - under its own packs only, through `registry:tiles`. See `docs/LINOLEUM.md`. |
174
+ | `linoleum` | tiles | [own repo](https://github.com/neostryder/neo-angband-mod-linoleum) | An ALTERNATIVE tile engine: the Linoleum loose-pack format (individual PNGs addressed by readable target maps, plus variant pools). It does NOT supply the game's graphics - all five upstream tile sets (Original / Adam Bolt / David Gervais / Nomad / Shockbolt Dark and Light) are core content (`grafmode.c` / `lib/tiles/list.txt`) and appear in the Graphics screen with no mod enabled. It ships all six converted to loose packs, so you can compare the two engines on identical art. Declare a pack with `{ "grafID": >=100, "engine": "linoleum", "menuname": "...", "path": "..." }` - `engine` names the FORMAT and the mod that ships the six converted packs shares the same id. Since its 0.15.0 it also carries the one rule the GAME used to hold: content a mod added, with no tile anywhere, is drawn from its nearest relative with the colour turned - under its own packs only, through `registry:tiles`. See `docs/LINOLEUM.md`. |
175
175
  | `borg` | plugin | [own repo](https://github.com/neostryder/neo-angband-mod-borg) | An automatic player, driving the game through the same perceive/act API any third-party automation would use. The whole port lives there, with its own release tags and its own suite, including one that drives the BUILT `plugin.js`. Installing and enabling it does not hand it your character; its "Let the Borg play" toggle does. |
176
176
  | `feature-restoration` | content + plugin | [own repo](https://github.com/neostryder/neo-angband-mod-feature-restoration) | Beloved Angband features that a later version quietly dropped, brought back one named toggle at a time, every toggle off by default. `Teleport Other` (content: a `fieldPatches` addition to the Priest, Paladin and Ranger's own books, who lost the spell somewhere between an earlier Angband and 4.2.6 while the Mage and the Rogue kept it) and store discounts (plugin: 4.2.6 dropped the discount roll entirely, so this restoration installs a `registry:store` discount-roll handler instead of patching data that no longer exists). |
177
177
  | `forge` | plugin | [own repo](https://github.com/neostryder/neo-angband-mod-forge) | An in-game workshop for building other mods without leaving the game: pick an existing record, see its neighbours, change what would have to change, and pack the result up to try in-session, install, or hand off as a file. Early - the workshop's own content is a demonstration fixture until the remaining engine seams land. See `docs/ENGINE_SEAMS.md` in its own repository. |
@@ -180,7 +180,7 @@ loaded). Each lives in its own repository and arrives through the mod manager's
180
180
  **First-party is not a shortcut.** All seven take the same route into the game as anybody else's mod, and that is on purpose: bundling the author's own mods would have hidden every defect in the install path behind mods that never used it. The download route, the folder code loader and the plugin ABI all work because nothing is exempt from them. What first-party buys is that these seven are also the reference examples - read them to learn the seams.
181
181
 
182
182
  Enable one in the in-app mod manager (game menu -> Mods), or with
183
- `?mods=qol,bug-fixes,neo-linoleum` for a one-off.
183
+ `?mods=qol,bug-fixes,linoleum` for a one-off.
184
184
 
185
185
  **The mod is the unit you switch; its patches ride with it.** While a mod is
186
186
  disabled its patches DO NOT EXIST - its code is never called, no hook is
@@ -151,10 +151,10 @@ So if you ship content, ship tiles for it, and if you do not, say so in your mod
151
151
  description and point players at a tile mod that fills blanks:
152
152
 
153
153
  > No tiles of its own: in tile mode the Padded Jerkin draws as a letter. Install
154
- > [neo-linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) and it is
154
+ > [linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) and it is
155
155
  > drawn from another item of its type instead.
156
156
 
157
- neo-linoleum draws an added item from a kind sharing its `tval`, with the colour
157
+ Linoleum draws an added item from a kind sharing its `tval`, with the colour
158
158
  turned, under its own tile packs. Under Angband's own tile sheets an added item
159
159
  keeps its letter, because those sheets are a fixed grid with no spare cell for a
160
160
  variant. **Do not make it a dependency:** your mod is complete in ASCII with no
@@ -132,13 +132,13 @@ thinking your mod is broken and a player knowing what they are looking at:
132
132
  or
133
133
 
134
134
  > No tiles of its own: in tile mode the carpenter ant draws as a letter. Install
135
- > [neo-linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) and it is
135
+ > [linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) and it is
136
136
  > drawn from its family instead.
137
137
 
138
- That second one is a real fallback rather than a shrug. neo-linoleum, the loose-pack
138
+ That second one is a real fallback rather than a shrug. Linoleum, the loose-pack
139
139
  tile mod, fills content nothing drew: an added monster is drawn from a relative
140
140
  sharing its `base` with the colour turned, so your carpenter ant reads as an ant
141
- without being pixel-identical to the base game's. It applies to neo-linoleum's own
141
+ without being pixel-identical to the base game's. It applies to Linoleum's own
142
142
  packs only - under Angband's own tile sheets there is no spare cell for a variant,
143
143
  so a letter is what an added creature gets - and your players turn it on
144
144
  themselves. **It is not a dependency:** your mod is complete and correct in ASCII
@@ -168,7 +168,7 @@ involved:
168
168
  | [feature-restoration](https://github.com/neostryder/neo-angband-mod-feature-restoration) | A small mod that is both data and code, with every feature behind its own switch |
169
169
  | [qol](https://github.com/neostryder/neo-angband-mod-qol) | Behaviour hooks in a shipped mod |
170
170
  | [bug-fixes](https://github.com/neostryder/neo-angband-mod-bug-fixes) | Many small, independent, individually-switchable changes |
171
- | [neo-linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) | A whole alternative tile engine, and a mod that ships art |
171
+ | [linoleum](https://github.com/neostryder/neo-angband-mod-linoleum) | A whole alternative tile engine, and a mod that ships art |
172
172
  | [borg](https://github.com/neostryder/neo-angband-mod-borg) | A mod that plays the game |
173
173
 
174
174
  None of them is bundled with the game and none takes a private path in. They
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpgm-tools/neo-angband-mod-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Pack schemas, validation, and tooling for Neo Angband mods (content packs, tile packs, scripted plugins)",
5
5
  "license": "GPL-2.0-only",
6
6
  "author": "neostryder (RPGM Tools)",
@@ -67,7 +67,9 @@
67
67
  "access": "public"
68
68
  },
69
69
  "scripts": {
70
- "build": "tsc"
70
+ "sync-docs": "node scripts/sync-docs.mjs",
71
+ "build": "pnpm run sync-docs && tsc",
72
+ "prepack": "pnpm run sync-docs"
71
73
  },
72
74
  "devDependencies": {
73
75
  "esbuild": "^0.28.1"
package/src/standards.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  * enforced it, because validateManifest never sees whether plugin.js is there.
25
25
  * - a mod whose payload is committed .zip archives must DECLARE them, or the
26
26
  * installer stores the zips unopened and the mod is present and dead. Found on
27
- * neo-linoleum by a live canary, after it had shipped that way.
27
+ * Linoleum by a live canary, after it had shipped that way.
28
28
  *
29
29
  * A rule is either `required` - the mod cannot work, and an install is refused - or
30
30
  * `recommended`, which is advice and never blocks anything. Nothing in between: a