MV Yanfly BuffStatesCore

I'm using Yanfly's BuffStateCore, I have a mutli enemy attack where the player attacks 4 random enemies, what I want is for with each attack, the attack increases by 25% but the attack seems to be the same amount. I tested it out by putting 100 in my damage formula and it just remains the same number, here is the script in my states notebox


<Custom Apply Effect>

user.glory = 0.25;

</Custom Apply Effect>



</Custom Confirm Effect>

// Check if the damage dealt deals physical HP damage.

if (this.isPhysical() && this.isHpEffect() && value > 0) {

// Base the bonus damage off of the user's HP rate.

value = value + (value * user.glory);

value = Math.ceil(value);

user.glory = user.glory * 2;

}

</Custom Confirm Effect>


Does anything appear to be wrong with my script?
just making sure, its a physical hit and not certain hit, right?
just making sure, its a physical hit and not certain hit, right?
Yes, i even tried switching it to this

<Custom Apply Effect>

user.glory = 0.25;

</Custom Apply Effect>



<Custom Confirm Effect>

value += Math.ceil(value * user.glory);

user.glory = user.glory * 2;

}

</Custom Confirm Effect>

And just making the skill a certain hit, I've also turned off all the other scripts I added recently, still no change in the damage
</Custom Confirm Effect>

// Check if the damage dealt deals physical HP damage.
i just noticed that you had a slash in the opening confirm effect tag in your first post, but you dont have it in your second.

user.glory = user.glory * 2;

}
however your second attempt has a closing bracket at the end from the if statement you removed. that would cause an error that would invalidate the notetag.
i just noticed that you had a slash in the opening confirm effect tag in your first post, but you dont have it in your second.


however your second attempt has a closing bracket at the end from the if statement you removed. that would cause an error that would invalidate the notetag.
Yes I caught that too but already removed it, it just looks like value isn't registering to changing the damage done to enemies. I've even used a script call to show the value of value after each hit and it shows it increasing, for whatever reason it's not connecting to the damage being dealt. :rsad:

I'm using the octopath battlers sample project https://fallenangelolivia.itch.io/octopack-battler-sample-project
It says that the buffstatescore is compatible.
can you show a screenshot of your plugin manager so that i can confirm your load order?

Edit: saw your edit and i took your initial notetags, put them in a state, and fixed the opening confirm effect tag. it works as intended even on the octopack project.
can you show a screenshot of your plugin manager so that i can confirm your load order?
Sure, and now for some reason I'm getting this error message, finally seemed to get value to start to working, maybe it was because the skill was an instant skill? After I removed instant everything seems to be working fine. But now I'm getting an error message.
Hmmm, i seemed to get it working by making a few modifications on yanflys combo script from his tips and tricks



<Custom Apply Effect>

// Defaults user's combo stacks to 0.

user._comboStacks = user._comboStacks || 0;

// Get the current number of stacks. Min 0, Max 10.

var stacks = user._comboStacks.clamp(0, 25);

</Custom Apply Effect>



<Custom Remove Effect>

// Reset combo stacks to 0.

user._comboStacks = 0;

// Get the current number of stacks. Min 0, Max 10.

var stacks = user._comboStacks.clamp(0, 25);

</Custom Remove Effect>



<Custom Confirm Effect>

// Check if the user is delivering physical damage and the action does not have "Combo" in its name.

if (this.isPhysical() && value > 0 && !this.item().name.match('Combo')) {

// Defaults user's combo stacks to 0.

user._comboStacks = user._comboStacks || 0;

// Get the current number of stacks. Min 0, Max 10.

var stacks = user._comboStacks.clamp(0, 25);

// Calculate the extra damage rate from Combo stacks.

var rate = 1.00 + stacks * 0.25;

// Round the damage upward.

value = Math.ceil(value * rate);

// Increase stack count.

stacks += 1;

// Set stack count min to 0, max to 10.

stacks = stacks.clamp(0, 25);

// Apply stack count to user's combo count.

user._comboStacks = stacks;

}

</Custom Confirm Effect>
finally seemed to get value to start to working, maybe it was because the skill was an instant skill
i set the skill i was using to instant and it still worked. the damage ramped up with each hit.
But now I'm getting an error message
i didnt get that error, but that usually comes from some value on the battler that has to be displayed becoming undefined or becoming NaN

ill paste back exactly what i have, which is just that you had at the start but with the removed slash

Code:
<Custom Apply Effect>
user.glory = 0.25;
</Custom Apply Effect>

<Custom Confirm Effect>
// Check if the damage dealt deals physical HP damage.
if (this.isPhysical() && this.isHpEffect() && value > 0) {
// Base the bonus damage off of the user's HP rate.
value = value + (value * user.glory);
value = Math.ceil(value);
user.glory = user.glory * 2;
}
</Custom Confirm Effect>

Edit: ah, already sorted then
i set the skill i was using to instant and it still worked. the damage ramped up with each hit.

i didnt get that error, but that usually comes from some value on the battler that has to be displayed becoming undefined or becoming NaN

ill paste back exactly what i have, which is just that you had at the start but with the removed slash

Code:
<Custom Apply Effect>
user.glory = 0.25;
</Custom Apply Effect>

<Custom Confirm Effect>
// Check if the damage dealt deals physical HP damage.
if (this.isPhysical() && this.isHpEffect() && value > 0) {
// Base the bonus damage off of the user's HP rate.
value = value + (value * user.glory);
value = Math.ceil(value);
user.glory = user.glory * 2;
}
</Custom Confirm Effect>

Edit: ah, already sorted then
I think I see what happened, the problem started when I started testing the state as a passive state, I think since it was never applied technically, it wasn't running the apply effects, so it got a null value for user.glory.
I think since it was never applied technically, it wasn't running the apply effects
Yep. Yanfly's passive states do not run apply or remove affects when theyre activated or deactivated. Turan has a patch for that in his plugin tweaks thread to add that functionality.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-buffstatescore.175378/