Hey, everybody! It's been a long time for me, so I hope I'm putting this in the right place!
Also, I've been googling and experimenting for about a week or two with this. Learned a lot, still not getting it. 😀
So, I edited Scene_Map to include a character HUD. It's a pretty basic window that reuses window_status.
Now, in Map_Scene, I have
In Window_Base:
I'm certain the problem is in Map_Scene and will try Shaz's suggestions and attempt to figure that out now.
Thanks everyone!
EDITED heavily as requested to remove most superfluous code and make it easier to read.
Also, I've been googling and experimenting for about a week or two with this. Learned a lot, still not getting it. 😀
So, I edited Scene_Map to include a character HUD. It's a pretty basic window that reuses window_status.
Now, in Map_Scene, I have
Code:
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
$game_variables[219] = 200
super
SceneManager.clear
$game_player.straighten
$game_map.refresh
$game_message.visible = false
create_spriteset
create_all_windows
@menu_calling = false
create_gold_window
create_status_window2
create_status_window3
create_status_windowM
@status_windowM.hide
@status_window3.hide
@status_window2.hide
end
#create status window here
def create_status_window2
@status_window2 = Window_MenuStatus2.new(10, 0)
@status_window2.x = Graphics.width - 200
@status_window2.y = 0
end
def create_status_window3
@status_window3 = Window_MenuStatus3.new(10, 0)
@status_window3.x = 0
@status_window3.y = Graphics.height - 110
end
def create_status_windowM
@status_windowM = Window_MenuStatusM.new(10, 0)
@status_windowM.x = 0
@status_windowM.y = 0
end
#create gold window here
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 2000
@gold_window.y = 0
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
$game_map.update(true)
$game_player.update
$game_timer.update
@spriteset.update
update_scene if scene_change_ok?
if $game_switches[20] == false
@status_window2.hide
else
@status_window2.show
end
if $game_switches[19] == false
@status_window3.hide
else
@status_window3.show
end
if $game_switches[18] == false
@status_windowM.hide
else
@status_windowM.show
end
@status_window2.refresh
@status_window3.refresh
@status_2windowM.refresh
end
In Window_Base:
Code:
#handles gold window?
def value
$game_party.gold
end
def currency_unit
Vocab::currency_unit
end
#--------------------------------------------------------------------------
# * This is the character hud; can be toggled with "q"
#--------------------------------------------------------------------------
def draw_actor_simple_status2(actor, x, y)
contents.font.size = 20
draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
draw_actor_hp(actor, x - 100, y - 15 + 20 * 1)
draw_actor_mp(actor, x - 100, y - 15 + 20 * 2)
# adding parameters below
change_color(normal_color)
contents.font.size = 20
# x start, y start - n + line.height * line, ??, line.height, text
# Did not redefine line height so I can have more control; though consistantly 20
# do not merge values, the '20*n' dictates line height
# draw player name
self.contents.font.color = Color.new(244,244,244)
draw_text(x - 105 , y -10, 120, 20, $game_actors[1].name)
self.contents.font.color = Color.new(244,4,244)
draw_text(x - 105 , y - 10 + 20 * 3, 120, 20, "ATTR")
draw_text(x - 55 , y - 10 + 20 * 3, 120, 20, "SKL+")
draw_text(x - 10 , y - 10 + 20 * 3, 120, 20, "BASE=")
draw_text(x + 45 , y - 10 + 20 * 3, 120, 20, "TOT")
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 4, 120, 20, Vocab::param(2))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40, y - 10 + 20 * 4, 120, 20, $game_variables[15])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 4, 36, 20, actor.param(2), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 4, 120, 20, $game_variables[1])
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 5, 120, 20, Vocab::param(3))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40, y - 10 + 20 * 5, 120, 20, $game_variables[9])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 5, 36, 20, actor.param(3), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 5, 120, 20, $game_variables[2])
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 6, 120, 20, Vocab::param(4))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40 , y - 10 + 20 * 6, 120, 20, $game_variables[16])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 6, 36, 20, actor.param(4), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 6, 120, 20, $game_variables[3])
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 7, 120, 20, Vocab::param(5))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40, y - 10 + 20 * 7, 120, 20, $game_variables[9])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 7, 36, 20, actor.param(5), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 7, 120, 20, $game_variables[4])
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 8, 120, 20, Vocab::param(6))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40, y - 10 + 20 * 8, 120, 20, $game_variables[17])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 8, 36, 20, actor.param(6), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 8, 120, 20, $game_variables[5])
change_color(normal_color)
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105, y - 10 + 20 * 9, 120, 20, Vocab::param(7))
change_color(normal_color)
self.contents.font.color = Color.new(50,154,255)
draw_text(x - 40, y - 10 + 20 * 9, 120, 20, $game_variables[18])
change_color(normal_color)
draw_text(x - 15, y - 10 + 20 * 9, 36, 20, actor.param(7), 2)
change_color(normal_color)
self.contents.font.color = Color.new(0,244,4)
draw_text(x + 50, y - 10 + 20 * 9, 120, 20, $game_variables[6])
change_color(normal_color)
#equipment
contents.font.size = 16
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105 , y + 30 + 16 * 10, 120, 16, "M. Hand")
self.contents.font.color = Color.new(200,223,66)
draw_text(x - 30, y + + 30 + 16 * 10, 120, 16, $game_variables[57])
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105 , y + 30 + 16 * 11, 120, 16, "Offhand")
self.contents.font.color = Color.new(200,223,66)
draw_text(x - 30, y + 30 + 16 * 11, 120, 16, $game_variables[58])
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105 , y + 30 + 16 * 12, 120, 16, "Head")
self.contents.font.color = Color.new(200,223,66)
draw_text(x - 30, y + 30 + 16 * 12, 120, 16, $game_variables[56])
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105 , y + 30 + 16 * 13, 120, 16, "Body")
self.contents.font.color = Color.new(200,223,66)
draw_text(x - 30, y + 30 + 16 * 13, 120, 16, $game_variables[59])
self.contents.font.color = Color.new(0,244,244)
draw_text(x - 105 , y + 30 + 16 * 14, 120, 16, "accessory")
self.contents.font.color = Color.new(200,223,66)
draw_text(x - 30, y + 30 + 16 * 14, 120, 16, $game_variables[60])
end
#created a monster status display
def draw_Monster_Status(target, x, y)
contents.font.size = 20
self.contents.font.color = Color.new(232, 4, 4)
draw_text(x - 100, y - 15, 120, 20, $game_variables[218])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20, 120, 20, Vocab::hp_a)
change_color(normal_color)
if $game_variables[201] * 100 / $game_variables[219] > 50
self.contents.font.color = Color.new(4, 232, 4)
end
if $game_variables[201] * 100 / $game_variables[219] <= 50
self.contents.font.color = Color.new(244,223,66)
end
if $game_variables[201] * 100 / $game_variables[219] <= 25
self.contents.font.color = Color.new(244,4,4)
end
draw_text(x - 50, y - 15 + 20, 120, 20, $game_variables[201])
change_color(normal_color)
draw_text(x , y - 15 + 20, 120, 20, $game_variables[220])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 2, 120, 20, Vocab::param(2))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 2, 120, 20, $game_variables[203])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 3, 120, 20, Vocab::param(3))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 3, 120, 20, $game_variables[204])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 4, 120, 20, Vocab::param(4))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 4, 120, 20, $game_variables[205])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 5, 120, 20, Vocab::param(5))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 5, 120, 20, $game_variables[206])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 6, 120, 20, Vocab::param(6))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 6, 120, 20, $game_variables[207])
change_color(normal_color)
draw_text(x - 100, y - 15 + 20 * 7, 120, 20, Vocab::param(7))
change_color(normal_color)
draw_text(x - 50, y - 15 + 20 * 7, 120, 20, $game_variables[208])
change_color(normal_color)
end
# not a status display; this is the scrolling message window
def draw_actor_simple_status3(actor, x, y)
contents.font.size = 12
# adding parameters below
change_color(normal_color)
if $game_switches[26]
self.contents.font.color = Color.new(244,4,4)
end
if $game_switches[36]
self.contents.font.color = Color.new(4,244,4)
end
if $game_switches[46]
self.contents.font.color = Color.new(244,244,4)
end
if $game_switches[56]
self.contents.font.color = Color.new(244,4,244)
end
draw_text(x - 100, y - 25 + 0, Graphics.width, 12, $game_variables[126])
change_color(normal_color)
contents.font.size = 16
if $game_switches[25]
self.contents.font.color = Color.new(244,4,4)
end
if $game_switches[35]
self.contents.font.color = Color.new(4,244,4)
end
if $game_switches[45]
self.contents.font.color = Color.new(244,244,4)
end
if $game_switches[55]
self.contents.font.color = Color.new(244,4,244)
end
draw_text(x - 100, y - 25 + 12, Graphics.width, 16, $game_variables[125])
change_color(normal_color)
contents.font.size = 20
if $game_switches[24]
self.contents.font.color = Color.new(244,4,4)
end
if $game_switches[34]
self.contents.font.color = Color.new(4,244,4)
end
if $game_switches[44]
self.contents.font.color = Color.new(244,244,4)
end
if $game_switches[54]
self.contents.font.color = Color.new(244,4,244)
end
draw_text(x - 100, y - 25 + 28, Graphics.width, 20, $game_variables[124])
change_color(normal_color)
contents.font.size = 24
if $game_switches[23]
self.contents.font.color = Color.new(244,4,4)
end
if $game_switches[33]
self.contents.font.color = Color.new(4,244,4)
end
if $game_switches[43]
self.contents.font.color = Color.new(244,244,4)
end
if $game_switches[53]
self.contents.font.color = Color.new(244,4,244)
end
draw_text(x - 100, y - 25 + 48, Graphics.width, 24, $game_variables[123])
change_color(normal_color)
contents.font.size = 28
if $game_switches[22]
self.contents.font.color = Color.new(244,4,4)
end
if $game_switches[32]
self.contents.font.color = Color.new(4,244,4)
end
if $game_switches[42]
self.contents.font.color = Color.new(244,244,4)
end
if $game_switches[52]
self.contents.font.color = Color.new(244,4,244)
end
draw_text(x - 100, y - 25 + 72, Graphics.width, 28, $game_variables[122])
change_color(normal_color)
end
I'm certain the problem is in Map_Scene and will try Shaz's suggestions and attempt to figure that out now.
Thanks everyone!
EDITED heavily as requested to remove most superfluous code and make it easier to read.