Forced Action Errors

Hi, this is my first time posting so I'm sorry if I posted this in the wrong place or anything. Whenever I use Yanfly's Ace Battle and Core engines most forced actions dont work, most noticeably ones that involve inflicting states or force the actor to perform an attack. When a state-inflicting one is used it just fails and when an attacking one is used the game just freezes/soft locks. I have absolutely no idea why this happens, I didn't mess around with any of the script or anything.

Edit:
Ok so after keeping the game open for a few seconds after it soft locks i end up getting an error message.
"SystemStackError occurred.

stack level too deep"

I've moved this thread to Script Support. Thank you.

I use those scripts and my forced actions work, so I think it would help if we had screenshots of the events where you are doing one so that we can see exactly how you are trying to go about this.

Please use Alt+PrtSc to take the shot so that we only get the active event window, not your whole desktop. Don't crop anything, as we need the info on the left side as well.
I use those scripts and my forced actions work, so I think it would help if we had screenshots of the events where you are doing one so that we can see exactly how you are trying to go about this.

Please use Alt+PrtSc to take the shot so that we only get the active event window, not your whole desktop. Don't crop anything, as we need the info on the left side as well.
unknown.png

unknown (1).png

unknown (2).png
Ok so after keeping the game open for a few seconds after it soft locks i end up getting an error message.
"SystemStackError occurred.

stack level too deep"
Ok so after keeping the game open for a few seconds after it soft locks i end up getting an error message.
"SystemStackError occurred.

stack level too deep"
You changed something. Copy the scripts back in. The stack level is an error that says the code is looping onto itself or you have duplicate code.
You changed something. Copy the scripts back in. The stack level is an error that says the code is looping onto itself or you have duplicate code.
So about 5 minutes ago I tried deleting some scripts and play-testing each time and it turns out a pre-skill effect script I have is somehow causing the error, since when I removed it there were no issues. Problem is I really wanna keep it, is there any way I could modify the script so it doesn't clash or keep causing the error?
a pre-skill effect script I have
You didn't mention that. What script is this? Post a link to it please.
You didn't mention that. What script is this? Post a link to it please.

Yeah my bad, that would've been useful info to have.
we can't help you unless you show us what you have done.

Post a screenshot of the skill as well as the event with the force action command
we can't help you unless you show us what you have done.

Post a screenshot of the skill as well as the event with the force action command
I tried to like 2 hours ago, but it's still awaiting moderator approval apparently. I'll try again.
unknown.png

unknown (1).png

unknown (2).png
I'd say the preskill script is the cause as it is looking to do the effects before the skill goes off, but that is causing the infinite loop. I'd instead look at using the damage formula to do the effects, as there are ways to do it, though I don't remember exactly how off the top of my head.
OK
You don't use the pre-skill effect here, so the error is some form of general incompatibility between two things. It would help to see a screenshot of your materials section to see what it might be incompatible with, because Tsukihime was too good a scripter and her scripts were usually very stable.

That said, what is the effect you're after? Or is this just a random test?
By default common events are executed at the end of the turn, and this does nothing but delay a different skill use to the end of the turn as a result - and if that is all you want, you would be better off to use the speed of the skill with negative values than a force action.
OK
You don't use the pre-skill effect here, so the error is some form of general incompatibility between two things. It would help to see a screenshot of your materials section to see what it might be incompatible with, because Tsukihime was too good a scripter and her scripts were usually very stable.

That said, what is the effect you're after? Or is this just a random test?
By default common events are executed at the end of the turn, and this does nothing but delay a different skill use to the end of the turn as a result - and if that is all you want, you would be better off to use the speed of the skill with negative values than a force action.
unknown.png
unknown (1).png
unknown (2).png
unknown (3).png

unknown (4).png

unknown (5).png
unknown (6).png

I'm having a bit of trouble understanding what you mean. Basically, I need two skills to trigger right after eachother on the same turn. For example going by the screenshots i sent prior, one that does damage and another that heals.
Basically, I need two skills to trigger right after eachother on the same turn.
but then your skill is wrong. The "Pre-skill" script does NOT work automatically, it needs a notetag to be triggered. You have not used that notetag in the skill, so it will not work at the same time - and as said by default the common events only work after all and every other skill action is completed. Please read the instructions on the use of that script on its website.

Please take this as a BIG REMINDER: Scripts need to be configured before they can work, and if you don't include that configuration (in this case the notetag) then nothing will happen.

That said, if all you want is to have the effects at the same time, you don't need a script for that - damage formula coding alone is enough.
Replace your first skill damage formula with the following:
Code:
a.hp += a.mhp*0.1; a.atk * 6 - b.def *2

I haven't tested it but it should work
but then your skill is wrong. The "Pre-skill" script does NOT work automatically, it needs a notetag to be triggered. You have not used that notetag in the skill, so it will not work at the same time - and as said by default the common events only work after all and every other skill action is completed. Please read the instructions on the use of that script on its website.

Please take this as a BIG REMINDER: Scripts need to be configured before they can work, and if you don't include that configuration (in this case the notetag) then nothing will happen.

That said, if all you want is to have the effects at the same time, you don't need a script for that - damage formula coding alone is enough.
Replace your first skill damage formula with the following:
Code:
a.hp += a.mhp*0.1; a.atk * 6 - b.def *2

I haven't tested it but it should work
I'm aware of the notetags, and I have added them to skills already and it's worked just fine, but this specific skill isn't one of the ones I want to use it on. and I'd prefer to have the healing effect take place on a separate skill so it can have an animation, sound effect and message when used. It's not that the effects of these 2 skills need any priority, it's just that i want them to be used on the same turn in general.
In that case you'll have to go bughunting for the incompatibility.

Please follow the link "how to use a script" in my signature, it also contains several steps for bughunting.
My first guess would be to try to change the order of the scripts, moving the pre-effect skill above the battle engine script.
In that case you'll have to go bughunting for the incompatibility.

Please follow the link "how to use a script" in my signature, it also contains several steps for bughunting.
My first guess would be to try to change the order of the scripts, moving the pre-effect skill above the battle engine script.
Changing the pre-effect skill to be above the other scripts definitely helped, now the effect finally does trigger. There's only one issue. There's a skill with two effects, one set to be pre-effect using a notetag, and the other triggering after the attack ends like with the skill i showed in the screenshots. The pre-effect skill plays a voice line for the attack. I didn't just add the voice line to a custom animation because the attack hits 3 times and because of how rpg maker works, it'd play the voice line for each hit, which could get a little repetitive. When I use the attack, the attack works successfully and the healing effect takes place straight afterwards, but the pre-skill effect of playing the voice line doesn't trigger.
In that case you'll have to go bughunting for the incompatibility.

Please follow the link "how to use a script" in my signature, it also contains several steps for bughunting.
My first guess would be to try to change the order of the scripts, moving the pre-effect skill above the battle engine script.
Update: It actually seems like NO pre-skill effects work now.

Original thread: https://forums.rpgmakerweb.com/threads/forced-action-errors.122581/