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.
| Registry | manifold:explosion-damage |
| Files | data/explosion_damage/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | manifold:predicate |
| Contract | Gameplay framework, data stage |
Entry
A record, written ExplosionDamage(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The entry’s key, <mod-id>:<name>. | |
damage_type | string | yes | The damage type dealt (manifold:damage-type key). | |
amount | number | yes | The amount, a number in the impact context over v.distance from the centre. | |
radius | f32 | yes | The 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.