Skip to content

v83 move paths for players and mobs; server-driven NPC idle actions - #504

Merged
neeerp merged 5 commits into
v83/skill-and-mob-detailsfrom
v83/movement-paths
Oct 17, 2026
Merged

neeerp merged 5 commits into
v83/skill-and-mob-detailsfrom
v83/movement-paths

Conversation

@neeerp

@neeerp neeerp commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Movement now travels as v83 move paths in both directions, mobs move by paths their controller builds, and NPC idle actions go through the server.

What changed

  • Path elements are read and written by type as v83 does (FUN_0068a33c decode, FUN_0068a563 encode):
    • velocity-only types keep the position before them, type 10 is one byte, and every other type ends with stance and duration;
    • HeavenClient sends velocities in px/s and a real start point, and records element 4 for Teleport;
    • the server relays the client's start point instead of 0, for players and mobs.
  • Attack action: the attack packets' action is a short with the facing in the top bit.
  • Batching: the user's steps merge into runs and go out about once a second (FUN_0068ab85, FUN_0068a88d). Air and rope elements wait until a foothold follows. Other characters play whole paths on a Hermite curve, a tenth faster when a second behind and snapping when over six (FUN_0068b371, FUN_0068adcc).
  • Mob paths: the controller runs the mob's AI ahead of what is shown, steps it until it has a second of movement (FUN_0066b6fc), sends that path in MOVE_MONSTER and plays it like every other client.
  • NPC control: the server gives one player per field control of its NPCs (0x103, handed on when they leave) and relays their idle choices (0xC5) to the map as 0x104. HeavenClient chooses only for NPCs it controls and plays what comes back (FUN_006d2918, 006d2e07). It also handles REMOVE_NPC and control release.

Not covered

  • Walking NPC paths: no v83 template has info/move.

Verification

  • New client test movement_path.
  • New server unit tests cover the path layouts; the harness's strict packet loops now skip NPC control (0x103).

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high.

Stacked on #503

neeerp and others added 5 commits October 17, 2026 19:18
Read and write path elements by type as v83 does (FUN_0068a33c decode,
FUN_0068a563 encode): velocity-only types keep the position before them,
type 10 is one byte, every other type ends with stance and duration.
HC sends velocities in px/s and a real start point, and records
element 4 when Teleport is used. The server relays the client's start
point instead of 0 and parses from it, for players and mobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user's steps merge into runs and go out about once a second, holding
back air and rope elements until a foothold follows (FUN_0068ab85,
FUN_0068a88d), with the key byte and bounding rect. Other characters
queue whole paths and play them on a Hermite curve, a tenth faster when
a second or more behind, snapping when over six (FUN_0068b371,
FUN_0068adcc).
The controller runs the mob's AI on its own body ahead of what is shown,
steps it until it has a second of movement (FUN_0066b6fc), sends that
path in MOVE_MONSTER and plays it like every other client. A hit shows at
once; the shown path stops at the next foothold and the AI flinches from
there (FUN_0068b16f). Other clients play the paths they get in turn.
…L162)

The server gives one player per field control of its NPCs (0x103, handed
on when they leave) and relays their 0xC5 choices to the whole map as
0x104. HC chooses only for NPCs it controls, waits for the echo, and every
client plays what comes back, as v83 does (FUN_006d2918, 006d2e07). HC
also handles REMOVE_NPC and control release (mode 0 no longer removes).
@neeerp
neeerp force-pushed the v83/movement-paths branch from 2b12181 to 7b7fc7b Compare October 17, 2026 23:26
@neeerp
neeerp added this pull request to stack #515 October 17, 2026 23:30
@neeerp
neeerp merged commit b2026f1 into v83/skill-and-mob-details Oct 17, 2026
2 checks 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