TacticalDamageScaling
A combat balancing mod for TABS. Adjusts damage based on Unit cost, durability, and DoT effects.Tactical Damage Scaling (TDS)
Tactical Damage Scaling (TDS) is a comprehensive combat overhaul for Totally Accurate Battle Simulator (TABS).
Have you ever wondered why 8 cheap units (costing 800 each) can melt a 6,000-cost Boss in just 2 seconds? Or why a cheap unit with a high-damage skill can one-shot an elite warrior? The vanilla TABS damage system lacks a logical connection between a unit's Deployment Cost, Durability (HP), and Actual Combat Power.
TDS completely rewrites the damage calculation logic using smooth mathematical curves, ensuring that every battle is fair, tactical, and respects the value of your units.
Core Design Philosophy
TDS is built on three fundamental rules:
- Cost represents power, not just raw stats. A 10,000-cost unit should naturally outclass a 1,000-cost unit, but never in a way that breaks the game.
- Swarm tactics must remain viable. We do not blindly reduce damage just because multiple units are attacking. Individual hits are balanced mathematically.
- No arbitrary hard caps. We use smooth mathematical curves (like the Hyperbolic Tangent) instead of sudden "damage cliffs."
The Mathematics of TDS (Deep Dive)
1. Smooth Price Scaling (The Tanh Curve)
Traditional mods use simple exponents (e.g., ratio ^ 0.5), which can cause explosive damage spikes or unfair penalties. TDS uses a Hyperbolic Tangent (Tanh) curve combined with an exponential function to calculate the base multiplier:
- Formula: M = exp(L * tanh(0.6 * ln(Ca / Cv) / L))
- Where: Ca is Attacker Cost, Cv is Victim Cost, and L = ln(2.5).
- Result: If costs are equal, the multiplier is exactly
1.0. Damage scales smoothly upwards or downwards without ever surpassing the mathematical boundaries of0.4xto2.5x. No sudden jumps between units costing 2999 vs. 3000.
2. Durability Compensation (Glass-Cannon Protection)
In TABS, a unit costing 6,000 might only have 1,000 HP, making them highly vulnerable to swarms and DoT effects. TDS introduces a Durability Penalty for damage taken.
- The mod calculates the expected HP for a unit based on its cost:
Expected HP = Cost * 0.5. - If a unit's actual HP is lower than expected, incoming damage is further reduced.
- Result: Expensive, fragile units are protected from being instantly melted by cheap, fast-hitting swarms, allowing them time to fight back.
3. DoT & Environmental (Unowned Damage) Balancing
Unowned damage from fire, explosions, and falling rocks is handled completely differently:
- Burn Effects (Damage < 150): Fire is highly lethal to "Tanky" units (High HP). The damage scales up based on the target's Max HP. However, it is heavily penalized against expensive "Glass-cannon" units.
- Explosions & Falling Objects (Damage >= 150): Explosions use a "Virtual Cost" based on their base damage. This ensures that a massive boulder doesn't one-shot a 10,000-cost giant just because the giant has high HP.
4. Diminishing Returns for DoT Stacks
If multiple cheap units apply burn/DoT stacks simultaneously, the efficiency of each new stack decreases. A swarm can still burn down a Boss, but the damage won't multiply exponentially out of control.
5. Anti-Charm Lock (Cupid Fix)
Elite units are no longer permanently locked down by cheap Cupids. After being charmed, the unit gains a temporary immunity/cooldown window, giving them a chance to counter-attack.
Key Features
- Zero Performance Impact: All fields and damage calculations are highly optimized and cached using Harmony
AccessTools. No reflection lag, no FPS drops, even in massive 100v100 battles. - Fully Configurable (Hardcoded for Balance): Tuned meticulously over hundreds of hours of testing to ensure the TABS meta remains intact while fixing its core flaws.
- Seamless Integration: Hooks directly into the
HealthHandler.TakeDamagemethod, meaning it works flawlessly with almost all other mods.
Installation
- Ensure you have BepInEx installed for TABS (v5.4.16 or higher).
- Download and extract this mod's zip file.
- Copy the
TacticalDamageScaling.dllfile into yourTotally Accurate Battle Simulator/BepInEx/plugins/folder. - Launch the game and enjoy balanced battles!
Credits
- Developer: TABSVietNam
