Repository navigation
Hueycoatl: tail facing and hidden while sunk, per-target head attack animations (#3558) - #6622
Conversation
…ile sunk; per-target head attacks The tail never turns, so live holds it with npc face_angle (instant): 512 out of the east cave, 1536 out of the west. It is added drawn as nothing (body customisation model -1), shown with a reset, and hidden again 2 ticks after a sink, so a late viewer sees no tail. Adds the NPC face angle update (mask 0x80000) to the protocol and client, and makes the client draw an NPC with a -1 model as nothing (no model, no clickbox). Rain Fire is huey_attack_melee for everyone; each target gets its own style sequence (shielded variants while shielded) and charge spotanim as npc_anim_specific / npc_spotanim_specific. Refs RSPSApp#3558 (rsprox recordings 4052, 4054, 3399). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r standing NPCs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewing this now (review loop, head 598346b). |
UnhealthyKraken
left a comment
There was a problem hiding this comment.
Reviewed PR #6622 at 598346b (main 8fd5092, integration tree 4e9b8d23bfdb1d9c462a1f8682818e81e8881bb2).
What it does
Holds the Hueycoatl's tail at a fixed facing (npc face_angle, instant) and draws it as nothing (body customisation model -1) from its spawn and from 2 ticks after each sink until it shows again.
Adds the NPC update mask 0x80000 end to end (server NPC state, session, protocol writer, client decoder, client rotation) and makes the client treat an NPC with a -1 model as not drawn and not clickable.
Rain Fire now plays huey_attack_melee (11669) in the shared update and sends each target its own style sequence and charge spotanim in slot 0.
What was checked
- Behaviour: the tail spawns at the east tile hidden with angle 512, shows west a tick later with 1536 and a customisation reset. A sink hides it 2 ticks later unless it shows again first (
tailShowscounter). The broken tail and the kill use the samesink(). No items, coins or persistent state involved. The face angle is resent every update while set, so late viewers get it. - Parity (captures): rsprox_transcripts/237/04052.txt: tail added at tick 80 (line 5256) with
face_angle512 instant andbody_customisationmodel -1; tick 81 telejump west,npc_huey_tail_appear_01, 1536 instant, empty customisation (reset); sink 117 and show 119 with no hide; whole tail sinks 153; break and show 155; broken sink 159 then three -1 models at 161; show 183; sink 189, three -1s at 191; knock-out 192. All match the PR and docs. rsprox_transcripts/237/04054.txt: add with 512, show with 1536 (lines 246762-246793). rsprox_transcripts/235/03399.txt: the kill at tick 812 has the tail sink at 812 and three -1s at 814, so the kill path is evidenced too. Rain Fire in 04052 (ticks 51, 73, 88, 103, 118, 133, 148, 163, 174, 185): sharedhuey_attack_meleewith no shared spotanim, plusnpc_anim_specific(11669/11670/11671, and 11673-11675 while the head is 14011) andnpc_spotanim_specificslot 0 (2968/2971/2974). The shielded and unshielded forms match the code. - Parity (Wiki): The Hueycoatl page only says "Fixed Hueycoatl's tail spawning in the wrong orientation" (30 September 2026) and gives no angle. It says nothing about the tail being hidden or about Rain Fire animations. The PR already states the recordings predate that fix; no Wiki conflict.
- Traced:
NPC.setFaceAngle->PlayerSession(faceAngle: npc.getFaceAngle()) ->npcUpdateMask/writeNpcUpdateBlock->NpcUpdateDecoder->OsrsClient(setTargetRot,setRotation). Mask 0x80000 is bit 19, free, inside the third mask bytewriteMaskalready handles; decoder order matches writer order (after TYPE_CUSTOMISATION).setTypeCustomisation(null)sends the 5-cycle reset;{models:[-1]}encodes as 0xffff and decodes to -1. The clientmodelIdsconsumers (NpcModelLoader,SceneRaycasterx2,overlays.ts) now go throughnpcTypeHasModelor skip negatives. Dump: huey_tail_broken (14015) has two models; the PR sends three -1s as live did, and any -1 hides it. - Rules: no generated JSON, no plugin config or description change (no world-config-docs needed). A hide and a show scheduled on the same tick resolve to a reset (hide runs first), as the tests assert.
Findings
runelite-gateway/src/main/kotlin/gateway/down/ActorBlocks.kt:146-177(npc()): the gateway decodes NPC update blocks itself and stops atNPC_TYPE_CUSTOMISATION(0x40000). The server now writes the newFACE_ANGLEmask (0x80000,ClientProtocol.ts:3161: a short angle and an instant byte,:3452-3454). The gateway never reads those 3 bytes. So on a RuneLite gateway session with the Hueycoatl tail in view, they are left in the stream, and every later field and NPC block in that update is misread. This PR does not change the gateway.
Fix: addNPC_FACE_ANGLE = 0x80000toActorBlocks.kt, readu16()thenu8()after the type customisation (the writer order), and map it inEntityMirror, or at least consume and drop it. Add a gateway decoder test for a block with the bit set.
Notes, not findings:
server/tests/hueycoatl-tail-head.test.cjs:6-7cites Rain Fire "ticks 61, 79, 96"; the 04052 volleys are at ticks 51, 73, 88. Comment only.- A sunk (hidden) tail can still be targeted by the server; live disables its ops. The PR lists this under "Not covered"; fixing it needs an NPC ops packet (shared protocol), so it stays a note.
- Capture 04052 omits the held
face_angleon the tick right after each sink (118, 154, 160, 190); we resend it every tick. Harmless.
Scope
ordinary (it adds a protocol mask and a client NPC rendering rule, but only the Hueycoatl uses either)
Verified
yarn buildin server/ on the integration commit: okhueycoatl-tail-head.test.cjs: 4/4hueycoatl.test.cjs: 20/20hueycoatl-camera-reset.test.cjs: 7/7echo-bosses.test.cjs: 7/7- Revert check (main's Fight, Attacks and Shared plugin files):
hueycoatl-tail-head.test.cjs0/4; files restored withgit checkout HEAD -- - docs/:
yarn install --frozen-lockfileandyarn build(Yarn 1.22.22): build complete - Recordings 04052, 04054 and 03399 read line by line as listed above
- main+head merge tree: clean
- generated JSON: none edited
Not verified
- Client tests (
npc-face-angle-hidden-models.test.ts,npc-type-customisation,npc-transparency) andtsc --noEmit: the client has no tsx or installed toolchain in this worktree. I covered them only by reading the decoder, writer and consumers. ides-of-milk-parityand the other client neighbours the PR lists were not run.- The
PlayerSessionface-angle line and the client's instant rotation were not exercised live; the tests use a fake NPC, as the PR admits. I traced the path by reading. - No live game session; the visible turn behaviour and the late-viewer case rest on the captures and the PR's own in-game check.
Verdict
Await author (1)
The gateway decodes tsps NPC update blocks itself and stopped at the type customisation, so the new face angle's three bytes were left in the stream and every later field of that update was misread on a RuneLite session with the Hueycoatl's tail in view. Read the angle and instant flag after the type customisation and send them with rsprot's setFaceAngle. Also corrects the Rain Fire ticks cited in the Hueycoatl test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in 0db0ac5:
Notes: the test's Rain Fire ticks now read 51, 73, 88. The sunk tail's ops and the held angle's resend cadence stay as noted (no NPC ops packet; resending every tick is a superset of live). |
|
Reviewing this now (review loop, head 0db0ac5). |
The gateway finding is fixed at 0db0ac5 (see the new review).
UnhealthyKraken
left a comment
There was a problem hiding this comment.
Reviewed PR #6622 at 0db0ac5 (main 093d8ab, integration tree 04c79aeacec8ae0a5d534b38a3748603fe6276c2).
Prior review: #6622 (review) on the earlier head
Prior findings
- Gateway
ActorBlocks.npc()stopped at 0x40000 and did not read FACE_ANGLE 0x80000: resolved.runelite-gateway/src/main/kotlin/gateway/down/ActorBlocks.ktnow readsu16angle thenu8instant after the type customisation, andEntityMirror.ktpasses it tosetFaceAngle(angle, instant). The order and widths match the server writer (writeNpcUpdateBlock: type customisation, thenshortBEangle and a 0/1 byte).
What it does
Adds a held NPC face angle (update mask 0x80000) end to end: server, web client, RuneLite gateway. The Hueycoatl tail uses it to face the arena from each cave, and is drawn as nothing (model -1) from its spawn until it first shows and from 2 ticks after each sink until it shows again. Rain Fire now plays 11669 for everyone and sends each target its own style animation and charge spotanim.
What was checked
- Behaviour: tail spawn, show, swap, break, final-phase sinks and the kill path in
Fight.Hueycoatl.js. The hide timer is guarded by a show counter andisRegistered(), and runs on the fight's generation-checked scheduler, so a reset drops it. A hide and a show on the same tick end in the reset state either way. The held angle is resent every tick (as live does), and only the Hueycoatl tail sets it. - Parity (recordings, checked line by line):
- rsprox_transcripts/237/04052.txt: add at tick 80 (line 5256) with face_angle 512 instant and model -1; show at 81 (5319) west with 1536 instant and a customisation reset; face_angle resent every tick while shown (82, 83); whole-tail swap 117 sink / 119 show east with 512, no hide in between; sinks at 159 and 189, three -1s at 161 (line 9248) and 191 (line 10998), exactly 2 ticks later. The 1536 west / 512 east pairing matches.
- rsprox_transcripts/237/04054.txt: add at tick 8302 with model -1, show 8303 west with 1536; whole-tail swaps never hide.
- rsprox_transcripts/235/03399.txt: on the kill (tick 812)
huey_knockoutand the tail sink share a tick and the three -1s follow at 814 (likewise 1109/1096 and 1429/1411). This supports "hidden again on the kill". - Rain Fire: every volley carries the shared
huey_attack_melee(11669) with no shared spotanim; each target getsnpc_anim_specific(11670/11671, 11673-11675 shielded) andnpc_spotanim_specificslot 0 (2968/2971/2974) on the same tick (04052 ticks 51, 73, 88, 103, 118, 133; 04054 ticks 7233-7373; 03399 ticks 612-718). Volleys seen without specific packets (04052 tick 10) are from a player outside the arena. - Beyond the recordings: one style per volley for everyone (the PR and docs say so), and hiding the whole-tail form with a single -1 (the recordings only show the broken tail's three -1s, and the whole tail is never sunk without a show except at the kill, where it is already the broken form).
- Wiki: the page states the 30 September 2026 change "Fixed Hueycoatl's tail spawning in the wrong orientation"; it says nothing about visibility while sunk or Rain Fire animations, so those rest on the recordings. The docs note that the angles predate that fix is accurate.
- Traced:
NPC.setFaceAngle->PlayerSessionNpcView ->npcUpdateMask/writeNpcUpdateBlock->NpcUpdateDecoder->OsrsClient; gateway decoder ->EntityMirror.npcTypeHasModelconsumers:NpcModelLoader,SceneRaycaster,overlays.getNpcDefaultHeight. The 0xffff to -1 decode only affects type customisations, whose other users (Echo bosses) send real ids. - Rules: LF endings; no generated JSON; no plugin description or config change (no world-config-docs run needed).
Findings
No defects found.
Scope
ordinary
Verified
- Server build (
yarn buildin server/) on the integration commit: ok server/tests/hueycoatl-tail-head.test.cjs: 4/4;hueycoatl.test.cjs: 20/20;hueycoatl-camera-reset.test.cjs: 7/7;echo-bosses.test.cjs: 7/7;echo-boss-controllers.test.cjs: 14/14;ides-of-milk-parity.test.cjs: 33/33- Client (tsx):
npc-face-angle-hidden-models,npc-type-customisation,npc-exact-move,npc-tint,npc-world-view-sync,npc-transparency,npc-headbars,npc-head-icons,npc-spot-anim-slots: all pass - Gateway
gateway.down.ActorBlocksTest: 5/5 pass. Revert check: with the face-angle decode line removed the new test fails (expected (512, true) but was null). - Revert check: with main's
server/plugins/bosses/hueycoatlfiles the 4 new server tests fail (0 pass); with main'sNpcType.tsandNpcUpdateDecoder.tsthe new client test fails. - docs:
yarn install --frozen-lockfileandyarn build(Yarn 1.22): ok - main+head merge tree: clean
- generated JSON: none edited
- Environment: Gradle first failed with git exit 128 (rsprox clone, "Filename too long") on this deep worktree path; fixed with
GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.longpaths GIT_CONFIG_VALUE_0=true. It then needed a JDK 11 toolchain for the pinned rsprox build, which this machine lacks; the gateway test ran with a scratch init script (outside the repo) forcing toolchains to JDK 17.
Not verified
tsc --noEmitin client, and the in-game checks (real client rendering of the -1 tail, the instant turn): not run; covered only by the protocol round-trip test and the author's report.packet-sender.test.cjs#8: not run.- The tail's menu ops while sunk (live
enabled_ops): tsps has no NPC ops packet, as the PR notes; not a defect of this change.
Verdict
Merge
Fixes #3558 (the remaining parts; the Peek lines and the pet chance were fixed in #3564).
Problem
face_angle(instant) on every show: 512 out of the east cave, 1536 out of the westhuey_attack_melee(11669) shared every volley; each target getsnpc_anim_specificwith the style's sequence (11670/11671, 11673-11675 shielded) andnpc_spotanim_specificcharge in slot 0Fix
server/.../npc/NPC.ts,net/PlayerSession.ts,net/protocol/ClientProtocol.ts: a held NPC face angle (NPC.setFaceAngle(angle, instant)), sent as NPC update mask0x80000(angle, instant flag) with every update while set, so late viewers get it too.client/game/sync/NpcUpdateDecoder.ts,client/game/OsrsClient.ts: decode the face angle (instant sets the drawn angle as well as the target, the only way to turn a turn-speed-0 NPC); a type customisation model of0xffffdecodes as -1.client/rs/config/npctype/NpcType.ts(npcTypeHasModel),NpcModelLoader.ts,game/scene/SceneRaycaster.ts,render/render/overlays.ts: an NPC with a -1 model is drawn as nothing and can't be clicked, as in the game.runelite-gateway/.../ActorBlocks.kt,EntityMirror.kt: the gateway reads the face angle after the type customisation and passes it on with rsprot'ssetFaceAngle(angle, instant); before, its three bytes misaligned the rest of the NPC update on RuneLite sessions.server/plugins/bosses/hueycoatl/Fight.Hueycoatl.js: the tail spawns hidden facing west, each show sets its side's angle and resets the customisation, each sink hides it 2 ticks later unless it has shown again (whole, broken, and on the kill).server/plugins/bosses/hueycoatl/Attacks.Hueycoatl.js: Rain Fire plays 11669 for everyone and sends each target its own style sequence and charge spotanim.Shared.Hueycoatl.js:TAIL_FACE,TAIL_HIDDEN_MODELS.docs/hueycoatl.md: the capture facts.Testing
server/tests/hueycoatl-tail-head.test.cjs(new, 4 pass): spawn hidden at 512, shows west at 1536; the 2-tick swap never hides; the broken tail is hidden with three -1s 2 ticks after each sink and shown again at its next show; Rain Fire's shared and per-target packets, shielded and not.client/tests/npc-face-angle-hidden-models.test.ts(new, passes): face angle and -1 models round-trip through the real encoder and decoder;npcTypeHasModel.hueycoatl.test.cjs,hueycoatl-camera-reset.test.cjs(31 with the new file),echo-bosses,ides-of-milk-parity, clientnpc-type-customisation,npc-transparency,npc-headbars,npc-world-view-sync,npc-head-icons,npc-spot-anim-slots.tsc --noEmitclean in client.packet-sender.test.cjsPoc/browser world host #8 (dialogue text resend) fails with or without this change.runelite-gatewayActorBlocksTest(5 pass, 1 new): a block with the type customisation and the face angle decodes both and leaves the stream at the next block; without the decode line it fails.Not covered
enabled_ops); tsps has no NPC ops packet, so the hidden tail relies on the fight's own checks.Reference
Self-reviewed with the review checklist at 57ad38b; its notes (the broken tail's model count in the docs,
setFaceAnglebeing for standing NPCs) are addressed in 598346b. Left open: the tests use a fake NPC, so thePlayerSessionface-angle line and the client's instant rotation are covered only by the protocol round-trip and the in-game check.🤖 Generated with Claude Code