RynthSuite as of 2026-11-02 (internal 487d6ea): release 2026.11.2.2

This commit is contained in:
Tom Bohar 2026-11-02 20:34:04 -05:00
commit f48050bf01
21 changed files with 847 additions and 177 deletions

View file

@ -51,7 +51,11 @@ internal readonly struct ArbiterInputs
/// <summary>Actively engaged (a live attack target), not merely "something is engageable".</summary>
public readonly bool CombatEngaged;
/// <summary>BoostNavPriority: RynthAi only navigates (no combat, no looting), route or not.</summary>
/// <summary>
/// Boost Nav Priority is on AND a nav route runs (BoostNavRule.Active): RynthAi only follows the
/// route (no combat, no looting). False with no route, at the end of a Once route, and during the
/// Outdoor Hunt, so the flag changes nothing there (R-20261103-000159-a65e).
/// </summary>
public readonly bool BoostNav;
/// <summary>BoostLootPriority — looting preempts combat.</summary>
public readonly bool BoostLoot;
@ -115,15 +119,17 @@ internal sealed class ActivityArbiter
if (s.WantBuffing) return BotActivity.Buffing;
// ── User priority overrides ────────────────────────────────────────
// BoostNavPriority (owner's rule, 2026-11-02): RynthAi ONLY navigates. No
// hunting, no looting, and no fighting back even with a monster on it: with
// a route (or a follow) it navigates, with nothing to navigate it stands
// idle. Buffing (above) still outranks it. This used to be guarded by
// WantNav, so with no route the flag did nothing and the bot hunted as
// usual; the player never noticed it was on and only saw that it would not
// loot (R-20261102-041824-3f7c). Two things still get a slot: a container
// the player flagged with /ra lootthis (looted with Boost Nav on, as with
// the macro off), and the salvage queue (an inventory chore, no fight).
// BoostNavPriority (owner's corrected rule, 2026-11-02, R-20261103-000159-a65e):
// "Boost nav priority should only run the nav route, not from mob to mob. So
// when no nav route is loaded it should fight." s.BoostNav is true only while
// a nav route (or a follow) runs (BoostNavRule.Active); then RynthAi only
// follows it: no hunting, no looting, no fighting back even with a monster on
// it. With no route, a Once route at its end, or the Outdoor Hunt, s.BoostNav
// is false and the default order below runs, as with the flag off. Buffing
// (above) still outranks it. Two things still get a slot: a container the
// player flagged with /ra lootthis (looted with Boost Nav on, as with the
// macro off), and the salvage queue (an inventory chore, no fight). Idle is
// left for the moment nav itself waits (travelling back to your corpse).
if (s.BoostNav)
{
if (s.WantNav) return BotActivity.Navigating;

View file

@ -4622,12 +4622,13 @@ public partial class CombatManager : IDisposable
DropTarget("combat disabled");
}
// Boost Nav Priority (owner's rule, 2026-11-02): RynthAi only navigates. No hunting and no
// fighting back, whatever BotAction says. canRun used to block combat only while the
// arbiter held "Navigating", so with no route (BotAction "Default") Think ran and the bot
// hunted as usual with the flag on (R-20261102-041824-3f7c). The scan above still runs:
// it is what tells the arbiter (and the once-per-session notice) a fight is being skipped.
if (_settings.BoostNavPriority)
// Boost Nav Priority (owner's corrected rule, 2026-11-02, R-20261103-000159-a65e): while a
// nav route runs RynthAi only follows it. No hunting and no fighting back, whatever
// BotAction says. With no route (or a Once route at its end, or the Outdoor Hunt) the flag
// does nothing and combat runs as usual: BoostNavRule.Active is the one test. The scan
// above still runs: it is what tells the arbiter (and the once-per-session notice) a fight
// is being skipped, and what picks the fight back up the moment the route is gone.
if (BoostNavRule.Active(_settings))
{
StandDownForBoostNav();
return;
@ -4635,7 +4636,9 @@ public partial class CombatManager : IDisposable
if (_boostNavStoodDown)
{
_boostNavStoodDown = false;
_host.Log("[RynthAi] Combat: Boost Nav Priority is off - hunting again.");
_host.Log(_settings.BoostNavPriority
? "[RynthAi] Combat: Boost Nav Priority is on but no nav route runs - hunting again."
: "[RynthAi] Combat: Boost Nav Priority is off - hunting again.");
}
// Combat can run in Default/Combat, can interrupt navigation, and can interrupt looting
@ -4665,8 +4668,9 @@ public partial class CombatManager : IDisposable
internal bool BoostNavStoodDown => _boostNavStoodDown;
/// <summary>
/// Boost Nav Priority (owner's rule, 2026-11-02), every combat tick while the flag is on:
/// nothing is attacked, and a fight the flag came on in the middle of is let go cleanly. The
/// Boost Nav Priority (owner's corrected rule, 2026-11-02), every combat tick while the flag is
/// on and a nav route runs (BoostNavRule.Active): nothing is attacked, and a fight the flag (or
/// a route loaded with it on) came in the middle of is let go cleanly. The
/// target is dropped (which ends a kite or an environment approach), the server's melee or
/// missile attack is cancelled (or it keeps swinging and walking us to the mob), a held turn
/// is let go, and with Peace Mode When Idle the stance goes back to Peace as it does between
@ -4679,13 +4683,13 @@ public partial class CombatManager : IDisposable
if (!_boostNavStoodDown)
{
_boostNavStoodDown = true;
_host.Log("[RynthAi] Combat: Boost Nav Priority is on - no hunting and no fighting back, RynthAi only navigates.");
_host.Log("[RynthAi] Combat: Boost Nav Priority is on and a nav route runs - no hunting and no fighting back, RynthAi only follows the route.");
// The flag came on mid-fight: end the server's attack even if our record of it is gone.
if (mode == CombatMode.Melee || mode == CombatMode.Missile)
ReleaseServerAttack("Boost Nav Priority", log: false);
}
if (activeTargetId != 0 || _lockedTargetId != 0)
DropTarget("Boost Nav Priority is on (RynthAi only navigates)");
DropTarget("Boost Nav Priority is on and a nav route runs (RynthAi only follows it)");
if (_serverAttackTargetId != 0)
ReleaseServerAttack("Boost Nav Priority", log: false);
ReleaseHeldTurn();
@ -4700,7 +4704,7 @@ public partial class CombatManager : IDisposable
// The idle swap's backoff (ThinkCore): 500 ms for the first 4 sends, then doubling to 15 s.
double peaceDelayMs = Math.Min(15_000, 500 * Math.Pow(2, Math.Min(5, _idlePeaceAttempts / 4)));
if ((RynthClock.Now - _lastPeaceAttempt).TotalMilliseconds > peaceDelayMs
&& _host.ChangeCombatModeFor(CombatMode.NonCombat, "Combat", "Boost Nav Priority: RynthAi only navigates (Peace Mode When Idle)"))
&& _host.ChangeCombatModeFor(CombatMode.NonCombat, "Combat", "Boost Nav Priority: RynthAi only follows the nav route (Peace Mode When Idle)"))
{
_lastPeaceAttempt = RynthClock.Now;
_idlePeaceAttempts++;

View file

@ -277,10 +277,11 @@ internal sealed class PetManager
if (!_petSeenSinceSummon) return;
_assumePetActiveUntil = 0;
}
// Boost Nav Priority (owner's rule, 2026-11-02): RynthAi only navigates, so there is no
// fight to summon for (a summoned pet attacks the monsters it was called for), and a
// cosmetic pet stays out.
if (_settings.BoostNavPriority) return;
// Boost Nav Priority (owner's corrected rule, 2026-11-02, R-20261103-000159-a65e): while a nav
// route runs RynthAi only follows it, so there is no fight to summon for (a summoned pet
// attacks the monsters it was called for), and a cosmetic pet stays out. With no route it
// hunts, and pets are summoned as with the flag off.
if (BoostNavRule.Active(_settings)) return;
if (petOut)
{
// A cosmetic pet in the slot steps aside for the fight; wait for the dismiss to land.

View file

@ -171,6 +171,13 @@ public sealed partial class RynthAiPlugin
private readonly List<int> _currentLootItemDestsTried = new();
private readonly List<int> _currentLootItemFullPacks = new(); // packs this item's refusals marked full
private long _moveAwaitTickAt; // CorpseNowMs of the previous answer-wait call
// 2026-11-02 (R-20261102-204309-206c): an open corpse while a fight has the tick (HoldOpenCorpseForFight).
private long _fightHoldSince; // CorpseNowMs the open corpse began waiting for the fight; 0 = none
private long _fightHoldTickAt; // CorpseNowMs of the previous held tick (the corpse clock is paid back)
private long _fightHoldEndedAt; // CorpseNowMs the last such wait ended (NoteNextSendWaits counts from it)
private bool _currentLootItemFightHeld; // the last send had no answer when a fight took the tick
private int _currentLootItemFightResends; // resends for a fight in between (not counted as tries)
private bool _currentLootItemResendWaitLogged; // the "next send waits" line was written for the last send
// How long the server took to answer recent pickups (confirmations and refusals after the
// pickup ran): the answer wait is sized from the slowest of them.
private readonly long[] _pickupAnswerLatencies = new long[8];
@ -700,16 +707,17 @@ public sealed partial class RynthAiPlugin
}
/// <summary>
/// Boost Nav Priority means no looting at all: corpses are passed by and the bot navigates
/// (owner, 2026-10-31: "when navprio is on it shouldn't loot at all, just bypass all corpses
/// and navigate"), route or not. The looter stood down for the flag, but HasLootWork still
/// offered the corpses, so with no route the arbiter's BoostNav clause (guarded by WantNav)
/// gave Looting the tick and the bot sat in Looting forever with nothing claimed
/// (R-20261031-203155-cea0). Both now read this one test: with the flag on there is no loot
/// work, so Looting never takes the tick. A forced loot (/ra lootthis) still goes.
/// Boost Nav Priority with a nav route running means no looting at all: corpses are passed by
/// and the bot follows the route (owner, 2026-10-31: "when navprio is on it shouldn't loot at
/// all, just bypass all corpses and navigate"). The claim and HasLootWork both read this one
/// test, so Looting never takes the tick while the looter stands down
/// (R-20261031-203155-cea0). Owner's corrected rule (2026-11-02, R-20261103-000159-a65e):
/// only while a nav route runs (BoostNavRule.Active); with no route, a Once route at its end,
/// or the Outdoor Hunt, corpses are looted as with the flag off. A forced loot (/ra lootthis)
/// always goes.
/// </summary>
private static bool BoostNavHoldsLoot(LegacyUiSettings settings)
=> settings.BoostNavPriority;
=> BoostNavRule.Active(settings);
private void TickCorpseOpeningCore()
{
@ -734,7 +742,7 @@ public sealed partial class RynthAiPlugin
if ((!settings.IsMacroRunning || !settings.EnableLooting || BoostNavHoldsLoot(settings)) && !ForcedLootHolds())
{
_lootSkipWhy = !settings.IsMacroRunning ? "the macro is off"
: !settings.EnableLooting ? "looting is off" : "Boost Nav Priority is on (RynthAi only navigates)";
: !settings.EnableLooting ? "looting is off" : "Boost Nav Priority is on and a nav route runs (RynthAi only follows it)";
ResetCorpseTarget();
return;
}
@ -777,7 +785,9 @@ public sealed partial class RynthAiPlugin
// ── Combat takes priority over claiming NEW corpses ───────────────
// But if we already have an opened container, finish looting it
// (no movement, no conflict with combat).
// (no movement, no conflict with combat) - while the arbiter gives Looting
// the tick; one that gives Combat the tick makes the open corpse wait
// for the fight (HoldOpenCorpseForFight).
// Exception: loot starvation (see LootStarveMs) - the arbiter gave this tick to
// Looting because a corpse waited too long and no monster is close.
if (settings.EnableCombat
@ -1070,7 +1080,7 @@ public sealed partial class RynthAiPlugin
if (!settings.IsMacroRunning || !settings.EnableLooting)
return false;
if (settings.BoostNavPriority)
if (BoostNavHoldsLoot(settings))
return false;
// Combat is #1 priority — block new corpse claims while combat is
@ -1487,6 +1497,10 @@ public sealed partial class RynthAiPlugin
if (_openedContainerAt == 0)
_openedContainerAt = now;
// A fight has the tick: the corpse waits for it, its clock stopped (R-20261102-204309-206c).
if (HoldOpenCorpseForFight(settings, corpseId, now))
return;
if (HasCorpseTimedOut(settings, now))
{
AbandonCurrentCorpse(now, "timeout");
@ -1980,6 +1994,12 @@ public sealed partial class RynthAiPlugin
/// <summary>Resends after a "You're too busy" that don't count as one of the item's 3 tries.</summary>
internal const int PickupFreeRetries = 3;
/// <summary>Resends after a fight came in before the send's answer that don't count as one of the item's 3 tries.</summary>
internal const int PickupFightResends = 2;
/// <summary>A send with no answer this long past the answer wait, whose next send is still held, is logged (once per send).</summary>
internal const long PickupResendWaitLogMs = 3000;
private const uint WeenieErrorYoureTooBusy = 0x001D;
private const uint EventInventoryServerSaveFailed = 0x00A0;
@ -2177,6 +2197,7 @@ public sealed partial class RynthAiPlugin
private void NoteLootMoveSent()
{
_currentLootItemAwaitingAnswer = true;
_currentLootItemResendWaitLogged = false;
_currentLootItemRefusedAt = 0;
_currentLootItemRefusalError = 0;
_currentLootItemRefusalObject = 0;
@ -2407,7 +2428,95 @@ public sealed partial class RynthAiPlugin
_corpseTargetSince += gap;
}
private void TickPendingCorpsePickup(LegacyUiSettings settings)
// ── A fight while a corpse is open (2026-11-02, R-20261102-204309-206c) ──
// Conquest, RynthAi 2026.11.2.1, outdoors, Boost Loot Priority on: "it will open the corpse and
// highlight the item and then just sit waiting". The bow's move went out and had no answer when
// monsters came 4.4 s later; the arbiter gave Combat the tick (combat is engaged, Boost Loot or
// not). The open corpse's looter ran on under Combat as if it looted: the answer wait ran out in
// a lull between shots, the send was counted as an unanswered try, and the resend was held by
// the shot's busy count, then by the 1 s of stillness the missile fight never gave - silently.
// With no answer awaited any more nothing stopped the corpse's clock (PauseCorpseClockWhileMoveAwaits
// runs only while one is), so 19 s after the send the corpse was abandoned mid-pickup with the
// 30-minute completed mark, and the bow stayed on it. A resend during the fight would not have
// done better: the client drops an item move while the character attacks ("You cannot move or
// use an item while attacking", ClientActionGates) and ACE answers one that gets through with
// "You're too busy". Now, while Combat has the tick, the open corpse waits: its clock stopped,
// no new pickup, and a move already out is only watched for (it may still land, or be refused).
// After the fight one with no answer goes again without costing one of its 3 tries
// (PickupFightResends), and every step says so in the log.
/// <summary>
/// TickOpenCorpseLooting: true while a fight has the tick, the open corpse waiting for it (your
/// own death corpse excepted: its recovery runs as before). Logs when the wait begins and ends.
/// </summary>
private bool HoldOpenCorpseForFight(LegacyUiSettings settings, int corpseId, long now)
{
bool fight = _activity == BotActivity.Combat && !IsOwnDeathCorpseId(settings, corpseId);
bool pending = _currentLootItemMovePending && _currentLootItemId != 0;
if (!fight)
{
if (_fightHoldSince != 0)
{
_fightHoldEndedAt = now;
LootDiag($"[RynthAi] {LootTag}: the fight is over after {(now - _fightHoldSince) / 1000.0:0.0}s; looting 0x{(uint)corpseId:X8} goes on" +
(pending ? $" (the move of 0x{(uint)_currentLootItemId:X8} '{_currentLootItemName}' sent {now - _currentLootItemMoveRequestedAt} ms ago " +
(_currentLootItemRefusedAt != 0 ? "was refused)." : "has no answer yet).") : "."));
}
_fightHoldSince = 0;
_fightHoldTickAt = 0;
return false;
}
if (_fightHoldSince == 0)
{
_fightHoldSince = now;
LootDiag(pending
? $"[RynthAi] {LootTag}: 0x{(uint)corpseId:X8} waits for the fight: the move of 0x{(uint)_currentLootItemId:X8} '{_currentLootItemName}' sent {now - _currentLootItemMoveRequestedAt} ms ago " +
(_currentLootItemRefusedAt != 0 ? "was refused" : "has no answer yet") +
"; it is watched for but not sent again while combat has the tick (the client drops item moves during an attack); the corpse's timeout clock is stopped."
: $"[RynthAi] {LootTag}: 0x{(uint)corpseId:X8} waits for the fight: no pickup while combat has the tick; the corpse's timeout clock is stopped.");
}
PauseCorpseClockForFight(now);
if (pending && _openedContainerInventoryObservedAt != 0)
TickPendingCorpsePickup(settings, heldByFight: true);
return true;
}
/// <summary>
/// The corpse's timeout clock does not run while a fight holds it, as for the cast-answer hold
/// (PauseCorpseClockWhileHeld, and for the same reason: the open-container branch resets the
/// frozen age FreezeCorpseTimeout keeps). A pickup confirmed during the hold restarts the clock.
/// </summary>
private void PauseCorpseClockForFight(long now)
{
long last = _fightHoldTickAt;
_fightHoldTickAt = now;
if (last == 0 || _targetCorpseId == 0 || _corpseTargetSince == 0)
return;
long gap = now - last;
if (gap > 0 && gap <= PickupHoldMaxGapMs)
_corpseTargetSince += gap;
}
/// <summary>
/// The current item's next send is held (<paramref name="why"/>) although its last send has had
/// no answer (or a refusal) for PickupResendWaitLogMs past the answer wait (and past the end of a
/// fight's wait): said once per send, so no pickup waits without a line (R-20261102-204309-206c:
/// 19 s with none).
/// </summary>
private void NoteNextSendWaits(long now, long answerWaitMs, string why)
{
if (_currentLootItemResendWaitLogged)
return;
long since = now - _currentLootItemMoveRequestedAt;
long due = Math.Max(_currentLootItemMoveRequestedAt + answerWaitMs, _fightHoldEndedAt);
if (now - due < PickupResendWaitLogMs)
return;
_currentLootItemResendWaitLogged = true;
string last = _currentLootItemRefusedAt != 0 ? "was refused" : "has had no answer";
LootDiag($"[RynthAi] {LootTag}: the last send of 0x{(uint)_currentLootItemId:X8} '{_currentLootItemName}' ({since} ms ago) {last}; the next send waits: {why}.");
}
private void TickPendingCorpsePickup(LegacyUiSettings settings, bool heldByFight = false)
{
if (_objectCache == null || _openedContainerId == 0 || _currentLootItemId == 0)
{
@ -2481,6 +2590,20 @@ public sealed partial class RynthAiPlugin
return;
}
// A fight has the tick (HoldOpenCorpseForFight, R-20261102-204309-206c): the answer is
// watched for (above) and nothing else. No resend: the client drops an item move while the
// character attacks and ACE answers one that gets through "You're too busy". A send with
// no answer yet goes again after the fight without costing one of the 3 tries.
if (heldByFight)
{
if (!refused) _currentLootItemFightHeld = true;
_currentLootItemStillSince = 0;
_moveAwaitTickAt = 0; // the fight's hold pays the corpse clock back, not the answer wait
return;
}
long answerWaitMs = PickupAnswerWaitMs();
// Item still on corpse — wait before retrying the UseObject. The window counts from
// when the character is still: while a pickup animation plays the engine holds the
// move, and a retry timed from the send gave up on items whose move had not gone
@ -2490,16 +2613,18 @@ public sealed partial class RynthAiPlugin
{
_currentLootItemStillSince = 0;
if (_currentLootItemAwaitingAnswer) PauseCorpseClockWhileMoveAwaits(now);
NoteNextSendWaits(now, answerWaitMs, "the character keeps animating");
return;
}
if (_currentLootItemStillSince == 0)
_currentLootItemStillSince = now;
bool freeRetry = busyRefusal && _currentLootItemFreeRetries < PickupFreeRetries;
// The last send had no answer when a fight took the tick: it goes again, free (bounded).
bool fightResend = !freeRetry && !refused && _currentLootItemFightHeld && _currentLootItemFightResends < PickupFightResends;
// No answer yet: no resend before PickupAnswerWaitMs (2026-10-29, R-20261029-122319-321f).
// The Loot Retry Timeout alone (0.5-1 s) is shorter than a slow server's answer (1.5-2.7 s
// on Conquest), and a resend while the move is out is dropped by the client or refused.
long answerWaitMs = PickupAnswerWaitMs();
long sinceSend = now - _currentLootItemMoveRequestedAt;
if (_currentLootItemAwaitingAnswer && !refused && sinceSend < answerWaitMs)
{
@ -2509,7 +2634,10 @@ public sealed partial class RynthAiPlugin
long verifyWindowMs = Math.Max(150, settings.LootRetryTimeoutMs);
long windowStart = Math.Max(_currentLootItemMoveRequestedAt, _currentLootItemStillSince);
if (!freeRetry && now - windowStart < verifyWindowMs)
{
NoteNextSendWaits(now, answerWaitMs, $"the character has not stood still for {verifyWindowMs} ms");
return;
}
// The last send failed: what it came to, once per send (a free resend's "too busy" is
// not one of the tries). Refused after the pickup ran counts against the pack; no answer
@ -2519,7 +2647,13 @@ public sealed partial class RynthAiPlugin
{
_currentLootItemAwaitingAnswer = false;
long answerMs = refused ? _currentLootItemRefusedAt - _currentLootItemMoveRequestedAt : sinceSend;
if (!refused)
if (fightResend)
{
// The fight, not the pack: no timeout counted against it (JudgeLootDest).
_currentLootItemTimedOut = true;
lastTry = $"no answer in {answerMs} ms, a fight in between";
}
else if (!refused)
{
_currentLootItemDestTimeouts++;
_currentLootItemTimedOut = true;
@ -2540,7 +2674,7 @@ public sealed partial class RynthAiPlugin
lastTry = $"too busy, {answerMs} ms after the send";
}
if (!freeRetry && _currentLootItemMoveAttempts >= 3)
if (!freeRetry && !fightResend && _currentLootItemMoveAttempts >= 3)
{
// None of the tries landed. When the server refused them after running the pickup,
// the pack they went to is full (its contents unknown to the client): leave it out
@ -2589,7 +2723,12 @@ public sealed partial class RynthAiPlugin
}
if (_busyCount > 0)
return; // Client is busy — don't queue retry
{
// Client is busy — don't queue retry. (R-20261102-204309-206c: a shot's busy count
// held the resend here, with no line, until the corpse timed out.)
NoteNextSendWaits(now, answerWaitMs, $"the client's busy count is {_busyCount}");
return;
}
if (PickupHeldByServerAction())
return; // a retry now would be refused as too busy and use up an attempt
@ -2604,8 +2743,11 @@ public sealed partial class RynthAiPlugin
bool retried = retry == LootPickupResult.Moved || retry == LootPickupResult.Used;
if (freeRetry)
_currentLootItemFreeRetries++;
else if (fightResend)
_currentLootItemFightResends++;
else
_currentLootItemMoveAttempts++;
_currentLootItemFightHeld = false;
_currentLootItemErrSeqAtSend = errSeqAtSend;
_currentLootItemMoveRequestedAt = now;
if (retried) NoteLootMoveSent();
@ -2614,6 +2756,10 @@ public sealed partial class RynthAiPlugin
_lastLootActionAt = now;
LootDiag(freeRetry
? $"[RynthAi] {LootTag}: the server refused 0x{(uint)_currentLootItemId:X8} as too busy ({refusedAfter} ms after the send, before its pickup ran; error 0x{refusal:X}); sending it again now the character is still."
: fightResend
? $"[RynthAi] {LootTag}: sending 0x{(uint)_currentLootItemId:X8} again after the fight" +
(lastTry.Length > 0 ? $" (last: {lastTry})" : "") +
$"; not one of its 3 tries ({_currentLootItemMoveAttempts} used)."
: $"[RynthAi] {LootTag}: retrying use for 0x{(uint)_currentLootItemId:X8} attempt {_currentLootItemMoveAttempts}" +
(lastTry.Length > 0 ? $" (last: {lastTry})." : "."));
@ -2790,8 +2936,8 @@ public sealed partial class RynthAiPlugin
if (!settings.IsMacroRunning || (!settings.EnableLooting && !ForcedLootHolds()))
return false;
// The claim's own full stop (TickCorpseOpening): with Boost Nav Priority on the looter
// stands down, so there is no loot work to offer (R-20261031-203155-cea0).
// The claim's own full stop (TickCorpseOpening): with Boost Nav Priority on and a nav route
// running the looter stands down, so there is no loot work to offer (R-20261031-203155-cea0).
if (BoostNavHoldsLoot(settings) && !ForcedLootHolds())
return false;
@ -2860,7 +3006,8 @@ public sealed partial class RynthAiPlugin
}
/// <summary>
/// Boost Nav Priority is passing by a corpse in range that would be looted with it off. For
/// Boost Nav Priority, with a nav route running, is passing by a corpse in range that would be
/// looted with it off. For
/// the once-per-session notice only (RynthAiPlugin.BoostNav.cs), which calls it every
/// BoostNavLootCheckMs until it has spoken. The scan's loot-starvation mark is put back: it
/// belongs to HasLootWork's tick, not to this look.
@ -3725,6 +3872,9 @@ public sealed partial class RynthAiPlugin
_currentLootItemPipelined = false;
_currentLootItemErrSeqAtSend = 0;
_currentLootItemFreeRetries = 0;
_currentLootItemFightHeld = false;
_currentLootItemFightResends = 0;
_currentLootItemResendWaitLogged = false;
_currentLootItemActionLabel = string.Empty;
_currentLootItemName = string.Empty;
_currentLootItemIsSalvage = false;
@ -4103,6 +4253,8 @@ public sealed partial class RynthAiPlugin
_lastLootActionAt = 0;
_corpseIdsRequested = false;
_corpseApproachTurnsActive = false;
_fightHoldSince = 0;
_fightHoldTickAt = 0;
ResetCurrentLootItem();
_processedCorpseItems.Clear();
_corpseItemAttempts.Clear();

View file

@ -374,9 +374,10 @@ internal sealed unsafe class InstrumentDashboard
ImGui.SetCursorScreenPos(min);
// A click asks why it is doing that (or nothing): /ra why's diagnosis, in chat.
if (ImGui.InvisibleButton("##activity", new Vector2(w, h))) _d.Command("/ra why");
// Boost Nav Priority (owner's rule, 2026-11-02): it reads Idle or Navigating, and says why.
// Boost Nav Priority (owner's corrected rule, 2026-11-02): while a nav route runs it reads
// Idle or Navigating, and says why. With no route the flag changes nothing, so nothing is said.
SafeImGui.SetItemTooltip("Bot activity: " + activity
+ (_r.BoostNav ? "\nBoost Nav Priority is on: RynthAi only navigates (no hunting, no looting)." : "")
+ (_r.BoostNav ? "\nBoost Nav Priority is on and a nav route runs: RynthAi only follows it (no hunting, no looting)." : "")
+ "\nMeta state: " + state + "\nClick: why it's doing that, in chat (/ra why).");
return y + h;
}

View file

@ -790,7 +790,7 @@ internal sealed class LegacyAdvancedSettingsUi
case "Navigation":
ImGui.Checkbox("Boost Nav Priority", ref _settings.BoostNavPriority);
if (ImGui.IsItemHovered())
ImGui.SetTooltip("RynthAi only navigates: no hunting, no looting, no fighting back (owner's rule, 2026-11-02). With no route it stands idle. Buffing and healing still run.");
ImGui.SetTooltip("While a nav route runs (a loaded route or a follow), RynthAi only follows it: no hunting, no looting, no fighting back. With no route, at the end of a Once route, or during Outdoor Hunt it hunts and loots as usual. Buffing and healing always run.");
ImGui.SetNextItemWidth(120);
ImGui.InputFloat("Nav point reach (yd)", ref _settings.FollowNavMin, 0.1f, 1.0f, "%.1f");
_settings.FollowNavMin = LegacyUiSettings.ClampFollowNavMin(_settings.FollowNavMin);
@ -1105,6 +1105,16 @@ internal sealed class LegacyAdvancedSettingsUi
ImGui.Checkbox("Pickup with macro off", ref _settings.LootChestsMacroOff);
if (ImGui.IsItemHovered())
ImGui.SetTooltip("A chest you open is looted by the loaded loot profile\neven with the macro or Looting off.");
if (_settings.LootChestsMacroOff)
{
ImGui.Indent();
ImGui.Checkbox("Leave the chest open", ref _settings.LootChestsMacroOffLeaveOpen);
if (ImGui.IsItemHovered())
ImGui.SetTooltip("When the pickup is done the chest stays open and chat says what was taken,\n" +
"so you can check it and take anything your profile missed. Untick it and\n" +
"RynthAi closes the chest when it's done (some chests lock again on close).");
ImGui.Unindent();
}
ImGui.Checkbox("Jump When Looting", ref _settings.LootJumpEnabled);
if (ImGui.IsItemHovered())
ImGui.SetTooltip("Hop (the keyboard jump) just before each pickup,\nso the server skips the bend-down. The hop has a fixed height.");

View file

@ -52,7 +52,7 @@ internal sealed partial class LegacyDashboardRenderer
_isLocked, _bgOpacity,
!string.IsNullOrEmpty(_vendorProfilePath?.Invoke()) ? _vendorProfilePath!.Invoke() : _settings.CurrentLootPath ?? string.Empty,
LootMode: Loot.LootModes.Clamp(_settings.LootMode),
BoostNav: _settings.BoostNavPriority);
BoostNav: BoostNavRule.Active(_settings)); // the flag counts only while a nav route runs
}
/// <summary>The five pickers' lists (copied under the lists' lock) and the entry in use. Any thread.</summary>

View file

@ -1406,6 +1406,7 @@ internal sealed partial class LegacyDashboardRenderer
LootOnlyRareCorpses = s.LootOnlyRareCorpses,
LootJumpEnabled = s.LootJumpEnabled,
LootChestsMacroOff = s.LootChestsMacroOff,
LootChestsMacroOffLeaveOpen = s.LootChestsMacroOffLeaveOpen,
LootJumpHeight = s.LootJumpHeight,
LootOwnership = s.LootOwnership,
LootOwnCorpse = s.LootOwnCorpse,
@ -1672,6 +1673,7 @@ internal sealed partial class LegacyDashboardRenderer
s.LootOnlyRareCorpses = p.LootOnlyRareCorpses;
s.LootJumpEnabled = p.LootJumpEnabled;
s.LootChestsMacroOff = p.LootChestsMacroOff;
s.LootChestsMacroOffLeaveOpen = p.LootChestsMacroOffLeaveOpen;
s.LootJumpHeight = p.LootJumpHeight;
s.LootOwnership = p.LootOwnership;
if (p.EscapeHazards is bool escape) s.EscapeHazards = escape; // absent = unchanged
@ -2059,6 +2061,7 @@ internal sealed partial class LegacyDashboardRenderer
dst.LootCorpseTimeoutMs = tmp.LootCorpseTimeoutMs;
dst.LootJumpEnabled = tmp.LootJumpEnabled;
dst.LootChestsMacroOff = tmp.LootChestsMacroOff;
dst.LootChestsMacroOffLeaveOpen = tmp.LootChestsMacroOffLeaveOpen;
dst.LootJumpHeight = tmp.LootJumpHeight;
dst.SalvageOpenDelayFirstMs = tmp.SalvageOpenDelayFirstMs;
dst.SalvageOpenDelayFastMs = tmp.SalvageOpenDelayFastMs;

View file

@ -151,6 +151,12 @@ public sealed class LegacyUiSettings
/// macro's own chest looting takes it.
/// </summary>
public bool LootChestsMacroOff = true;
/// <summary>
/// Pickup with macro off > Leave the chest open (2026-11-02, off by default: the chest is closed when done, as before): when the pickup is done the
/// chest stays open and chat says so, instead of RynthAi closing it (a chest that locks itself on close
/// can't be opened again without its key or quest item).
/// </summary>
public bool LootChestsMacroOffLeaveOpen = false;
public int LootJumpHeight = 10; // kept for old profiles and metas; jump-loot uses the keyboard tap jump (fixed height)
public int SalvageOpenDelayFirstMs = 400;
@ -1374,6 +1380,7 @@ public sealed class SettingsBridgePayload
public bool LootOnlyRareCorpses { get; set; }
public bool LootJumpEnabled { get; set; }
public bool LootChestsMacroOff { get; set; } = true; // an engine that doesn't know it leaves it on
public bool LootChestsMacroOffLeaveOpen { get; set; } // off: an engine that doesn't know it closes, as before
public int LootJumpHeight { get; set; }
public int LootOwnership { get; set; }
// Nullable, as CastBuffsOverItemBuffs: an engine that predates them doesn't send them,

View file

@ -109,6 +109,13 @@ public sealed class NavRouteParser
public NavRouteType RouteType { get; set; }
public List<NavPoint> Points { get; set; } = new();
/// <summary>
/// The Outdoor Hunt's own walk to its next monster (RynthAiPlugin.OutdoorHunt.cs), not a nav
/// route the player loaded. Boost Nav Priority leaves it alone (BoostNavRule): the hunt goes
/// from monster to monster, so it fights and loots as usual. Never set on a loaded route.
/// </summary>
public bool OutdoorHuntWalk { get; set; }
/// <summary>
/// Non-null if the last load hit an unknown waypoint type or a malformed
/// line. The route still holds whatever points parsed cleanly before that.

View file

@ -2071,9 +2071,10 @@ public sealed partial class RynthAiPlugin
// Interpretation — the point of D2/D3: name the most likely reason it isn't attacking.
string why =
!s.IsMacroRunning ? "macro is STOPPED (start it from the panel / command)." :
// Owner's rule (2026-11-02): with Boost Nav Priority on RynthAi only navigates.
_dashboard?.Settings?.BoostNavPriority == true
? "Boost Nav Priority is on: RynthAi only navigates (no hunting, no looting). Turn it off to hunt and loot." :
// Owner's corrected rule (2026-11-02, R-20261103-000159-a65e): Boost Nav Priority only
// while a nav route runs; with no route it changes nothing, so it is no reason then.
_dashboard?.Settings is { } boostSettings && BoostNavRule.Active(boostSettings)
? "Boost Nav Priority is on and a nav route runs: RynthAi only follows it (no hunting, no looting). Turn it off to hunt along the route." :
!s.EnableCombat ? "combat is disabled in settings." :
s.BusyCount > 0 ? "AC busy>0 — waiting on a server action (cast/use/move); try /ra clearbusy if stuck." :
forced != 0 && forced == s.ActiveTargetId && bySelection

View file

@ -2,18 +2,21 @@ using RynthCore.Plugin.RynthAi.LegacyUi;
namespace RynthCore.Plugin.RynthAi;
// Boost Nav Priority (owner's rule, 2026-11-02): with the flag on RynthAi ONLY navigates. No
// hunting, no looting, no fighting back; with nothing to navigate it stands idle. Buffing and
// vitals still run. The arbiter (ActivityArbiter.Decide) never picks Combat or Looting with the
// flag on, CombatManager.OnHeartbeat stands down (drops the target, ends the attack, lets go of a
// turn), the looter passes every corpse by (CorpseOpenController.BoostNavHoldsLoot) and no pet is
// summoned (PetManager). The flag comes on quietly from NavLootPrio or a hunting meta's SetOpt, and
// a player who never knew it was on saw only that the bot would not loot
// (R-20261102-041824-3f7c). So the first fight or corpse it skips says so, once per session.
// Boost Nav Priority, owner's corrected rule (2026-11-02, R-20261103-000159-a65e): "Boost nav
// priority should only run the nav route, not from mob to mob. So when no nav route is loaded it
// should fight." The flag counts only while a nav route runs (BoostNavRule.Active). Then RynthAi
// only follows the route: no hunting, no looting, no fighting back (the arbiter never picks Combat
// or Looting, CombatManager.OnHeartbeat stands down, the looter passes every corpse by through
// CorpseOpenController.BoostNavHoldsLoot, PetManager summons nothing). Buffing and vitals still run.
// With no route, a Once route at its end ("when a 'once' nav route is at the end it should hunt
// as well"), nav off, or the Outdoor Hunt walking from monster to monster, the flag does nothing: RynthAi hunts, fights and loots as with it off.
// The flag comes on quietly from NavLootPrio or a hunting meta's SetOpt, and a player who never
// knew it was on saw only that the bot would not loot (R-20261102-041824-3f7c). So the first fight
// or corpse it skips along a route says so, once per session.
public sealed partial class RynthAiPlugin
{
internal const string BoostNavNotice =
"[RynthAi] Boost Nav Priority is on: RynthAi only navigates (no hunting, no looting). Turn it off to hunt and loot.";
"[RynthAi] Boost Nav Priority is on: while a nav route runs, RynthAi only follows it (no hunting, no looting). Turn it off to hunt along the route.";
/// <summary>How often the corpse half of the notice looks for a corpse it would have looted.</summary>
internal const long BoostNavLootCheckMs = 2000;
@ -22,13 +25,14 @@ public sealed partial class RynthAiPlugin
private long _boostNavLootCheckAt; // CorpseNowMs of the last corpse look
/// <summary>
/// After the arbiter's decision, every tick: Boost Nav Priority is why a fight (combat on and a
/// monster to engage) or a corpse (looting on and one in range it would loot) is skipped. Says
/// so once per session, in chat and the log; nothing at all once said.
/// After the arbiter's decision, every tick: Boost Nav Priority, with a nav route running, is
/// why a fight (combat on and a monster to engage) or a corpse (looting on and one in range it
/// would loot) is skipped. Says so once per session, in chat and the log; nothing at all once
/// said, and nothing while no route runs (then the flag skips nothing).
/// </summary>
private void NoteBoostNavSkip(LegacyUiSettings settings, bool wantCombat)
{
if (_boostNavNoticeSaid || !settings.IsMacroRunning || !settings.BoostNavPriority) return;
if (_boostNavNoticeSaid || !BoostNavRule.Active(settings)) return;
string? skipped = null;
if (wantCombat)
@ -49,3 +53,37 @@ public sealed partial class RynthAiPlugin
Host.WriteToChat(BoostNavNotice, 2);
}
}
/// <summary>
/// The one test for Boost Nav Priority (owner's corrected rule, 2026-11-02, R-20261103-000159-a65e):
/// it applies only while a nav route runs. Read by the arbiter's input, CombatManager's stand-down,
/// PetManager, the looter and the notice, so they can never disagree.
/// </summary>
internal static class BoostNavRule
{
/// <summary>Boost Nav Priority is on and a nav route runs: RynthAi only follows the route.</summary>
public static bool Active(LegacyUiSettings s) => s.BoostNavPriority && NavRouteRuns(s);
/// <summary>
/// A nav route runs: the macro runs, navigation is on, and either a follow is steering (a
/// Follow route or fellowship follow; VTank counts a follow as a nav route too) or a loaded
/// route has points left to walk. Not a route: none loaded or an empty one, a Once route that
/// has walked off its last point, and the Outdoor Hunt's walk to its next monster (it goes
/// from monster to monster, which is hunting). The Dungeon Patrol's generated loop counts:
/// it is walked waypoint by waypoint like a loaded route.
/// </summary>
public static bool NavRouteRuns(LegacyUiSettings s)
{
if (!s.IsMacroRunning || !s.EnableNavigation) return false;
if (RynthAiPlugin.IsFollowActive(s)) return true;
var route = s.CurrentRoute;
if (route == null || route.Points.Count == 0) return false;
// A hunt walk saved to a file (a nav path set) is a loaded route from then on.
if (route.OutdoorHuntWalk && string.IsNullOrEmpty(s.CurrentNavPath)) return false;
// Owner (2026-11-02): "When a 'once' nav route is at the end it should hunt as well." The nav
// engine's CompleteOnceRoute leaves the index past the last point (and turns nav off); loading
// the route again or /ra nav restart rewinds it, and Boost Nav applies again. Circular and
// Linear routes never finish.
return !s.NavRouteFinished();
}
}

View file

@ -220,14 +220,22 @@ public sealed partial class RynthAiPlugin
/// </summary>
private void FinishChestLoot(int chestId, string why, bool close, bool sayNothingMatched)
{
if (close)
// Pickup with macro off > Leave the chest open: a chest the player opened stays open, and chat says so.
bool leaveOpen = close && chestId == _manualChestLootId && (_dashboard?.Settings?.LootChestsMacroOffLeaveOpen ?? false);
if (chestId == _manualChestLootId)
_manualChestLootId = 0;
if (close && !leaveOpen)
CloseCorpseContainer(chestId, why);
if (sayNothingMatched)
string chestName = _objectCache?[chestId]?.Name is { Length: > 0 } cn ? cn : "the chest";
if (sayNothingMatched && NothingLootedLine(chestName, chest: true) is { } nothingLine)
ChatLine(nothingLine);
if (leaveOpen)
{
string chestName = _objectCache?[chestId]?.Name is { Length: > 0 } cn ? cn : "the chest";
if (NothingLootedLine(chestName, chest: true) is { } nothingLine)
ChatLine(nothingLine);
string done = why == "completed"
? _corpseItemsLooted > 0 ? $"done with {chestName}: took {_corpseItemsLooted} item(s)." : $"done with {chestName}."
: $"stopped on {chestName} ({why}).";
ChatLine($"[RynthAi] Pickup with macro off: {done} Left it open: close it when you're done.");
}
LootDiag($"[RynthAi] Chest loot: done with chest 0x{(uint)chestId:X8} ({why}); not marked, so opening it again loots it again.");
@ -282,6 +290,8 @@ public sealed partial class RynthAiPlugin
private const long ManualChestWaitMs = 3000; // for the chest's owner and name to be readable
private int _manualChestId;
private long _manualChestSince;
/// <summary>The chest Pickup with macro off is looting (0 = none): FinishChestLoot leaves it open when set to.</summary>
private int _manualChestLootId;
/// <summary>OnViewObjectContents for a non-corpse container: a chest the player may have opened.</summary>
private void NoteManualChestOpened(int id)
@ -311,5 +321,6 @@ public sealed partial class RynthAiPlugin
}
LootDiag($"[RynthAi] Pickup with macro off: looting the opened chest 0x{(uint)id:X8} by the loot profile.");
ForceLootOpenChest(id);
_manualChestLootId = id;
}
}

View file

@ -216,7 +216,7 @@ public sealed partial class RynthAiPlugin
_dunPatrolActive = false; // the hunt's route replaces the patrol's
CopyHuntSettings(s);
_hunt.Start(RynthClock.Now, me);
_huntRoute = new NavRouteParser { RouteType = NavRouteType.Once };
_huntRoute = new NavRouteParser { RouteType = NavRouteType.Once, OutdoorHuntWalk = true };
s.CurrentNavPath = string.Empty;
s.CurrentRoute = _huntRoute;
s.ActiveNavIndex = 0;
@ -303,7 +303,8 @@ public sealed partial class RynthAiPlugin
private void InstallHuntRoute(LegacyUiSettings s, IReadOnlyList<OutdoorHunt.Vec> corners)
{
var route = new NavRouteParser { RouteType = NavRouteType.Once };
// Marked as the hunt's walk: Boost Nav Priority does not count it as a nav route (BoostNavRule).
var route = new NavRouteParser { RouteType = NavRouteType.Once, OutdoorHuntWalk = true };
foreach (var c in corners)
{
route.Points.Add(new NavPoint

View file

@ -243,8 +243,11 @@ public sealed partial class RynthAiPlugin
(s.BoostNavPriority, s.BoostLootPriority) = NextPriority(s.BoostNavPriority, s.BoostLootPriority, nav, loot, arg);
dash!.SaveSettings();
string On(bool b) => b ? "on" : "off";
// Owner's rule (2026-11-02): with Boost Nav on RynthAi only navigates; say so when it comes on.
string navOnly = nav && s.BoostNavPriority ? " RynthAi only navigates (no hunting, no looting)." : "";
// Owner's corrected rule (2026-11-02, R-20261103-000159-a65e): Boost Nav counts only while a
// nav route runs; say so when it comes on.
string navOnly = nav && s.BoostNavPriority
? " While a nav route runs RynthAi only follows it (no hunting, no looting); with no route it hunts and loots as usual."
: "";
ReplyOk(nav && loot ? $"[RynthAi] Boost Nav Priority {On(s.BoostNavPriority)}, Boost Loot Priority {On(s.BoostLootPriority)}.{navOnly}"
: nav ? $"[RynthAi] Boost Nav Priority {On(s.BoostNavPriority)}.{navOnly}"
: $"[RynthAi] Boost Loot Priority {On(s.BoostLootPriority)}.");
@ -366,7 +369,7 @@ public sealed partial class RynthAiPlugin
}
string note = !settings.IsMacroRunning ? " (the macro is off: this container only)"
: !settings.EnableLooting ? " (Looting is off: this container only)"
: BoostNavHoldsLoot(settings) ? " (Boost Nav Priority is on: this container only)" : "";
: BoostNavHoldsLoot(settings) ? " (Boost Nav Priority is on and a nav route runs: this container only)" : "";
LootDiag($"[RynthAi] LootThisCont: 0x{(uint)id:X8} '{name}' flagged{(already ? " (already open as the loot container)" : "")}.");
ChatLine($"[RynthAi] LootThisCont: looting {name}{note}.");
}

View file

@ -922,7 +922,7 @@ public sealed partial class RynthAiPlugin : RynthPluginBase
/// as nav work in its own right: without this, turning Follow on with no route loaded would
/// leave the arbiter's wantNav false and NavigationEngine.Tick would never do the following.
/// </summary>
private static bool IsFollowActive(LegacyUiSettings settings)
internal static bool IsFollowActive(LegacyUiSettings settings)
=> (settings.FollowMode && settings.FollowTargetId != 0)
|| (settings.CurrentRoute != null && settings.CurrentRoute.RouteType == NavRouteType.Follow
&& settings.CurrentRoute.FollowTargetName.Length > 0);
@ -930,8 +930,8 @@ public sealed partial class RynthAiPlugin : RynthPluginBase
/// <summary>
/// The arbiter's WantNav input: the macro runs, navigation is on, and there is a route (or a
/// follow) to run. Travelling back to your corpse (RynthNav walks): RynthAi's own route waits.
/// Also read by BoostNavHoldsLoot, so the looter stands down for Boost Nav Priority exactly
/// when the arbiter's BoostNav clause can give nav the tick.
/// The Outdoor Hunt's walks count here (nav walks them); Boost Nav Priority's own test of "a
/// nav route runs" is BoostNavRule.NavRouteRuns, which leaves them out.
/// </summary>
private bool NavWantsTick(LegacyUiSettings settings)
=> settings.IsMacroRunning && settings.EnableNavigation
@ -1913,7 +1913,7 @@ public sealed partial class RynthAiPlugin : RynthPluginBase
var inputs = new ArbiterInputs(
settings.IsMacroRunning, wantBuff, wantCombat, wantLoot, wantSalvage, wantNav,
combatEngaged: engaged,
boostNav: settings.BoostNavPriority,
boostNav: BoostNavRule.Active(settings), // only while a nav route runs (R-20261103-000159-a65e)
boostLoot: settings.BoostLootPriority,
followActive: followActive,
lootStarved: lootStarved,