Repository navigation
The recipe branch: mods chosen when the game is built, a help key, two books, and the recipe that checks itself - #1
Merged
Conversation
A build now carries exactly the mods its builder chose. mods/catalog.tsv
declares each mod (its files, what it requires, whether online players
must match, the tests that need it); mods/default.cfg is the shipped set;
an uncommitted mods.cfg holds your own choices (+name, -name, or
"name off"). tools/mods.py turns them into src/mods_build.h before every
build (make, Visual Studio, MinGW; run_with_tcc.bat falls back to the
committed src/mods_default.h). A mod that is off compiles to nothing:
src/mods_off.c stands in for it, doing what the game would do had the
mod never been written. Its menu lines are hidden; its zelda3.ini keys
are still accepted and do nothing.
The shipped set is the game as it was: every existing mod on, and the
shipped build sends the same protocol version as before, so it plays
online with builds made without this. A build whose game-changing mods
differ sends a tag instead, and mismatched builds refuse each other
("Different game version or mods"). zelda3 --mods prints what a build
carries.
The rules are mods/SPEC.md (M1-M21); tests/mods/run.sh checks each
clause in shell (36 tests) and --prove-red plants eight faults that
must each turn it red. tools/mods_census.py measures a mod's surface
from the compiled objects; tools/mods_matrix.sh builds every
composition and runs every test in each; tools/mods_needs.py reads
which tests really need which mod.
New, off by default: the helpbook mod. Ctrl+H opens the player's book
at the section for the moment (the menu, the title screen, online,
together, a dungeon, outdoors); the Windows help viewer on Windows, the
browser elsewhere. tests/coop/helpbook.txt checks it.
Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
Two game books, one Markdown file each (docs/books/manual.md, docs/books/devguide.md), seventeen numbered sections, each ending with where to go next. tools/books.py check refuses a book in which a route goes nowhere, a section cannot be reached from section 1, a section strands its reader, or a page the help key can open is missing; tests/books/run.sh tests it and --prove-red plants five faults. tools/books.py build (make books) makes help/: a Windows help file (.chm) for each book, the pages as HTML, each book on one page, and plain text. The markers are the C4 game-book markers, so its linter can read the books too. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
First-person models in layers: each mod making its own case with its measured numbers (ideas/), the readers the books were written for (readers/), the contributors (contributors/: each person's file is theirs to write, and is empty), how the parts lean on each other (RELATIONS.tsv, from the census), the project's words from the game, Bryant and Alfred's garden and Corwin's lab (TAXONOMY.tsv), and the plan for keeping those words steady from design to build (PLAN-theseus-argo-disco.md). Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
What each part is, in the order to make it, the command, and what you should see. Its check blocks are pulled out by two readers that must agree byte for byte (tools/unfold.awk, tools/unfold.py); CI runs that check on Linux, and builds the books into the Linux and Windows downloads. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
8464ead taught Archipelago to play Archipelago's own A Link to the Past world, and the game now asks it eleven new things (and the randomizer one). tools/mods_census.py listed them; each stand-in was written from its caller. Places answer "not a place of the multiworld" (-1), gates and items pass the original game's answer through, and Ap_MedallionOpens keeps the original rule (Ether opens Misery Mire, Quake opens Turtle Rock), which it also holds: a plain "no" would have sealed both dungeons in builds without Archipelago. Erratum 7 in the developer's guide; the census and relations in CONTEXT-MODELS are measured again. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
Upstream removed it in 6a7984b. Its files come back exactly as they were at 0831a3d, with a README: nothing builds it unless asked (no CI job, not the top Makefile, not the README), which is "off by default" for a whole platform. Building it needs one new step, making src/mods_build.h first. Not checked: no devkitPro where this was made. Files restored from Bryant Frankford's tree at 0831a3d. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
README: a section on choosing the mods when you build (mods.cfg, the help key, the books), pointers to the player's book, the developer's guide and RECIPE.org, and two lines in "Where to mod". AI_DISCLOSURE.txt stays true: the recipe branch's commits were made by an AI too, and are authored under Corwin's name by his house rule, each naming the AI. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
Before the pull request the branch was read by a council: a doubt-first critic, a reward-first critic, an editor's seat, and two fact-checks of every claim in the player's book. What they found, and what changed: - The recipe's own check said "every check passed" after a check had failed, when run with plain sh. It now stops at the first failure, restores mods.cfg on any exit, and tests/recipe/run.sh plants a broken catalog and a broken book to prove it (and --prove-red shows the test sees the old weakness). - The 3D view now requires the 2D-HD look: without its light gathering dark rooms drew fully lit. A plain "-hd2d" is refused, with the reason. - The catalog's test lists come from the build matrix, not from names; tools/mods_needs.py counts a failure as explained by any mod that is off with the named one. - The help key: the legend, game over and file screens open "starting", the credits "last"; the Windows help path is quoted and file:// URLs are percent-encoded (tests/unit/helpbook_url_test.c); Controls help hides the 3D and screenshot lines in builds without them. - run_with_tcc.bat stops on a refused mods.cfg, and says so when it has no Python; a mods.cfg with a byte-order mark is accepted. - CI builds every mod off but the help key, runs the recipe's proof and the URL test, and compiles the help key's Windows file with MinGW. - The player's book: nine claims corrected (L3 for first person, the ping, DeathLink, the assets message, notarized, the menus, the keys in zelda3.ini, the screenshots the repository keeps, your own saves); Watch everyone explained; who wrote it moved to the end. - RECIPE.org states its claim as two bets and measures them (tools/books.py voice); BUILDING.md says how to choose mods in a hand build; numbers in CONTEXT-MODELS match their data. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
CONTEXT-MODELS/data/matrix1-*.tsv: the discovery run of tools/mods_matrix.sh (every test in every composition, nothing skipped), from which the catalog's tests column was set. The final run on the finished branch follows. tools/mods_needs.py now counts a shipped-build failure as explained when the test belongs to a mod the shipped set leaves off (the help key). Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
CI's Archipelago client job compiles src/ap_*.c directly, without make, and src/mods.h stopped with #error when src/mods_build.h had not been made. Now a file compiled on its own gets the shipped set from src/mods_default.h (mods/SPEC.md, M22). tests/mods/run.sh compiles every mod's own file alone in a clean tree, and --prove-red plants the old erroring header back to show the test sees it. The council's doubt seat had named this risk (d10); the first answer was only a paragraph in BUILDING.md, which now says what is true. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
Upstream removed the Switch build in 6a7984b. It had stopped building some time before: its Makefile's SRC_DIR was ../.. (src/), which cannot reach snes/ or third_party/. With SRC_DIR at the top of the tree every source compiles for the Switch, and the one link error left is Archipelago's sigaction, which libnx does not have. So the Switch carries its own set of mods: mods/switch.cfg, read through the tool's new --cfg option (mods/SPEC.md, M23), is the shipped set without Archipelago (its TLS loads the system's OpenSSL at run time; a Switch has none) and without the network (the port never starts the Switch's sockets). `make switch` builds src/platform/switch/zelda3.nro with devkitPro, or in its image devkitpro/devkita64. A new CI job builds it there on every push, so it keeps building; it is not shipped (no artifact). Untested on hardware or an emulator: it builds and links. Co-Authored-By: Mentat (for Corwin; claude-opus-5-5) <[email protected]>
Member
|
Noice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes for the game as shipped: nothing about how it plays. A plain build carries
every mod it carries today, plays online with builds made before this branch, and passes every
existing test. One message is new: a refused join now says "Different game version or mods".
What it adds
mods/catalog.tsvdeclares each mod (its files, what itneeds, whether online players must match, the tests that need it);
mods/default.cfgis theshipped set; an uncommitted
mods.cfgholds your own (-archipelago,+helpbook,hd3d off).A mod that is off is not in the program: its files compile to nothing and
src/mods_off.cstands in, doing what the game would do had the mod never been written. Its menu lines go; its
zelda3.inikeys are still accepted.zelda3 --modssays what a build carries. Two builds whosegame-changing mods differ refuse each other instead of drifting apart.
randomizer), the network. Co-op is not a switch: it is the game now (138 names used by 22
other files, measured).
mods/SPEC.md(M1 to M21);tests/mods/run.shchecks each in shell (37 tests),and
--prove-redplants nine faults that must each turn it red.what you are doing (the menu, the title or a game over, online, together, a dungeon, outdoors, the
credits): the Windows help viewer on Windows, the browser elsewhere.
tests/coop/helpbook.txt,tests/unit/helpbook_url_test.c.docs/books/manual.md(for players) anddocs/books/devguide.md(for modders),as numbered game-book sections that each say where to go next.
make booksbuilds a Windows helpfile (
.chm) for each, web pages, and plain text; the Windows download carries them.tools/books.py checkrefuses a route to nowhere, a section no one can reach, or a page the helpkey needs that is missing.
RECIPE.org: the branch as a literate recipe, what each part is, in order, with the commandand what you should see. Its check blocks are read by two readers that must agree byte for byte,
and the check runs in CI.
CONTEXT-MODELS/: what the work was planned from. Each mod makes its own case with itsmeasured numbers; the readers the books were written for; the project's words (yours, Alfred's,
and Corwin's workshop's, none renamed).
contributors/BRYANT.mdandALFRED.mdare empty andyours to fill, or delete: no one's first person is written for them.
stopped building before it was removed: its Makefile's
SRC_DIRpointed atsrc/, which cannotreach
snes/orthird_party/. With that fixed, every source compiles for the Switch; it carriesits own set of mods (
mods/switch.cfg: no Archipelago, whose TLS needs the system's OpenSSL, andno network, since the port never starts the Switch's sockets).
make switchbuildszelda3.nro, with devkitPro or in its imagedevkitpro/devkita64, and a new CI job builds it onevery push without shipping it. Two commits (941b5f5, 693ec85), so it can be dropped alone.
Also: stand-ins for your new A Link to the Past world (8464ead), written from each caller.
Ap_MedallionOpenskeeps the original rule (Ether opens Misery Mire, Quake opens Turtle Rock), whicha plain "no" would have broken. BUILDING.md and the README have short sections, and
AI_DISCLOSURE.txt stays true.
How it was checked
tools/mods_matrix.sh) builds the shipped set, each mod off alone and all off,and runs every test in each, skipping nothing;
tools/mods_needs.pyreads which tests need whichmod. The first (discovery) run set the catalog's test lists (
CONTEXT-MODELS/data/matrix1-*). Thefinal run, on this branch's code, is still going as this opens; its results will land as one more
commit here. Two network tests (
net_combat_*) failed once each in the discovery run while themachine was busy compiling; the final run is on an idle machine, to tell load from a real need.
real.
All of it was answered in commit 39d79cc, and the fixes closed on one clean QA pass. The block: the recipe's own check said "every check
passed" after a failure when run with plain
sh. It now stops at the first failure, andtests/recipe/run.shproves it.and compiles the help key's Windows file with MinGW.
The first push failed CI, and why
The Archipelago client tests compile
src/ap_*.cdirectly, withoutmake, and the first version ofsrc/mods.hstopped with an error when the generated header was missing. Fixed in 1426a4f: a filecompiled on its own gets the shipped set (
mods/SPEC.md, M22), with a test that compiles every mod'sfile alone in a clean tree. Every Linux, Windows, Switch and Archipelago CI step was then run in a
clean clone before the next push (
ci-local, which reads the steps frombuild.yamlitself).Not checked
.chmin the real Windows help viewer. Two readers here agree the files are sound(7-Zip, chmlib); a person on Windows 11 is the third.
Authorship
Every commit on this branch was made by an AI (Claude, working for Corwin Brust as "Mentat"). By
Corwin's house rule they are authored under his name and each carries
Co-Authored-By: Mentat (for Corwin; claude-opus-5-5); AI_DISCLOSURE.txt says so. If you wouldrather they were authored "Claude" like the rest of the history, that is a rebase away.
Mentat (for Corwin; claude-opus-5-5)