MV Force Action Causing Error with Certain Plugins...

I'm not sure if anyone will be able to help due to the plugin I'm using here, but I'm at my wits end trying to figure this out. basically I'm using this plugin... https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AlternatingTurnBattle.js

it makes it so turns alternate between you and the enemy. the ONLY issue I'm having is that I'm also using Yanfly's Battle Engine Core... http://www.yanfly.moe/wiki/Battle_Engine_Core_(YEP)

These actually work just fine in every regard, except force actions. I even looked through the two plugins and it "looks" like this was taken into account, but it still throws this error whenever I use a force action with someone.
ScreenShot_4_14_2023_5_45_32.png


So I'm curious if there's anyway to fix this. I've tried numerous things and I either get the force action constantly repeated at the end of the turn, or it never goes to the enemy's turn. I don't quite know enough about how turns/actions work to figure this out on my own, so any help is definitely appreciated.
"of null" means that yo0u tried to reference a data object that does not exist.

Can you give us screenshots of the event that uses force action, to see what exactly that command is set to? Because one way for such an error would be to send force-action to a battler that does not exist in the current troop, and a few similar variants.

Other possibilities are loading an old and incompatible savefile (always test with a new game) or a wrong order of plugins etc.
Event 1.PNG

Here's a screen shot of the command. I only didn't show a wait time since I couldn't fit it all in one picture. it's set to go off on turn 1 and set to turn as far as span goes. The force action here is a basic attack that has an enemy target it's ally, showing a basic attack to the player. then letting the player do one of their own.

I also found this on the site that the Alternate Turns plugin was posted on... https://tm.lucky-duet.com/viewtopic.php?f=5&t=5843&start=90

someone else apparently was also having issues with Force Actions according to a post here. So I'm wondering what's up especially since force actions from both plugins are taken into account at the end of the Alternating Turns plugin or so it seems.
Here's a screen shot of the command.
please try again, and this time without cutting away the important properties of the event, like which event it is and when and where it is triggered.

For example the attack skill can only be used on the battlescreen - which means in a troop event or in a common event attached to a skill - and that event looks like neither
Event 1.PNG

Event 2.PNG

Event 3.PNG


sorry about that... didn't wanna clutter it with a bunch of pics since I don't know how to fit it all in one, but yeah, best to show everything anyways. it's basically for a tutorial fight when you start the game. I wanted one of the enemy's to basically act as a guide to show the player some basics. so I have them use a force action.
yes, that looks better - you see the difference in the force action command that now displays the name of the enemy?

And your explanation gives at least two points where the sequence could have gone wrong:
First, "last target" does not exist on turn 1 before anyone attacked, so any use of that goes nowhere

Second, the regular skill attack is always targeted at the other side, which means that if an enemy uses it it will hit one of the actors. To have an enemy hit another enemy you'll need a skill targeted on an ally - did you change and used a skill that way?
If no it can never work, if yes then you should have given that other skill a different name like "tutorial-Attack" as it is NOT the regular attack skill anymore.
You gave me an idea when you mentioned it being the first turn. regardless of what I put the force action to do, it fails on the first turn. even picking an index instead of last target fails. Though I notice this doesn't happen with either plugin off... No idea why force actions don't work on turn one, but I got them to work on turn 2 and so on. If this is the case, I'll just have to rearrange how I have the player interact with things at the beginning of battles since it seems I can't use force action on turn 1.

thanks for pointing me in the right direction. I'm never sure if I've given people enough info to help so yeah, thanks for having me show more.
I suggest that you check the plugin order in that case.
strange errors when using yanfly plugins are very often caused by the wrong order of plugins.
oh I definitely try to make sure everything is where is should be. almost once a week here I see people having Yanfly plugins in the wrong order lol. I honestly think it's just a conflict between the main two plugins since this still happens when nothing else is on except the 2 of them. It's not a huge deal since force actions do work in the long run.

Original thread: https://forums.rpgmakerweb.com/threads/force-action-causing-error-with-certain-plugins.156681/