[GH-ISSUE #4740] Native mods: helpers for spawning and moving mobs #1433

Closed
opened 2026-11-02 15:46:54 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Qwerner88880 on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4740

Originally assigned to: @Qwerner88880 on GitHub.

🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally.

Part of #3911 (Mods). Gap X of #1854 (entities and AI): today a native server mod can't spawn a mob, or read, move or remove one without reaching into the game's internals. Bosses, guards and summoned creatures need this.

Proposal

Helpers in a new crates/horizon-client/src/game/native_mobs.rs, like native_server.rs, with no new hook points:

  • native_spawn_mob(kind, pos, options): a mob of a kind the game knows, with optional name, health, and the NoAI, Invisible, Silent, Invulnerable and NoGravity flags. It returns the mob's id.
  • native_mob(id), native_mobs(): a mob's kind, position, health and maximum health, in the level in place.
  • native_mob_teleport, native_mob_push, native_mob_set_health, native_kill_mob, native_remove_mob: by id. Killing takes the same path as /kill, so loot drops; removing doesn't drop anything.

They act only on an authoritative server. Nothing changes without a native mod. NATIVE_HOOKS_API + 1 and docs/native-mods.md.

Originally created by @Qwerner88880 on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4740 Originally assigned to: @Qwerner88880 on GitHub. > 🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally. Part of #3911 (Mods). Gap **X** of #1854 (entities and AI): today a native server mod can't spawn a mob, or read, move or remove one without reaching into the game's internals. Bosses, guards and summoned creatures need this. ## Proposal Helpers in a new `crates/horizon-client/src/game/native_mobs.rs`, like `native_server.rs`, with no new hook points: - **`native_spawn_mob(kind, pos, options)`:** a mob of a kind the game knows, with optional name, health, and the `NoAI`, `Invisible`, `Silent`, `Invulnerable` and `NoGravity` flags. It returns the mob's id. - **`native_mob(id)`, `native_mobs()`:** a mob's kind, position, health and maximum health, in the level in place. - **`native_mob_teleport`, `native_mob_push`, `native_mob_set_health`, `native_kill_mob`, `native_remove_mob`:** by id. Killing takes the same path as `/kill`, so loot drops; removing doesn't drop anything. They act only on an authoritative server. Nothing changes without a native mod. `NATIVE_HOOKS_API` + 1 and `docs/native-mods.md`.
Author
Owner

@Qwerner88880 commented on GitHub (Oct 30, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6535172343 --> @Qwerner88880 commented on GitHub (Oct 30, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1433
No description provided.