BuffStateCore, is it possible to add a turn cap?

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
158
Reaction score
29
First Language
English
Primarily Uses
RMMV
Using the YEP Buffstatecore, there is an option for state reapplication rules, the first is to Ignore, the second is to reset turns back to the max (if you have a 10turn state on you that's down to 5 left and you reapply it, it will return to 10 turns), and the third is add. when using add, it adds on the entire turn duration, so if a state lasts 10 turns, and at 5, you reapply it, it now lasts 15.
Does anyone who knows more about using Lunatic Mode have any idea if it's possible to add a cap to this? For example, maybe a state lasts 10 turns, but you can keep spamming it, theoretically this means you could get it up to 1000 turns. I am seeking a piece of code that could cap it, such that maybe you could only get it to max out at 30 or 40 turns.
Is anyone aware of any such way to do this?

Normally I just use the Reset rule, but when playing Octopath Traveler, I realized it's nice to be able to extend buffs if you have extra turns.

 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,332
Reaction score
449
First Language
Dutch
Primarily Uses
RMMV
if it doesn't any damage behind there but just boosting it, why not using skill cooldown to it?
if it is for 5 turns, why not 5 turns cooldown on the skill before re-use?

wouldn't that be much simpler?
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
158
Reaction score
29
First Language
English
Primarily Uses
RMMV
if it doesn't any damage behind there but just boosting it, why not using skill cooldown to it?
if it is for 5 turns, why not 5 turns cooldown on the skill before re-use?

wouldn't that be much simpler?
that is a possible workaround, yes, but I didn't want to have to resort to that, and I'll provide an example as to why:

I have a bleed skill, where when it hits, it applies a bleed effect. but what if you want to get bleeds rolling on all targets? if there's a cooldown, that is impossible.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,332
Reaction score
449
First Language
Dutch
Primarily Uses
RMMV
nothing is impossible, but I think you can cap a state stack like:

you hit a enemy with a skill that give 5 counters on it,
when its 2 and it hits, to give the state again, it goes either back to 5 or ignors untill that state is gone.

you can work around if target.addState(x), if it has a state, you need to make a else
with if its NOT state effected. so it doesn't add anymore stack unless the state is removed.

if you want to add it, than you need to check if its > 5 and if so, it will be 5.

But Idk which one you exacly need or how to do that. Because yanfly is complicated for me =)
but if you know a bit how to do that, you can make it happen nicely :)
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
158
Reaction score
29
First Language
English
Primarily Uses
RMMV
Ideally, I would like it add, but with a modifiable cap, something like, for example, if initial application of the state sets the counter to 10 turns, and it is reapplied when it's down to 8, it will become 18. and another reapplication say at 15 would bump it to 25, but then if it is reapplied while above 15, it will only go up to 25, and not above that.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
155
Reaction score
94
First Language
French
Primarily Uses
RMMV
Hi, you could cap the state turns like this:
Code:
<Custom Apply Effect>
   if (target._stateTurns[X] >= 25) {
     target._stateTurns[X] = 25;
   }
</Custom Apply Effect>
You can put this notetag in the notebox of the state and replace X by its ID.
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
158
Reaction score
29
First Language
English
Primarily Uses
RMMV
Hi, you could cap the state turns like this:
Code:
<Custom Apply Effect>
   if (target._stateTurns[X] >= 25) {
     target._stateTurns[X] = 25;
   }
</Custom Apply Effect>
You can put this notetag in the notebox of the state and replace X by its ID.
works perfectly, thank you very much!
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

My sister is a saint. Specifically Saint Peter. Because shes my best friend until other ppl are around then shes all "nope, dont know him, dont like him."
Making it a rule that I don't do any world building for my new game before the actual gameplay is concrete and working. I have 16 years of lore to work with anyway.
Cheesy power metal makes everything better. No matter what you do, you'll feel heroic doing it.
Starting to really like the first of my madness areas. I think the eyes looking at them really helps to sell the place. :LZSexcite:

Forum statistics

Threads
95,698
Messages
931,110
Members
126,043
Latest member
rpgteck
Top