SAS IV - HP/MP Drain

atmanSeijo

Veteran
Veteran
Joined
Apr 20, 2016
Messages
30
Reaction score
3
First Language
English
Primarily Uses
RMMV
Hello all,


So I've been using Sapphire Action System IV, and things are going mostly smoothly. However, once I got into enemies that apply poison, I noticed that the health bar doesn't drain. I opened the menu to check, and the HP does drain. When I closed the menu, the HUD updated and the bar dropped to the correct level. So it seems that the HUD doesn't update when taking damage from a status effect. I'm not a programmer, but I can imagine that the system only updates the HUD when taking damage from an attack or skill (or when using skills for MP). I was wondering if anyone could come up with a script that updates the HUD every few steps.


To be clear, specifically NOT only when the player is poisoned, because I also has a status effect that drains MP in the same way.


Any help is appreciated!


-Atman
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
Insert this script below the SAS scripts:

# SAV IV - HUD fix for HP/MP/TP Regen

class Game_Battler < Game_BattlerBase

alias fix_sas_hud8822 regenerate_hp
def regenerate_hp
old_hp = self.hp
fix_sas_hud8822
$game_map.sas_hud.refresh_bars if old_hp != self.hp
end

alias fix_sas_hud1122 regenerate_mp
def regenerate_mp
old_mp = self.mp
fix_sas_hud1122
$game_map.sas_hud.refresh_bars if old_mp != self.mp
end

alias fix_sas_hud5522 regenerate_tp
def regenerate_tp
old_tp = self.tp
fix_sas_hud5522
$game_map.sas_hud.refresh_bars if old_tp != self.tp
end

end



This should remedy your issue.
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,545
Members
137,834
Latest member
EverNoir
Top