RPG Maker Forums

Hello !

I'm trying to make a skill that hits harder every time you hit the same target, and decreases in power every turn you don't hit the target with the skill.

So I was thinking it'd be easiest to use yanfly's buff&state core as I remembered it had a state counter fonctionality which would be perfect for the job, though i don't have much experience with custom notetag formulas and such, and as expected i can't get it to work yet :kaocry:


So far, i set it up like so :

The 'low-kick' skill :

Damage formula : a.atk*0.5*(1+b.getStateCounter(21))*(a.atk/b.def).clamp(1/3,3)/2
The "*a.atk * (a.atk/b.def).clamp(1/3,3)/2" part is part of the standard damage formula i use, the part thats specific to this skill is the ".5* (1+b.getStateCounter(21))" which is supposed to multiply the damage by 0.5 times th state's counter +1.

In effect, the skill adds the LegBreak state (21).

And in notebox :
<Custom Establish Effect>
b.addStateCounter(21,1);
</Custom Establish Effect>

As I understand it should increase the target's state's counter by 1 every time the skill hits a target.


The 'LegBreak' state:

No specefic effect or restrictions, no removal parameters.
Notetag :
<Custom Turn Start Effect>
this.clampStateCounter(21, 0, 4); // just to be sure the counter values clamps, didn't know where to put it
this.addStateCounter(21, -1);
if (this.getStateCounter(21) == 0)
{this.removeState(21)};
</Custom Turn Start Effect>

Here i wanted the state to substract 1 counter every turn, and remove itself when counter reaches 0.


And up to now, pretty much nothing works.
-> The skill always does 0 damage, even though i tested it in conditions when it guaranted damage even at lowest damage output (atk 20 -> def 5), so I guess i messed up the formula.
-> The state applies on the target, but no counter is shown on it (i made sure to set show ennemy state counter to true in plugin settings).
-> The state never automatically removes itself.

What i suppose is that i probably got off the mark regarding how to use the script commands provided, and i'm quite clueless as to how to actually make it work, so if someone cares to help that would be nice :kaoluv:

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,543
Members
137,834
Latest member
EverNoir
Top