MV How to make states applied to Reserve Party Member still be effected by the end of a turn

I was wondering if there was a way to have it so that when a specific state is applied to a party member and they are in the reserve party (the ones not currently battling) it will still go down in turns like normal after the turn ends despite them not actively fighting? I dont want it for all states, just specific ones.

I have a work around currently involving variables but I would prefer actively being able to see the state counter go down in turns like YEP_BuffsStateCore does already for me on states that are inflicted on the active party members

TLDR
I want specific states and their turn counters to work the same way they do for active battling party members, but on the reserve party members
the only way I can think off is the use with Olivia_MetaControl and set
the counter for actors inside of them in the form of arrays.

that way, it might work, but don't know exactly.

if the state counter stops or is removed outside, it probably require
to modify the code, but I have no clue how too.

it also depends what those states exactly does (hp dmg, mp dmg, generate etc).
I don't know of any existing plugin to do this, but it seems very relevant to my Reserve Actions plugin, so I'm going to add it to that plugin.
I don't know of any existing plugin to do this, but it seems very relevant to my Reserve Actions plugin, so I'm going to add it to that plugin.
Ooo ok! Maybe I'll look into that plugin of ur's then!

the only way I can think off is the use with Olivia_MetaControl and set
the counter for actors inside of them in the form of arrays.

that way, it might work, but don't know exactly.

if the state counter stops or is removed outside, it probably require
to modify the code, but I have no clue how too.

it also depends what those states exactly does (hp dmg, mp dmg, generate etc).
Ah I see, well if you happen to figure it out at any point in time please let me know! Dont worry too much about figuring it out tho!
just going off of what you said, try this as a plugin and load it last
Spoiler
Code:
(() => {
    var _endTurn = BattleManager.endTurn
    BattleManager.endTurn = function() {
        _endTurn.call(this);
        $gameParty.allMembers().forEach(m => {
            if (!$gameParty.battleMembers().contains(m)){
                m._states.forEach(s => {
                    if (m._stateTurns[s] > 0 && $dataStates[s].meta.BacklineUpdate){
                        m._stateTurns[s]--;
                    }
                })
            }
            m.removeStatesAuto(2)
        })
    };
})();
any state with a <BacklineUpdate> notetag should be able to tick down and expire on any actor thats not in the current battle party
@Robro33 Assuming it works, do you mind if I use that code in my plugin with some tweaks?
do with it as you will. just wanted to provide something that targets what OP wanted specifically in case they didnt need your entire reserve actor plugin
just going off of what you said, try this as a plugin and load it last
Spoiler
Code:
(() => {
    var _endTurn = BattleManager.endTurn
    BattleManager.endTurn = function() {
        _endTurn.call(this);
        $gameParty.allMembers().forEach(m => {
            if (!$gameParty.battleMembers().contains(m)){
                m._states.forEach(s => {
                    if (m._stateTurns[s] > 0 && $dataStates[s].meta.BacklineUpdate){
                        m._stateTurns[s]--;
                    }
                })
            }
            m.removeStatesAuto(2)
        })
    };
})();
any state with a <BacklineUpdate> notetag should be able to tick down and expire on any actor thats not in the current bat
just going off of what you said, try this as a plugin and load it last
Spoiler
Code:
(() => {
    var _endTurn = BattleManager.endTurn
    BattleManager.endTurn = function() {
        _endTurn.call(this);
        $gameParty.allMembers().forEach(m => {
            if (!$gameParty.battleMembers().contains(m)){
                m._states.forEach(s => {
                    if (m._stateTurns[s] > 0 && $dataStates[s].meta.BacklineUpdate){
                        m._stateTurns[s]--;
                    }
                })
            }
            m.removeStatesAuto(2)
        })
    };
})();
any state with a <BacklineUpdate> notetag should be able to tick down and expire on any actor thats not in the current battle party
THIS WORKS EXACTLY HOW I HAD WANTED IT TO! IT'S PERFECT! THANK YOU SO SO MUCH!!!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

So I have some skills and items that give a State to ALL Actors (Both ones in-Battle and the ones in Reserve during said Battle) but when I swap in the Reserve Actors... they still have the full Turn Length of the State no matter if any Turns have passed since it had been applied. I had a Plugin that still ticked down the States for Reserve Actors but it doesnt seem to work well with YEP's Standard Turn Battle System (ST😎 and was wondering if there was a different plugin or other form of work around like a script or something?
Preferably something that works with STB
My Reserve Actions plugin makes states tick down on reserve actors (though it's not the primary feature of the plugin), but I can make no promises that it works with anything Yanfly. I do know it works with Ellye's ATB system though, so the chance of it working with Yanfly STB is not zero.

If that's too much for you, this exact question was asked a few days ago, and someone else posted a short mini-plugin to do the job.
My Reserve Actions plugin makes states tick down on reserve actors (though it's not the primary feature of the plugin), but I can make no promises that it works with anything Yanfly. I do know it works with Ellye's ATB system though, so the chance of it working with Yanfly STB is not zero.

If that's too much for you, this exact question was asked a few days ago, and someone else posted a short mini-plugin to do the job.
I think I was actually the person who posted that question hah... im pretty sure I was the one that got that Plugin and it worked when I tested it but when I got around to playtesting and working on my game more I noticed that issue I stated above and it's like a blemish I cant ignore
I'm a little bit confused. You posted in the previous post that it worked, but the title of this thread is that, in fact, it didn't work at all. Were you not using STB when you tested before? Have you already tried adjusting the position of the plugin from the previous thread? (It should definitely go below STB at a minimum.)
just to note, you could have reported your prior thread to have it reopened and said youve encountered a plugin incompatibility you'd like checked out. ill be merging the threads shortly.

I had a Plugin that still ticked down the States for Reserve Actors but it doesnt seem to work well with YEP's Standard Turn Battle System
I didnt test it with the battle engine core nor any battle system plugins before as they werent mentioned.
Ive made a project with just yanfly's battle engine core, the STB system, and the plugin I gave you last and funny enough, Ive observed the opposite issue. the states clear immediately. Loading it before the battle engine core instead of at the end fixed that issue though
just to note, you could have reported your prior thread to have it reopened and said youve encountered a plugin incompatibility you'd like checked out. ill be merging the threads shortly.


I didnt test it with the battle engine core nor any battle system plugins before as they werent mentioned.
Ive made a project with just yanfly's battle engine core, the STB system, and the plugin I gave you last and funny enough, Ive observed the opposite issue. the states clear immediately. Loading it before the battle engine core instead of at the end fixed that issue though
Oh... oops, I didnt know you could do that sorry... my bad... also the plugin is below the battle system plugins

I'm a little bit confused. You posted in the previous post that it worked, but the title of this thread is that, in fact, it didn't work at all. Were you not using STB when you tested before? Have you already tried adjusting the position of the plugin from the previous thread? (It should definitely go below STB at a minimum.)

It's my fault, I only tested it a little to see if it worked and didnt tinker around too much. It works perfectly fine when any other actors do it but when it gets to the last actor in the turn order it doesnt work for some reason? Which is why I didnt know before that it had a weird bug with that till I started doing more in-depth testing and playtesting, my bad
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-states-applied-to-reserve-party-member-still-be-effected-by-the-end-of-a-turn.178404/