Auto-Life and effects that occur when your state changes

voymasa

Veteran
Veteran
Joined
Jul 25, 2013
Messages
124
Reaction score
18
First Language
English
Primarily Uses
I am attempting to create an effect similar to the auto-life feature of games like Final Fantasy, without using scriptin, wherein when a particular character with that effect on them dies, it revives them and removes that state. The way I currently have it set up, Auto-Life is a State that is placed on a target via an item or spell(skill). I think I need to set up a common event (so that I can just call the common event for each battle event once per turn on don't run) where it checks that State of each party member for Death (state id 1) and if they are dead (conditional branch) I check to see if they have the auto-life state (id 30 for my database; another conditional branch), and if they are it removes death and gives them 50% of their max hp. I know that you can check their current hp (as a variable) because the death state reduces it to 0 (if I remember correctly), but I am having a hard time linking the check to each party member, and checking each of their states. There has got to be a more elegant way than trying to hamfisted jam it through a bajillion conditional branches (especially if you switch battle party members out).

Can someone please show me an elegant way to set up an effect that revives a character when they die (and obviously does a remove_state so it won't continuously prevent death) and restores 50% of their Max Hp? If possible, give both the abstract eventing or whatnot concepts so that they can be applied to other situations, but also the specific example and process for the "auto-life" skill. (I apologize, but everytime I approach this issue and I think I'm going somewhere, my brain locks up when I hit a roadblock; I've tried adding a state, and attempting a conditional branch common event that I call in the battle events, but I can't seem to link it to check for each party member.... i do try to use variables and switches to check as well). Any help would be much appreciated, I can't seem to find something in the forum that is sufficient, and the one other person I saw asking for something similar did not get an answer during the topic (I think it was within the custom formulae topic).
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to VX Ace Support (Tutorials are for completed tutorials, not for requesting help). Please be sure to post your threads in the correct forum next time. Thank you.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You don't want to do it using a huge amount of conditionals and such? Use scripts... that's why we have these in scripts...

that, or live with the idea that this will need lots of event commands
 
Last edited by a moderator:

voymasa

Veteran
Veteran
Joined
Jul 25, 2013
Messages
124
Reaction score
18
First Language
English
Primarily Uses
You don't want to do it using a huge amount of conditionals and such? Use scripts... that's why we have these in scripts...

that, or live with the idea that this will need lots of event commands
I'm still reading through the "help" file (the electronic instruction book that comes with Ace) under the RGSS3 section, to understand the syntax of Ruby so I can script, otherwise, arghhhhh!!!!! so many conditional branches!!!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
with scripts, you can run something at the time a state is applied maybe, check if it's the state[1], which is the dead state... then check if he has auto-life, then revive...

or find the part that handles the addition of the dead state, do shorten things...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I will move this into RGSSx Script Support, as that seems to be the way you've decided to go.
 

voymasa

Veteran
Veteran
Joined
Jul 25, 2013
Messages
124
Reaction score
18
First Language
English
Primarily Uses
with scripts, you can run something at the time a state is applied maybe, check if it's the state[1], which is the dead state... then check if he has auto-life, then revive...

or find the part that handles the addition of the dead state, do shorten things...
I'm looking at the Script Editor right now to see if I can find the status handling for the death state (and maybe add the lines for checking autolife). Ahhh, my head.... so much code and.. barely..... und...er...stand...it.. Uhhhhhhhh.

Under Game_BattlerBase, line 130-135 deals with checking the KO state. Would this be the right lines to add checking the auto-life state, and if true then revive, restore to 50%hp, and remove auto-life state (between ln 134-135)? Or is there a different spot that would be better? I notice on lines 556-561 that it does a determination if you are incapacitated. Would it be better to add the conditional auto-life check between lines 560 and 561?

This is why I need a better understanding of Ruby. In the subclass of Game_BattlerBase, the class Game_Battler has the lines 146-153 dealing with Knockout. I don't know which spot to try and script in the check for auto-life.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I can't help much on that part right now coz I don't have my RM with me... but I guess you can try to CTRL+SHIFT+F and look for add_state(1) or something like that...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top