Constant HP damage instead of percentage.

A lot of the scrips for this are a bit more complicated. I just wanted something super simple and easy to understand, but I couldn't find it. I think the context is self-explanatory, but feel free to ask a question.
Ruby:
# replaces %n hp damage with constant damage n
# Also wotks for MP and TP, just change the letters
# !NOTE! removes = vars "@result.hp_damage", and "damage".
# Obvs if something else uses those vars it won't work right
class Game_Battler < Game_BattlerBase
    def regenerate_hp
       self.hp += hrg*100
       #perform_map_damage_effect if $game_party.in_battle #uncomment if you want screen flash
    end
end

For reference:
# in game_battler
#--------------------------------------------------------------------------
# * Regenerate HP
#--------------------------------------------------------------------------
def regenerate_hp
damage = -(mhp * hrg).to_i
perform_map_damage_effect if $game_party.in_battle && damage > 0
@result.hp_damage = [damage, max_slip_damage].min
self.hp -= @result.hp_damage
end
#--------------------------------------------------------------------------
# * Regenerate MP
#--------------------------------------------------------------------------
def regenerate_mp
@result.mp_damage = -(mmp * mrg).to_i
self.mp -= @result.mp_damage
end
#--------------------------------------------------------------------------
# * Regenerate TP
#--------------------------------------------------------------------------
def regenerate_tp
self.tp += 100 * trg
end
@Fen_Star I'm happy to approve this topic this time (and thank you for sharing it!), but there are some obvious issues with your scriptlet. For example, I believe the popups will never display when a character takes negative (or even positive) regeneration from a state in your approach, and there will also be no way to prevent slip damage from killing a player even if the designer wants to prevent this (due to the lack of a check against max_slip_damage).
In the future, please work on your scripts and make sure they're at least as good as default RPG Maker functionality before posting them on the Scripts board. (If you need help tuning it up, the people on the Learning Ruby/RGSS board are great!)
@Fen_Star I'm happy to approve this topic this time (and thank you for sharing it!), but there are some obvious issues with your scriptlet. For example, I believe the popups will never display when a character takes negative (or even positive) regeneration from a state in your approach, and there will also be no way to prevent slip damage from killing a player even if the designer wants to prevent this (due to the lack of a check against max_slip_damage).
In the future, please work on your scripts and make sure they're at least as good as default RPG Maker functionality before posting them on the Scripts board. (If you need help tuning it up, the people on the Learning Ruby/RGSS board are great!)

My bad.
I should have posted it like this probably?
Although I am not sure what you mean by no damage popups though?

Ruby:
#--------------------------------------------------------------------------
# * Constant HP, MP and TP Damage instead of percentage
#--------------------------------------------------------------------------
class Game_Battler < Game_BattlerBase
    def regenerate_hp
        damage= -hrg*100
        damage = -(mhp * hrg).to_i
        perform_map_damage_effect if $game_party.in_battle && damage > 0
        @result.hp_damage = [damage, max_slip_damage].min
        self.hp -= @result.hp_damage
    end
   
    def regenerate_mp
        @result.mp_damage = -mrg*100
        self.mp -= @result.mp_damage
    end
   
    def regenerate_tp
        @result.mp_damage = -trg*100
        self.mp -= @result.mp_damage
    end
end

I guess what I was going for was making it for myself, but I didn't consider the usual method of use by others.

Original thread: https://forums.rpgmakerweb.com/threads/constant-hp-damage-instead-of-percentage.128785/