How do I create a DnD damage system - where party members taking enough damage kills them outright?

First off, let's hear it for my first post.

Made an account just for this. I'm working with the yanfly ace battle engine, and whatever else was used to make Lisa: The Painful. I'd like some help in making it so that characters basically have a second health bar, equal to the first, that appears whenever they are KO'd. I'd like it so that the KO'd status effect reduces target rate drastically, which I know how to do. What I need help with is the second health bar.

I'd really appreciate any feedback. Even just "that idea sucks" or "this is built in to the engine, dumbass". Or maybe you like the idea. Let me know either way.
I'm assuming that Yanfly Ace Battle Engine does not provide a second health bar? If so, this will need to be moved to script requests as it will take a script to add the bar.
First off, let's hear it for my first post.

Made an account just for this. I'm working with the yanfly ace battle engine, and whatever else was used to make Lisa: The Painful. I'd like some help in making it so that characters basically have a second health bar, equal to the first, that appears whenever they are KO'd. I'd like it so that the KO'd status effect reduces target rate drastically, which I know how to do. What I need help with is the second health bar.

I'd really appreciate any feedback. Even just "that idea sucks" or "this is built in to the engine, dumbass". Or maybe you like the idea. Let me know either way.

... I'm sorry, what are you trying to do? You want... a second health bar to appear when characters are knocked out and that tells enemies to not target them? :LZSskeptic:
... I'm sorry, what are you trying to do? You want... a second health bar to appear when characters are knocked out and that tells enemies to not target them? :LZSskeptic:
Yup. Extra damage done to the character while alive would carry over to this second health bar. If enough is dealt, they are permanently lost.

Rereading my first post, totally neglected the permadeath aspect of it. If they take enough damage, they die outright.
You'll need a script that does some modifications to the combat system. The second health bar is actually mostly incidental - you can simply reset the actor's HP back up to some amount but prevent them from acting while the KO state is on.

The more technical part is that there's a lot of stuff coded into the game that this would mess with - for instance, there's no initial point to modifying the target rate in the KO state because enemies can't consider dead actors as valid targets in the first place.

You'd need to make it so the first time an actor hits 0 HP they get a state other than the default KO, that can have your action restrictions and target rate modifications. Then, if they hit 0 again with that state on, they actually get the KO and you can use eventing to remove them from your party at that point.
You'll need a script that does some modifications to the combat system. The second health bar is actually mostly incidental - you can simply reset the actor's HP back up to some amount but prevent them from acting while the KO state is on.

The more technical part is that there's a lot of stuff coded into the game that this would mess with - for instance, there's no initial point to modifying the target rate in the KO state because enemies can't consider dead actors as valid targets in the first place.

You'd need to make it so the first time an actor hits 0 HP they get a state other than the default KO, that can have your action restrictions and target rate modifications. Then, if they hit 0 again with that state on, they actually get the KO and you can use eventing to remove them from your party at that point.
Thank you very much

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-create-a-dnd-damage-system-where-party-members-taking-enough-damage-kills-them-outright.146887/