Low Health Warning - default battle script

Status
Not open for further replies.

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
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?
 

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
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.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
No, just stick this in a new slot below Materials and above Main in the script editor.
 

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
No, just stick this in a new slot below Materials and above Main in the script editor.
Thanks but what about my other question?
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
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.)
 

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
Works like a charm. Thanks!
 

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,884
First Language
English
Primarily Uses
N/A
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.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top