As the title says, I want the character to be unable to killed by poison (K.O. by slip damage unchecked) but the enemy will be able...
When i check the K.O. by slip damage box, both player and enemy can die by poison and when i uncheck it both cannot die and their hp is remaining to 1...How can i do it?
Enemy can be killed by poison but character not
● ARCHIVED · READ-ONLY
-
-
Since the engine is programmed that way, you need to change the engine - and that requires a script.
[move]Ace Script Request[/move] -
In each Troop Event, make a troop event page, Have a variable equal the enemy's HP and check if its equal to 1 AND have poison state, then add the death state. If equal to 1, add the death state. Here is an example (Appopalisis is the name of the enemy I'm using):

If you are doing multiple enemies, you can reuse the variable and just set it equal to the next enemy's HP like this (Orc Brute is the name of the other enemy)...

As you can see, I couldn't show it all at once, but you see how Appopalisis' section is there and how I then check for the Orc Brute right below it.
With all of this being said, you must uncheck "K.O. by slip damage" Is this what you needed? -
So i have to this for all my troop set ups?
Is there any easier way to do it? -
Only option is to instead make it a common event and just call the common event (so you don't have to copy and paste nothing but "Call Common Even").
The battle itself will fill in who's Enemy ID 1, 2, 3 and so on until it gets to 8 (8 is the default max enemies you can have on a troop at once). Here's an example of what it would look like (I only went up to 3). I suggest going all the way up to 8. If the enemy of the specified ID doesn't exist, the program will just go to the next conditional branch.
Besides this, there is no faster way. But once you change all troop events to do that, it'll be easier to maintain (assuming you have loads of Troops already). -
Oh man...I already copied and pasted the conditionals...;_;
EDIT: Ok, I made the common event already:guffaw: Lol
Thank you very much! Much appreciated :) -
No problem ^_^
-
You can simply insert this snippet between the Materials and Main script slots:
This will prevent the actors from dying from any kind of state damage.SpoilerCode:class Game_Actor < Game_Battler def max_slip_damage return [hp - 1, 0].max end end
Ohh, and for this to work, you must enable the K.O. by Slip Damage option, otherwise your enemies would not die either. -
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Incidentally, there is a scripting solution too if you wish to use it now.