Can anyone tell me why this RMXP code:
Fails to display this picture:
On this menu:
Would greatly appreciate any help possible
Code:
#_______________________________________________________________________________
# MOG Scene Status Eva V1.2
#_______________________________________________________________________________
# By Moghunter
# [url=http://www.atelier-rgss.com]http://www.atelier-rgss.com[/url]
#_______________________________________________________________________________
module MOG
#Transition Time.
MST_TT = 10
#Transition Type(Name).
MST_TTT = "004-Blind04"
# Set Maximum (STR,DEX,AGL,INT)
MST_ST = 999
# Set Maximum (ATK,PDEF,MDEF)
MST_STE = 999
end
$mogscript = {} if $mogscript == nil
$mogscript["menu_eva"] = true
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
###############
# Window_Base #
###############
class Window_Base < Window
def nada2(actor)
face = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
end
def draw_heroface4(actor,x,y)
face = RPG::Cache.picture(actor.name + "_fc2") rescue nada2(actor)
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
if face == RPG::Cache.battler(actor.battler_name, actor.battler_hue)
self.contents.blt(x + 40 , y - ch - 240, face, src_rect) #x + 45 , y - ch - 150
else
self.contents.blt(x , y - ch, face, src_rect)
end
end
def draw_actor_parameter2(actor, x, y, type)
back = RPG::Cache.picture("STBAR_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 50 , y - ch + 20, back, src_rect)
meter = RPG::Cache.picture("STBAR.png")
case type
when 0
parameter_value = actor.atk
cw = meter.width * actor.atk / MOG::MST_STE
when 1
parameter_value = actor.pdef
cw = meter.width * actor.pdef / MOG::MST_STE
when 2
parameter_value = actor.mdef
cw = meter.width * actor.mdef / MOG::MST_STE
when 3
parameter_value = actor.str
cw = meter.width * actor.str / MOG::MST_ST
when 4
parameter_value = actor.dex
cw = meter.width * actor.dex / MOG::MST_ST
when 5
parameter_value = actor.agi
cw = meter.width * actor.agi / MOG::MST_ST
when 6
parameter_value = actor.int
cw = meter.width * actor.int / MOG::MST_ST
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y - 2, 36, 32, parameter_value.to_s, 2)
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 50 , y - ch + 20, meter, src_rect)
end
def draw_maphp5(actor, x, y)
back = RPG::Cache.picture("BAR")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("HP_Bar2")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y - 1, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y - 2, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)
end
def draw_mapsp5(actor, x, y)
back = RPG::Cache.picture("BAR")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65 , y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("SP_Bar2")
cw = meter.width * actor.sp / actor.maxsp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65 , y - ch + 30, meter, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y - 1, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y - 2, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)
end
def draw_mexp5(actor, x, y)
bitmap2 = RPG::Cache.picture("Exp_Back")
cw = bitmap2.width
ch = bitmap2.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
bitmap = RPG::Cache.picture("Exp_Meter")
if actor.level < 99
cw = bitmap.width * rate
else
cw = bitmap.width
end
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 51, y + 6, 84, 32, actor.next_rest_exp_s.to_s, 1)
self.contents.font.color = Color.new(55,255,55,0)
self.contents.draw_text(x + 52, y + 1, 84, 32, actor.next_rest_exp_s.to_s, 1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 45, y + 6, 84, 32, "N",0)
self.contents.font.color = Color.new(255,255,255,0)
self.contents.draw_text(x + 44, y + 8, 84, 32, "N",0)
self.contents.font.color = Color.new(0,0,0,0)
self.contents.draw_text(x + 10, y + 5, 30, 32, actor.level.to_s, 1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 11, y + 6, 30, 32, actor.level.to_s, 1)
end
end
##################
# Window_Status2 #
##################
class Window_Status < Window_Base
def initialize(actor)
super(0, 0, 660, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
self.opacity = 0
refresh
end
def refresh
self.contents.clear
self.contents.font.name = "OCR A Extended"
draw_actor_name(@actor, 60, -3)
draw_actor_class(@actor, 302, -3) #needs to go left
draw_mexp5(@actor,310,130)
draw_actor_state(@actor, 500, 20) #down?
draw_maphp5(@actor, 256, 165) #275
draw_mapsp5(@actor, 440, 165) #430
draw_actor_parameter2(@actor, 286, 108, 0)
draw_actor_parameter2(@actor, 465, 137, 1)
draw_actor_parameter2(@actor, 465, 108, 2)
draw_actor_parameter2(@actor, 286, 53, 3)
draw_actor_parameter2(@actor, 465, 53, 4)
draw_actor_parameter2(@actor, 286, 80, 5)
draw_actor_parameter2(@actor, 465, 80, 6)
self.contents.font.color = menu_color
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 228)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 258)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 288)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 318)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 348)
end
def dummy
self.contents.font.color = menu_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
###############
# Window_Face #
###############
class Window_Face < Window_Base
def initialize(actor)
super(0, -20, 300, 520)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_heroface4(@actor,10,485)
end
end
################
# Scene_Status #
################
class Scene_Status
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
def main
@actor = $game_party.actors[@actor_index]
@status_window = Window_Status.new(@actor)
@status_face = Window_Face.new(@actor)
@status_face.z = 20
@status_face.x = -300
@status_face.contents_opacity = 0
@mst_lay = Sprite.new
@mst_lay.bitmap = RPG::Cache.picture("MST_Lay")
@mst_lay.z = 100
@mst_back1 = Plane.new
@mst_back1.bitmap = RPG::Cache.picture("MN_BK_FILE") #Put MN_BK_FILE here
@mst_back1.z = 10
Graphics.transition(MOG::MST_TT, "Graphics/Transitions/" + MOG::MST_TTT)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
for i in 0..30
@status_face.x -= 20
@status_face.contents_opacity -= 15
Graphics.update
end
Graphics.freeze
@mst_lay.dispose
@mst_back1.dispose
@status_face.dispose
@status_window.dispose
end
def update
@mst_back1.ox -= 1
#@mst_back1.oy += 1
if @status_face.x < 0
@status_face.x += 20
@status_face.contents_opacity += 15
elsif @status_face.x >= 0
@status_face.x = 0
@status_face.contents_opacity = 255
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(3)
return
end
if Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Status.new(@actor_index)
return
end
if Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Status.new(@actor_index)
return
end
end
end
Fails to display this picture:
On this menu:
Would greatly appreciate any help possible