# Torn Ratio Helper — Changelog
---
## v3.1.0
- Script now only runs on the gym page (`gym.php`) — removed profile and index page matches
- Panel actively removes itself if Torn's SPA navigates away to a profile or other page
- Auto-refresh after training — a background poller detects when a stat value changes (i.e. a train just completed) and re-renders the panel automatically without needing a manual refresh
---
## v3.0.0
**Major update — 4 new tabs and several new features**
New tabs:
- **Planner** — set a target TBS and see exactly what each stat needs to reach it, along with a deficit and estimated train count per stat. Supports optional passive daily gains input (books, education etc.) for more accurate estimates
- **Efficiency** — tracks stat gains vs energy spent since you opened the page. Shows stats per 100 energy, stats per train, total energy spent, and a per-stat gains breakdown
- **Export** — one-click copy of a formatted stat snapshot ready to paste into faction Discord servers or forums
- **Info tab** condensed to an icon (📖) to save tab bar space
New overview features:
- **Ratio drift alerts** — warns you if any stat has slipped more than 5% out of ratio since your last session
- **Faction war mode** — reweights the "Train Next" recommendation to prioritise Defense and Dexterity during wars. Pulsing WAR badge appears in the header when active
New settings:
- **Light/dark theme toggle** — full light theme with a clean blue palette
- **War mode toggle**
---
## v2.2.0
- Fixed timing issue where stats could not be read on first load, requiring a tab switch to resolve
- Implemented two-phase polling — waits for DOM structure first, then separately waits for actual stat values to appear (up to ~15 seconds total)
- Added background stat watcher — if the warning banner appears, the script silently keeps retrying and re-renders automatically once values are available
---
## v2.1.0
- Added **Info tab** with plain-English explanations of why ratios matter, how gym dots work, a full breakdown of Baldr's vs Hank's with tradeoffs, what each battle stat does in combat, and a recommendation for new players
---
## v2.0.0
**Major update — full panel redesign with tabbed interface**
- Redesigned UI with dark terminal aesthetic and cyan accent
- Added tabbed navigation: Overview, What-If, History, Settings
- **Overview tab** — color-coded progress bars per stat, letter grade (A+ to F) for overall ratio health, Total Battle Stats (TBS) with delta from last visit, and a "Train Next" recommendation with gym tip
- **What-If calculator** — enter hypothetical stat values and see projected ratio grade and targets update live
- **History tab** — automatically logs stats each visit (up to 30 snapshots), shows per-stat deltas and TBS over time, with option to clear history
- **Settings tab** — ratio selector, high stat selector, and custom ratio multiplier input; all preferences saved between sessions
- Added support for **custom ratio** (user-defined multipliers)
- Added **Hank's Ratio** toggle alongside Baldr's
---
## v1.0.0
**Initial release**
- Injects a panel on the gym and profile pages
- Reads all four battle stats from the page
- Color-codes each stat against Baldr's Ratio targets (✅ on target, 🟡 close, ❌ off, 🔶 too high)
- Shows current value, target value, and exact point difference per stat
- Toggle between Baldr's and Hank's ratio
- Dropdown to select your high stat (Strength, Speed, Defense, or Dexterity)
- Preferences saved between sessions via Violentmonkey storage
- Handles Torn's React SPA with MutationObserver for navigation detection
- Fallback text scraping if CSS selectors don't match