Skip to content

Mines weapon type & weapon proximity triggers#7461

Open
MjnMixael wants to merge 11 commits into
scp-fs2open:masterfrom
MjnMixael:mines-weapon-type
Open

Mines weapon type & weapon proximity triggers#7461
MjnMixael wants to merge 11 commits into
scp-fs2open:masterfrom
MjnMixael:mines-weapon-type

Conversation

@MjnMixael
Copy link
Copy Markdown
Contributor

Adds mines as a new weapon type that sit stationary and have unlimited life. Mines are also plotted on radar and are destroyable like bombs. Because these are a true weapon type they can take advantage of all the other various weapon features to come up with all kinds of new weapon ideas.

This PR also adds a proximity system for triggering detonations that is generalized and fixes #2235 while we're here. Proximity can be limited by IFF (hard set or comparative relation), Species, Type, and Class. Also includes a +Stealth Proximity Multiplier to scale proximity radius for stealth ships allowing stealth ships to get closer than others if desired. +Detonate Chance is also a feature here for probabilistic detonation per contact and is, I hope, multiplayer-deterministic.

Mine-specific ($MineInfo:)
+Sensors Range: / +Targetable Range: radar/HUD visibility tiers (distorted blip vs. fully targetable). -1 = always, 0 = never.
+Hitpoints: destructible HP (default 50)
+Chase Duration: on trigger, turn into a guided missile chasing the target for N seconds instead of detonating immediately (requires a homing flag)
+Detonates on Chase Timeout: at chase end, detonate vs. give up and return to stationary
+Chase Cooldown: re-arm delay after a non-detonating chase

Additionally new spawn behaviors have been added to reproduce BtA's mine design.
$Spawn Aimed: / $Spawn Aim Lead: spawn children fire toward the parent's homing target instead of into a random cone, with optional lead extrapolation.

AI ships will never choose mines as a weapon to use. An AI Profile flag is added to gate mine defensive behavior for safety.

AI: $ships intercept mines: profile flag
When set, AI ships autonomously engage hostile mines they can detect, with imminent-threat preemption (swap targets if a mine is about to detonate on them) and standoff distance scaled to the mine's proximity radius. Guards also defend their charges against mines.

Some scripting behavior is also added here with mines in mind like a proximity triggered hook and ability to arbitrarily detonate a weapon.

@MjnMixael MjnMixael added this to the Release 26.0 milestone May 14, 2026
@MjnMixael MjnMixael added feature A totally new sort of functionality Requested by Active Mod A feature request that has been requested by a mod that is actively in development. labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A totally new sort of functionality Requested by Active Mod A feature request that has been requested by a mod that is actively in development.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Proximity Munitions

1 participant