Attack Element Modifiers

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

attackElementModifiers

This script allows you to set up “attack element modifiers”. Basically, you can

  1. Set up skills with multiple attack elements
  2. 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.

Download

Script: download here

Installation

In the script editor, place this script below Materials and above Main

Tutorials

Usage

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
element type.

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.

Example

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>

Notes

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.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

14 Responses

  1. Elasmo says:

    This script is almost perfect for my weapon system, but I’m encountering an interesting problem. I want to have some weapons still inflict a single damage type, but choose that type (from 2 choices) based on what will be most effective against the enemy. Without using scripts at all, this seems to be what the system does if you attach multiple attack elements to a weapon. However, while using this script, I haven’t been able to duplicate that effect. Using the notetags makes the damage divide between the elements, and having no notetag at all seems to make the damage ignore elemental resistances altogether. I’m fairly new to this; am I missing something obvious?

    • Hime says:

      Sounds like there’s a bug. If there are no note-tags, then it should default to just picking the one that deals the most damage.

  2. Bright_Shield says:

    Wanted to verify something I read in the file.

    If a skill is notetagged:
    attack element: water 1
    and the actor has, say, a fire sword that is notetagged:
    attack element: fire .45
    attack element: normal .55

    Then I should see 100% water damage, correct?

    IF SO:
    Now assuming I had a skill that was:
    attack element: water .5
    attack element: normal .5
    and the actor has the same fire sword that is notetagged:
    attack element: fire .45
    attack element: normal .55

    then would the skill do 50% water, and something like 22.5% fire 27.5% normal, (half of the weapon stats) if my math is right?

    • Hime says:

      "Normal" is not an element and is treated as a special case. This script does not provide the ability to mix skill atk element and weapon atk elements. It is either "skill elements" or "user elements".

  3. Matthew says:

    Is it possible to set a notetag for the 'Normal Attack' element?

  4. Allusion says:

    This is a great script, Hime! You wouldn’t believe how greatly this helps my game, which is 99.9% focused on elements. Thank you! 😀

  5. halrawk says:

    Quick question on this, does the element drop down box matter at all when using these notetags?

    Eg. if skill is set to water element, then note tagged

    Will it still do any water element damage? Or will the notetags overwrite the water element?

    • halrawk says:

      Oops, that should read:

      Eg. if skill is set to water element, then note tagged
      attack element: fire 0.7
      attack element: earth 0.3

      Will it still do any water element damage? Or will the notetags overwrite the water element?

  1. March 2, 2014

    […] Attack Element Modifiers script has been updated to support all database objects that supports features. This includes […]

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax