- Joined
- May 3, 2019
- Messages
- 2
- Reaction score
- 1
- First Language
- french
- Primarily Uses
- RMMV
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
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
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
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
Last edited:

