Afterbattle Replenish Mod

Share, discover, or contribute to mods for Persona 5 for PS3 and PS4.
Post Reply
User avatar
A-NB
Posts: 12
Joined: Thu Feb 20, 2020 9:16 pm
Has liked: 5 posts
Been liked: 9 posts

This is a mod that will randomly replenish your party's HP and SP by a random amount after a battle has ended.
Once you're confidant with Oda you'll also get bullet refills.

UPDATE 1.2:

Code: Select all

- The amount of HP/SP gained after a battle now depends on the difficulty setting. 
  Lower difficulties also have a much larger chance to trigger this.
   
  Safe > 9 out of 10 times. +HP and +SP up to 80. Not less than +40.
  Easy > 8 out of 10 times. +HP up to 60, +SP up to 70. Not less than 30 for HP and not less than 15 for SP.
  Normal > 5 out of 10 times. +HP and +SP up to 45. Not less than 20 for HP and not less than 10 for SP.
  Hard > 2 out of 10 times. +HP up to 20, +SP up to 15. Not less than 5 for HP and SP.
  Risky > 5 out of 20 times. +HP and SP up/down to 50.
  
- The amount of HP/SP gained is also now randomized for each party member and no longer a fixed value for everyone.
  
- Bullet refill now triggers with the HP/SP gain. 
  With safe and easy difficulties you will get bullet refills as long as your confidant rank with Oda is 1 and above.
  On normal difficulty you will get bullet refills once you have rank 5 and above.
  On hard difficulty you will get bullet refills once you have rank 5 and above, the chance of bullets being refilled is randomized.
  On Risky there are no refills after battles.
  
- Chance of triggering this on Risky is much lower than on any other difficulty. 
  Not only that but there's a 50-50 chance that you will not gain HP/SP but LOSE HP/SP. Up to 50 points.
>> Download <<

Note that this mod might not be compatible with other mods that replace dngPack.pac.
In that case open the other mods dngPack.pac with: >> Amicitia <<
and replace it's support.bf with the one found in the "Script" folder that's included with the replenish mod.

If there are any issues with this or you have certain ideas to make this even better, please let me know!
Last edited by A-NB on Sun Mar 01, 2020 6:53 am, edited 6 times in total.
User avatar
Alan3D
Posts: 66
Joined: Tue Oct 08, 2019 5:57 am
Has liked: 37 posts
Been liked: 23 posts

Really interesting, i'm ignorant to codding, how does this work? Didn't know adding such a thing was posible.
User avatar
A-NB
Posts: 12
Joined: Thu Feb 20, 2020 9:16 pm
Has liked: 5 posts
Been liked: 9 posts

Alan3D wrote: Sun Mar 01, 2020 3:34 am Really interesting, i'm ignorant to codding, how does this work? Didn't know adding such a thing was posible.
There's a function called "after_battle" inside the support.bf script file found in dngPack.pac (ps3.cpk > field)
that calls a random dialogue and some other things every time a battle has ended.

I've modified said function to include code such as:

Code: Select all

	  if(RND(10) < 5)
	  {
	     int _HP = RND(25);

	     // Fill HP:
		    if(GET_HP(0) + _HP < GET_MAXHP(0))
			{
			   SET_HP(0, GET_HP(0)+_HP);
			}
			else
			{
			   SET_HP(0, GET_MAXHP(0));
			}
		...
The code above checks if a random() function returns less than 5, then triggers another random function that's going to be the value used for the HP replenish. Then simply add that value to the party's current hp value.

In the case of Odas bullet refill i simply added a check if you have a certain ability from oda. Then have it refill the bullets.
User avatar
A-NB
Posts: 12
Joined: Thu Feb 20, 2020 9:16 pm
Has liked: 5 posts
Been liked: 9 posts

Updated (more like rewrote) the mod to take account of difficulty settings.
Changelog:

Code: Select all

- The amount of HP/SP gained after a battle now depends on the difficulty setting. 
  Lower difficulties also have a much larger chance to trigger this.
  
  Safe > 9 out of 10 times. +HP and +SP up to 80. Not less than +40.
  Easy > 8 out of 10 times. +HP up to 60, +SP up to 70. Not less than 30 for HP and not less than 15 for SP.
  Normal > 5 out of 10 times. +HP and +SP up to 45. Not less than 20 for HP and not less than 10 for SP.
  Hard > 2 out of 10 times. +HP up to 20, +SP up to 15. Not less than 5 for HP and SP.
  Risky > 5 out of 20 times. +HP and SP up/down to 50.  
  
- The amount of HP/SP gained is also now randomized for each party member and no longer a fixed value for everyone.
  
- Bullet refill now triggers with the HP/SP gain. 
  With safe and easy difficulties you will get bullet refills as long as your confidant rank with Oda is 1 and above.
  On normal difficulty you will get bullet refills once you have rank 5 and above.
  On hard difficulty you will get bullet refills once you have rank 5 and above, the chance of bullets being refilled is randomized.
  On Risky there are no refills after battles.
  
- Chance of triggering this on Risky is much lower than on any other difficulty. 
  Not only that but there's a 50-50 chance that you will not gain HP/SP but LOSE HP/SP. Up to 50 points.
Post Reply
cron

ShrineFox 2020 - 2023
Support | Progress | Labs | Privacy | Terms
This site is NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Atlus Co., Ltd, Atlus U.S.A., Inc. or Sega Games Co., Ltd, or any of its subsidiaries or its affiliates.