RynthAi jump loot: no Return wait after a pickup ACE ran in the air #24

Open
AwfulWaffle wants to merge 2 commits from AwfulWaffle/RynthSuite:lootjump-no-benddown into main
First-time contributor

Depends on: lootjump-landing-gate (#23) (uses its ActionPacer.LootJumpAirborne / NoteLootJump). Second of the stack: lootjump-landing-gate (#23) -> lootjump-no-benddown (#24) -> lootjump-slot-refusal (#29) -> {lootjump-merge-floor (#30), lootjump-flight-budget (#31)} (siblings).

What went wrong in play

On ACE with jump-loot, a pickup that reaches the server while the character is in the air has no pickup motion (Player_Inventory.GetPickupMotion returns Invalid under allow_jump_loot): the item moves at about the round trip, EnqueuePickupDone has no Return to play, and the character is not busy. RynthAi still handled it like a normal pickup:

  • the answer was not believed before the 500 ms PickupAnswerMinMs floor (ACE's motion time), although it had come in about 150 ms;
  • the corpse was then held open until the motion queue went still (the jump's own take-off and landing) or for PickupSettleMs;
  • the next item on the same corpse was queued as if behind a Return.

In play that is about 2 s per pickup of waiting for a bend-down and Return the server never played.

The fix

  • A jump send is believed on arrival when the item is seen in a pack: the server's own answer about that object, which also frees the client's one request slot. A merge keeps the floor here (a merged-away object can leave the slot held; lootjump-merge-floor (#30) revisits that once the slot-refusal net is in).
  • A pickup whose jump went out with that very send, or that was sent while still in the air from the last loot jump, and whose item was off the corpse sooner than PickupAnswerMinMs, settles at its confirm: the corpse completes and the next pickup or open goes at once, in the air. For the rest of the jump's flight (JumpLandMaxMs from the jump itself, read through the new ActionPacer.LootJumpAgeMs) a busy motion queue does not hold the next pickup.
  • A jump pickup answered after a bend-down's time keeps the Return wait, and its confirm ends any earlier flight window, so no jump goes into a Return.
  • The call can be wrong (a fast real bend-down can be 0.25-0.4 s). A move sent on it refused as too busy (0x1D, or ACE's 0x1D plus code-0 save-failed pair), or the next corpse's open sent on it answered UseDone 0x1D, ends the window and turns the call off for 5 min, so every pickup waits its Return. Any other fast refusal does not. Dropping the corpse claim ends the window.

How it was tested

Tools/RynthCore.RynthAiHostTests, dotnet run -c Release:

  • full run: 1516 tests, 1515 passed, 1 failed (map bake: 0x6346 ..., the same pre-existing failure as upstream main);
  • "Jump" filter: 49 tests, 49 passed.

New tests: next corpse opened at the confirm with the air queue busy or idle; next item sent in the air with no second jump and a fresh jump after the landing; a slow answer waits its Return and ends the flight window; a jump answer at 150 ms is confirmed then; a jump merge, a no-jump send and a weak sign keep the floor; no-jump and resent fast answers wait their Return; a too-busy move or open turns the call off, a code-0 refusal does not; the claim reset ends the window; one move in flight, the next on the answer tick; the window after an in-air send is anchored to the jump, not the send (checked to fail when anchored to the send).

Scope and risk

ACE-specific. Only jump sends take any of this, so it needs Jump When Looting (LootJumpEnabled, default off). A send with no jump (setting off, pipelined, resent, low stamina) keeps the floor and the Return wait unchanged. Files: CorpseOpenController.cs, ActionPacer.cs (LootJumpAgeMs), LootJumpTests.cs.

🤖 Generated with Claude Code

Depends on: lootjump-landing-gate (#23) (uses its `ActionPacer.LootJumpAirborne` / `NoteLootJump`). Second of the stack: lootjump-landing-gate (#23) -> lootjump-no-benddown (#24) -> lootjump-slot-refusal (#29) -> {lootjump-merge-floor (#30), lootjump-flight-budget (#31)} (siblings). ## What went wrong in play On ACE with jump-loot, a pickup that reaches the server while the character is in the air has no pickup motion (Player_Inventory.GetPickupMotion returns Invalid under allow_jump_loot): the item moves at about the round trip, EnqueuePickupDone has no Return to play, and the character is not busy. RynthAi still handled it like a normal pickup: - the answer was not believed before the 500 ms `PickupAnswerMinMs` floor (ACE's motion time), although it had come in about 150 ms; - the corpse was then held open until the motion queue went still (the jump's own take-off and landing) or for `PickupSettleMs`; - the next item on the same corpse was queued as if behind a Return. In play that is about 2 s per pickup of waiting for a bend-down and Return the server never played. ## The fix - A jump send is believed on arrival when the item is seen in a pack: the server's own answer about that object, which also frees the client's one request slot. A merge keeps the floor here (a merged-away object can leave the slot held; lootjump-merge-floor (#30) revisits that once the slot-refusal net is in). - A pickup whose jump went out with that very send, or that was sent while still in the air from the last loot jump, and whose item was off the corpse sooner than `PickupAnswerMinMs`, settles at its confirm: the corpse completes and the next pickup or open goes at once, in the air. For the rest of the jump's flight (`JumpLandMaxMs` from the jump itself, read through the new `ActionPacer.LootJumpAgeMs`) a busy motion queue does not hold the next pickup. - A jump pickup answered after a bend-down's time keeps the Return wait, and its confirm ends any earlier flight window, so no jump goes into a Return. - The call can be wrong (a fast real bend-down can be 0.25-0.4 s). A move sent on it refused as too busy (0x1D, or ACE's 0x1D plus code-0 save-failed pair), or the next corpse's open sent on it answered UseDone 0x1D, ends the window and turns the call off for 5 min, so every pickup waits its Return. Any other fast refusal does not. Dropping the corpse claim ends the window. ## How it was tested `Tools/RynthCore.RynthAiHostTests`, `dotnet run -c Release`: - full run: 1516 tests, 1515 passed, 1 failed (`map bake: 0x6346 ...`, the same pre-existing failure as upstream main); - `"Jump"` filter: 49 tests, 49 passed. New tests: next corpse opened at the confirm with the air queue busy or idle; next item sent in the air with no second jump and a fresh jump after the landing; a slow answer waits its Return and ends the flight window; a jump answer at 150 ms is confirmed then; a jump merge, a no-jump send and a weak sign keep the floor; no-jump and resent fast answers wait their Return; a too-busy move or open turns the call off, a code-0 refusal does not; the claim reset ends the window; one move in flight, the next on the answer tick; the window after an in-air send is anchored to the jump, not the send (checked to fail when anchored to the send). ## Scope and risk ACE-specific. Only jump sends take any of this, so it needs Jump When Looting (`LootJumpEnabled`, default off). A send with no jump (setting off, pipelined, resent, low stamina) keeps the floor and the Return wait unchanged. Files: `CorpseOpenController.cs`, `ActionPacer.cs` (`LootJumpAgeMs`), `LootJumpTests.cs`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ACE refuses a cast, a swing, a shot, a kit, food or a potion while the
character is in the air (Player_Magic/Melee/Missile, Healer, Food:
IsJumping -> YouCantDoThatWhileInTheAir, 0x4EB). Nothing held combat or
buffs for a loot jump, so an attack or heal sent during the pickup's jump
was refused, and a refused attack was judged a no-damage miss.

ActionPacer now keeps a loot-jump air hold (NoteLootJump /
LootJumpAirborne / ForgetLootJump), with the landing check the stuck-cast
jump already used (height back from JumpLandMinMs, JumpLandMaxMs at most,
so a missed landing cannot stall anything). CombatManager.Think checks it
right before the attack send (target, approach and stance go on; nothing
is stamped, counted or judged for a held tick); MayStart holds "Buff"
starts (buffs, heals, kits, potions, the emergency step). "Loot" and doors
are never held: ACE takes a pickup and a corpse use in the air. The hold
ends at death, portal space and logout.

Belt and braces: a cast answered UseDone 0x4EB, and a swing or shot
followed by WeenieError 0x4EB, is not judged as a no-damage attack.

No second tap jump while the last one is still in the air: the move
arrives in the air anyway, and ACE HandleActionJump has no ground check
(an air jump only costs stamina). A jump the client refused is not noted.

The hold is only ever set by a loot jump, which needs Jump When Looting
(LootJumpEnabled, default off). The 0x4EB handling reacts only to the
server's own in-the-air refusal.

Host tests: no second jump while in the air, a fresh one after the
landing; the jump holds buffs and emergency heals but never loot, until
the landing or the cap; portal space and a death drop the hold; Think
sends no cast in the air and casts on the landing or at the cap; a swing
refused in the air is not a miss.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With jump-loot on ACE the server answers a pickup made in the air with no
pickup motion (Player_Inventory.GetPickupMotion returns Invalid under
allow_jump_loot), so EnqueuePickupDone has no Return to play and the
character is not busy. The looter still treated the answer like a normal
one: it held the answer to the 500 ms PickupAnswerMinMs floor, then held
the corpse open until the motion queue went still (the jump's own take-off
and landing) or for PickupSettleMs, and queued the next item as if behind
a Return. In play that is about 2 s of bend-down wait per pickup that the
server never played.

A jump send is now believed on arrival when the item is seen in a pack
(the server's own answer about that object, which also frees the client's
one request slot). A merge keeps the floor: a merged-away object can leave
the slot held. A pickup whose jump went out with that very send, or that
was sent while still in the air from the last loot jump, and whose item
was off the corpse sooner than PickupAnswerMinMs, settles at its confirm:
the corpse completes and the next pickup or open goes at once, in the air.
For the jump's flight (JumpLandMaxMs from the jump itself, read through
the new ActionPacer.LootJumpAgeMs) a busy motion queue does not hold the
next pickup. A jump pickup answered after a bend-down's time keeps the
Return wait, and its confirm ends any earlier flight window.

The call can be wrong (a fast real bend-down can be 0.25-0.4 s): a move
sent on it refused as "too busy" (0x1D, or ACE's 0x1D plus code-0
save-failed pair), or the next corpse's open sent on it answered UseDone
0x1D, ends the window and turns the call off for 5 min. Any other fast
refusal does not. Dropping the corpse claim ends the window.

Only jump sends take any of this, so it needs Jump When Looting
(LootJumpEnabled, default off). A send with no jump keeps the floor and
the Return wait unchanged.

Host tests: next corpse opened at the confirm with the air queue busy or
idle; next item sent in the air with no second jump, a fresh jump after
the landing; a slow answer waits its Return and ends the flight window;
a jump answer at 150 ms is confirmed then; a jump merge, a no-jump send
and a weak sign keep the floor; no-jump and resent fast answers wait
their Return; a too-busy move or open turns the call off, a code-0
refusal does not; the reset ends the window; one move in flight, the next
on the answer tick; the window is anchored to the jump, not the send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • Plugins/RynthCore.Plugin.RynthAi/CorpseOpenController.cs
  • Plugins/Shared/ActionPacer.cs
  • Tools/RynthCore.RynthAiHostTests/Tests/CombatHookTests.cs
  • Tools/RynthCore.RynthAiHostTests/Tests/LootJumpTests.cs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u lootjump-no-benddown:AwfulWaffle-lootjump-no-benddown
git switch AwfulWaffle-lootjump-no-benddown

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff AwfulWaffle-lootjump-no-benddown
git switch AwfulWaffle-lootjump-no-benddown
git rebase main
git switch main
git merge --ff-only AwfulWaffle-lootjump-no-benddown
git switch AwfulWaffle-lootjump-no-benddown
git rebase main
git switch main
git merge --no-ff AwfulWaffle-lootjump-no-benddown
git switch main
git merge --squash AwfulWaffle-lootjump-no-benddown
git switch main
git merge --ff-only AwfulWaffle-lootjump-no-benddown
git switch main
git merge AwfulWaffle-lootjump-no-benddown
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
rynth/RynthSuite!24
No description provided.