Death Removal Issue

Hello gang, I'm having an issue I was hoping someone more skilled than myself could help me with. So my game has an optional permadeath mode, I use a plugin for that I will post a link to below. For the most part it all works fine, except for in certain battle types.

I have a standard 4 person group but there are optional battles that are say 1 on 1 and 2 on 1. To accomplish this I use the plugin command changemaxparty size to 1 before the battle and then after the battle I change it back to a 4 person group. This is a command from Yanfly's party plugin. Now normally after the battle dead members are removed from the group and considered permadead, but when there's less party members like listed above if they all die the game is over when there are technically still live party members. This defeats the purpose of the purpose for having the permadeath option if it doesn't work on many fights.

What I am hoping is for a way to remove the party member completely when this situation arises, and bypass the forced game over. I can create troop conditions to abort the battle if the live actor hits 0 hp but this stops him from dying so the plugin doesn't remove him, so maybe a parallel process to monitor for if anyone is at 0 HP. I have tried a bunch of things but have not yet been able to get the removal to work properly.

Side not I have a ton of recruitable actors so ideally a script to check for a state or something like that would be much nicer than having to create conditions for each actor. I have a script "I though I could butcher to make work in this situation but so far no luck, I thought maybe someone knows how to alter it properly so I'll port it just in case.

$gameParty.battleMembers().forEach(function(actor) { if (actor.isAlive()) { actor.addState(4, 1); }})

So yeah sorry for the wall of text there but I hope someone can help here this is becoming an annoying bug. Thanks for taking the time to have a look.



If the battles where this is happening are evented, just click on the box 'Can Lose'.
The battles are evented but the plugin only works if there is no Can Lose so I removed that on all my battles to make it work.
Does the plugin work if you kill off the actor after a battle?
No it does not, but I went ahead and removed the plugin and put together my own permadeath system, with variables for each actors hp and a parallel process that monitors for when an actor hits <= 1Hp. I just finished testing it all and it seems to be working fine, it's just way more convoluted than I had hoped for. I had to set if actor hp <=1Hp = death because I re-added the can lose condition to my battles, which puts the actor at 1hp when he should have died. Other than that the systems working perfect it just added a lot more work when creating future characters.
The permadeath plug in is not working, any solution?
@Iohiko It would make more sense to post the question in the plugin's thread than in someone else's 6-year old thread about a different question.

This is a very old plugin and might not be compatible with the latest version of MV.

As a general rule, any time a plugin appears to not be working, try pressing F8 during the playtest, go to the Console tab, see if there are any errors.
Necro-post notice: @Iohiko

As @ATT_Turan has noted, questions about a specific plugin can be better accommodated in any dedicated threads they have, or at least a fresh support thread if desired.

Original thread: https://forums.rpgmakerweb.com/threads/death-removal-issue.79722/