- Joined
- Jul 10, 2013
- Messages
- 11
- Reaction score
- 0
- First Language
- English
- Primarily Uses
So I've got an idea for a game, but I need a custom scriptlet to make some alterations to the default engine.
I'm working with Window_Base primarily, but I'm using some bits I learned from how it's written in Zetu's Alternate MP X script.
This is the tidbit I found in the Zetu script.
class Window_Base < Window #-------------------------------------------------------------------------- # * New method: draw_actor_ampx #-------------------------------------------------------------------------- def draw_actor_ampx(resource, x, y, width) color1, color2 = resource.params[:color] draw_gauge(x, y, width, resource.rate, text_color(color1), text_color(color2)) change_color(text_color(color2)) draw_text(x, y, 30, line_height, resource.params[:abbv][0]) draw_current_and_max_values(x, y, width, resource.value, resource.max, mp_color(resource.battler), normal_color) end #-------------------------------------------------------------------------- # * Overwrite method: draw_actor_mp #-------------------------------------------------------------------------- def draw_actor_mp(actor, x, y, width=124) if actor.resources.nil? actor.setup(actor.id) end width /= actor.resources.size offset = width if actor.resources.size != 1 offset += 2 width -= 1 end for i in 0...actor.resources.size draw_actor_ampx(actor.resources, x+offset*i, y, width) end end endSo going from there and the plans I have, I need a script that looks like this:
class Window_Base < Window #--------------------------------------------------- # * New HP Colors #--------------------------------------------------- def hp_gauge_color3; text_color(20); end; # HP gauge 3 def hp_gauge_color4; text_color(21); end; # HP gauge 4 def hp_gauge_color5; text_color(20); end; # HP gauge 1 def hp_gauge_color6; text_color(21); end; # HP gauge 2 #-------------------------------------------------------------------------- # * Overwrite method: draw_actor_mp #-------------------------------------------------------------------------- def draw_actor_hp(actor, x, y, width = 124) if actor_id == 1 draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color3, hp_gauge_color4) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) elseif actor_id == 2 draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color5, hp_gauge_color6) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) else draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) end endI think I'm fairly close to what I wanted, but I'm not sure what else it might need. Can someone help?
I'm working with Window_Base primarily, but I'm using some bits I learned from how it's written in Zetu's Alternate MP X script.
This is the tidbit I found in the Zetu script.
class Window_Base < Window #-------------------------------------------------------------------------- # * New method: draw_actor_ampx #-------------------------------------------------------------------------- def draw_actor_ampx(resource, x, y, width) color1, color2 = resource.params[:color] draw_gauge(x, y, width, resource.rate, text_color(color1), text_color(color2)) change_color(text_color(color2)) draw_text(x, y, 30, line_height, resource.params[:abbv][0]) draw_current_and_max_values(x, y, width, resource.value, resource.max, mp_color(resource.battler), normal_color) end #-------------------------------------------------------------------------- # * Overwrite method: draw_actor_mp #-------------------------------------------------------------------------- def draw_actor_mp(actor, x, y, width=124) if actor.resources.nil? actor.setup(actor.id) end width /= actor.resources.size offset = width if actor.resources.size != 1 offset += 2 width -= 1 end for i in 0...actor.resources.size draw_actor_ampx(actor.resources, x+offset*i, y, width) end end endSo going from there and the plans I have, I need a script that looks like this:
class Window_Base < Window #--------------------------------------------------- # * New HP Colors #--------------------------------------------------- def hp_gauge_color3; text_color(20); end; # HP gauge 3 def hp_gauge_color4; text_color(21); end; # HP gauge 4 def hp_gauge_color5; text_color(20); end; # HP gauge 1 def hp_gauge_color6; text_color(21); end; # HP gauge 2 #-------------------------------------------------------------------------- # * Overwrite method: draw_actor_mp #-------------------------------------------------------------------------- def draw_actor_hp(actor, x, y, width = 124) if actor_id == 1 draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color3, hp_gauge_color4) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) elseif actor_id == 2 draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color5, hp_gauge_color6) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) else draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2) change_color(system_color) draw_text(x, y, 30, line_height, Vocab::hp_a) draw_current_and_max_values(x, y, width, actor.hp, actor.mhp, hp_color(actor), normal_color) end endI think I'm fairly close to what I wanted, but I'm not sure what else it might need. Can someone help?

