Max HP/MP/TP changes Gauge Color

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
As the title says, I want the HP/MP/TP changes gauge color when it is at MAX value.

Actually I want it just for TP (Limit Break System), but as long I know how to set one, I can do the rest.

It should be really simple (or hard) cuz I've searched all around and found nothing.

I dont think a pic is necessary...

So you guys are my last resort!

PS: Further but not really necessary, would be cool to have a MAX text inside the gauge...
 
Last edited by a moderator:

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
So I guess there's no way to do it?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
You just need to change the color of the rectangle that's being drawn.
 
Last edited by a moderator:

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
You just need to change the color of the rectangle that's being drawn.
Note that I'm no programmer. I'm just a "self-taught" guy...but 's the point is - I know how to change colors (I did it analyzing other works)

BUT I want it to change only when the TP value is 100%!

It would be something like:

"WHEN $game_actors.tp = 100

change_gauge_color(Color.new(204,170, 255)"

I dont know how to correctly formulate that...
 
Last edited by a moderator:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
#==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This is a super class of all windows within the game.#==============================================================================class Window_Base < Window #-------------------------------------------------------------------------- # * Get Text Colors #-------------------------------------------------------------------------- def tp_gauge_color3; text_color(31); end; # TP gauge 3 def tp_gauge_color4; text_color(32); end; # TP gauge 4 #-------------------------------------------------------------------------- # * Draw TP #-------------------------------------------------------------------------- unless method_defined?:)ex_tpcolor_wb_draw_actor_tp) alias_method:)ex_tpcolor_wb_draw_actor_tp, :draw_actor_tp) end def draw_actor_tp(actor, x, y, width = 124, *args, &block) if actor.tp.to_i == 100 draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color3, tp_gauge_color4) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::tp_a) change_color(tp_color(actor)) draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2) else ex_tpcolor_wb_draw_actor_tp(actor, x, y, width, *args, &block) end end endAs for HP and MP, they are underneath Window_Base, as well (draw_actor_hp, draw_actor_mp, etc). The above code should get you started!Might be an easier way to do what you are wanting, but this is what I came up with in a few minutes.
 
Last edited by a moderator:

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
#==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This is a super class of all windows within the game.#==============================================================================class Window_Base < Window #-------------------------------------------------------------------------- # * Get Text Colors #-------------------------------------------------------------------------- def tp_gauge_color3; text_color(31); end; # TP gauge 3 def tp_gauge_color4; text_color(32); end; # TP gauge 4 #-------------------------------------------------------------------------- # * Draw TP #-------------------------------------------------------------------------- unless method_defined?:)ex_tpcolor_wb_draw_actor_tp) alias_method:)ex_tpcolor_wb_draw_actor_tp, :draw_actor_tp) end def draw_actor_tp(actor, x, y, width = 124, *args, &block) if actor.tp.to_i == 100 draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color3, tp_gauge_color4) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::tp_a) change_color(tp_color(actor)) draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2) else ex_tpcolor_wb_draw_actor_tp(actor, x, y, width, *args, &block) end end endAs for HP and MP, they are underneath Window_Base, as well (draw_actor_hp, draw_actor_mp, etc). The above code should get you started!Might be an easier way to do what you are wanting, but this is what I came up with in a few minutes.
HOLY COW! That's EXACTLY what I wanted! You're the MAN!

Thanks a lot!!
 

tiagoms

Veteran
Veteran
Joined
May 19, 2014
Messages
181
Reaction score
4
Primarily Uses
But, is possible change the color gauge of a specific actor?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top