Two casts were held open 40.8 s and 37 s by ACE's fast-tick turn-to-cast wait; every later send was answered UseDone 0x1D and a heal was re-sent every 2.5 s. - ActionPacer: after a 0x1D UseDone nothing starts until the server answers; with no cast of ours open, one probe after 1.5 s, then doubling (max 6 s). Attack repeats are not held (ACE sends no UseDone for a swing), and a latch with no cast of ours open ends after LatchMaxMs (15 s). A cast still unanswered 1 s past its normal cycle (learned per spell, at least 3 s) is turned to face its target; 2 s past it (capped by Stuck Cast Break, default 8000 ms) or on a 0x1D while it has been open 3 s, it is broken with a jump (TapJump; ACE fails a cast on a fast-tick jump). Starts wait until landed; no UseDone 3 s after landing -> Peace mode; 3 s more -> going on. Every hold is bounded: a cast StaleCastMs old, or sent before a frame gap of 5 s (keyed on the gap's end), is dropped with the latch, never broken. No breaker step in portal space; Forget on portal-enter and the death hold. A burst of 5 'too busy' answers in a second holds every start except a heal. A refused forced jump with no cast open leaves no breaker stage. A cast a script chose (the combat hook) is not jumped before 6 s from its send (ScriptCastMinBreakMs, the held-cast nudge's HeldAfterIncantMs). Stuck Cast Break is read from the settings once per tick. - MoveAudit: no start in the tick of a movement change; 150 ms and a clear motion queue (or 600 ms) let it go. A held stop sent later by FlushPendingStops counts as a movement change too; the forced flush in CastSpellFor still goes out in the same tick as the cast that follows it. - Blacklist: casts answered 0x1D (or unanswered while the server is busy) are not no-damage casts. - Combat hook: ctx.pending is the cast in flight; ctx.last is the most recent RESOLVED cast, its err final (the first UseDone after its send; nil only when none could be read: 7 s timeout, or another answer came first). The casts in flight of both kinds resolve in send order through one queue. The send-time UseDone count comes from the pacer (LastCastSeqAtSend). CombatRequestV1 appends Resolved*/Pending* fields (StructSize-gated, no Version bump); an older RynthAi keeps the old ctx.last. - HP failsafe (BuffManager.HpFailsafe.cs): at or under Emergency Heal At with no heal landing for 3 rounds of 2.5 s, a forced jump; 3 more rounds, the macro stops and /lifestone goes out (HP Failsafe Recall, default on). Nothing counts in portal space; a pending recall is dropped on death; a recall that never starts turns the macro back on (only one the failsafe stopped, never past the VTank yield) and re-arms after a 30 s cooldown. Recovery retry: recovery vitals (Heal Self, Stamina to Health, Revitalize, Stamina to Mana) refused for "not enough mana" retry after Recovery Retry (200 ms, a setting) instead of resting the family: ACE rolls Mana Conversion on every attempt before the windup and a refusal costs nothing. At most 5 recovery casts a second, 20 refusals in a row, stamina and Mana Conversion checks, an episode with no refusal for 7 s ends; an episode summary line. Stamina to Mana and Revitalize are still held under their cost by the mana reserve (AttemptVitalCast), so for them the retry applies when the mana reading is stale or costs are unknown; Heal Self and Stamina to Health, which are tried below cost, gain the most. When the retry stops, the vital rests as the existing mana reserve has it (LowManaHealRestSec, 2 s). Script heals and other casts are unchanged. Tests: StuckCastTests (incl. the script cast's break floor), PacerEdgeTests, RecoveryRetryTests (incl. costs known: Stamina to Mana held), HpFailsafeTests, CombatHookTests (ctx.last/ctx.pending, send order, an answer during the send, 0x1D blacklist, script heal keeps its rest, script attack and heal not jumped before 6 s with or without a 'too busy' answer); HealLatencyTests' and ManaReserveTests' low-mana rest cases pin untrained Mana Conversion; RynthLua compat combathook.lua. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
957 lines
53 KiB
C#
957 lines
53 KiB
C#
using System;
|
|
using System.Numerics;
|
|
using ImGuiNET;
|
|
|
|
namespace RynthCore.Plugin.RynthAi.LegacyUi;
|
|
|
|
internal sealed class LegacyAdvancedSettingsUi
|
|
{
|
|
private readonly LegacyUiSettings _settings;
|
|
private MissileCraftingManager? _missileCraftingManager;
|
|
|
|
// Scratch buffer for the "never attack" name entry box.
|
|
private string _newBlacklistName = "";
|
|
|
|
private static readonly string[] AttackHeights = { "Low", "Medium", "High" };
|
|
private static readonly string[] NavLabelModeNames = { "Off", "Numbers", "Numbers and names" };
|
|
private static readonly string[] TargetSelectionNames = { "Lowest health", "Closest", "Farthest", "Least turning" };
|
|
private static readonly string[] LootOwnershipModes = { "My Kills Only", "Fellowship Kills", "All Corpses" };
|
|
|
|
public LegacyAdvancedSettingsUi(LegacyUiSettings settings)
|
|
{
|
|
_settings = settings;
|
|
}
|
|
|
|
public void SetMissileCraftingManager(MissileCraftingManager mgr) => _missileCraftingManager = mgr;
|
|
|
|
private Func<string>? _autoVendorStatus;
|
|
public void SetAutoVendorStatusProvider(Func<string> status) => _autoVendorStatus = status;
|
|
|
|
private Func<string>? _autoTradeStatus;
|
|
public void SetAutoTradeStatusProvider(Func<string> status) => _autoTradeStatus = status;
|
|
private string _newAutoAcceptPattern = "";
|
|
|
|
public string MissileCraftingState => _missileCraftingManager?.State.ToString() ?? string.Empty;
|
|
public bool MissileCraftingActive => _missileCraftingManager?.IsCrafting ?? false;
|
|
public string MissileCraftingStatus => _missileCraftingManager?.StatusMessage ?? string.Empty;
|
|
|
|
public void Render()
|
|
{
|
|
if (!_settings.ShowAdvancedWindow)
|
|
return;
|
|
|
|
ImGui.SetNextWindowSize(new Vector2(600, 400), ImGuiCond.FirstUseEver);
|
|
|
|
if (ImGui.Begin("RynthAi Advanced Settings", ref _settings.ShowAdvancedWindow))
|
|
{
|
|
ImGui.BeginChild("AdvancedSidebar", new Vector2(150, 0), ImGuiChildFlags.Borders);
|
|
for (int i = 0; i < _settings.AdvancedTabs.Length; i++)
|
|
{
|
|
if (ImGui.Selectable(_settings.AdvancedTabs[i], _settings.SelectedAdvancedTab == i))
|
|
_settings.SelectedAdvancedTab = i;
|
|
}
|
|
ImGui.EndChild();
|
|
|
|
ImGui.SameLine();
|
|
|
|
ImGui.BeginGroup();
|
|
ImGui.BeginChild("AdvancedContent", new Vector2(0, -ImGui.GetFrameHeightWithSpacing()), ImGuiChildFlags.Borders);
|
|
RenderTabContent(_settings.SelectedAdvancedTab);
|
|
ImGui.EndChild();
|
|
|
|
if (ImGui.Button("Close"))
|
|
_settings.ShowAdvancedWindow = false;
|
|
|
|
ImGui.EndGroup();
|
|
}
|
|
|
|
ImGui.End();
|
|
}
|
|
|
|
private void RenderVendoring()
|
|
{
|
|
ImGui.Text("AutoVendor (UtilityBelt)");
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
|
|
string status = _autoVendorStatus?.Invoke() ?? "Not logged in";
|
|
ImGui.TextDisabled($"Status: {status}");
|
|
ImGui.Spacing();
|
|
|
|
ImGui.Checkbox("Enabled##AV", ref _settings.AutoVendorEnabled);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Buy and sell by a loot profile when a vendor opens (and allow /ub autovendor).\n" +
|
|
"Profiles: <Vendor Name>.utl or default.utl in your character's AutoVendor\n" +
|
|
"folder, the server folder, or " + Vendor.AutoVendorManager.MainProfileDir + ".");
|
|
ImGui.Checkbox("Test Mode (only print what it would do)##AV", ref _settings.AutoVendorTestMode);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Lists what would be bought and sold without trading. Leave this on until\n" +
|
|
"the list looks right: selling can't be undone.");
|
|
ImGui.Checkbox("Buy##AV", ref _settings.AutoVendorEnableBuying);
|
|
ImGui.SameLine();
|
|
ImGui.Checkbox("Sell##AV", ref _settings.AutoVendorEnableSelling);
|
|
ImGui.Checkbox("Only Sell From Main Pack##AV", ref _settings.AutoVendorOnlyFromMainPack);
|
|
ImGui.Checkbox("Show Merchant Info##AV", ref _settings.AutoVendorShowMerchantInfo);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Print the vendor's buy/sell rates and max value when it opens.");
|
|
ImGui.Checkbox("Think When Finished##AV", ref _settings.AutoVendorThink);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Send 'AutoVendor finished: <vendor>' (and failures) as a /tell to yourself,\n" +
|
|
"so a meta's chat condition can wait for it.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("/ub vendor open");
|
|
ImGui.SetNextItemWidth(120);
|
|
if (ImGui.InputInt("Tries##AV", ref _settings.AutoVendorTries))
|
|
_settings.AutoVendorTries = Math.Clamp(_settings.AutoVendorTries, 1, 20);
|
|
ImGui.SetNextItemWidth(120);
|
|
if (ImGui.InputInt("Time Between Tries (ms)##AV", ref _settings.AutoVendorTriesTime, 250))
|
|
_settings.AutoVendorTriesTime = Math.Clamp(_settings.AutoVendorTriesTime, 500, 30000);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.TextDisabled("Never sold: equipped, attuned, bonded, retained, tinkered, imbued,");
|
|
ImGui.TextDisabled("inscribed, rare, zero value, packs, or anything a Keep rule could match.");
|
|
|
|
RenderAutoTrade();
|
|
}
|
|
|
|
private void RenderAutoTrade()
|
|
{
|
|
ImGui.Spacing();
|
|
ImGui.Spacing();
|
|
ImGui.Text("AutoTrade (UtilityBelt)");
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
|
|
string status = _autoTradeStatus?.Invoke() ?? "Not logged in";
|
|
ImGui.TextDisabled($"Status: {status}");
|
|
ImGui.Spacing();
|
|
|
|
ImGui.Checkbox("Enabled##AT", ref _settings.AutoTradeEnabled);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When a trade window opens, add the items that match Keep / Keep # rules in\n" +
|
|
"<Partner Name>.utl or default.utl (your character's AutoTrade folder, the\n" +
|
|
"server folder, or " + Trade.AutoTradeManager.MainProfileDir + ").");
|
|
ImGui.Checkbox("Test Mode (only print what it would add)##AT", ref _settings.AutoTradeTestMode);
|
|
ImGui.Checkbox("Only Trade From Main Pack##AT", ref _settings.AutoTradeOnlyFromMainPack);
|
|
ImGui.Checkbox("Auto Accept After Adding##AT", ref _settings.AutoTradeAutoAccept);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Accept the trade once every item AutoTrade added shows in the window.\n" +
|
|
"Check what the other player offers first: nothing checks their side.");
|
|
ImGui.Checkbox("Think When Finished##AT", ref _settings.AutoTradeThink);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Send 'AutoTrade finished: <partner>' and 'Trade accepted: <partner>' as a /tell\n" +
|
|
"to yourself, so a meta's chat condition can wait for it.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Auto-accept trades from (name patterns, .NET regex)");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When one of these players accepts a trade, this character accepts too.\n" +
|
|
"The autoAcceptList.json files from /ub autotrade autoaccept add[g|s] count as well.");
|
|
var list = _settings.AutoTradeAutoAcceptChars;
|
|
int removeAt = -1;
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
ImGui.Bullet();
|
|
ImGui.SameLine();
|
|
ImGui.TextUnformatted(list[i]);
|
|
ImGui.SameLine();
|
|
if (ImGui.SmallButton($"Remove##ATaac{i}"))
|
|
removeAt = i;
|
|
}
|
|
if (removeAt >= 0)
|
|
list.RemoveAt(removeAt);
|
|
ImGui.SetNextItemWidth(200);
|
|
ImGui.InputText("##ATnewpattern", ref _newAutoAcceptPattern, 128);
|
|
ImGui.SameLine();
|
|
if (ImGui.Button("Add##ATaddpattern"))
|
|
{
|
|
string p = _newAutoAcceptPattern.Trim();
|
|
if (p.Length > 0 && !list.Contains(p) && IsValidRegex(p))
|
|
{
|
|
list.Add(p);
|
|
_newAutoAcceptPattern = "";
|
|
}
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.TextDisabled("Never added: equipped, attuned, retained, tinkered, imbued, inscribed,");
|
|
ImGui.TextDisabled("packs, unidentified items, or items on RynthAi's weapon/consumable lists.");
|
|
}
|
|
|
|
private static bool IsValidRegex(string pattern)
|
|
{
|
|
try { _ = System.Text.RegularExpressions.Regex.Match(string.Empty, pattern); return true; }
|
|
catch { return false; }
|
|
}
|
|
|
|
/// <summary>One cell of the Protections and Banes grid: ticked = cast it.</summary>
|
|
private void BuffToggle((string Buff, string Label) toggle)
|
|
{
|
|
bool on = !_settings.IsBuffDisabled(toggle.Buff);
|
|
if (ImGui.Checkbox($"{toggle.Label}##buff_{toggle.Buff}", ref on))
|
|
_settings.SetBuffEnabled(toggle.Buff, on);
|
|
}
|
|
|
|
private void RenderTabContent(int tabIndex)
|
|
{
|
|
if (tabIndex < 0 || tabIndex >= _settings.AdvancedTabs.Length)
|
|
return;
|
|
|
|
string tabName = _settings.AdvancedTabs[tabIndex];
|
|
ImGui.TextColored(new Vector4(0.4f, 0.7f, 1.0f, 1.0f), $"Advanced Settings > {tabName}");
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
|
|
switch (tabName)
|
|
{
|
|
case "Display":
|
|
ImGui.Checkbox("Show Target Stamina / Mana", ref _settings.ShowTargetStaminaMana);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When enabled, displays stamina and mana bars\nfor the selected target (requires appraisal data).");
|
|
break;
|
|
|
|
case "UI":
|
|
ImGui.Text("Radar");
|
|
ImGui.Separator();
|
|
ImGui.Checkbox("Hide retail radar", ref _settings.SuppressRetailRadar);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Suppress the game's built-in radar (bezel, compass, coords, blips).");
|
|
|
|
ImGui.Checkbox("Show RynthRadar", ref _settings.ShowRynthRadar);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Render the custom square radar widget (indoor walls + dot markers, works outdoors).");
|
|
|
|
ImGui.Checkbox("Radar Click-Through", ref _settings.RadarClickThrough);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Mouse events over the radar pass through to the game instead of the widget.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Chat");
|
|
ImGui.Checkbox("Show RynthChat", ref _settings.ShowRynthChat);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Render the custom chat viewer (scrollback + channel coloring).");
|
|
|
|
ImGui.Checkbox("Chat Click-Through", ref _settings.ChatClickThrough);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Mouse events over the chat pass through to the game. The gear button stays clickable.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Power Bar");
|
|
ImGui.Checkbox("Hide retail power bar", ref _settings.SuppressRetailPowerbar);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Hide the vanilla attack/magic power bar that appears under the cursor while charging.\nThe bar's underlying combat state still works — only the on-screen widget is hidden.");
|
|
break;
|
|
|
|
case "Misc":
|
|
if (ImGui.Checkbox("Enable FPS Limit", ref _settings.EnableFPSLimit)) { }
|
|
if (_settings.EnableFPSLimit)
|
|
{
|
|
ImGui.Indent();
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Focused FPS", ref _settings.TargetFPSFocused, 10, 240);
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Background FPS", ref _settings.TargetFPSBackground, 5, 60);
|
|
ImGui.Unindent();
|
|
}
|
|
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
|
|
ImGui.Checkbox("Auto Cram", ref _settings.EnableAutocram);
|
|
if (ImGui.IsItemHovered())
|
|
{
|
|
ImGui.SetTooltip("Automatically moves items from your main pack into side packs.\nNote: recently used weapons stay in the main pack.");
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Checkbox("Peace Mode When Idle", ref _settings.PeaceModeWhenIdle);
|
|
ImGui.Checkbox("Start Macro On Login", ref _settings.StartMacroOnLogin);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Automatically starts the macro when RynthAi loads.");
|
|
ImGui.Checkbox("Patrol On Login", ref _settings.PatrolOnLogin);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Automatically starts dungeon patrol when RynthAi loads.");
|
|
ImGui.Checkbox("Escape Acid and Lava", ref _settings.EscapeHazards);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When acid or lava hurts you, stop everything (combat, buffs, healing, looting)\nand walk back out the way you came. The spot is remembered so the patrol avoids it.\nTurn off for a character that walks through acid on purpose.");
|
|
ImGui.Checkbox("Enable Raycasting", ref _settings.EnableRaycasting);
|
|
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
ImGui.Text("Missile Arc Velocities (m/s)");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Per-weapon launch speed used for line-of-sight arc checks.\n" +
|
|
"Lower velocity = higher arc. Tune until LoS matches in-game hits\n" +
|
|
"(/ra lostest bow on a selected mob shows the arc and where it hits).\n" +
|
|
"Indoors the arc is checked against ceilings too.");
|
|
ImGui.Checkbox("Use Arcs for Missile LoS", ref _settings.UseArcs);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("On: a missile target must pass the straight line AND the arc the\n" +
|
|
"missile flies (checked against ceilings in dungeons).\n" +
|
|
"Off: all missile LoS checks are a straight line (eye-to-eye).");
|
|
if (_settings.UseArcs)
|
|
{
|
|
ImGui.Indent();
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderFloat("Bow", ref _settings.BowArcVelocity, 10.0f, 60.0f, "%.1f");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderFloat("Crossbow", ref _settings.CrossbowArcVelocity, 10.0f, 80.0f, "%.1f");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderFloat("Atlatl", ref _settings.AtlatlArcVelocity, 10.0f, 60.0f, "%.1f");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderFloat("Arc Clearance (m)", ref _settings.MissileArcClearance, 0.0f, 3.0f, "%.1f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Extra headroom the arc must have at mid-flight. Raise it if shots\n" +
|
|
"still hit ceilings; lower it if mobs the arrows can reach are skipped.\n" +
|
|
"Default 0.5.");
|
|
ImGui.Unindent();
|
|
}
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderFloat("Magic Arc", ref _settings.MagicArcVelocity, 10.0f, 60.0f, "%.1f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Arc spells' horizontal speed (m/s). ACE: 40. Lower = higher arc.\n" +
|
|
"A rule with Arc on casts an arc only when this path reaches the target\n" +
|
|
"(walls, and ceilings in dungeons); otherwise its other shape, or a bolt.\n" +
|
|
"Needs Enable Raycasting. /ra lostest magic shows the arc to the selected mob.");
|
|
ImGui.Checkbox("LoS Debug Log", ref _settings.LosDebugLog);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Log each in-range mob's LoS verdict ([LOS] lines: straight line or arc,\n" +
|
|
"how high the arc rises, where it hits, distance and cells). For tuning.");
|
|
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
ImGui.Text("Monster Blacklist");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Casts Before Blacklist", ref _settings.BlacklistAttempts, 1, 20);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("How many offensive casts that deal NO damage (each judged after the settle window) before a mob is blacklisted.");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Blacklist Timeout (sec)", ref _settings.BlacklistTimeoutSec, 5, 120);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("How long a blacklisted mob is ignored before re-trying.");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Cast Settle (ms)", ref _settings.BlacklistCastSettleMs, 250, 15000);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Grace after a cast before it counts as a no-damage miss — lets the damage/health packet arrive so good targets aren't blacklisted prematurely.");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("No Progress Timeout (sec)", ref _settings.TargetNoProgressTimeoutSec, 0, 300);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Blacklist a target after being engaged this many seconds without dealing damage.\n" +
|
|
"0 = disabled. Default 60s. Useful for targets stuck in geometry or unreachable.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Never Attack (by name)");
|
|
ImGui.SetNextItemWidth(220);
|
|
bool addByEnter = ImGui.InputTextWithHint("##blacklistName", "Monster name (e.g. Drudge)",
|
|
ref _newBlacklistName, 64, ImGuiInputTextFlags.EnterReturnsTrue);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Monsters whose name CONTAINS this text (case-insensitive) are never\n" +
|
|
"targeted, faced, or attacked. This manual do-not-attack list is\n" +
|
|
"separate from the automatic no-damage blacklist above.");
|
|
ImGui.SameLine();
|
|
if ((ImGui.Button("Add##blacklist") || addByEnter) && !string.IsNullOrWhiteSpace(_newBlacklistName))
|
|
{
|
|
string entry = _newBlacklistName.Trim();
|
|
bool exists = false;
|
|
for (int i = 0; i < _settings.MonsterNameBlacklist.Count; i++)
|
|
if (string.Equals(_settings.MonsterNameBlacklist[i], entry, StringComparison.OrdinalIgnoreCase))
|
|
{ exists = true; break; }
|
|
if (!exists) _settings.MonsterNameBlacklist.Add(entry);
|
|
_newBlacklistName = "";
|
|
}
|
|
|
|
if (_settings.MonsterNameBlacklist.Count == 0)
|
|
{
|
|
ImGui.TextDisabled("(empty — any monster may be attacked)");
|
|
}
|
|
else
|
|
{
|
|
int removeIdx = -1;
|
|
for (int i = 0; i < _settings.MonsterNameBlacklist.Count; i++)
|
|
{
|
|
ImGui.PushID(i);
|
|
if (ImGui.SmallButton("X")) removeIdx = i;
|
|
ImGui.SameLine();
|
|
ImGui.TextUnformatted(_settings.MonsterNameBlacklist[i]);
|
|
ImGui.PopID();
|
|
}
|
|
if (removeIdx >= 0) _settings.MonsterNameBlacklist.RemoveAt(removeIdx);
|
|
}
|
|
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
ImGui.Text("Give Queue");
|
|
ImGui.SetNextItemWidth(150);
|
|
ImGui.SliderInt("Give Interval (ms)", ref _settings.GiveQueueIntervalMs, 50, 2000);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Minimum delay between each item sent by /ra givea commands.\nLower = faster but may drop items if the server can't keep up.");
|
|
break;
|
|
|
|
case "Recharge":
|
|
ImGui.Text("Self Vitals (%)");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Heal At", ref _settings.HealAt, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Emergency Heal At", ref _settings.EmergencyHealAt, 0, 100);
|
|
if (ImGui.IsItemHovered()) ImGui.SetTooltip("At or under this health %, a healing kit goes first out of Magic mode,\nand a kit or potion is used while a cast is pending. 0 = off.");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Stamina To Health At", ref _settings.StaminaToHealthAt, 0, 100);
|
|
if (ImGui.IsItemHovered()) ImGui.SetTooltip("At or under this health %, cast Stamina to Health Self ahead of Heal At\n(after a kit out of Magic mode). 0 = never cast it.");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Stamina To Health Min Stamina", ref _settings.StaminaToHealthMinStamina, 0, 100);
|
|
if (ImGui.IsItemHovered()) ImGui.SetTooltip("Don't cast Stamina to Health unless stamina is over this %.");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Re-stam At", ref _settings.RestamAt, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Re-stam To", ref _settings.RestamTo, 0, 100);
|
|
if (ImGui.IsItemHovered()) ImGui.SetTooltip("Once a recharge starts under Re-stam At, keep recharging until stamina reaches this %.\n0 = one recharge, as before.");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Get Mana At", ref _settings.GetManaAt, 0, 100);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Top-Off Vitals (%)");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Top HP", ref _settings.TopOffHP, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Top Stam", ref _settings.TopOffStam, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Top Mana", ref _settings.TopOffMana, 0, 100);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Helper Settings (%)");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Heal Others", ref _settings.HealOthersAt, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Re-stam Others", ref _settings.RestamOthersAt, 0, 100);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Infuse Others", ref _settings.InfuseOthersAt, 0, 100);
|
|
break;
|
|
|
|
case "Melee Combat":
|
|
ImGui.Text("Attack Power & Height");
|
|
ImGui.Separator();
|
|
ImGui.Checkbox("Use Recklessness", ref _settings.UseRecklessness);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When enabled and Recklessness is trained, auto power uses 80% instead of 100%.");
|
|
|
|
ImGui.Spacing();
|
|
bool meleeAuto = _settings.MeleeAttackPower < 0;
|
|
if (ImGui.Checkbox("Melee Auto Power", ref meleeAuto))
|
|
_settings.MeleeAttackPower = meleeAuto ? -1 : 100;
|
|
ImGui.Indent();
|
|
ImGui.SetNextItemWidth(150);
|
|
if (meleeAuto)
|
|
{
|
|
int displayVal = 100;
|
|
ImGui.BeginDisabled();
|
|
ImGui.SliderInt("Melee Power %", ref displayVal, 0, 100);
|
|
ImGui.EndDisabled();
|
|
}
|
|
else
|
|
{
|
|
ImGui.SliderInt("Melee Power %", ref _settings.MeleeAttackPower, 0, 100);
|
|
}
|
|
ImGui.Unindent();
|
|
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.Combo("Melee Attack Height", ref _settings.MeleeAttackHeight, AttackHeights, AttackHeights.Length);
|
|
|
|
ImGui.Spacing();
|
|
bool missileAuto = _settings.MissileAttackPower < 0;
|
|
if (ImGui.Checkbox("Missile Auto Power", ref missileAuto))
|
|
_settings.MissileAttackPower = missileAuto ? -1 : 100;
|
|
ImGui.Indent();
|
|
ImGui.SetNextItemWidth(150);
|
|
if (missileAuto)
|
|
{
|
|
int displayVal = 100;
|
|
ImGui.BeginDisabled();
|
|
ImGui.SliderInt("Missile Power %", ref displayVal, 0, 100);
|
|
ImGui.EndDisabled();
|
|
}
|
|
else
|
|
{
|
|
ImGui.SliderInt("Missile Power %", ref _settings.MissileAttackPower, 0, 100);
|
|
}
|
|
ImGui.Unindent();
|
|
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.Combo("Missile Attack Height", ref _settings.MissileAttackHeight, AttackHeights, AttackHeights.Length);
|
|
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
ImGui.Checkbox("Use Native Attack", ref _settings.UseNativeAttack);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Uses the client's combat pipeline for attacks.\nThe client handles turn-to-face naturally (no backwards arrows).");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Checkbox("Summon Pets", ref _settings.SummonPets);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Pet Min Monsters", ref _settings.PetMinMonsters);
|
|
break;
|
|
|
|
case "Spell Combat":
|
|
ImGui.Text("War/Void Casting Settings");
|
|
ImGui.Separator();
|
|
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Spell Interval (ms)", ref _settings.SpellCastIntervalMs, 100, 1500);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Delay between BUFF / utility spell casts (not combat).\n" +
|
|
"Lower = faster buff chains. 400ms is a good balance.\n" +
|
|
"Below 200ms may cause fizzles or dropped casts on laggy servers.");
|
|
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Stuck Cast Break (ms)", ref _settings.StuckCastBreakMs, 0, 20000);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"The longest a cast may stay unanswered before it is broken\n" +
|
|
"with a jump (the server then fails the cast). It fires sooner,\n" +
|
|
"about 2 s past the spell's normal cycle, when that is shorter.\n" +
|
|
"After a 'too busy' answer nothing is cast until the server answers.\n" +
|
|
"0 = never break.");
|
|
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Recovery Retry (ms)", ref _settings.RecoveryRetryMs, 200, 5000);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Heal Self, Stamina to Health, Revitalize and Stamina to Mana refused\n" +
|
|
"for 'not enough mana' are tried again after this long: each try\n" +
|
|
"rolls Mana Conversion again, and a refusal costs nothing.\n" +
|
|
"At most 5 tries a second, 20 in a row.");
|
|
|
|
ImGui.Checkbox("HP Failsafe Recall", ref _settings.HpFailsafeRecall);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"At or under Emergency Heal At with heals failing: break the\n" +
|
|
"stuck cast with a jump and heal again; if that fails too,\n" +
|
|
"recall to the lifestone.");
|
|
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Attack Spell Delay (ms)", ref _settings.AttackSpellIntervalMs, 0, 5000);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Least time between offensive (war/void) COMBAT casts at one target.\n" +
|
|
"The next cast also waits until the last one is finished (the server's\n" +
|
|
"answer and the casting animation), so 0 = cast again as soon as it is.\n" +
|
|
"Does NOT affect buffing speed.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Checkbox("Cast Dispel Self", ref _settings.CastDispelSelf);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Ring Spell Override");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Min Ring Targets", ref _settings.MinRingTargets);
|
|
ImGui.InputInt("Blast Range (0 = off)", ref _settings.BlastRange);
|
|
ImGui.InputInt("Min Blast Targets", ref _settings.MinBlastTargets);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("If this many monsters are within ring range, ring spells are used instead of arc/bolt/streak.");
|
|
ImGui.InputInt("Wall Range (0 = off)", ref _settings.WallRange);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Monster rules with Wall on cast their element's wall spell when enough monsters\n" +
|
|
"are within this many yards in the wall's path toward the target.\n" +
|
|
"The character turns to face the target first. 0 = no walls.");
|
|
ImGui.InputInt("Min Wall Targets", ref _settings.MinWallTargets);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Spell Difficulty (Min Buffed Skill)");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Minimum buffed skill level required to cast each spell tier.\nRaise these above AC's hard minimums (1/50/100/150/200/250/300/350) to avoid fizzles.");
|
|
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 1", ref _settings.MinSkillLevelTier1);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 2", ref _settings.MinSkillLevelTier2);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 3", ref _settings.MinSkillLevelTier3);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 4", ref _settings.MinSkillLevelTier4);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 5", ref _settings.MinSkillLevelTier5);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 6", ref _settings.MinSkillLevelTier6);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 7", ref _settings.MinSkillLevelTier7);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 8", ref _settings.MinSkillLevelTier8);
|
|
break;
|
|
|
|
case "Ranges":
|
|
ImGui.Text("Standard Ranges (Yards)");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Monster Range", ref _settings.MonsterRange);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Disengage Range", ref _settings.MonsterDisengageRange);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Drop a locked target only past this distance (hysteresis).\n0 or <= Monster Range = auto (Monster Range + 3).");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Ring Range", ref _settings.RingRange);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Approach Range", ref _settings.ApproachRange);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Combat Targeting");
|
|
ImGui.Separator();
|
|
ImGui.SetNextItemWidth(160);
|
|
ImGui.Combo("Targeting", ref _settings.TargetSelection, TargetSelectionNames, TargetSelectionNames.Length);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Which monster to attack, among those of the highest priority inside Monster Range.\nLeast turning: the one needing the smallest turn to face. Unknown health counts as full.");
|
|
ImGui.Checkbox("Target Lock", ref _settings.TargetLock);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("On: keeps the target it picked until it dies, leaves Monster Range, or a higher-priority monster shows up.\nOff: switches whenever another monster is clearly better by the Targeting rule.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Corpse Acquisition (Yards)");
|
|
ImGui.Separator();
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.InputDouble("Corpse Max (yd)", ref _settings.CorpseApproachRangeMax, 0.5, 1.0, "%.1f");
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.InputDouble("Corpse Min (yd)", ref _settings.CorpseApproachRangeMin, 0.5, 1.0, "%.1f");
|
|
break;
|
|
|
|
case "Navigation":
|
|
ImGui.Checkbox("Boost Nav Priority", ref _settings.BoostNavPriority);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputFloat("Nav point reach (yd)", ref _settings.FollowNavMin, 0.1f, 1.0f, "%.1f");
|
|
_settings.FollowNavMin = LegacyUiSettings.ClampFollowNavMin(_settings.FollowNavMin);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("How close to get to each nav point before moving on to the next (yards). VTank calls it Follow/Nav Min Distance. Up to 2 nav walks right up to each point before turning (tight dungeons); bigger values round corners. Follow stops this close to its leader; the nav marker ring shows it.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Nav Marker Display");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderFloat("Ring Thickness", ref _settings.NavRingThickness, 1.0f, 16.0f, "%.0f");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderFloat("Line Thickness", ref _settings.NavLineThickness, 1.0f, 16.0f, "%.0f");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderFloat("Height Offset", ref _settings.NavHeightOffset, -5.0f, 5.0f, "%.2f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Vertical offset for nav markers above the ground. Negative = lower.");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderFloat("Slope Sink", ref _settings.NavSlopeSink, 0.0f, 8.0f, "%.2f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Extra downward offset on slopes only. 0 = off; flat ground unaffected.");
|
|
|
|
ImGui.Checkbox("Show Terrain Passability", ref _settings.ShowTerrainPassability);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Highlight impassable terrain triangles in red.");
|
|
ImGui.SetNextItemWidth(160);
|
|
ImGui.Combo("Waypoint Labels", ref _settings.NavLabelMode, NavLabelModeNames, NavLabelModeNames.Length);
|
|
ImGui.Checkbox("Guide Line", ref _settings.NavGuideLine);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("A line from your character to the waypoint nav is heading for.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Doors");
|
|
|
|
ImGui.Checkbox("Open Doors While Navigating", ref _settings.OpenDoors);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Automatically open doors encountered during navigation.");
|
|
|
|
if (_settings.OpenDoors)
|
|
{
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderFloat("Door Detection Range (yd)", ref _settings.OpenDoorRange, 0.1f, 70.0f, "%.1f");
|
|
|
|
ImGui.Checkbox("Auto-Unlock Doors", ref _settings.AutoUnlockDoors);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("If a door is locked, try to use a lockpick from your Consumable Items list.");
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Getting Back On Route");
|
|
|
|
ImGui.Checkbox("Find A Way Back When Stuck", ref _settings.NavRecoveryEnabled);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When a jump doesn't free a stuck character, or navigation wanders far off the route, plan a way back to the route around walls and obstacles (the dungeon map indoors, RynthNav outdoors) and open doors on the way. Off = only the jump and side-step escapes, as before.");
|
|
|
|
if (_settings.NavRecoveryEnabled)
|
|
{
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Off Route Distance (yd)", ref _settings.NavOffTrackYards, 5f, 20f, "%.0f");
|
|
_settings.NavOffTrackYards = Math.Clamp(_settings.NavOffTrackYards, 160f, 1000f);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Navigation counts as off the route only beyond this distance, and only if it got there itself. At least 160: metas can take the character up to about 159 yd away on purpose, and coming back from that is normal.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputInt("Tries Per Waypoint", ref _settings.NavMaxDetourAttempts);
|
|
_settings.NavMaxDetourAttempts = Math.Clamp(_settings.NavMaxDetourAttempts, 1, 10);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("How many planned ways back to try for one waypoint before giving up and using only the jump and side-step escapes. Reaching a waypoint resets the count.");
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Steering");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Stop & Turn Angle", ref _settings.NavStopTurnAngle, 1f, 5f, "%.0f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Stop forward motion and turn in place when heading error exceeds this.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Resume Run Angle", ref _settings.NavResumeTurnAngle, 1f, 5f, "%.0f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Resume running once the turn-in-place error drops below this.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Dead Zone", ref _settings.NavDeadZone, 0.5f, 1f, "%.1f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Ignore heading corrections smaller than this.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Sweep Detect Mult", ref _settings.NavSweepMult, 0.5f, 1f, "%.1f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Closest-approach detection radius multiplier.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Lookahead (yd)", ref _settings.NavLookaheadYards, 0.5f, 1f, "%.1f");
|
|
if (_settings.NavLookaheadYards < 0f) _settings.NavLookaheadYards = 0f;
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Within this distance of a waypoint, blend the aim point toward the next one to round corners. The nav point reach limits it to 2 yd per yard of reach over 1 yd (no rounding up to a 2 yd reach), never more than this. 0 = off (aim straight at each waypoint).");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Turn Rate (deg/s)", ref _settings.NavTurnRateDegPerSec, 15f, 45f, "%.0f");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Max turn speed while navigating. Higher = snappier turns, lower = gentler.");
|
|
|
|
ImGui.SetNextItemWidth(80);
|
|
ImGui.InputFloat("Post-Portal Delay (s)", ref _settings.PostPortalDelaySec, 0.25f, 1f, "%.2f");
|
|
if (_settings.PostPortalDelaySec < 0f) _settings.PostPortalDelaySec = 0f;
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Seconds to settle after any portal/recall teleport before nav resumes.");
|
|
|
|
if (_settings.MovementMode == 2)
|
|
{
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Tier 2 Tuning");
|
|
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputFloat("Speed##t2", ref _settings.T2Speed, 0.1f, 0.5f, "%.1f");
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputFloat("Walk Within (yd)", ref _settings.T2WalkWithinYd, 1f, 5f, "%.0f");
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputFloat("Stop Distance (yd)", ref _settings.T2DistanceTo, 0.1f, 0.5f, "%.1f");
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputFloat("Reissue Timeout (ms)", ref _settings.T2ReissueMs, 100f, 500f, "%.0f");
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputFloat("Max Range (yd)", ref _settings.T2MaxRangeYd, 50f, 100f, "%.0f");
|
|
ImGui.SetNextItemWidth(100);
|
|
ImGui.InputInt("Max Landblock Dist", ref _settings.T2MaxLandblocks, 1);
|
|
}
|
|
break;
|
|
|
|
case "Buffing":
|
|
ImGui.Checkbox("Enable Buffing", ref _settings.EnableBuffing);
|
|
ImGui.Checkbox("Rebuff When Idle", ref _settings.RebuffWhenIdle);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Rebuff With (seconds left)", ref _settings.RebuffSecondsRemaining, 30, 1800);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Recast a self buff when its remaining duration drops below this value.\n" +
|
|
"Default 300 (5 minutes). Lower values rebuff more eagerly; very low\n" +
|
|
"values (<60s) risk a gap between the old buff dropping and the new one\n" +
|
|
"landing.");
|
|
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.SliderInt("Also Refresh Under (seconds left)", ref _settings.RebuffTopOffSecondsRemaining, 30, 3600);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"When a buff is due, also recast every other buff with less than this\n" +
|
|
"much time left, so they land together. Buffs with more time are left\n" +
|
|
"alone. Default 1200 (20 minutes). At or below 'Rebuff With', only the\n" +
|
|
"expiring buff is recast.");
|
|
|
|
ImGui.Checkbox("Cast buffs even when an item gives them", ref _settings.CastBuffsOverItemBuffs);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Cast your own buff even when worn gear already gives that buff.\n" +
|
|
"For servers with buff augments, where your own cast is stronger or\n" +
|
|
"lasts longer. On by default: on retail it costs a few extra casts.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Protections and Banes");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Untick a protection or bane to stop the bot casting it.\n" +
|
|
"Unticked buffs are skipped and never hold the bot in Buffing.\n" +
|
|
"All on by default.");
|
|
if (ImGui.BeginTable("##protsBanes", 2, ImGuiTableFlags.SizingStretchSame))
|
|
{
|
|
ImGui.TableSetupColumn("Protections");
|
|
ImGui.TableSetupColumn("Banes");
|
|
ImGui.TableHeadersRow();
|
|
int rows = Math.Max(BuffManager.ToggleProtections.Length, BuffManager.ToggleBanes.Length);
|
|
for (int i = 0; i < rows; i++)
|
|
{
|
|
ImGui.TableNextRow();
|
|
ImGui.TableSetColumnIndex(0);
|
|
if (i < BuffManager.ToggleProtections.Length) BuffToggle(BuffManager.ToggleProtections[i]);
|
|
ImGui.TableSetColumnIndex(1);
|
|
if (i < BuffManager.ToggleBanes.Length) BuffToggle(BuffManager.ToggleBanes[i]);
|
|
}
|
|
ImGui.EndTable();
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Buff Difficulty (Min Buffed Skill)");
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip(
|
|
"Minimum buffed skill level required to cast each self-buff tier.\n" +
|
|
"Separate from Spell Combat thresholds so you can tune buffing\n" +
|
|
"more aggressively — buff fizzles just retry on the next heartbeat.\n" +
|
|
"AC's hard minimums are 1/50/100/150/200/250/300/350.");
|
|
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 1##Buff", ref _settings.BuffMinSkillLevelTier1);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 2##Buff", ref _settings.BuffMinSkillLevelTier2);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 3##Buff", ref _settings.BuffMinSkillLevelTier3);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 4##Buff", ref _settings.BuffMinSkillLevelTier4);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 5##Buff", ref _settings.BuffMinSkillLevelTier5);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 6##Buff", ref _settings.BuffMinSkillLevelTier6);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 7##Buff", ref _settings.BuffMinSkillLevelTier7);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Level 8##Buff", ref _settings.BuffMinSkillLevelTier8);
|
|
break;
|
|
|
|
case "Looting":
|
|
ImGui.Checkbox("Enable Looting", ref _settings.EnableLooting);
|
|
ImGui.Checkbox("Boost Loot Priority", ref _settings.BoostLootPriority);
|
|
ImGui.Checkbox("Loot Only Rare Corpses", ref _settings.LootOnlyRareCorpses);
|
|
ImGui.Checkbox("Learn Unknown Spells", ref _settings.ReadUnknownScrolls);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Loots scrolls of spells you don't know and can learn (magic school trained or\nspecialized, skill high enough), and reads them when it's safe. Scrolls already\nin your pack are read too.");
|
|
ImGui.Checkbox("Jump When Looting", ref _settings.LootJumpEnabled);
|
|
if (_settings.LootJumpEnabled)
|
|
{
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.SliderInt("Jump Height", ref _settings.LootJumpHeight, 1, 100);
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Corpse Ownership");
|
|
ImGui.SetNextItemWidth(180);
|
|
ImGui.Combo("Loot From", ref _settings.LootOwnership, LootOwnershipModes, LootOwnershipModes.Length);
|
|
ImGui.Checkbox("Recover My Corpse", ref _settings.LootOwnCorpse);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When your own corpse (\"Corpse of <you>\") is within loot range, open it and take\nevery item on it, whatever the loot profile and Loot From say.");
|
|
ImGui.Checkbox("Item Info On Select", ref _settings.ItemInfoOnSelect);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("Selecting an item prints its details to chat (/ra iteminfo).");
|
|
ImGui.Checkbox("Travel Back To My Corpse", ref _settings.TravelToOwnCorpse);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("After a death, travel back to where you died with RynthNav (outdoors only),\nfighting on the way, recover the corpse, then carry on. Needs the macro running.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Text("Inventory Management");
|
|
ImGui.Checkbox("Enable Autostack", ref _settings.EnableAutostack);
|
|
ImGui.Checkbox("Enable Autocram", ref _settings.EnableAutocram);
|
|
ImGui.Checkbox("Combine Salvage Bags", ref _settings.EnableCombineSalvage);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("After the salvage queue empties, move same-name bags together so the server merges them.");
|
|
ImGui.Checkbox("Combine Bags During Salvage", ref _settings.CombineBagsDuringSalvage);
|
|
if (ImGui.IsItemHovered())
|
|
ImGui.SetTooltip("When salvaging an item, also add any under-full salvage bag of the same material to the salvage panel — the salvage operation merges them into a single bag.");
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Loot Timers (ms)");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Inter-Item Delay", ref _settings.LootInterItemDelayMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Content Settle", ref _settings.LootContentSettleMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Empty Corpse Wait", ref _settings.LootEmptyCorpseMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Closing Delay", ref _settings.LootClosingDelayMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Assess Window", ref _settings.LootAssessWindowMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Loot Retry Timeout", ref _settings.LootRetryTimeoutMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Corpse Open Retry", ref _settings.LootOpenRetryMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Corpse Timeout", ref _settings.LootCorpseTimeoutMs);
|
|
|
|
ImGui.Spacing();
|
|
ImGui.Separator();
|
|
ImGui.Text("Salvage Timers (ms) - First / Fast");
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Open (First)", ref _settings.SalvageOpenDelayFirstMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Open (Fast)", ref _settings.SalvageOpenDelayFastMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Add Item (First)", ref _settings.SalvageAddDelayFirstMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Add Item (Fast)", ref _settings.SalvageAddDelayFastMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Salvage Click", ref _settings.SalvageSalvageDelayMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Result (First)", ref _settings.SalvageResultDelayFirstMs);
|
|
ImGui.SetNextItemWidth(120);
|
|
ImGui.InputInt("Result (Fast)", ref _settings.SalvageResultDelayFastMs);
|
|
break;
|
|
|
|
case "Crafting":
|
|
ImGui.Text("Missile Ammo Crafting");
|
|
ImGui.Separator();
|
|
ImGui.Spacing();
|
|
ImGui.Checkbox("Enable Missile Crafting", ref _settings.EnableMissileCrafting);
|
|
if (ImGui.IsItemHovered())
|
|
{
|
|
ImGui.SetTooltip("Auto-manage missile ammo when the ammo slot is empty or low.");
|
|
}
|
|
|
|
if (!_settings.EnableMissileCrafting)
|
|
{
|
|
ImGui.TextDisabled("(Disabled)");
|
|
break;
|
|
}
|
|
|
|
ImGui.Spacing();
|
|
if (_missileCraftingManager != null)
|
|
{
|
|
string stateLabel = _missileCraftingManager.State.ToString();
|
|
Vector4 stateColor = _missileCraftingManager.IsCrafting
|
|
? new Vector4(0.9f, 0.7f, 0.2f, 1.0f)
|
|
: new Vector4(0.5f, 0.5f, 0.5f, 1.0f);
|
|
ImGui.Text("State:");
|
|
ImGui.SameLine();
|
|
ImGui.TextColored(stateColor, stateLabel);
|
|
|
|
if (!string.IsNullOrEmpty(_missileCraftingManager.StatusMessage))
|
|
ImGui.TextWrapped(_missileCraftingManager.StatusMessage);
|
|
}
|
|
break;
|
|
|
|
case "Vendoring":
|
|
RenderVendoring();
|
|
break;
|
|
|
|
default:
|
|
ImGui.Text($"Settings for {tabName} are currently under development.");
|
|
break;
|
|
}
|
|
}
|
|
}
|