MP Death

As of late, I've been experimenting with some battle scripting, and as a big fan of SOTET's MP death feature, I've been trying to recreate it for my own RMVXAce games, and so far, I've worked out this line of code:

@hp == 0 || @mp == 0 ? add_state(death_state_id) : remove_state(death_state_id)So far, it's worked well, but during some playtests, I ran into a bit of an issue. When an actor's MP hits 0, they die, but they also lose all of their HP. Curiously, this does not work the other way around; an actor that loses all of their HP still dies, but retains their MP value. The main issue here is consistency, and I haven't been able to figure out how to make it so, which is why I'm posting here now.
I believe the problem is that the death status itself will remove HP to zero since that what the normal occurrence is. So that when you inflict the Death status via a no damage ability for example, you die and HP is brought down to 0.

I am guessing that you want when a character's MP becomes 0 it dies, but retains HP? You'd have to make a new state for that.

Or maybe you want that MP to be lost as well, in which case you can edit the games original Death status to reduce MP to 0.

Might help if you explain what you want the outcome to be, I have no idea what SOTET is,  as I'm sure others won't either.
I believe the problem is that the death status itself will remove HP to zero since that what the normal occurrence is. So that when you inflict the Death status via a no damage ability for example, you die and HP is brought down to 0.

I am guessing that you want when a character's MP becomes 0 it dies, but retains HP? You'd have to make a new state for that.

Or maybe you want that MP to be lost as well, in which case you can edit the games original Death status to reduce MP to 0.

Might help if you explain what you want the outcome to be, I have no idea what SOTET is,  as I'm sure others won't either.
Ah, the outcome I'm looking for would be that when an actor's MP becomes 0, they die, but HP is retained, since that is how it worked in the "SOTET" I mentioned, which is Star Ocean: Till the End of Time.
After a bit of searching, I think I've found your culprit in Game_Battler:

 #--------------------------------------------------------------------------  # * Knock Out  #--------------------------------------------------------------------------  def die    @hp = 0    clear_states    clear_buffs  endSo, try commenting out that first line and see if that fixes your problem.
After a bit of searching, I think I've found your culprit in Game_Battler:

 #--------------------------------------------------------------------------  # * Knock Out  #--------------------------------------------------------------------------  def die    @hp = 0    clear_states    clear_buffs  endSo, try commenting out that first line and see if that fixes your problem.
Thanks, it worked. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/mp-death.24397/