This script allows you to set up “attack element modifiers”. Basically, you can
- Set up skills with multiple attack elements
- Specify the attack element rate for each element
By default, damage calculations are done by first calculating the skill’s “base” damage, then applying the elemental modifiers. An elemental modifier is the product between “elemental damage rate” and “elemental resist rate”.
For example, if your fire damage rate is 100% and the target’s fire resist rate is 25%, then the actual fire damage is 75%. If your damage was 100% fire, then that means the actual damage you inflict is reduced by the target’s resistance.
Suppose you have a skill that inflicts both fire and earth elemental damage, and you want to make it so that the damage is 70% fire and 30% earth. With this script, it properly calculates the total damage dealt, after all elemental resistances have been applied.
If an enemy has no fire resistance and has 50% earth resistance, then your final element multiplier is equal to 70% from fire + 15% from earth, for a total of 85% of the skill’s base damage.
Script: download here
In the script editor, place this script below Materials and above Main
To specify an attack element, note-tag skills or items with
<attack element: ELEMENT_NAME>
Where the ELEMENT_NAME is the name of your element in the database. Refer to
the Terms tab.
To specify attack element rates for each element, add the rate to the note-tag
as a percentage
<attack element: ELEMENT_NAME RATE>
Some example rates are
0.5 means it deals 50% 1.0 means it deals 100% 2.0 means it deals 200%
Damage Element Type
Elemental damage is calculated in two different ways depending on the skill’s
If the element type is “normal”, then it takes the user’s attack elements and
calculates damage based on those.
If there are multiple objects contributing to atk elements, then it will average out each element individually. For example, if you were dual-wielding a sword that does 30% fire damage and 70% physical damage, and you had another sword that does 50% fire and 50% physical damage, then the total damage that you will do is 40% fire and 60% physical. You can verify that the math is correct.
If the element type is anything else, then it takes the skill’s attack elements. When you note-tag a skill with atk elements, then that is assumed to be the skill’s damage element types.
To specify that your skill inflicts 70% fire and 30% earth damage, you would
note-tag it with
<attack element: fire 0.7> <attack element: earth 0.3>
To clarify, when I say “resistance”, I am not talking about the value that you specify for the “element rate” feature.
A fire element rate of 20% means the battler only receives 20% of any fire damage. This is equivalent to a fire resistance of 80%.
A fire element rate of 200% means the battler receives 200% of any fire damage. How you want to describe this in terms of resistance is up to you.