Low Health Warning - default battle script

So I noticed that when I was doing a test battle run the game has its own low health indicator in which the color of the party members current HP turns Yellow. (presumingly at 25% and lower)

I'm wondering, how can I make it to where the color changes again at 10% to indicate that the health level is critical?
You can, for sure. I whipped this up really fast--it should do the trick:

#==============================================================================# ** Window_Base#============================================================================== class Window_Base < Window  #--------------------------------------------------------------------------  # * Get Text Colors  #--------------------------------------------------------------------------  def critical_color;    text_color(2);   end;    # Critical  #--------------------------------------------------------------------------  # * Get HP Text Color  #--------------------------------------------------------------------------  def hp_color(actor)    return knockout_color if actor.hp == 0    return critical_color if actor.hp < actor.mhp * 0.1    return crisis_color if actor.hp < actor.mhp / 4    return normal_color  endend # Window_BaseIf you want to change the color, change the number after "text_color" to the corresponding color on the Window graphic.
I'm guessing this goes in window_base? Also...

If you want to change the color, change the number after "text_color" to the corresponding color on the Window graphic.
I don't understand what you are saying? I'm confused.
No, just stick this in a new slot below Materials and above Main in the script editor.
No, just stick this in a new slot below Materials and above Main in the script editor.
Thanks but what about my other question?
You added it after I posted.

The number in "text_color(#)" is the id of the color you'll use. To see what color it is, look at the Window graphic in the Graphics/System folder and check the block of colored squares in the bottom right corner. The very first square's id is 0, the next is 1, and so on; count until you reach the color you want, and replace the "2" in the code I provided with it. (Or you can keep it as is, since 2 is red.)
Works like a charm. Thanks!
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.

Original thread: https://forums.rpgmakerweb.com/threads/low-health-warning-default-battle-script.38210/