Skip to content

0.4.0: a Races tab for the races a mod adds - #7

Merged
jeany55 merged 3 commits into
mainfrom
mod-races
Nov 10, 2026
Merged

jeany55 merged 3 commits into
mainfrom
mod-races

Conversation

@jeany55

@jeany55 jeany55 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

A mod can give players a race past the game's eight (Cosmonarchy BW's fourth race is byte 69), and none of its files says what it is called. This adds the table where a mod's own facts are edited (0.4.0).

  • A Races tab: number (8–255), name, the letter of its files, and the game's race it plays as. Add, edit, remove; a row is checked as it is typed and refused in plain words ("1 is the game's own race, Terran. A mod's races are numbered 8 to 255.").
  • Kept by the editor for the mod (api.gameData.setRaces, looked for: in an editor without it the table is read-only and says so).
  • Hints, never filled in: the names and letters the editor's raceCandidates suggests are buttons for the row being typed.
  • mod.json: a folder opened with races hands them to the editor, and saving a mod folder writes the table. Before this, saving a folder dropped a races key written by hand. A mod that names none writes byte-identical files.
  • Play and Start Test Game hand the races to the play page with the mod.

Checked: npm test (76 passed, 3 skipped), npm run typecheck, npm run build. In a headless browser against the editor's mod-races branch with the real mod: the empty tab, a row named from Aftermath appearing here, a rename followed by Aftermath at once, each refusal, removing a row, the tab scrolling in a short panel, Korean.

Order: after the editor's PR (scm-js mod-races). The README does not name the editor version that keeps race names, since none is released yet. dist/plugin.js is not rebuilt here; CI does that on main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VEdp4XLKV3SYMXKD411ypP

jeany55 and others added 3 commits November 10, 2026 12:09
A mod can give players a race past the game's eight, and none of its files
says what it is called. The Races tab names them: number, name, the letter of
its files, and the game's race it plays as. The editor keeps the table for the
mod (api.gameData.setRaces, looked for; read-only in an editor without it),
the names and letters the mod's files hint at are offered and never filled in,
and a mod folder's mod.json reads and writes them as `races`. A mod that names
none writes the same files as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEdp4XLKV3SYMXKD411ypP
… status line once the row is fixed

The tab's body is laid out like the Strings and Requirements tabs (an inner
element scrolls) and a redraw keeps the scroll position. A refusal shown on
Add ("Give the race a name.") is taken back from the status line when the
field changes, unless something else has been said since.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEdp4XLKV3SYMXKD411ypP
The two hand-overs carried the mod's name, hash and files but not the races
named in the Races tab, so the page's setup screen and player lists could not
name them for a game started from here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEdp4XLKV3SYMXKD411ypP
@jeany55
jeany55 merged commit c8271b5 into main Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant