jc_mods-WeaponBash icon

WeaponBash

Ranged units bash enemies that get too close with whatever they're holding. Physical contact required - real swings, real physics, no fake damage auras.

Last updated a day ago
Total downloads 299
Total rating 0 
Categories Mods
Dependency string jc_mods-WeaponBash-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_TABS-5.4.16 icon
BepInEx-BepInExPack_TABS

BepInEx pack for TABS. Preconfigured and ready to use.

Preferred version: 5.4.16

README

Weapon Bash

Ranged units can now defend themselves in melee: when an enemy gets within arm's reach, they bash with whatever they're holding. It only does a small amount of damage and is mostly for knockback.

How it works

  • Every unit holding a ranged weapon gets the bash automatically — no unit creator setup, works with vanilla units, custom units, and units from other mods.
  • When an enemy closes to ~1.75m, the unit slams its weapon at them with a full-body lunge.
  • Damage and knockback only happen on real physical contact. The bash arms the weapon for a short window; if the swing physically connects, the victim takes a small blunt-damage bonus plus whatever the impact physics dish out. A whiffed bash does nothing.
  • Melee units are untouched — their normal attacks already fill this niche, and the forced swing would interfere with their combat rhythm.
  • Bash cooldown is 3 seconds per unit.

Tuning

There's no config file yet — defaults are tuned for a natural, physics-driven feel. If you build from source, everything lives in the WeaponBashConfig class:

Setting Default What it does
Enabled true Master switch
RangedOnly true Only units holding a ranged weapon bash
Radius 1.75 Trigger distance (meters)
Damage 5 Bonus blunt damage on contact
Knockback 0 Artificial launch (m/s) added on contact; 0 = pure swing physics
Cooldown 3 Seconds between bashes per unit
DebugLogs false Log attach/trigger/contact events to the BepInEx log

Compatibility

  • Applied via a single Harmony patch on unit initialization — no blueprint edits, no unit database changes, safe to add or remove mid-campaign.
  • Plays fine with custom factions and unit mods; anything that spawns through the normal unit pipeline gets the bash.

Source

Built for TABS with BepInEx 5. Source on GitHub: https://github.com/jc-code377/TABS-Weapon-Bash