mirror of
https://github.com/horizon-rust/horizon-site.git
synced 2026-12-03 19:12:41 +07:00
[PR #8] [MERGED] Make a mod: native mods (setup, the bundle, hook points) #10
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
horizon-rust/horizon-site#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/horizon-rust/horizon-site/pull/8
Author: @ludovic111
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111
Base:
main← Head:docs/make-a-native-mod📝 Commits (2)
108aa6aMake a mod: native mods (setup, the bundle, hook points)9c9b8b9Make a mod: hook points version 2 are on main, not in a Nightly yet📊 Changes
3 files changed (+399 additions, -230 deletions)
View changed files
📝
docs/make-a-mod.md(+61 -51)📝
docs/mod-code.md(+250 -141)📝
docs/mod-manifest.md(+88 -38)📄 Description
First of three stacked PRs that rewrite "Make a mod" for the two kinds of mod that stay once WebAssembly code mods are removed (horizon#3371): content mods and native mods. This one rewrites three pages:
make-a-mod): the two kinds side by side and which to pick; how a native mod works (horizon-mixins, Horizon's hook points); the tools (Rust, horizon-mods'native.py, launcher 0.2.23+); the files of a mod;native.py check;horizon-launcher native-build … --trust-native-code; what players see (the notice once, Settings > Native mods, Build, the red warning, the Native mods instance, Options > Mods with Settings and keys).mod-manifest):horizon-mixin.tomlpart by part, helpers and bindings, hook points versus a pinned commit,compatibility.json, the.hnmod, and why native mods are reviewed rather than sandboxed.mod-code): every hook point and helper innative_hooks.rsof the current Nightly, version 2 (item panel, recipes) marked "next Nightly", and a worked example, Playtime.The page slugs stay the same, so links from elsewhere keep working. Only what works on Horizon main, the current Nightly (6f8c7a0) and launcher 0.2.23+ is described, with no dates. horizon's docs/native-mods.md is the source; two stale statements there are fixed in a Horizon PR.
The example is real
Playtime (
/private/tmp/om2-playtime/playtimeon the Mac mini, exactly the code on the page):cargo test: 2 passed.native.py check /path/to/playtimefrom a horizon-mods clone, on Nightly 6f8c7a0: ok, with warnings as errors (2 min 31 s cold).native.py proof(fast build, offscreen game driven with horizon-ctl, commands typed into the chat box as a player does):shown=false./playtimeanswers "You have played 1h 00m";/playtime resetanswers "Playtime reset", writes 0 and the box shows "Played 0h 00m".Checks
HORIZON_CHECKOUT=<horizon main> node build.mjs: built. (A link topublish-a-mod#package-a-native-modandcontent-mods#the-manifestwaits for the next PR, which adds those sections.)node --test src/ scripts/: 48 pass.Order
.hnmod) is independent.nav.jsonline that dropsapi/modsandapi/mods-reference: the stack with that line builds against #3371's tip. So the docs land first, the removal after.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.