ok, so I played around with changing the color of the title HP in Window_BattleStatus so that when in battle, 'HP' is shown green. this was just a simple way to try to alias methods, though Im not sure if this is done correctly.
This DOES change the Name of 'HP', but I am curious if this would be no-no for compatibility? Essentially, I re-wrote def refresh so that it calls my method draw_colored_hp instead of draw_actor_hp.
Basically, in terms of compatibility and/or scripting ettiquette, is this acceptable?
Man, I suck at this!
Code:
HP_COLOR = Color.new(128, 255, 128, 255) # Green
# this constant is just here to make it configurable, even though
# it could be just placed below...
class Window_BattleStatus
# I doubt if I even need the alias, as the new refresh method
# directly calls the color edit method.
alias draw_colored_hp draw_actor_hp
def draw_colored_hp(actor, x, y, width = 144)
draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = HP_COLOR
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# This is to change the color of 'HP' or whatever the game
# calls it. As this is a test, I am just
# trying to see if this is acceptable practice.
end
def refresh
# This method directly calls the color edit method, so I don't
# think I need the alias above. However, if I do not change
# the refresh method to call my method, then mine never gets
# called, alias or not... I don't understand the right way to
# use alias maybe?
for i in 0...$game_party.actors.size
actor = $game_party.actors
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_colored_hp(actor, actor_x, 32, 120) #changed from draw_actor_hp
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end