Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/explosion_damage/

Explosion damage: what an explosion does to entities. An explosion names an entry, which hits every damage receiver on the player and creature layers within its radius, nearest first (at most 64), scaled by how much blocks shield each target (the same factor that scales the explosion’s push). The explosion’s owner is credited, even when they are offline. The knockback is the damage type’s, from the centre; since the explosion pushes on its own, give its damage type manifold:damage.no_knockback. Explosions are not built yet, so entries load and wait. Loaded by the server only.

Registrymanifold:explosion-damage
Filesdata/explosion_damage/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsmanifold:predicate
ContractGameplay framework, data stage

Entry

A record, written ExplosionDamage(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe entry’s key, <mod-id>:<name>.
damage_typestringyesThe damage type dealt (manifold:damage-type key).
amountnumberyesThe amount, a number in the impact context over v.distance from the centre.
radiusf32yesThe radius, in metres, above 0 and at most 64.

Example

From game/flagship-game/data/explosion_damage/flagship.ron:

ExplosionDamage(
    id: "flagship-game:tnt",
    damage_type: "flagship-game:explosion",
    amount: "math.max(0, 24 - v.distance * 4)",
    radius: 6.0,
)

Value forms used here: number.