In Vanilla Rimworld, there’s very little use for breaching weapons, as even bare fists are enough to drill through a mountain, let alone walls and doors. This mod fixes that, by nerfing every damage type against buildings, except for the ones used by breaching weapons. I recommend carrying a breach axe from now on!
Walls are solid Mod features
This is possible by using tags from the game itself: buildingDamageFactorPassable and buildingDamageFactorImpassable. Impassable buildings are basically walls, and passable is everything else (eg: doors).
List of changes:
- “Sharp” damage: Cut, Stab, Poke, Scratch and Bite
- “Blunt” damage: Blunt, Crush
- “Ranged” damage: RangedStab, Bullet, Arrow
- “Explosion*” damage: Bomb
*The bomb damage type is special, as it already has a default damage bonus against buildings, namely 4x against Impassable, and 2x against Passable. Walls are defined to receive 2x damage against Bomb and Thump, so the calculated value for a frag grenade damage is 50 x 4 x 2 = 400, enough to completely destroy a slate wall in one shot!
By changing the bonus to 0.8, grenades should now deal 80 damage to walls, and 100 to doors. Antigrain warheads deal, on point-blank, 418 damage to walls, this may be changed.
Additionally, weapons shaped like maces, clubs or hammers (precisely, weapons with a ‘head’ part that deals ‘Blunt’ damage) will be patched to deal a new damage type called “BluntCrushing”, it works like vanilla Blunt.
- “Hammer” damage: BluntCrushing
For reference, here is the damage types for breaching weapons, untouched by this mod:
- “Thump Cannon Bullet” damage: Thump
- “Breaching Axe” damage: Demolish
The Breaching Axe def uses a third tag, buildingDamageFactor, that seems to be multiplied before buildingDamageFactorImpassable, so it deals a lot of damage to buildings, but only 10% of that to pawns.
What about mining?
Mining uses a different damage type. Also, the mining damage is coded into the mining job, mining pawns will do 40 damage against walls, and 80 against natural stone.
Will it stop naked prisoners and escaping pawns from obliterating everything in their path?
Fortunately for them, no, unless they can’t mine, because “digging out” is considered mining, which means I can’t change the value with only xml. Maybe in the future? I’m yet to learn how to code C# and use Harmony and stuff, so no promises!
What about mountain bases?
Natural and smooth stone walls are the same as regular ones, except that they don’t take 2x more damage against explosions and the thump cannon’s blast, and since they also have more HP, they are still the safest choice. Beware against infestations though!
What about infestations’ digging?
Since insectoids also use the mining job, they will still carve a hole through the mountain if left unchecked, so don’t let them!
What about modded walls?
This mod doesn’t interfere with walls, it only makes it so every type of damage in the game, except for the special ones used by the Breaching Axe and Thump Cannon, deal less damage to buildings.
What about modded weapons?
Most modded weapons use the same damage types as vanilla, so there’s no issue. If a mod has custom damage types, you can tell me in the comments.
Is it compatible with CE?
Combat Extended already has a patch that makes bullets and arrows deal very little damage to all buildings. I can see if I can make it compatible, but they are having some issues that need fixing right now.
Feedback about the values is welcome.
If you know how to write a Harmony transpiler, there’s a function inside Verse.AI.JobGiver_ExitMap.TryGiveJob that has two bools: canMineMineables and canMineNonMineables. Forcing them to false will make it so escaping prisoners and digging out pawns will always bash stuff instead of mining, making the changes from this mod apply to them. I don’t have enough time or brainpower to learn how to write that out. This method was suggested by Aelanna, but she is also short on time, so if anyone wants to contribute, you can either upload it as your own, or I can add you as an author here.
This mod was heavily inspired by Aelanna’s Fists Aren’t Made of Steel, and is therefore incompatible with it (it does the same thing).