Scripted battle force action issue.

Hello everyone, I have an issue with a battle handout.

The idea:
  1. A group of 8 friends are ambushed by an enemy group of 4. (Yanflys party member plugin crashes so i'm forced to stick to the default 4 party members)
  2. The battle scene has 8 enemies, 4 of which are flipped sprites hugging the party members side of the battle screen to give the impression they are your allies (the 8 friends)
  3. The enemies 1 at a time are using a forced attack action which results in instant death to the 4 other enemies (allies) indexed 5-8.
  4. However, the forced actions are still for some reason hitting the actual party members dealing damage.
  5. To counter this I gave the party a death immunity status, but if the party member is dealt a fatal blow 0hp they die.
I hope the bullet points explain enough here, I simply want the forced actions to apply only to those indexed enemies and to have 0 effect on the party itself. (They are supposed to stay alive until those forced action victims have fallen.

Can anyone help me with this?
wrong way - the way to solve bugs is to remove their cause so that everything works correctly, not to add more strange effects to hide the bugs. and you do that at least twice.

1) if yanfly's plugin crashes, you should find out why instead of ignoring that. Yanfly programs in a rather stable way, and if one of his plugins crashes it is usually due to something in the project, not because of an instable plugin.

2) If the forced action hits the party members in addition to the enemies, then there is something wrong - in either case no matter how you defined things. In such a case you should search for the problem in the force action, the event or the skill that causes this instead of trying to make the unwanted target immortal.

3) that said, if anyone has an immortal status they can't die from 0HP unless there is something wrong as well.


So to sum up: can you show us screenshots of what you have (including the skills and the troop events and the plugin manager) so that we can check for possible causes to the three different issues you describe?
Pretty much what @Andar said. Just wanted to add if something is going wrong with yanfly stuff it's more often than not due to wrong plugin order. There's a master list of all yep plugins. Follow that.
wrong way - the way to solve bugs is to remove their cause so that everything works correctly, not to add more strange effects to hide the bugs. and you do that at least twice.
Not necessarily hiding bugs per say but avoiding the cause of them to begin with, my method of madness to deviate from a crash was to place 4 enemies dressed up as allies to avoid the use Yanfly's party system plugin, which results in a crash report I have 0 understanding of. But still If I can find a way to simply have allies be actual party members then the better.

1) if yanfly's plugin crashes, you should find out why instead of ignoring that. Yanfly programs in a rather stable way, and if one of his plugins crashes it is usually due to something in the project, not because of an instable plugin.
They are fairly stable, but I have seen alot of random examples of random abrupt crashes even with just simple brand new projects making use of them, but that is irrelevant anyhow.
3) that said, if anyone has an immortal status they can't die from 0HP unless there is something wrong as well.
Turns out that's an error on my part, I had accidentally forgot to place the immunity status on the next turn. The party does survive as a result but through tests when hits 0 hp naturally dies.

So to sum up: can you show us screenshots of what you have (including the skills and the troop events and the plugin manager) so that we can check for possible causes to the three different issues you describe?
Sure, if there is anything missing let me know.

This page simply handles the forced actions at the start, they were intended to kill the 4 on the right.
Force Actions.png


Immunity is removed.
Force Actions2.png

The immunity status set up.
Force Actions3.png

The Party system plugin parameters, assuming to begin with you need to have a maximum of 8 battle members and 8 maximum followers to do the alternative.
Force Actions5.png

And of course that dreaded black/yellow/white screen of a crash report whenever combat begins with the 8 party member parameters are locked in.
Force Actions4.png
1) removing the immortal state even earlier should not cause the actors to die, not unless they received damage through something else.
I suspect that your skills selected in force action are actually targeted at the player and have nothing to do with why the enemies die.
In that case it would be much easier to make different skills of the same name where the target are the allies instead of the enemies and have those skills executed directly.

Because the index of the force action depends on the user and the skill and "index #1" can both mean "enemy #1" or "party member #1" depending on who the skill is supposed to target.
And unfortunately you didn't include a screenshot of the skills in force action to check if they are targeted on allies (correct for this case) or enemies (the party, and why they get damaged and killed)

2) "of undefined" always means that the engine is missing a data object that is currently undefined despite being told to use it.
This can happen in three different ways, and those ways only:
a- you loaded an old and incompatible savefile that is missing data that a new plugin has added into the game. Solution: start a new game in playtest and never load the incompatible savegame file again.
b- you deleted an element of the database that is still used somewhere in the game. For example if you have a battle with an enemy, but deleted the enemy from the database without removing it from the troop, then the troop will crash missing the enemy data.
c- a plugin is configured to require some database entires, and those database entries are missing because they had not been added (the plugin defaults don't check if they are correct, that is your responsibility

I think most likely c in your case, especially if you mixed up programming array index (starts with 0) and engine index (starts with 1)
OK so i've been mostly at work for the past few days so sorry for the response delay.
1) removing the immortal state even earlier should not cause the actors to die, not unless they received damage through something else.
I suspect that your skills selected in force action are actually targeted at the player and have nothing to do with why the enemies die.
In that case it would be much easier to make different skills of the same name where the target are the allies instead of the enemies and have those skills executed directly.

Because the index of the force action depends on the user and the skill and "index #1" can both mean "enemy #1" or "party member #1" depending on who the skill is supposed to target.
And unfortunately you didn't include a screenshot of the skills in force action to check if they are targeted on allies (correct for this case) or enemies (the party, and why they get damaged and killed)
Strangely the attacks relevant are using target definitions, so why they carry onto a party member to me seems irrelevant to what commands I put in, perhaps it's just something yanfly overlooked in creating the combat plugins, who knows at this point. The force actions to me seem to be going rogue on anything that's customized outside the default program. Fortunately using the animation command following a death apply state works adequately although not as impressive looking it does the job.

Because the index of the force action depends on the user and the skill and "index #1" can both mean "enemy #1" or "party member #1" depending on who the skill is supposed to target.
And unfortunately you didn't include a screenshot of the skills in force action to check if they are targeted on allies (correct for this case) or enemies (the party, and why they get damaged and killed)

2) "of undefined" always means that the engine is missing a data object that is currently undefined despite being told to use it.
This can happen in three different ways, and those ways only:
a- you loaded an old and incompatible savefile that is missing data that a new plugin has added into the game. Solution: start a new game in playtest and never load the incompatible savegame file again.
b- you deleted an element of the database that is still used somewhere in the game. For example if you have a battle with an enemy, but deleted the enemy from the database without removing it from the troop, then the troop will crash missing the enemy data.
c- a plugin is configured to require some database entires, and those database entries are missing because they had not been added (the plugin defaults don't check if they are correct, that is your responsibility

I think most likely c in your case, especially if you mixed up programming array index (starts with 0) and engine index (starts with 1)
Frustratingly I can't seem to figure out what or where the file relevant went referring to the crashes, all my files at this point leading to this particular battle crash and i'm forced to essentially start a new game to test them out which is annoying but not impossible to test through.


Sadly I cannot see a way through making additional party members work with this plugin due to a row issue and how it places them, outside the standard chibi graphics for the side view battlers- my own are cropped out of the screen if I have sprites larger than the default.
The error message mentions a plugin called "astfglra.js". If you've renamed a plugin, it will probably not find its plugin parameters (i.e. those parameters will be undefined), which can cause all sorts of problems.

Original thread: https://forums.rpgmakerweb.com/threads/scripted-battle-force-action-issue.138423/