[YEP_DamageCore][YEP_BuffStatesCore]Increase damage value before critical multiplier is applied

Randor01

Veteran
Veteran
Joined
Dec 24, 2018
Messages
88
Reaction score
15
First Language
Italian
Primarily Uses
RMMV
Hello!
I'm using the two Yanfly's plugins listed in the title in my project to better control how damage is calculated.
So, i made a State that increases the damage dealt by an ability based on the user's Luck parameter.
This is its Notetag:


Code:
<Custom Confirm Effect>
   if(value < 0)
   {
      value-=Math.floor((user.param(7) - 10) / 2);
   }
   else if(value >= 0)
   {
      value+=Math.floor((user.param(7) - 10) / 2);
   }
</Custom Confirm Effect>
So, while testing, i noticed that the critical multiplier is applied to the skill's damage BEFORE the boost from State. So instead of being like:

Code:
(base + luk) * cri
It's more like:

Code:
base * cri + luk
I know i could hard-code the change with Damage Core, but i would like to know if there is a more elegant way to do it with BuffStates's notetags. Thanks in advance!
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
I think you may be better off using a custom damage formula with an if/else statement dependent on whether the state is applied to the user.
 

Randor01

Veteran
Veteran
Joined
Dec 24, 2018
Messages
88
Reaction score
15
First Language
Italian
Primarily Uses
RMMV
I think you may be better off using a custom damage formula with an if/else statement dependent on whether the state is applied to the user.
The problem is that i have many States with which i should do this, and i don't think it would be worth it at that point.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
Maybe not. It could be as simple as

user.isStateAffected(Id) || user.isStateAffected(Id) || user.isStateAffected(Id) || etc.
 

Randor01

Veteran
Veteran
Joined
Dec 24, 2018
Messages
88
Reaction score
15
First Language
Italian
Primarily Uses
RMMV
Maybe not. It could be as simple as

user.isStateAffected(Id) || user.isStateAffected(Id) || user.isStateAffected(Id) || etc.
Yeah, but the various States increment damage by different values, use different parameters etc.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
Oh, okay, I see. Did you try custom establish effect?
 

Randor01

Veteran
Veteran
Joined
Dec 24, 2018
Messages
88
Reaction score
15
First Language
Italian
Primarily Uses
RMMV
Oh, okay, I see. Did you try custom establish effect?
Yeah, but in that case the damage has already been dealt to the target, so the bonus given by the State isn't even applied.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
I was having an issue getting a skill to work properly when trying to set a variable before the damage took place. It would never work on the first use of the skill, but then it would work with subsequent uses. The answer I got that solved it was to use <Custom Execution>. This note tag would execute before pre-damage eval.

However, this is a skill core note tag so if you were to attempt this it would require using note tags in the skill and using if/else statements.

Sorry I couldn't be of more help.
 

Randor01

Veteran
Veteran
Joined
Dec 24, 2018
Messages
88
Reaction score
15
First Language
Italian
Primarily Uses
RMMV
I was having an issue getting a skill to work properly when trying to set a variable before the damage took place. It would never work on the first use of the skill, but then it would work with subsequent uses. The answer I got that solved it was to use <Custom Execution>. This note tag would execute before pre-damage eval.

However, this is a skill core note tag so if you were to attempt this it would require using note tags in the skill and using if/else statements.

Sorry I couldn't be of more help.
I see. It's not exactly the ideal solution, but is still something. Thanks for the help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top