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.
模組介紹 作者原文
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:
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: