RynthAi jump loot: hold combat and buffs for the landing, no second jump in the air #23

Open
AwfulWaffle wants to merge 1 commit from AwfulWaffle/RynthSuite:lootjump-landing-gate into main
First-time contributor

Depends on: nothing (applies to upstream main 7166d25). First of the stack: lootjump-landing-gate (#23) -> lootjump-no-benddown (#24) -> lootjump-slot-refusal (#29) -> {lootjump-merge-floor (#30), lootjump-flight-budget (#31)} (the last two are siblings, each on lootjump-slot-refusal (#29)).

What went wrong in play

With Jump When Looting on, every corpse pickup goes out with a tap jump. On ACE the character is then in the air for up to about 1.5 s, and ACE refuses a cast, a swing, a shot, a healing kit, food or a potion while the character is jumping (Player_Magic, Player_Melee, Player_Missile, Healer, Food: IsJumping -> WeenieError 0x4EB, "You can't do that while in the air"). Nothing in RynthAi knew about the loot jump, so:

  • an attack or a heal sent during the pickup's flight was refused and had to be redone;
  • a refused swing or shot was then judged as a no-damage attack, which counts toward blacklisting a healthy target;
  • a second pickup sent while still in the air took a second tap jump, which on ACE costs stamina and does nothing for the pickup (HandleActionJump has no ground check).

The fix

  • ActionPacer keeps a loot-jump air hold: NoteLootJump when the client took the tap jump, LootJumpAirborne until the height is back (checked from JumpLandMinMs) or JumpLandMaxMs at most, so a missed landing can never stall anything, and ForgetLootJump at death, portal space and logout. The landing check is the one the stuck-cast jump already used, factored into Landed.
  • CombatManager.Think waits for the landing right before the attack send. Target, approach and stance go on; nothing is stamped, counted or judged for a held tick. MayStart("Buff") (buffs, heals, kits, potions, the emergency step) waits too. Loot and doors are never held: ACE takes a pickup and a corpse use in the air.
  • Belt and braces: a cast answered UseDone 0x4EB, or 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. A jump the client refused is not noted.

How it was tested

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

  • full run: 1500 tests, 1499 passed, 1 failed (map bake: 0x6346 from the real dats matches the plan already on disk, which fails the same way on untouched upstream main: 1495 tests, 1494 passed);
  • "Jump" filter: 33 tests, 33 passed.

New tests: no second jump while in the air and 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 (0x4EB) is not a miss. The no-second-jump test was checked to fail with the in-air guard removed.

Scope and risk

ACE-specific. The hold is only ever set by a loot jump, which needs Jump When Looting (LootJumpEnabled, default off), so with the setting off nothing is held. The 0x4EB handling only reacts to the server's own in-the-air refusal, which is never a real miss on any server. Files: ActionPacer.cs, CombatManager.cs, CorpseOpenController.cs (the jump call), RynthAiPlugin.cs / RynthAiPlugin.Safety.cs (the three ForgetLootJump calls), plus tests.

🤖 Generated with Claude Code

Depends on: nothing (applies to upstream main 7166d25). First of the stack: lootjump-landing-gate (#23) -> lootjump-no-benddown (#24) -> lootjump-slot-refusal (#29) -> {lootjump-merge-floor (#30), lootjump-flight-budget (#31)} (the last two are siblings, each on lootjump-slot-refusal (#29)). ## What went wrong in play With Jump When Looting on, every corpse pickup goes out with a tap jump. On ACE the character is then in the air for up to about 1.5 s, and ACE refuses a cast, a swing, a shot, a healing kit, food or a potion while the character is jumping (Player_Magic, Player_Melee, Player_Missile, Healer, Food: IsJumping -> WeenieError 0x4EB, "You can't do that while in the air"). Nothing in RynthAi knew about the loot jump, so: - an attack or a heal sent during the pickup's flight was refused and had to be redone; - a refused swing or shot was then judged as a no-damage attack, which counts toward blacklisting a healthy target; - a second pickup sent while still in the air took a second tap jump, which on ACE costs stamina and does nothing for the pickup (HandleActionJump has no ground check). ## The fix - `ActionPacer` keeps a loot-jump air hold: `NoteLootJump` when the client took the tap jump, `LootJumpAirborne` until the height is back (checked from `JumpLandMinMs`) or `JumpLandMaxMs` at most, so a missed landing can never stall anything, and `ForgetLootJump` at death, portal space and logout. The landing check is the one the stuck-cast jump already used, factored into `Landed`. - `CombatManager.Think` waits for the landing right before the attack send. Target, approach and stance go on; nothing is stamped, counted or judged for a held tick. `MayStart("Buff")` (buffs, heals, kits, potions, the emergency step) waits too. Loot and doors are never held: ACE takes a pickup and a corpse use in the air. - Belt and braces: a cast answered UseDone 0x4EB, or 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. A jump the client refused is not noted. ## How it was tested `Tools/RynthCore.RynthAiHostTests`, `dotnet run -c Release`: - full run: 1500 tests, 1499 passed, 1 failed (`map bake: 0x6346 from the real dats matches the plan already on disk`, which fails the same way on untouched upstream main: 1495 tests, 1494 passed); - `"Jump"` filter: 33 tests, 33 passed. New tests: no second jump while in the air and 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 (0x4EB) is not a miss. The no-second-jump test was checked to fail with the in-air guard removed. ## Scope and risk ACE-specific. The hold is only ever set by a loot jump, which needs Jump When Looting (`LootJumpEnabled`, default off), so with the setting off nothing is held. The 0x4EB handling only reacts to the server's own in-the-air refusal, which is never a real miss on any server. Files: `ActionPacer.cs`, `CombatManager.cs`, `CorpseOpenController.cs` (the jump call), `RynthAiPlugin.cs` / `RynthAiPlugin.Safety.cs` (the three `ForgetLootJump` calls), plus tests. 🤖 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>
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-landing-gate:AwfulWaffle-lootjump-landing-gate
git switch AwfulWaffle-lootjump-landing-gate

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-landing-gate
git switch AwfulWaffle-lootjump-landing-gate
git rebase main
git switch main
git merge --ff-only AwfulWaffle-lootjump-landing-gate
git switch AwfulWaffle-lootjump-landing-gate
git rebase main
git switch main
git merge --no-ff AwfulWaffle-lootjump-landing-gate
git switch main
git merge --squash AwfulWaffle-lootjump-landing-gate
git switch main
git merge --ff-only AwfulWaffle-lootjump-landing-gate
git switch main
git merge AwfulWaffle-lootjump-landing-gate
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!23
No description provided.