Skip to content

Bomb

A Bomb is a deployable bomb-style explosive — a third explosive category alongside Missile (guided, in-flight) and Mine (placed, contact-triggered). The engine exposes class.bomb to scripts, but there is no dedicated bomb datatype in scriptproperties.xml — the class is a label, not a property bag.

No inheritance beyond standard object. A bomb is class.bomb and inherits everything from object → destructible → component. There are no bomb-specific accessors.

Minimal vanilla usage. Searching vanilla MD and aiscripts for class.bomb returns essentially nothing — like Checkpoint, bomb is an engine class exposed for modders without active vanilla content.

There are no bomb-specific properties. Use inherited accessors from object:

PropertySourceDescription
.sector / .zone / .positionobjectWhere the bomb is
.owner / .trueownerobjectFaction that deployed it
.macrocomponentBomb macro
.hulldestructibleCan be shot
ClassBehaviourDatatypeVanilla use
class.missileGuided / dumb / torpedo, in-flight trackingmissile (2 props + explosive base)Heavy
class.mineStationary / tracking / friend-foe, contact-triggermine (6 props)Heavy via PlaceMinefield
class.bombDeployable bomb (proximity / timer / scripted detonation)No datatypeNone in vanilla

bomb is positioned for script-triggered explosives — mod content that wants “set bomb here, detonate on cue” semantics distinct from missile lifecycle or mine arming.

<create_object
name="$Bomb"
macro="$BombMacro"
owner="$Faction"
sector="$Sector">
<position x="$x" y="$y" z="$z"/>
</create_object>
<find_object name="$Bombs"
space="$Sector"
class="class.bomb"
multiple="true"/>
<destroy_object object="$Bomb"
explosiondamage="50000hp"/>

The explosiondamage= attribute is the canonical “set off this object with a blast” path. Note: the actual damage model depends on the bomb’s macro definition — modders typically include AoE damage in the macro.

There is no event_bomb_X family. Bomb lifecycle is observed through standard object events:

EventWhenNotes
event_object_destroyedBomb destroyed (detonation, shot, despawn)Filter event.object.isclass.{class.bomb}
event_object_killed_objectBomb killed something via blastevent.object = bomb, event.param = victim
  • No vanilla MD content uses class.bomb. It’s a mod hook. Treat it like Checkpoint — safe to spawn-and-destroy without colliding with vanilla.
  • No dedicated datatype properties. No .target, no .armed, no .timer. Build state via parallel $BombState.{$bomb} tables in your mod.
  • Don’t conflate with Mine. Mines have F/F logic and a dedicated framework; bombs are placeholders. If you want F/F detonation, use mine subclasses.
  • Engine class enum exists but registry may be sparse. Without a vanilla macro per faction, you’ll need to define your own bomb macros in libraries/macros.xml-derived data.
  • Why some classes exist without vanilla content: Architectural overview Reserved engine classes — same pattern as Checkpoint.
  • Custom explosive mods: Architectural overview Custom explosive content — bomb / IED mod design.
  • Missile — sibling explosive (in-flight, guided).
  • Mine — sibling explosive (placed, F/F).
  • Explosive — abstract parent type (though bomb doesn’t strictly use this in vanilla).