Restore Dead Allies To 1 HP After Battle? (Persona 5 Feature)

Status
Not open for further replies.

thecursedcometh

Veteran
Veteran
Joined
Dec 4, 2018
Messages
35
Reaction score
17
First Language
English
Primarily Uses
RMMV
In Persona 5, if an ally dies in battle, they will be automatically revived with 1 HP after the battle. Can this be done with common events, or is a script required? How would I go about making this?
Forgive me if this exists already. Maybe I'm bad at knowing what to look up, but I can't find this anywhere. Not on the master list, not on Google.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,616
Reaction score
1,978
First Language
English
Primarily Uses
RMMV
You can do this with a parallel process common event. Set aside a switch and call it "revive dead"; let's say it has ID 5. Your event should be activated by that switch.

Create a conditional branch for script condition "!$gameParty.inBattle()" and inside that do the following script command:

Code:
$gameParty.deadMembers().forEach(function(member) { member.removeState(1); });
Then turn switch 5 OFF.

Make a battle event (if you're not using shared battle events, you'll need this for all troops) which turns switch 5 ON on turn 0.
 

thecursedcometh

Veteran
Veteran
Joined
Dec 4, 2018
Messages
35
Reaction score
17
First Language
English
Primarily Uses
RMMV
@Trihan that doesn't seem to be working. Am I doing this correctly?
 

Attachments

  • Untitled-2.png
    Untitled-2.png
    58 KB · Views: 4
  • Untitled-3.png
    Untitled-3.png
    18.7 KB · Views: 4

thecursedcometh

Veteran
Veteran
Joined
Dec 4, 2018
Messages
35
Reaction score
17
First Language
English
Primarily Uses
RMMV
Ah, it works now. Had to remove the extra lines. I just saw you edited your post, so that's my bad lol. Thanks!
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ

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.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Where is the "world-weary sigh" comment response when you need it? I need that one more than anything, but the closest we have is "wow" or "angry".
My apologies if it's out-of-place for my goyim-lookin' ass to be the one to say it, but the mythology of "Golems" is that they were created by Rabbis to protect Jewish villages from Anti-semetic attacks.
I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason

Forum statistics

Threads
107,775
Messages
1,032,061
Members
139,919
Latest member
cabanacatalogs
Top