Player completely heals after battle?

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I want one of my characters to completely recover all HP and MP after each battle she fights. I found a script for that, but I have not been able to make it work, and the thread is 3 years old and archived. Can anyone help?
 

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 RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Just post a link to the thread.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Sorry 3:

http://www.rpgmakervxace.net/topic/3239-restoreset-after-battlelevel/

'Twas this. I thought I was using it right but I guess not. Here are the parts I changed:

Code:
#Restore after battle for specific actors only:RAB_SPECIFIC_ACTORS_B = true#Array of actor id'sRAB_ACTORS_B = [4]#HPSETTYPE and MPSETTYPE# Set to 0 for setting of hp/mp to a specific number after battle.# Set to 1 for setting of hp/mp to a specific percentage after battle.# Set to 2 for adding to hp/mp by a certain percentage of maxhp/maxmpHPSETTYPE = 2     MPSETTYPE = 2
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
As an alternative, you could do this without a script.

[SIZE=10.5pt]If it's an evented encounter, you can just use the "Full Recovery" command in the first tab of the events command window (under the actors tab).  Specify the actor if it is only one.[/SIZE]

[SIZE=10.5pt]If it's a random encounter, you'll have to add the "Full Recovery" command in the troops page of the database, giving it to spawn at 'End of Battle'.  Again specify the particular actor if needed.[/SIZE]

[SIZE=10.5pt]If you want a percentage instead of full recovery, just specify what you want.  If you want a fixed amount, then use the Change HP, Change MP commands.[/SIZE]
 
Last edited by a moderator:

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV
You don't need a script, lol. Just have a switch turn on in every encounter, and then an auto-start event under common events that runs when the switch is on. The auto-start event then fully heals the characters and turns itself off again.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
As an alternative, you could do this without a script.

[SIZE=10.5pt]If it's an evented encounter, you can just use the "Full Recovery" command in the first tab of the events command window (under the actors tab).  Specify the actor if it is only one.[/SIZE]

[SIZE=10.5pt]If it's a random encounter, you'll have to add the "Full Recovery" command in the troops page of the database, giving it to spawn at 'End of Battle'.  Again specify the particular actor if needed.[/SIZE]

[SIZE=10.5pt]If you want a percentage instead of full recovery, just specify what you want.  If you want a fixed amount, then use the Change HP, Change MP commands.[/SIZE]
I can't find an "end of battle" option.

 

You don't need a script, lol. Just have a switch turn on in every encounter, and then an auto-start event under common events that runs when the switch is on. The auto-start event then fully heals the characters and turns itself off again.
 

You're going to have to be more specific. Also, after a battle I want the player to be able to open up the menu and see that the character is completely healed, instead of just being healed when a new battle begins. Specifically so that she can't use the healing items in it.
 
Last edited by a moderator:

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV
That would heal the character automatically after every battle.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
That would heal the character automatically after every battle.
No I mean be specific in what kind of switch you're talking about, and what would be activated by the switch. Just telling me to turn a switch on and off doesn't let me know what to do.

Give me an example or something. I am a visual learner, so in lieu of visuals you have to be reeeaaally specific with me.

EDIT: Should this be moved back to the other forum...?
 
Last edited by a moderator:

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I would turn the switch off AFTER doing the healing. And it can also be a parallel process event - doesn't have to be autorun.


Are you happy to set that up for every battle? If you'd rather a scripted solution, I can give you one.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Actually, I found that all I need to do is put a "Recover All" parallel process on the map. But, thanks for trying to help out guys.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
That means you're never going to get slip damage or damage from terrain.


Also, bad idea to have a parallel process running ALL THE TIME for something that's ONLY ever going to happen the moment you end a battle. Bad design choice there, and you're going to end up with lag in your game as a result, especially if this is your "go-to" solution for a number of issues.


If you HAVE to use a parallel process (do it as a common event, not a map event), add a Wait 30 Frames to it, so it's not trying to do it 60 times a second.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
The only time this is used is during specific and relatively small puzzle maps (which have no slip damage or terrain damage) where there are only two parallel processes running at the same time. Just two. I don't use parallel processes as a "go-to" solution, I would expect you of all people to know that it's usually scripts with me. And I currently have 25 user scripts, which is a lot since I remember someone telling me most developers only have one or two. I don't want to add any more unless absolutely necessary.

I see no problem in using a parallel process for this if there are literally only two for each map this is needed for, including this process. But I did do what you said about the common event, and it works fine.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,855
Messages
1,017,007
Members
137,563
Latest member
MinyakaAeon
Top