RemiliaTSM

Warper
Member
Joined
Aug 11, 2015
Messages
4
Reaction score
0
First Language
Norwegian
Primarily Uses
Hello.

 

I'm trying to create an auto-revive skill that revives the player if they die within, say, 3 turns of the spell being cast.

 

How can I do that?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,685
Reaction score
8,492
First Language
German
Primarily Uses
RMMV
That will require a script because player death otherwise ends the game and the death state removes all other states.


I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
Non-Script Method:

Normal death protection is being done by disable the Death State (in features) in the protection skill+state(for x turns). But that just prevents the player from dying not reviving. The other method is to use regeneration states (but this will not prevent death).

But combining both (Invincible at hp 1 minimum + auto regenerate) can make a similar state to do what you need without a script.

If you don't want the healing and just want to prevent death, just add a state that prevent death state will do the trick, the actor will stay at 1hp and not dying as long as he/she has that state applied.

Script Method:

Actor's states are all removed when they are dead (except the death state), making it hard to run a state after death without proper scripting.

So what you really want, will need a script that prevent the revive state being removed, prevent death state from being applied at hp 0, and heal the actor when hp = 0. Which, in the end, is very similar to the non-script method above. Plus using extra scripts that you don't really need adds to the chance of script conflicts and game crash.

But if you really must use a script, let me know and i'll see if i can make one.

Edit:

Script's done, paste it below Material and above Main

Did a small test with it and it's working fine, let me know if you run into any problem.

Script Link:

http://forums.rpgmakerweb.com/index.php?/topic/51604-auto-revive-state/
 
Last edited by a moderator:

RemiliaTSM

Warper
Member
Joined
Aug 11, 2015
Messages
4
Reaction score
0
First Language
Norwegian
Primarily Uses
That will require a script because player death otherwise ends the game and the death state removes all other states.I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
  Okay, wasn't aware that it was in the wrong section, sorry about that.

Non-Script Method:

Normal death protection is being done by disable the Death State (in features) in the protection skill+state(for x turns). But that just prevents the player from dying not reviving. The other method is to use regeneration states (but this will not prevent death).

But combining both (Invincible at hp 1 minimum + auto regenerate) can make a similar state to do what you need without a script.

If you don't want the healing and just want to prevent death, just add a state that prevent death state will do the trick, the actor will stay at 1hp and not dying as long as he/she has that state applied.

Script Method:

Actor's states are all removed when they are dead (except the death state), making it hard to run a state after death without proper scripting.

So what you really want, will need a script that prevent the revive state being removed, prevent death state from being applied at hp 0, and heal the actor when hp = 0. Which, in the end, is very similar to the non-script method above. Plus using extra scripts that you don't really need adds to the chance of script conflicts and game crash.

But if you really must use a script, let me know and i'll see if i can make one.

Edit:

Script's done, paste it below Material and above Main

Did a small test with it and it's working fine, let me know if you run into any problem.

Instructions in script.

#==============================================================================# ■ Meow Face Auto Revive#------------------------------------------------------------------------------# Auto Revive when dead#==============================================================================module MEOWREVIVE #DO NOT REMOVE!#==============================================================================# Settings Area#==============================================================================  STATE_ID = 28 #State ID that auto revive when dead  HEAL_PERCENT = 10 #HP% to heal when revive  ANIMATION_ID = 42 #Animation to Play when revived#==============================================================================# End of Settings Area# Edit anything past this line at your own risk!#==============================================================================endclass Game_Battler < Game_BattlerBase  def die    if state?(MEOWREVIVE::STATE_ID)      @hp = [mhp * MEOWREVIVE::HEAL_PERCENT / 100, 1].max      @animation_id = MEOWREVIVE::ANIMATION_ID    else      @hp = 0    end    clear_states    clear_buffs  endend
Dude, thanks a lot! Couldn't find a script for it anywere, but it seems the RPG Maker community is a massive bunch of good guys and gals! I appreciate your help, and credit will be given! (Even though it's just a small practice game I'm making for my friends.)

Might use it in future works though, but all credit goes to you!
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
You are welcome, updated the script to add compatibility. You can now choose to disable/enable states clear for the revive state.
 

RemiliaTSM

Warper
Member
Joined
Aug 11, 2015
Messages
4
Reaction score
0
First Language
Norwegian
Primarily Uses
You are welcome, updated the script to add compatibility. You can now choose to disable/enable states clear for the revive state.
Not to be demanding or anything, but would it be possible to trigger the autorevive by using a spell/skill?
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
yes, simply add that state to skill/item just like you normally will add a state to skill/item.
 

Latest Threads

Latest Profile Posts

My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...
Terribly depressed. Worst birthday I've had in years, no motivation to work on anything. Still no income. At least I've got my computer running again.
Doing RPG Maker News for 19th September 2021

Stream will be live with some Dark Souls 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
115,205
Messages
1,088,026
Members
149,781
Latest member
delwin
Top