Skip to content

AOE Update

BDCarrillo edited this page Sep 20, 2023 · 27 revisions

Background

The legacy system of radiant, explosive, and detonation having some overlapping data and confusing options has led to a rewrite of AOE damage. Keen explosions are no longer called, drastically increasing performance.

AOE & Detonation: Concepts

Definitions:

ByBlockHit - somewhat similar to the old radiant or explosive, this damage is applied upon hitting a block and occurs until the primary damage pool depletes (in other words, until the main projectile dies)

EndOfLife - equitable to the old "detonation," this is an AOE effect that only occurs once at end of projectile life, such as after the primary(base) damage pool is depleted.

Radiant- a dirty, messy old word, but can be approximated using either Pooled falloff or MaxAbsorb (more info below)

Explosive - another holdover from earlier iterations, but is roughly equivalent to the new Linear falloff

Comparisons to Previous System

Some legacy area damage types or detonation events called a Keen missile explosion method. This Keen method generated 10 shrapnel, at a random vector, that flew at 100 m/s for up 1km and did 10 damage. Each shrapnel hit of 10 damage then called a special deform method with additional damage.

AOE Settings

Damage: (damage)

Baseline damage. This will be multiplied by various scales such as global damage, area damage modifiers, block integrity modifiers, etc.

Radius: (meters)

Maximum distance from impact point, in meters, that damage can be applied.

Falloff:

Options to control how damage is applied based upon distance from impact point. NoFallOff - applies the same damage to all blocks in radius

Linear - drops evenly by distance from center out to max radius

Curve - drops off damage sharply as it approaches the max radius

InvCurve - drops off sharply from the middle and tapers to max radius

Squeeze - does little damage to the impact point, but rapidly increases damage toward max radius. IE, outer edge takes the most damage

Pooled - each hit decreases the pool by the damage done, enforcing an upper limit (similar to legacy radiant or explosive effects)

Exponential - follows an inverse power IE second block from center gets 1/2, third gets 1/3, fourth gets 1/4, etc.

Max Absorb: optional, defaults to 0 for no limit

This has two behaviors: For any falloff type except pooled, this is a cutoff that stops application of damage after it's reached. IE, a max damage limit useful for large radius weapons.

If falloff type is pooled, then max absorb is a PER BLOCK limit of damage to be applied, and is deducted from the total damage. IE, pooled with damage 600 and maxabsorb 100 would apply 100 damage to 6 blocks. If this effect isn't desired for a pooled damage weapon, leave maxabsorb at zero.

Max Depth: optional, defaults to radius (meters)

Maximum depth to apply damage into the grid that was hit, along direction of hit. Setting a high radius with a low depth would generate a "pancake" shaped hit on the surface of the target.

Shape: optional, defaults to diamond

Diamond - This is a high performance shape and should be utilized for ALL weapons with a radius less than 5 meters.

Round - A more circular, or spherical, shape that does have a higher processing cost. Do NOT use for high rate of fire weapons.

You can enable transparency on hits by setting debug to true in your weapon configuration. Transparency is not permanent and will revert to normal on a reload

AOE Shield Interactions

Damage calculation:

AOE damage versus shields is calculated by multiplying the damage by the falloff averages listed below. This is capped by MaxAbsorb as well.

NoFalloff: 1 * radius

Linear: 0.55 * radius

Curve: 0.81 * radius

InvCurve: 0.39 * radius

Squeeze: 0.22 * radius

Exponential: 0.29 * radius

Pooled: 1 (no radius multiplier to respect damage as the total pool)

Clone this wiki locally