MV Yanfly Element Core

I have an enemy that has a fire rate of 200% and a wind rate of 50%
I am using a skill that does fire and wind damage while using the <Element Magnify Fire: +15%>
The damage that I do to the enemy is 161. How is the damage calculated?
By whatever you have in your damage formula? We have no idea what number you're giving to the engine.

Unless you meant this to be a math problem, where you're giving us the result and asking us to solve for X 🤣
Sorry, the damage formula is 150.
And what Multi-Element Rule are you using? Is there any damage variance on the formula? You've gotta give us the info to work with.

Presuming you're using the default multiplicative rule,
Target's fire rate is 2 * 1.15 = 2.3
150 * 2.3 * .5 = 172

But if you're using a different multi-element rule, or you have any damage variance on, that will of course vary.
Did you set a deviation? Also Element Core has different rulings for the use of multiple elements. Which one did you choose?

Edit: Oops I didn't notice there was an answer already. Also variance is the english word ... gotta remember that.
So:
1.-The enemy has Fire Rate: 200% and Wind Rate:50%
2.-The skill is the 'Attack Command'
3.-The skill formula is just 150, for testing, no variance or anything funny, just that.
3.-The weapon I am using has the Fire and Wind elements.
4.-The weapon has the notetag <Element Amplify Fire: +15%>
6.-Element Core ruling is the default 'Multiply'
5.-Nothing else on it, no extra buffs or anything.

Edit: I think is like this: (150* 200% + 150 *15%)*50% == 161.25
I'm not sure, the math I came up with is presented above.

You can open the plugin in a text editor, go to line 769, and after the brace paste in:
Code:
console.log("Element ", elementId, " rate is ", eleRate, ". Current rate is ", finalRate);

Then hit F12 during the game, go to the Console tab, and it will show you the math as it calculates each element.
Then we'll have:
Total Damage of the Skill 150.
50% Wind Damage = 75
50%Fire Damage = 75
The Fire Damage will increase through the Amplifier of 15%, so: 75 x 1,15 = 86,25
75+86,25=161,25

The other things cancel each other out. (Fire Rate 200% and Wind Rate 50% -> 2 * 0,5 = 1)
Thanks a lot, I'm starting with skills and the damages formulas, noting how it works so I dont have to worry about it later!
Then we'll have:
Total Damage of the Skill 150.
50% Wind Damage = 75
50%Fire Damage = 75
Huh! I assume you're correct, since it's coming up with the same number that the OP's game is.

But I didn't see the part where it divides the original damage by the number of elements in it. Good call.
Then we'll have:
Total Damage of the Skill 150.
50% Wind Damage = 75
50%Fire Damage = 75
The Fire Damage will increase through the Amplifier of 15%, so: 75 x 1,15 = 86,25
75+86,25=161,25

The other things cancel each other out. (Fire Rate 200% and Wind Rate 50% -> 2 * 0,5 = 1)
Well that kind of calcule doesn't seem to work if the Wind Damage has also an Amplifier of 15%.
Cause it would be : 86,25 + 86,25 = 172,5
But the damage that puts out is 210
The other things cancel each other out. (Fire Rate 200% and Wind Rate 50% -> 2 * 0,5 = 1)
That part actually doesn't make sense. The fire rate should actually be 2.3, as I mentioned above, because the amplify is applied directly to the target's element rate. They shouldn't cancel each other out.

So it should be (75*2.3) + (75*.5) = 209.

From calcElementRate():
Code:
var eleRate = target.elementRate(elementId);
eleRate *= Math.max(0, this.subject().elementMagnifyRate(elementId));

@Gudako Did you use the code I gave you to simply see the numbers that are being produced by the game?

It's a little complex to follow through the code just because there are a number of functions everything passes through, I'd have to care a little more and have a little more free time to do it thoroughly.
Yes, I use it and I had a problem with SRD Super tools but thats solve, now I can see how it is calculating the rates, just wanted to say that that calculation above wasn't working, thanks for the help!
So it should be (75*2.3) + (75*.5) = 209.
Wait wait wait ... can you explain this to me? xD I tried to figure out how this plugin calculates damage a while ago, when I first started to use it and I really thought I understood.
Why is it not (75*2.15) + (75*0.58)?
Like we have the division in two times 75, but both amplifiers are added two only one of them?

Also how does this work with the first example? Shouldn't it be
(75*2.15) + (75*0.5) without the additional amplifier for wind?
But that's 200 or something
Wait wait wait ... can you explain this to me? xD I tried to figure out how this plugin calculates damage a while ago, when I first started to use it and I really thought I understood.
Why is it not (75*2.15) + (75*0.58)?
Because of the code I showed you - it doesn't add the magnify to the target's element rate, it multiplies it.
Code:
var eleRate = target.elementRate(elementId);
eleRate *= Math.max(0, this.subject().elementMagnifyRate(elementId));

As far as the .58 bit, I was simply talking about the first example. Not the amplify on both.

I'd be a little surprised if someone hasn't dissected and explained this plugin by now. Is the tutorial video not helpful? Have you Googled it?

If there's nothing, I could see if I have free time this evening and go through the code in greater detail.
Ah no, I misunderstood again. I thought this
So it should be (75*2.3) + (75*.5) = 209.
was your solution for the second calculation since it's almost the same as the result the OPs game delivered.

Of course I understand the general mechanics of the plugin presented in the tutorial video and the description. It's only these calculations I can't retrace because I don't see how the game gets these results.
Okay, @coucassi - the long and short of it is, I don't know what Gudako has done.

I did out the math following the code and I got the exact same result that I put in my second reply in this thread: 172.5

I then put it in a test game with all the numbers and notetags that we were told, and that's what it does - rounded up to 173.

So I have no idea how Gudako is getting 161. Either some of the rates or notetags or plugin parameters are not correct as described in here, or there's another plugin being used that modifies it somehow.
I checked the log an this is what it does when I use Amplify:

When the enemy has one element rate and I use one amplify tag:

base * (paramrate + amplifyrate)

When the enemy has two element rates and I use two amplify tags:

base * (paramrate + amplifyrate) * (paramrate2 + amplifyrate2)

So my skill does 150 and the enemy has a Fire Rate of 200% and a Wind Rate of 50% and I use a Amplify Fire notetag of 15%:

150 * (200% + 15%) * 50% = 161.25
All I can say is that both by reading the code and by testing it in a game, that's not correct. There's no place where the amplify rate is added, it's multiplied.

Are you using an old version? Have you tested it with that being the only active plugin?
It is Element Core version 1.02, I tested without any other plugin and it just goes like that, seemed easy when I saw the log, and I tried with multiple Element Rates and amplify tags and it goes like that. The Magnify notetag just multiplies all the rates.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-element-core.158644/