Okay, here it is. Just replace your Window_Status script with this:
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
def draw_alignment(id, x, y)
src_rect = Rect.new(0, 0, 185, 40)
self.contents.blt(x, y, RPG::Cache.picture("Good-Bad"), src_rect, 255)
a = $game_variables[id]
if a > 80
a = 80
end
if a < -80
a = -80
end
src_rect = Rect.new(0, 0, 30, 30)
self.contents.blt(78 + x + a,y + 4, RPG::Cache.picture("Good-Bad Icon"), src_rect, 255)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
if (@actor.id == 1)
draw_alignment(4, 320, 120)
end
self.contents.draw_text(320, 160, 96, 32, "Equipment")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
end
end
The only things I added were this:
def draw_alignment(id, x, y)
src_rect = Rect.new(0, 0, 185, 40)
self.contents.blt(x, y, RPG::Cache.picture("Good-Bad"), src_rect, 255)
a = $game_variables[id]
if a > 80
a = 80
end
if a < -80
a = -80
end
src_rect = Rect.new(0, 0, 30, 30)
self.contents.blt(78 + x + a,y + 4, RPG::Cache.picture("Good-Bad Icon"), src_rect, 255)
end
and this:
if (@actor.id == 1)
draw_alignment(4, 320, 120)
end
This second part, you have to edit. The way I did it (most scripters hate doing this, but I think it makes it easier for the user), is I have the alignment meter controlled by an in-game variable. I.E., one of the variables you control with the event command Control Variables. The things you have to edit are the numbers in that second segment I just posted.
The 1 in if (@actor.id ==
1) is the ID of your main hero. The 4 in draw_alignment(
4, 320, 120) is the ID of the variable you want to use to control alignment. The 320 is the x-coordinate and the 120 is the y-coordinate. Once the hero hits 80 or -80, the meter will stop advancing if he gets more good or more evil.
So, basically, if you add 1 to the variable, the meter will move 1 pixel to the right, and if you subtract 1, it will move one pixel to the left.
You can edit the look of the bar, that was just something I made quickly in paint. Try to keep it the same width and height. If you want any edits and don't know how to script them in, just post back and I will make the necessary adjustments. (For example, if you wanted a larger bar, or if you want a wider range then 160... etc...). Also, if you don't understand something, post back.