Ramming Damage
This is a C# DLL mod and requires a mod loader to work.
Instructions:
- Setup the ‘Yet Another Mod Loader’ mod (YAML) using the manual steps from its author: https://steamcommunity.com/sharedfiles/filedetails/?id=3577650065&searchtext=
- Enable ZTX Ramming Damage in the Cosmoteer Mods menu.
- Restart Cosmoteer.
- On restart at the Welcome screen, YAML will display a security dialog listing ZTX.RammingDamage.dll under "Unknown libraries". This means YAML hasn’t yet been told to trust this mod’s DLL.
- Return to the Cosmoteer mods list, click on this mod, and press "Trust this mod" in the description panel.
- Restart Cosmoteer one last time.
I also need to make sure people understand that downloading DLL mods can be dangerous since you are running someone else’s code on your device so unless you trust the author of the mod DO NOT download any DLL mods, but if you are experienced in coding or the mod you are going to download is trusted by the community please be my guest.
Yes this mod is exactly what you think, it adds collision damage to the game!!! No more pillow-bumping into enemies — rams hurt. By default if ships make contact with another ship and the relative velocity of contact is >50m/s they enter ramming mode and keep dealing/receiving ramming damage until relative velocity falls below 5m/s.
NOTE:
This mod has a DLL hook and requires YAML. Read the IMPORTANT field for instructions. Special thanks to Morse!
AI was used in code generation of this mod.
I tried to make this mod as close to good feeling collisions as possible since the game always tries to YEET the ships that overlap or contact each other. So many iterations and ideas were tried until I got to something that just works. Please experiment with the config settings, make specialised rammers and enjoy the mod!!!
How it works:
Every contact runs the pen-ratio formula to figure out how much damage each side takes. Then each destroyed-part HP gets converted into a contact-point impulse that pushes AND spins the bodies apart through Box2D — so heavier ships slow less, and off-centre hits make ships spin instead of stopping dead. Two formulas are selectable: NewtonSum (default, Newton’s 3rd law — total collision energy splits equally between both bodies) or Asymmetric (damage to B drives push on A and vice versa).
If you want to make a ramming block then my suggestion is High pen but low HP. The only thing that decides how many blocks will be destroyed is the pen ratio, so a single (20HP 20PenRes block) can destroy 20 (1000HP 1PenRes corridors). HP feeds the pushback magnitude — more destroyed-HP per HIT = more impulse on both bodies.
Pressing X when you are about to set ships destination will turn off auto avoidance making it easier to collide with stuff 😉
- Pen-ratio damage allocation. Pen 7 armour vs pen 1 corridor → corridor dies in 1 HIT, armour takes ~14%(1/7) of MaxHealth per contact. Equal-pen parts mutually destruct.
- Directional pushback. Each HIT applies a Box2D impulse at the contact point — produces both linear push and angular spin in one go. Linear/Rotation shares tune independently.
- Two pushback formulas. Newton’s 3rd law (symmetric energy split, default) or Asymmetric cross-mapping where each side’s damage drives the OTHER side’s push.
- Head-on damage bonus. Head-on collisions deal up to 4× more total damage than a one-sided impact (KE-realistic v² scaling).
- Stall mechanic. If a rammer is moving faster than parts can be destroyed, it freezes for a single physics tick every N ticks. Invisible at normal speed but stops parts phasing through armour and destroying ship internals.
- Per-body impulse reduction. Light bodies (debris, fighters) receive scaled-down impulse so a grazing capital ship doesn’t YEET them into a different galaxy.
- Pen-priority shadowing. Armour shadows lower-pen parts behind it within the same tick — internals don’t die alongside armour even when ramming geometry clips through hull.
- Per-part HIT cap. Each part takes at most one HIT per tick, smoothing multi-HIT spikes from wedge-front geometry.
- Optional mass-tier thresholds. Per-mass ramming speed so light fighters need high speed while capital ships can activate ramming at low speeds.
- Sustain grace window. Rammer keeps damaging across separate target ships and short (default 1 second at 30Hz physics) contact gaps.
- Friendly-fire respected. Defers to the game’s CanDamage check, so allied ships only damage each other when FF is on.
- Invulnerability respected. Invulnerable ships (Creative toggle, mode overrides) take no ramming damage but can still damage non-invulnerable ships.
- Open source. Full C# source bundled in the source/ subfolder. MIT licensed.
All gameplay knobs live in config.rules next to the DLL. Edit values, restart Cosmoteer — no rebuild required:
- MinClosingSpeed / MinSustainSpeed — ramming start speed / sustain thresholds
- HpToEnergy — master impulse magnitude per HP of damage. Raise to decrease overall ramming
effectiveness, lower to increase. - LinearMultiplier / RotationMultiplier — split each impulse between linear push and rotation
- PushbackFormula — 0 = Asymmetric, 1 = NewtonSum
- SlowdownHeadOnFactor — head-on bonus strength (default 0.71 = 4× more HITs at full alignment, 1.0 disables)
- ImpulseReductionTiers — per-body mass-based impulse scaling (prevents debris YEET cascade)
- MassClosingSpeedTiers / MassSustainSpeedTiers — optional per-mass speed thresholds with independent on/off toggles
- SustainGraceTicks — how long sustain threshold persists between contacts (30Hz physics, so 30 = 1s)
- MaxPhaseLayers / StallDisableSpeed / StallGraceTicks — stall mechanic tuning
- PerPartSuppression / PenPriority / DeadPartGate — per-tick contact filters
- DebugLog — verbose per-HIT log lines for tuning / bug reports
Every knob has an inline comment in config.rules explaining what it does.
Every player in the lobby must have this mod enabled, and all players must run matching config.rules values.
Cosmoteer uses deterministic lockstep — every client runs the simulation locally from synced inputs. If one client has the mod and another doesn’t, their physics diverge on the first ram and the game desyncs. Same applies if two clients run different config.rules values — even a single mismatched knob causes a desync on the first ram.
Full C# source is bundled inside the mod’s source/ subfolder, along with the .csproj and build script. You can audit the code, rebuild from source with .NET SDK 10, or fork freely.
License: MIT. See LICENSE next to the DLL.