Damage calculation over area: Difference between revisions
A long overdue correction, what the heck was I thinking when I wrote this... |
Added bunch of new/missing information. |
||
Line 1: | Line 1: | ||
The damage fades in linear regression from the center to the edge of the impact area, in cell-sized steps. | Splash damage, or damage over area, is a common feature in video games. In classic C&C games, there are two main systems that enable damage to spread over an area: the [[Spread]] mechanic in pre-{{ra2}} titles and [[CellSpread]] introduced in {{ra2}}. | ||
__TOC__ | |||
==In {{td}} and {{ra}}== | |||
When a [[warhead]] detonates, damage will fade in ring-shaped steps from the epicenter of the explosion. On each step the damage is decreased by 50%, resulting in an exponential curve where damage drops quickly at first, then slowly fades away the further you get from the epicenter. The radius of these steps is controlled by the {{f|Spread|link}} flag in the warhead settings. | |||
==In {{ts}} and {{fs}}== | |||
The [[Spread]] system is carried over from RA, with a few minor changes. Damage spread in total is limited to a 3x3 area, minus the corner [[Cell Spots|cell spots]], creating a roughly circular area. [[File:Ts_warhead_spread_16.png|right|frame|This illustration shows damage falloff steps/rings with {{f|Spread|16}}. On each ring, damage is halved from the previous step. Note the maximum area of effect and the four corner cell spots which are excluded from it.]] | |||
===Examples=== | |||
Below is a demonstration of damage falloff. In the left example, a warhead with {{f|Spread|52}} was detonated at the center of the circle (red spot). The warhead was configured to kill the target Technicians only if damage was dealt in full and no falloff occurred. In the left example, all settings are the same, except the warhead was changed to have {{f|Spread|56}}. Note that the Technicians standing in the left, bottom and right corners are just outside the maximum area of effect hardcoded to the engine, hence they are left unscratched. | |||
[[File:Ts_warhead_spread_52_demo.png]] [[File:Ts_warhead_spread_56_demo.png]] | |||
==In {{ra2}} and {{yr}}== | |||
Damage fades in linear regression from the center to the edge of the impact area, [[CellSpread|in cell-sized steps]]. {{f|PercentAtMax|link}} determines the percentage of damage left at the very edge of the affected area. | |||
=== Example: === | === Example: === | ||
Line 16: | Line 35: | ||
CellSpread=10 | CellSpread=10 | ||
Target A receives 100% of the original damage, Target B receives 2%, and Target C receives 51% (linear average = (100 + 2) / 2). | |||
==Workarounds== | |||
A common workaround to overcome the rather small area restriction in {{ts}} is to use invisible, [[Bouncer|debris-like]] [[animations]]. Such animations can use any warhead and carry damage over to any distance, but they're susceptible to terrain obstacles, buildings and water, and cannot be used by units to gain rank. This workaround also works in {{ra2}} and {{yr}}, should [[CellSpread]] be insufficient. | |||
Another method is to use [[cluster]] or [[splits]] projectiles, but they are hardcoded to a slow [[speed]] (approximately {{f|Speed|20}}). | |||
[[Category: General Editing Information]] | [[Category: General Editing Information]] |
Revision as of 12:23, 20 April 2020
Splash damage, or damage over area, is a common feature in video games. In classic C&C games, there are two main systems that enable damage to spread over an area: the Spread mechanic in pre-Red Alert 2 titles and CellSpread introduced in Red Alert 2.
In Tiberian Dawn and Red Alert
When a warhead detonates, damage will fade in ring-shaped steps from the epicenter of the explosion. On each step the damage is decreased by 50%, resulting in an exponential curve where damage drops quickly at first, then slowly fades away the further you get from the epicenter. The radius of these steps is controlled by the Spread flag in the warhead settings.
In Tiberian Sun and Firestorm
The Spread system is carried over from RA, with a few minor changes. Damage spread in total is limited to a 3x3 area, minus the corner cell spots, creating a roughly circular area.
Examples
Below is a demonstration of damage falloff. In the left example, a warhead with Spread=52 was detonated at the center of the circle (red spot). The warhead was configured to kill the target Technicians only if damage was dealt in full and no falloff occurred. In the left example, all settings are the same, except the warhead was changed to have Spread=56. Note that the Technicians standing in the left, bottom and right corners are just outside the maximum area of effect hardcoded to the engine, hence they are left unscratched.
In Red Alert 2 and Yuri's Revenge
Damage fades in linear regression from the center to the edge of the impact area, in cell-sized steps. PercentAtMax determines the percentage of damage left at the very edge of the affected area.
Example:
Imagine three identical targets, the first one (A) placed at the impact point, the second one (B) at the edge of the impact zone, and the third (C) in the middle of them.
Upon detonation of a warhead with stats:
PercentAtMax=1.0 CellSpread=10
Target A receives 100% original damage, Target B receives 100%, and Target C receives 100% as well.
If a different warhead is detonated, with stats:
PercentAtMax=0.02 CellSpread=10
Target A receives 100% of the original damage, Target B receives 2%, and Target C receives 51% (linear average = (100 + 2) / 2).
Workarounds
A common workaround to overcome the rather small area restriction in Tiberian Sun is to use invisible, debris-like animations. Such animations can use any warhead and carry damage over to any distance, but they're susceptible to terrain obstacles, buildings and water, and cannot be used by units to gain rank. This workaround also works in Red Alert 2 and Yuri's Revenge, should CellSpread be insufficient.
Another method is to use cluster or splits projectiles, but they are hardcoded to a slow speed (approximately Speed=20).