// Management · RimWorld Mod
Stability Framework
Stability Framework Overview Introducing the Stability System to RimWorld — a brand-new combat survival mechanic.
Stability Framework
Overview
Introducing the Stability System to RimWorld — a brand-new combat survival mechanic. Every pawn possesses an independent Stability value, functioning similarly to a pawn's combat posture and balance. While protected by cover, pawns gain substantial damage reduction through Stability. Once Stability reaches zero, the pawn enters a Stability Collapse state and temporarily loses all Stability-based protection until recovery. In addition, every pawn is assigned 2 random weapon weaknesses at spawn (randomly selected from Light Ammo, Medium Ammo, Heavy Ammo, Shotgun, and Melee categories). Attacks from weapons matching a pawn's weaknesses inflict additional Stability damage and increased actual damage.Core Features
- Dynamic Stability Values — Calculated from body size, total body part HP, damage scaling factors, and random bonuses. Every pawn has unique Stability potential.
- Five Weapon Weakness Types — Light Ammo / Medium Ammo / Heavy Ammo / Shotgun / Melee. Each pawn is randomly assigned 2 weaknesses.
- Automatic Weapon Classification — Built-in keyword recognition automatically categorizes vanilla and modded weapons, with manual override support in Mod Settings.
- Cover-Based Stability Protection — Pawns protected by cover while retaining Stability receive additional damage reduction proportional to their Stability state.
- Stability Collapse & Recovery — After Stability reaches zero, all Stability protection is disabled for 3 hours before automatically recovering to full.
- Explosive Stability Damage — Explosive attacks disrupt balance and consume additional Stability. Parameters can be customized in Settings.
- Armor Penetration Scaling
Visual Features
- A Stability Shield Icon + Current Stability Value is displayed above each pawn. The shield icon changes according to Stability status (Full Stability / Partial Stability / Collapsed).
- Weapon Weakness Icons are displayed to the right of the Stability indicator.
- When a pawn is selected, weakness icons on other pawns will flash and highlight if they are vulnerable to the selected pawn's current weapon.
- A cover protection icon is displayed when a pawn is positioned behind effective cover.
- Separate toggle buttons are available in the lower-right corner to independently show or hide Stability and Weakness icons.
- Weapon Gizmos automatically display their corresponding ammunition type icon in the upper-right corner.
All icon sizes, position offsets, and spacing can be adjusted in real time through Mod Settings, with instant visual preview.
Weapon Type Cache
The mod automatically detects and caches ammunition categories for all weapons. The complete weapon list can be viewed in Mod Settings, with filtering by mod source and weapon category. Incorrect classifications can be manually corrected. Manually overridden entries are marked with a *.Compatibility
- Uses Harmony patches to automatically attach the Stability component to all pawns (humans, animals, mechanoids, and more).
- Currently incompatible with Combat Extended (CE).
- Can be safely added to existing saves, but should not be removed mid-save.
- Tested for 7 in-game days on a 5-year colony save containing over 800 mods without any major issues observed.
API
Provides a public API (`StabilityFramework.API.StabilityModifierApi`):- `AddPawnStability(Pawn, int)` — Add Stability to a pawn.
- `ReducePawnStability(Pawn, int)` — Directly reduce a pawn's Stability.
- `ResolvePawnIncomingAttack(Pawn, AttackData)` — Manually process Stability calculations for an incoming attack.
- `PawnHasWeakness(Pawn, WeaponType)` — Check whether a pawn has a specified weakness type.