Elemental Damage in Formula (Skill)

Hello all,

I have been searching over the internet and this forum for a way to add elemental damage to a skill via the damage formula.

I'm just looking for the skill to do 30% elemental damage on top of it's regular damage. For example 100 physical damage + 30% elemental damage.

I'm using visustella plugins but am not experienced enough to figure out how to get this done via JS if I need to. I tried looking for any reference to elemental ID access in the script call excel but couldn't find anything related to elements.

I did find this in the forums (this._action.item().damage.elementId) while looking but I believe this wont work for what I want.
I also found (battler.elementRate(<elementId>)) but according to the forum post I found this in, you cannot add a rate.

I appreciate your assistance!
I'm not sure what would stop you from multiplying the elemental rate value by 0.3, which would in fact add the 30% value you need.
Example:
JavaScript:
100 + a.elementRate(1) * 0.3
I'm not sure what would stop you from multiplying the elemental rate value by 0.3, which would in fact add the 30% value you need.
Example:
JavaScript:
100 + a.elementRate(1) * 0.3
I guess the person in that forum post was confused. Thanks!

Quick question, does the actor have to have the elemental trait assigned to it for this to have an effect?

Edit: Nvm the question I got it answered while searching and now I feel dumb lol. Thanks!
Maybe I'm wrong, but elementRate doesn't appear to be used correctly in this case. elementRate is the battler's elemental resistance (or vulnerability) not an attack value.

To create a skill that deals a certain amount of physical damage, then 30% of that damage as additional elemental damage, you'd want to do the following:

1. Set the damage type to "none."
2. Use a formula like this:

Code:
let dmg = a.atk * 4 - b.def * 2; dmg * b.elementRate(1) + dmg * 0.3 * elementRate(2)
If using the default elements in a new project, this will deal 100% of the formula's damage as physical (element 1) damage, then 30% of the formula's damage as fire (element 2) damage. Replace each elementRate's values (1 or 2, respectively) with other numbers if your element IDs are different or you want to use some other element besides fire.
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/elemental-damage-in-formula-skill.174590/