Spell damage templates were originally designed to be used in offence spells but they have now found their way into spell templates that cover both buffs and debuffs – as a side effect of casting the spell.
These templates provide a flexible range of options including how the damage can be visualised to the player; How the target of the damage is selected; The radius or size of the area that the damage will spread to; How the actual damage is calculated. Plus many more options.
When written down the multitude of options can be expressed as one or more of the following attributes:
- damage type
- shape of the damage
- the target for the damage
- the radius (or size) of the damage impact area
- damage calculation method
- damage tier id
- AoE reduction value
- when is the damage applied
- Number of DoT turns
The mnemonic attribute allows for a unique name to be applied to the spell damage template. Which is then used in the overall spell template as an index back into the spell damage template.
The description attribute is primarily used during debugging and play testing only. However it can be used by the designer/modder as a visual reference/reminder to the templates capabilities. Regardless though it is never displayed to the player during a game.
The damage-type attribute defines the type of damage that may be applied to the target, e.g. cold, divine, poison, etc. This is the only reference to which kind of damage the spell uses. I wanted the design this way so I can easily swap out one type of damage for another by just changing a single attribute within the damage template itself.
The shape-of-the-damage attribute is then used to represent damage at the point of impact both visually and programatically. There will be a few hard coded values available for use such as ball, square or cross. This attribute is primarily used for spells that cause Area of Effect (AoE) damage that require the damage to be spread out across several tiles in a particular shape.
The target-for-the-damage attribute will be used to control who/what the spell damage can be applied to. This attribute is then used by the spell targeting routines to exclude any targets that do not match its value. For example if this value is set to “enemy” then neither friendly, neutral, allies or other target types will be selected.
The radius of the damage is used to determine the size of the impact, it’s typically used with AoE spells.
The damage-calculation-method attribute determines how the damage is calculated, the most common method is to use a tier based approach that scales with the spell, i.e. the more experienced the spell the more damage it causes. There are other options such as a dice based approach – such as 1d4+1 – or even a fixed value for the damage.
The tier-id works alongside the damage-calculation-method and when set to tier, each tier level will provide either a single value or a range of values that the base damage can be calculated from.
The AoE-reduction attribute is used to scale the damage (typically down) for AoE spells as the damage ripples away from the point of impact. The actual reduction value will be decided upon during the design phase for the damage spell template. The value stored in this attribute is a percentage so 25 means reduce the damage by 25% for each tile it ripples away from the point of impact.
The next attribute damage-applied-when controls when the final damage total is applied to the target and this generally falls into either instant (this turn only) or overtime (every game turn for a number of turns).
The actual number of turns the damage persists for is controlled in the last attribute number-of-dot-turns.
The spell damage template is one the most complex of the templates used for spells in terms of the features it offers to the designer/modder. It is also the one that has required the greatest amount of time and effort to get right from my point of view.
A final thought for the modder…
When designing your first spell damage template I would recommend you take a copy of an existing template, rename the mnemonic and then tweak one element at a time so you can get a feel for how things work.
So, what do you think is this a good approach, is it to complex, is there something you don’t understand? Let me know by posting a comment.