MV "Cannot Move" state breaking my action sequences. Looking for help or work arounds.

Hi all.
Using RMMV with Yanfly action sequences and buff and states core
In my game when a character is attacked they are always moved to a location by action sequences where the animation takes place. If they are suffering from a state that includes the "cannot move" status they aren't moved even with manual movement control in an action sequence. I'd rather the "cannot move" status prevent a player from making an attack and automatically prevent attack/skill selection without restricting actual movement.
So I'm hoping someone can help me with a work around. I'm happy to edit the plug in or core JS if needed but I don't know where to look and what to replace it with. ChatGPT suggested putting this in the state notetag but it didn't help: ```
<Custom Restriction>
if (this.isActor() && BattleManager._phase === 'input') {
value = true; // Prevent action selection during input phase.
} else {
value = false; // Allow movement during the action sequence phase.
}
</Custom Restriction>```
ChatGPT suggested putting this in the state notetag but it didn't help
That makes sense, seeing as how that notetag isnt mentioned by nor exists within yanfly's plugins you mentioned. If it did, i wouldnt have made a plugin to add conditions to state restrictions. Chat GPT frequently just makes things up and should not be used for technical help if you cant discern the garbage it gives you.

Actors not being able to be moved with a state restriction doesnt sound intended, but i am in no position to look into it myself. Can you confirm all your yanfly plugins are in the order they appear in on yanfly's website before anything?

If they are, you could either try editting the BattleManager's nextSubject() function to skip battlers with your states and then remove the restrictions, or use my plugin and make its bypass condition if the actor isnt the inputting actor
That makes sense, seeing as how that notetag isnt mentioned by nor exists within yanfly's plugins you mentioned. If it did, i wouldnt have made a plugin to add conditions to state restrictions. Chat GPT frequently just makes things up and should not be used for technical help if you cant discern the garbage it gives you.

Actors not being able to be moved with a state restriction doesnt sound intended, but i am in no position to look into it myself. Can you confirm all your yanfly plugins are in the order they appear in on yanfly's website before anything?

If they are, you could either try editting the BattleManager's nextSubject() function to skip battlers with your states and then remove the restrictions, or use my plugin and make its bypass condition if the actor isnt the inputting actor
Thanks for that info. Your plug in seems great. I’ll give that a shot.
I basically only know how to change variables with JavaScript so if you have any more advise about what I could put in that note box I’d appreciate it?
I cant test it, but try
Code:
BattleManager._subject != user
As the bypass condition
I cant test it, but try
Code:
BattleManager._subject != user
As the bypass condition
Thank you. I’ll test that as soon as I wake up in 8 hours. I appreciate the help so far.

I tested the code you gave my with the "bypass =" in front of it but no luck. I then tried the below with attacks adding that state as the first thing in setup action but that didn't work either.
```
<Custom Restriction>

bypass = user.isStateAffected(25);

</Custom Restriction>
```
I put your plug in under all the yanfly battle plug ins. I've also looked again and my plugins follow the order list. It makes me think I'm doing something wrong because your plug in is working for you but I don't know what.
<Custom Restriction>
thats not the notetag youd use for it. its in the both the forum page and in the help section in the plugin
thats not the notetag youd use for it. its in the both the forum page and in the help section in the plugin
Yep. That was my bad. Now when I use the state method it works but the "bypass =BattleManager._subject != user" doesn't. I'm more than happy to use the state method if you don't have time to suggest another line I could use.

How would you like credit and is it ok to use in a commercial game?
Now when I use the state method it works but the "bypass =BattleManager._subject != user" doesn't.
I see now that its handled differently than i thought it was outside of the STB system. try
Code:
user._actionState != "inputting"
instead

How would you like credit and is it ok to use in a commercial game?
its ok for use in both commercial and noncommercial. just credit "Robro"
I knew i was forgetting something.
I see now that its handled differently than i thought it was outside of the STB system. try
Code:
user._actionState != "inputting"
instead


its ok for use in both commercial and noncommercial. just credit "Robro"
I knew i was forgetting something.
It's working perfectly now!
I'll be sure to credit you under that and I really appreciate it. Thanks heaps for the help.
Hi Robro. I had one more question for you if that's ok?
The "inputting" status doesn't apply to enemies so I was thinking of having a dummy state that I would apply at the beginning of each attack and then remove at the end of each attack. in the note tag, would the target of the attack be considered the user for the purpose of the status bypass?
For example:
bypass = user.isStateAffected(145) == true
in the note tag, would the target of the attack be considered the user for the purpose of the status bypass?
both "user" and "target" will always be the battler with the state on them.

I was thinking of having a dummy state that I would apply at the beginning of each attack and then remove at the end of each attack
...
bypass = user.isStateAffected(145) == true
that could work, but you'd have to add it to every skill.
After re-reading the thread, i see i got caught up on inputting from the opening post. another angle would be to just check if theyre the target of the current action.

try
Code:
bypass = BattleManager._targets.contains(user)

Original thread: https://forums.rpgmakerweb.com/threads/cannot-move-state-breaking-my-action-sequences-looking-for-help-or-work-arounds.173960/