My skill applies a state to the user and a different state to the target, 100% of the time.
Both states are removed from the user and the target at the start of the user's next turn.
Right now there are no other ways to add, remove, or modify these states other than battler death or end of battle, afaik.
The problem: if the skill was used on the user's previous turn, using the skill on the current turn will not apply either state to the user.
That is, after using the skill on any target on his first turn, then targeting himself with the skill on his second turn...
Expectation: both states are applied to the user
Reality: neither state is added to the user
If the user targets anything on the first turn, then targets an ally/enemy on the second turn...
Expectation: state applied to the target, and other state applied to the user.
Reality: state only applied to the target. This state then gets stuck on the target forever.
As long as the skill is not used on consecutive turns, everything works as expected.
=== More details ===
This is a ~3 year old RPG Maker MV project, using RPG Maker MZ version v1.5.0 as the editor with a few of its features.
I'm using like 75 MV plugins in total.
Here's most of the ones related to battle:
YEP_CoreEngine // required for most of these plugins
YEP_BattleEngineCore // default system set to ctb. This does raise issues with states and turn timings.
YEP_TargetCore // lets the skill target enemies, allies, and the user
YEP_BuffsStatesCore // State Settings set to Reapply rules 1 (reset when reapplying an already existing state). Note that the states are not present (afaik) when attempting to reapply them.
YEP_AutoPassiveStates // the state applied to the user makes use of this plugin, but disabling this plugin only disables the state's in-game use.
YEP_X_ActSeqPack1 // this is how I am applying the states, via two action sequence lines: "add state 21: target, (show)" and "add state 22: user, (show)"
YEP_X_ActSeqPack2
YEP_X_ActSeqPack3
YEP_X_BattleSysCTB // the turn order battle system plugin; the problem persists with this disabled and the default battle engine being used
YEP_X_SelectionControl // I'm using this one for its intended purpose, but I'll say that when I first got it and enabled it, it kept most of my custom evented menus outside of battle from working. The very poor javascript I wrote completely broke when I first added this plugin. Since then I have fixed my own code to be more compatible with it (mostly just keeping some things from being undefined at times). None of this happens on the battle screen, but disabling the plugin let my old code seemingly work just fine. So I find this plugin suspicious.
YEP_X_PassiveAuras // same situation as AutoPassiveStates
Olivia_SideBattleUI // req YEP Battle Engine Core; my game's battles are currently built around this plugin. Disabling it (and anything associated with it) leaves the same problem
YEP_Z_PassiveCases // (req AutoPassiveStates) i dont know where to put this plugin in the plugin list order, so I put it below all of the other yanfly ones. It can be disabled and the problem persists, but I plan on using it once I get this problem solved.
SergeofBIBEKActionSequenceLoops // (req Yanfly Battle Engine Core) these three suspicious plugins are great and do what you'd expect. All three can be disabled and the problem persists except for the last one on the list, in which the skill won't really do anything at all without rewriting the skill (copy/pasting the proxy's code to the skill itself).
SergeofBIBEKActionSequenceNestedIF // (req Yanfly Battle Engine Core)
SergeofBIBEKActionSequenceProxy // (req Yanfly Battle Engine Core) this one can be disabled as long as I move the proxy action sequence to the skill's action sequence note tag, in which case the problem persists and all three SergeofBIBEK plugins are disabled.
The Skill
Note:
The target's state: State 21 defended
everything is empty/blank/default, and/or unchecked
The user's state: State 22 Origin
also everything blank/unchecked, except for the Note:
Bear in mind that my goal isn't to simply make this work, it is to understand why it's doing what it is.
There are plenty of other ways to make a simple skill perform the way it's supposed to.
I want to know WHY the states aren't being added every other turn.
Both states are removed from the user and the target at the start of the user's next turn.
Right now there are no other ways to add, remove, or modify these states other than battler death or end of battle, afaik.
The problem: if the skill was used on the user's previous turn, using the skill on the current turn will not apply either state to the user.
That is, after using the skill on any target on his first turn, then targeting himself with the skill on his second turn...
Expectation: both states are applied to the user
Reality: neither state is added to the user
If the user targets anything on the first turn, then targets an ally/enemy on the second turn...
Expectation: state applied to the target, and other state applied to the user.
Reality: state only applied to the target. This state then gets stuck on the target forever.
As long as the skill is not used on consecutive turns, everything works as expected.
=== More details ===
This is a ~3 year old RPG Maker MV project, using RPG Maker MZ version v1.5.0 as the editor with a few of its features.
I'm using like 75 MV plugins in total.
Here's most of the ones related to battle:
YEP_CoreEngine // required for most of these plugins
YEP_BattleEngineCore // default system set to ctb. This does raise issues with states and turn timings.
YEP_TargetCore // lets the skill target enemies, allies, and the user
YEP_BuffsStatesCore // State Settings set to Reapply rules 1 (reset when reapplying an already existing state). Note that the states are not present (afaik) when attempting to reapply them.
YEP_AutoPassiveStates // the state applied to the user makes use of this plugin, but disabling this plugin only disables the state's in-game use.
YEP_X_ActSeqPack1 // this is how I am applying the states, via two action sequence lines: "add state 21: target, (show)" and "add state 22: user, (show)"
YEP_X_ActSeqPack2
YEP_X_ActSeqPack3
YEP_X_BattleSysCTB // the turn order battle system plugin; the problem persists with this disabled and the default battle engine being used
YEP_X_SelectionControl // I'm using this one for its intended purpose, but I'll say that when I first got it and enabled it, it kept most of my custom evented menus outside of battle from working. The very poor javascript I wrote completely broke when I first added this plugin. Since then I have fixed my own code to be more compatible with it (mostly just keeping some things from being undefined at times). None of this happens on the battle screen, but disabling the plugin let my old code seemingly work just fine. So I find this plugin suspicious.
YEP_X_PassiveAuras // same situation as AutoPassiveStates
Olivia_SideBattleUI // req YEP Battle Engine Core; my game's battles are currently built around this plugin. Disabling it (and anything associated with it) leaves the same problem
YEP_Z_PassiveCases // (req AutoPassiveStates) i dont know where to put this plugin in the plugin list order, so I put it below all of the other yanfly ones. It can be disabled and the problem persists, but I plan on using it once I get this problem solved.
SergeofBIBEKActionSequenceLoops // (req Yanfly Battle Engine Core) these three suspicious plugins are great and do what you'd expect. All three can be disabled and the problem persists except for the last one on the list, in which the skill won't really do anything at all without rewriting the skill (copy/pasting the proxy's code to the skill itself).
SergeofBIBEKActionSequenceNestedIF // (req Yanfly Battle Engine Core)
SergeofBIBEKActionSequenceProxy // (req Yanfly Battle Engine Core) this one can be disabled as long as I move the proxy action sequence to the skill's action sequence note tag, in which case the problem persists and all three SergeofBIBEK plugins are disabled.
The Skill
Note:
Code:
<Select Conditions>
Not State: 1
Not State: 21
</Select Conditions>
<target action>
add state 21: target, (show)
add state 22: user, (show)
</target action>
The target's state: State 21 defended
everything is empty/blank/default, and/or unchecked
The user's state: State 22 Origin
also everything blank/unchecked, except for the Note:
Code:
<Custom Turn Start Effect>
var members = target.friendsUnit().aliveMembers();
console.log(target)
for (i = 0; i < members.length; ++i) {
var member = members[i];
if (member && member.isStateAffected(21)) {
member.removeState(21);
target.removeState(22);
break;
}
}
</Custom Turn Start Effect>
Bear in mind that my goal isn't to simply make this work, it is to understand why it's doing what it is.
There are plenty of other ways to make a simple skill perform the way it's supposed to.
I want to know WHY the states aren't being added every other turn.