// Weapons · RimWorld Mod

The Dead Man's Switch - Universal Mech Weapons

The Dead Man's Switch - Universal Mech Weapons mod preview for RimWorld

Unofficial companion mod/patch.

Unofficial companion mod/patch.

Lets every Dead Man's Switch mech equip every weapon, with two deliberate exceptions.

HOW IT WORKS
Fortified Features Framework gates mech weapons with Fortified.MechWeaponExtension, whose CanUse() is an OR-match on the weapon's weaponTags against the mech's UsableWeaponTags. This mod adds one synthetic tag, DMSU_AnyWeapon, to every weapon and to every mech, and removes the per-mech tech-level gate. Nothing is hard-coded to a weapon list, so weapons from any other mod are covered automatically.

EXCEPTIONS
- DMS_Dragoon_Shotgun and DMS_Dragoon_Axe stay exclusive to the MobileDragoon exosuit. The exosuit grants those through HeavyEquippableDef/EquippableWithApparel, a separate code path this mod does not touch.
- The five built-in tank cannons stay exclusive to their own chassis via BypassUsableWeapons.

TURRET PLATFORMS
Eight gestatable mechs shipped with no MechWeaponExtension and so could not hold anything. They get one here:
Geochelone, SuperGeochelone, HermitCrab - no built-in gun, purely additive
Caretta, Killdozer, panzer, STGeorge, ZBZ59D - have a built-in cannon in the primary slot
Hyrax and Mammoth are excluded: their thingClass is plain Pawn, not a WeaponUsableMech, so they cannot equip at all without changing their class.

CANNON PROTECTION
Fortified's CompVehicleWeapon puts the built-in cannon in the pawn's real primary equipment slot, and those cannons ship with destroyOnDrop=true. Without this mod's second patch file, equipping any other weapon on one of those five would permanently destroy the cannon. Patches/02 sets destroyOnDrop=false on those five cannons so they drop as a real item you can re-equip, plus smeltable=false, Flammability=0 and DeteriorationRate=0 so the dropped cannon cannot be smelted, burned or weathered away.

Sub-turrets (CompMultipleTurretGun) are unaffected. Each SubTurret is its own IAttackTargetSearcher with its own verb, target scan and fire-at-will toggle, and fires with nonInterruptingSelfCast, so it never competes with the equipped primary.


On the part about the Cannons, I'm not sure I even want to keep this in really. It works fine, but it's probably the most volatile part of this and the most likely to cause problems. Went through with it anyway just because, but I am considering removing it just for the ease of use.

SUPPORTED MODS: The Dead Man's Switch Synthetic, Mobile Dragoon, Ancient Corps, Assembly Master, Legion. Those are the ones I play with, so those are the ones I added. But like I said in the beginning, it should be compatible with other mods, but I don't know HOW compatible.


!!!!!Load after The Dead Man's Switch and all its add-ons!!!!!