Been trying to puzzle this one out for a little while.
I have a character that sings songs, the idea being that they buff the entire party, and each turn that the song is sung again by that character, the buff gains an extra stack.
The buff starts at 2 stacks to give a better initial effect (and to get around that 1 stack is lost at turn end, since I do also want that songs effects to decay if the song is not sustained).
But, for whatever reason, I can't actually seem to get it to stack the effect (but the duration does seem to change). Probably something dumb I'm missing here. Here's the notebox code of the state:
The skill and state:
The Action sequence is very basic at the moment, its just there in case I want to change the look later, it doesn't do anything other than Action Effect and Action Animation and the other basics.
For Testing purposes, I've set the DEF bonus here to 50% and have a character with 30 DEF. Monitoring it with the YEP Battle Status, I can see the DEF correctly changes to 45 DEF on turn 2 (two stacks added, one lost), but then on turn 3, using the song again, there are now two stacks (four added, two lost) but the DEF is still 45. I've tried using it with a flat bonus as well (i.e. <def Plus: +50> as a state notetag) and indeed, it is stuck at 80 in that case.
Edit: In retrospect, am I just grossly misinterpreting what state counters do? Do they not actually stack the states effects by default in this manner?
I have a character that sings songs, the idea being that they buff the entire party, and each turn that the song is sung again by that character, the buff gains an extra stack.
The buff starts at 2 stacks to give a better initial effect (and to get around that 1 stack is lost at turn end, since I do also want that songs effects to decay if the song is not sustained).
But, for whatever reason, I can't actually seem to get it to stack the effect (but the duration does seem to change). Probably something dumb I'm missing here. Here's the notebox code of the state:
Code:
<Reapply Add Turns>
<Custom Apply Effect>
user.addStateCounter(45, 1);
user.setStateTurns(45, battler.getStateCounter(45));
</Custom Apply Effect>
<Custom Turn End Effect>
user.removeStateCounter(45, 1);
user.setStateTurns(45, battler.getStateCounter(45));
</Custom Turn End Effect>
<Custom Remove Effect>
user.setStateCounter(45, 0);
user.setStateTurns(45, battler.getStateCounter(45));
</Custom Remove Effect>
The skill and state:
The Action sequence is very basic at the moment, its just there in case I want to change the look later, it doesn't do anything other than Action Effect and Action Animation and the other basics.
For Testing purposes, I've set the DEF bonus here to 50% and have a character with 30 DEF. Monitoring it with the YEP Battle Status, I can see the DEF correctly changes to 45 DEF on turn 2 (two stacks added, one lost), but then on turn 3, using the song again, there are now two stacks (four added, two lost) but the DEF is still 45. I've tried using it with a flat bonus as well (i.e. <def Plus: +50> as a state notetag) and indeed, it is stuck at 80 in that case.
Edit: In retrospect, am I just grossly misinterpreting what state counters do? Do they not actually stack the states effects by default in this manner?