// IltHubState.cs — Persisted per-character state for the ILT Hub (Infinite Leaftide tools). // Originally SilentKelpie's ILT Hub state in RynthAi; moved to RynthILT 2026-10-13. // // Lives in %APPDATA%\RynthCore\RynthILT\\\hub.json (IltHubStore). The first // login with RynthILT copies RynthAi's \ilt-hub.json there (IltMigration), so the // shape stays compatible with that file: the parts that stayed with RynthAi's universal Mini // Remote tabs (the Pets tab's settings, the quest tracker's filter and favorites, the VTank // import path) are simply not read here any more. Serialized with the NativeAOT source-generated // IltHubJsonContext (IncludeFields = true), so plain public fields are used throughout. using System; using System.Collections.Generic; namespace RynthCore.Plugin.RynthILT.Hub; /// Root of everything the Hub remembers between sessions. public sealed class IltHubState { /// Bumped when the shape changes in a way that needs a migration. public int SchemaVersion = 1; // ── Window / shell ────────────────────────────────────────────────────── /// /// Hub UI on screen: the Mini Remote or any ILT section window (IltHubController.Tick keeps it /// current). Bank auto-refresh and the gear / split-arrow scans run only while it is true. /// public bool WindowVisible; /// Unused since the tabbed Hub window was retired; kept so old files still load. public int SelectedTab; public bool GamesHudVisible = true; /// /// "This world is an ACECustom/ILT shard even though its name isn't InfiniteLeaftide." /// World-identity override ONLY: it makes the Hub ask the server for its options, it /// never turns a feature on by itself. /// public bool ForceLeaftideFeatures; /// True once the one-time UtilityBelt sidecar import has run for this character. public bool UbSidecarsImported; /// Last-seen server feature bits. Cache only — overwritten by every login refresh. public IltServerOptionsSnapshot ServerOptions = new(); public IltBankState Bank = new(); public IltPetState Pet = new(); public IltCharacterState Character = new(); public IltGearState Gear = new(); public IltGamesState Games = new(); public IltGuardianState Guardian = new(); } /// Cached result of the server-options check (see IltServerOptions). public sealed class IltServerOptionsSnapshot { public string WorldName = string.Empty; /// "probe" (the login probe) or "" (never refreshed). public string Source = string.Empty; public DateTime LastRefreshUtc = DateTime.MinValue; /// Feature key → -1 unknown, 0 off, 1 on. public Dictionary Bits = new(StringComparer.OrdinalIgnoreCase); } // ── Banking ───────────────────────────────────────────────────────────────── public sealed class IltBankState { public long Pyreals; public long Luminance; public long LegendaryKeys; public long MythicalKeys; public long EnlightenedCoins; public long WeaklyEnlightenedCoins; /// Bound to the character: deposit and withdraw only, never transferred. public long PrestigeCoins; public DateTime LastUpdated = DateTime.MinValue; /// Last transfer recipient typed into the transfer form. public string TransferTarget = string.Empty; public int TransferCurrencyIndex; /// Transfer form's trade-note denomination (IltBankCommands.NoteDenominations; 9 = MMD). public int TransferNoteIndex = 9; /// Deposit / withdraw form choices (IltBankCommands.Deposits / Withdrawals / NoteDenominations). public int DepositIndex; public int WithdrawIndex; public int WithdrawNoteIndex = 9; /// Re-issue /bank every N seconds while the Hub is open (0 = manual only). public int AutoRefreshSeconds = 120; } /// One "Transferred …" / "Received …" bank line seen in chat. public sealed class IltBankTransaction { public DateTime Timestamp; /// "Sent" or "Received". public string Type = string.Empty; public string Currency = string.Empty; public long Amount; public string OtherPlayer = string.Empty; public string Description = string.Empty; } // ── Pet ───────────────────────────────────────────────────────────────────── public sealed class IltPetState { /// Last captured /pets and /shinies rosters (display only; the Pets tab's logs). public List PetLog = new(); public List ShinyLog = new(); /// The breeding tracker: rules this server showed, growth stage names, recent events (IltPetBreeding). public IltBreedingState Breeding = new(); // The Pets tab's own settings (roster, healing / cosmetic pets, refill path) are RynthAi's // (its miniremote.json); older ilt-hub.json files still carry them, and they are ignored here. } // ── Character ─────────────────────────────────────────────────────────────── public sealed class IltCharacterState { /// Item → coin conversion table used by the session-rates strip. public List ItemConversions = new() { new IltItemConversion { ItemName = "Strawberry Jam Jar", ItemsPerConversion = 100, CoinsPerConversion = 10 }, new IltItemConversion { ItemName = "Ancient Pyreal", ItemsPerConversion = 100, CoinsPerConversion = 37 }, }; /// Augmentation planner targets, keyed by aug type (lowercase). public Dictionary AugTargets = new(StringComparer.OrdinalIgnoreCase); /// Luminance price of one Enlightened Coin (planner math only; 0 = don't price coins). public long LumPerEnlightenedCoin; /// Enlightenment planner target level (0 = current + 5). public int EnlTargetLevel; public int EnlightenedCoinsPerToken = 20; /// /// Auto-enlighten preference. Even when true it stays DISARMED each session until the /// player confirms in the Hub, and the server's own Yes/No dialog is never auto-clicked. /// public bool AutoEnlightenEnabled; public int AutoEnlightenCheckSeconds = 30; /// Spend unassigned XP with /attr before sending /enl (enlightening wipes unspent XP). public bool AutoEnlightenSpendXpFirst; // ── Attribute raiser (IltAttributeRaiser; Skills panel > Progression) ── /// Spend unassigned XP on the ticked attributes/vitals every AttrAutoRaiseMinutes. public bool AttrAutoRaise; public int AttrAutoRaiseMinutes = 5; /// IltAttributeRaiser.Mode: 0 priority (top of the order first), 1 round robin, 2 cheapest first. public int AttrRaiseMode; /// Unassigned XP the raiser never spends. public long AttrKeepXp; /// /attr abbreviations in raise-priority order (all nine; repaired on load). public List AttrOrder = new(IltAttributeRaiser.DefaultOrder); /// /attr abbreviations the raiser may spend on ("Raise now" and auto-raise). public List AttrRaiseStats = new(); /// Quest bonus (/qb) list filter. (The /myquests tracker's filter and favorites are RynthAi's.) public string QbFilter = string.Empty; // The ILT sections are Mini Remote tabs now (HudState.MiniRemoteTab); the old per-section // "window open" flags in older files are ignored on load. /// /// Registry charms this character has carried, keyed by charm name. Lets the Charms Tracking /// tab report "acquired" for charms that are now in storage (the client only sees carried items). /// public Dictionary CharmsSeen = new(StringComparer.OrdinalIgnoreCase); } /// Last time a charm was seen in the character's possession, with its best tier. public sealed class IltCharmSeen { public int Tier; public int MaxTier; public DateTime LastSeenUtc; } public sealed class IltItemConversion { public string ItemName = string.Empty; public int ItemsPerConversion = 100; public int CoinsPerConversion; } // ── Gear ──────────────────────────────────────────────────────────────────── public sealed class IltGearState { // Dispel (Rune of Dispel on harmful debuffs) public bool AutoDispel; public int DispelCooldownSeconds = 10; /// Spell-name substrings that are ALWAYS dispelled. public List DispelInclusions = new(); /// Spell-name substrings that are NEVER dispelled. public List DispelExclusions = new(); // Surging Strength (Empowered Volcanic Ember keeper) public bool SurgingStrength; public int SurgingCooldownSeconds = 15; // Aetheria / corrupted-weapon chunking public bool AutoChunkAetheria; public bool AutoChunkCorrupted; public bool ChunkInCombat; public int ChunkIntervalMs = 2000; /// /// Only chunk aetheria whose max level is below this (Coalesced Aetheria too). Infinite Leaftide /// aetheria goes up to level , so the cap runs to one past it. /// public int ChunkAetheriaUnderLevel = 4; /// Never chunk aetheria carrying a Crit rating (C, GearCrit 372; ILT tier-10 sigils of level 6+). public bool KeepAetheriaWithCrit = true; /// Never chunk aetheria carrying a Crit Damage rating (CD, GearCritDamage 374). public bool KeepAetheriaWithCritDamage = true; /// Never chunk aetheria carrying a Crit Damage Resist rating (CDR, GearCritDamageResist 375). public bool KeepAetheriaWithCritDamageResist = true; /// /// Rating level for the C / CD / CDR keep switches: a rating at or above this keeps the piece, /// a lower one does not protect it (it chunks if the other rules allow). 1 = any rating keeps. /// public int KeepAetheriaRatingAtLeast = 1; // Corrupted-weapon keep rules (ub-IT IdleActs > Corr Chunk). All off by default, as in ub-IT: // the hard rules (unmodified, workmanship, cleaving, never-chunk) always apply on top. /// Never chunk a corrupted weapon with Crushing Blow (CriticalFrequency float 147 > 0). public bool KeepCorruptedCrushingBlow; /// Never chunk a corrupted weapon with Biting Strike (CriticalMultiplier float 136 > 0). public bool KeepCorruptedBitingStrike; /// Never chunk a corrupted weapon with Armor Cleaving (IgnoreArmor float 155 > 0). public bool KeepCorruptedArmorCleaving; /// Never chunk a corrupted weapon with any slayer (SlayerCreatureType int 166 > 0). public bool KeepCorruptedAnySlayer; /// Never chunk a multi-strike corrupted weapon (AttackType int 47 = 160 / 166 / 486). public bool KeepCorruptedMultiStrike; /// Never chunk a corrupted weapon with an elemental damage bonus (int 204 > 0). public bool KeepCorruptedElementalBonus; /// Never chunk a corrupted weapon with any spell on it. public bool KeepCorruptedAnySpell; /// Never chunk a corrupted weapon whose max damage (int 44) is at least this. 0 = off. public int KeepCorruptedMaxDamageAtLeast; /// Spell ids (comma / space separated): never chunk a corrupted weapon carrying any of them. public string KeepCorruptedSpellIds = ""; // Auto-clap (/clap all) public bool AutoClap; public int ClapIntervalMinutes = 30; // Guardian Hand charm (WCID unpublished — name match until set) public uint GuardianHandWcid; public string GuardianHandName = "Guardian Hand"; // Split arrows (White Quartz imbue on missile weapons) public int SplitArrowTarget = 3; public bool SplitIgnoreImbued = true; // Equipment profiles (.utl suits). (The VTank .usd import path is RynthAi's: the importer stayed there.) public string LastEquipProfile = string.Empty; // Rings inscription chain (IltRingChainRunner; SilentKelpie's, moved from RynthAi's Crafting tab) /// Recipe id (IltRingChain.Recipes) to how many times to craft it. Pump thread only. public Dictionary RingRuns = new(StringComparer.OrdinalIgnoreCase); /// Answer the server's craft dialog Yes for the queued combines (engine API v85). public bool RingAnswerCraftDialog = true; /// Craft and inscribe in combat mode too (servers with combat-mode crafting). public bool RingAllowInCombat; } // ── Games ─────────────────────────────────────────────────────────────────── public sealed class IltGamesState { public long BlackjackBet = 1_000_000; public long FellowshipBlackjackBet = 1_000_000; public int PowerballQuantity = 1; } // ── Guardian (Temple of Enlightenment) ────────────────────────────────────── public sealed class IltGuardianState { /// Translate incoming guardian tells and show the answer (Guardian window + Mini Remote). public bool AutoDetectFromChat = true; /// After a chat answer, give the item to the guardian automatically. public bool AutoHandIn; /// Temple guardian only: buy one of the item from the nearest vendor when none is carried. public bool BuyMissingFromVendor = true; /// Assumed attribute turn-in cooldown when only /qb wait stamps are known (hours). public int CooldownHoursAssumed = 20; /// Turn-ins counted from /qb wait-stamp transitions, keyed by attribute (fallback when /myquests lacks the flag). public Dictionary TurnInCounts = new(StringComparer.OrdinalIgnoreCase); /// Estimated end of each attribute's cooldown (UTC), keyed by attribute (same fallback). public Dictionary CooldownUntilUtc = new(StringComparer.OrdinalIgnoreCase); }