States not wearing off properly

UmbyPokochan

Veteran
Veteran
Joined
Oct 4, 2020
Messages
33
Reaction score
5
First Language
English
Primarily Uses
RMMV
No matter what I try, I can't get states to wear off when I want them to. For example, I have a state that affects the whole party, but if I set it to Action End for 5 turns then the first member of my party always loses the buff 1 turn early. If I set it to Turn End for 5 turns then it wears off in 3 turns. If I set it to Action End for 5 turns but put the note tag <turn end: 5> then it lasts for 4 turns and in the 5th turn it ends after each character takes action. If I set it to Action end for 5 turns but put the note tag <turn start: 5> then it wears off at the very beginning of the 5th turn, making you think you'll have it for that turn but you won't.

All I want is for the buff to last 5 turns no matter what and wear off at the END of the 5th turn. Why is that so hard? Why does it only last for 3 turns when I set it to Turn End for 5 turns? I really don't want to use Action End because then they don't get the effect of the state after they attack and that ruins the purpose because it's an HP regen state.

EDIT: I think Action End causing the state to wear off at different times is because of a "stun" skill the enemy has that skips the target's turn basically. It's like it's not ticking down the state duration because the player didn't get to act that turn. That's really annoying and it seems unintended.

EDIT 2: Okay, so the MAIN issue I am having is that I am setting states to end after 5 turns but they are ending after 3. I can't understand why. It just won't let states last more than 3 turns when set to Turn End.

EDIT 3: Turns out the problem is with YEP_CoreEngine. Gonna try and figure out why.

SOLVED!: My plugins were in the wrong order. :)
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
772
Reaction score
482
First Language
English
Primarily Uses
RMMV
I know you said this is solved already, but here's a tip about action end states that might help you out.

The state is applied to the battler who cast it before their action ends, so the first action end turn for the battler who cast the skill is the turn he used to cast the skill. So if it affects everyone, everyone will get 5 actions, even the user, but his first action was casting the spell in the first place, so he really only gets 4.

You can mitigate this by adding a turn to the state, one way is in the action sequence, but you could also use a <Custom Apply Effect> instead, like the following:

<Custom Apply Effect>
if (target === origin){
target._stateTurns[stateId] += 1
}
</Custom Apply Effect>
This adds one to the turn count of the state, if the user who just applied it is also the target. Naturally you need the BuffsStatesCore plugin from Yanfly to use these tags, but it sounds like you probably have those based on your post.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just finished composing a boss battle theme!
Scripted a multi-variable weather system that randomizes wind speed, cloudiness, rain, fogginess, etc, while attempting to realistically account for interactions between them (e.g. wind speed affects fogginess, cloudiness affects rain, etc), the current weather pattern, and the player's biome e.g. swamp, beach, etc. Now I "just" have to tie visuals and sounds to the variables so stuff actually happens...
I'm having a headache balancing the combat using flat defense so I'm gonna use percentual armor, in this pic, Simon has 16 on Defense which means all the incoming damage will be reduced by 16% this will ease my burden a bit.
!Have a nice day everybody¡
SO glad they patched outer worlds for switch! I can finally play it! Weird that other peeps are still having issues. I know it was really chugging on my lite when it first came out.

Forum statistics

Threads
105,555
Messages
1,014,620
Members
137,231
Latest member
anjing_gila
Top