Official mods: FPS Counter and Keystrokes, the first extras as mods
The FPS counter and keystrokes extras rewritten as mods on the public API (render, input, ui, storage), in mods/official/, with the extras' options on their settings pages and the extras' look: the same boxes, colours and text positions, pixel for pixel. They are workspace members, so clippy and pr_ready cover them; a maintainer publishes them in horizon-mods. The built-in extras stay until the removal PR, which installs these for the players who had them on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ folder, loads no runtime and plays exactly like vanilla 26.3.
|
||||
| The contract (WIT) | `crates/horizon-mod-sdk/wit/horizon.wit` | 0.1: log, game-read, chat, hud, storage, ui; tick, frame, chat and command hooks |
|
||||
| SDK for mod authors | `crates/horizon-mod-sdk` | 0.1 |
|
||||
| Example mod | `crates/horizon-mod-sdk/examples/coords-hud` | coordinates, facing and time HUD, `/where`, `/coords` |
|
||||
| Horizon's official mods | `mods/official/` | the extras moving to the registry: FPS Counter (`fps-overlay`), Keystrokes |
|
||||
| Runtime | `crates/horizon-mods` | wasmtime 36 LTS, component model |
|
||||
| Authoring tool | `crates/cargo-horizon-mod` | `cargo horizon-mod new / build / run / check`, and the registry's CI (`registry build / review / list`) |
|
||||
| In the game | `crates/horizon-client/src/game/mods.rs`, Options > Mods | client mods |
|
||||
@@ -406,6 +407,21 @@ An update is the same form with a new version; only the project's `owners` can p
|
||||
has one. A published file never changes. Without the form, open the pull request by hand (the repository's README
|
||||
says how). The formats: [api/mod-index.md](api/mod-index.md).
|
||||
|
||||
### Horizon's official mods
|
||||
|
||||
The Horizon extras that are mods now live in `mods/official/<name>/`, one crate each in the game's workspace, so
|
||||
`cargo clippy --workspace` and pr_ready cover them. They use only the public API, like any other mod, with the same
|
||||
options on their settings page as the extra had and the same look. Each is published by a maintainer: build it on
|
||||
`main` with the toolchain CI uses (`cd mods/official/<name> && cargo horizon-mod build`), then open a pull request in
|
||||
horizon-mods with its `mods/<id>.toml` (owners `ludovic111`, `source` pointing at the folder) and the file's
|
||||
SHA-256. The reviewer builds it the same way and merges only when the hashes match: the `.wasm` holds no local paths,
|
||||
so the same rustc and `Cargo.lock` give the same file.
|
||||
|
||||
| Mod | Id | Replaces | Settings (storage key: values) |
|
||||
|---|---|---|---|
|
||||
| FPS Counter | `fps_overlay` | Extras > FPS counter | `corner`: `top_left` (default), `top_right`, `bottom_left`, `bottom_right`; `lows`: `false` (default), `true` |
|
||||
| Keystrokes | `keystrokes` | Extras > Keystrokes | `corner`: as above, default `top_left`; `cps`: `true` (default), `false` |
|
||||
|
||||
## Versions and compatibility
|
||||
|
||||
- The API is the WIT package `horizon:mods@0.1.0`. New functions and
|
||||
|
||||
Reference in New Issue
Block a user