Yanfly action sequence plugin problems.

So, I put together what I...think...is what I need for a mid-battle sequence I want to do, but I cannot for the life of me get it to behave.


This take the form of a user-targetting skill that does nothing on its own and only serves to unreel the battle sequence. A combat event will start it up with a force action.

Here's the notepad code:

<setup action>

hide battle hud

move actor 2: forward, 50

wait for movement

face actor 2: backward

bgm: stop

common event: 1

face actor 2: forward

motion spell: user

bgm: Battle3

common event: 2

move actor 2: home

face actor 2: forward

show battle hud

</setup action>



I don't know what's going wrong, but the events are basically being skipped entirely or performed in completely random order. For instance, the last time I tested it (I've tested with both playtest and test battle functions) the following happened:

The character never moved or changed facing.

The BGM stopped and the new BGM initiated, but this happened before the character gestured or common event 2 triggered.

Common event 1 never triggered at all. It did randomly trigger in one test, but it happened after common event 2!

So, I must be doing something wrong.
the first guess whenever yanfly's plugins reat strangely is that they might be in the wrong order.

can you give us a screenshot of your plugin manager? The order of yanfly's plugins has to be exactly the same order as it is on his website. You can mix in other plugins if and where you want, but everything yanfly has to be in that specific order.

And if it's not the order, we can use that screenshot to check for compatibility problems with other plugins.
1578177692966.png


looks like a few may be out of order. I'll try resorting them and trying again.
Okay, I got everything in the right order in my plugins and then I went through one step at a time, trying to see what worked and what doesn't. I also created a danger-room map for testing.

This is what the skill notes currently look like:



<setup action>

bgm: stop

wait: 60

move user: forward, 175, 120

wait for movement

face user: backward

wait: 120

common event: 1

wait: 120

face user: forward

wait: 60

bgm: Battle3

motion spell: user

wait: 12

animation 120: user

animation wait: 29

common event: 2

wait: 60

move user: forward, 175, 25

wait for movement

motion swing: user

wait 3

animation 31: enemies

wait for animation

hp 500: enemies show

collapse: enemies, force

</setup action>




Now, in isolation this works pretty much perfectly: the character goes through each step and triggers the common events when they're supposed to. It looks pretty great.

The problem is when I get out of the test-map and try it in the live game. When I get into the actual fight that this skill/scene was designed for, problems crop up again:

The actor will go through all the steps of the scene, but common event 1 never triggers and common event 2 only triggers after all the other steps are completed.

Any idea what's going on here? I've clearly got the actual script working more or less right, but there must be some external factor interfering.

In hopes of getting better feedback, here's the event script for the battle that starts everything off:

1578227835239.png



1578227888235.png


1578227958037.png


1578227996434.png


1578228163271.png



That last force action is what triggers the skill. I'll go ahead and screenshot its stat page too...


1578228285694.png



I'm extra confused because it's obvious that the skill is triggering, otherwise nothing would happen. But it only fails when used in the game, not when used in the isolated test chamber. But I just don't know what could be happening to screw it up.


EDIT: Alternatively, does anyone know how to get the action sequence to display a text box? The main purpose of the common events is to provide the scene with some dialogue during the middle of the action events. Everything else in the common events could be done with the skill sequence itself, I just can't find a way to provide text boxes.
Okay, I've done some more digging. Here's what seems to be the problem:

When performed as a regular skill action everything goes off without a hitch. The problem is that I need this to be a forced action through a combat event. And for some reason making it a forced action breaks the common event triggers. I have no idea why.

Next comes what is possibly the least elegant solution possible: I need this event to trigger on it's own or there's no point, but forcing the action screws everything up.

So there's only one way to make sure this happens...give the skill to the enemy, create an event that adds an invisible state that prevents characters from taking their turns (which has to be removed by the first events of the action sequence to then allow the character who needs to move around to do so), then give the enemy the action sequence skill as their only skill and therefore setting them up to use it when the player's turns are skipped and the enemy's turn comes around.

Then comes the issue of targeting because for some reason I found that the [actor x] designation wasn't working at all (I did eventually figure out that [character x] works but I had already finished). "target" worked, but how do I make sure the enemy targets the person I want them to? I can't use force action, I've got to have the enemy do it themselves. So I use the selection control plugin to make the player I don't want targeted immune to targeting by this skill.

Finally, this made the sequence work. If anyone knows how to deal with the problem of forcing an action sequence I would love for some help for future events.


If anyone cares to see, here's what the final product looks like.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-action-sequence-plugin-problems.116941/