[Show/Hide] Script
CODE
#==============================================================================
# ■ RisingPhoenix_Window_Status
#------------------------------------------------------------------------------
# Make the status window with room on the right for a large picture
# Author: RisingPhoenix
#==============================================================================
module RisingPhoenix
SmallFontSize = 18 #Size of smaller font on status screen
WLH = 20 #Define line height for small font size; change for different font sizes
X_Offset = 100 #How far to the right you want the picture to be
CharacterFullPics = Array.new
CharacterFullPics = {
#(Leave file name blank for no picture for that character; picture files are stored in the System folder)
#(Try to stick to a height of 390ish, anything below that is cut off - widths can vary but the picture will be right-aligned)
#ID => "file name"
1 => "",
}
DefaultFullPic = "" #Leave blank for no picture as the default
end
class Window_Status < Window_Base
WLH = RisingPhoenix::WLH
#--------------------------------------------------------------------------
# ● Object initialization
# actor :The actor for which the window is being made
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 544, 416)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if RisingPhoenix::CharacterFullPics[@actor.id] == nil
if RisingPhoenix::DefaultFullPic != ""
draw_status_pic(RisingPhoenix::DefaultFullPic)
end
elsif RisingPhoenix::CharacterFullPics[@actor.id] != ""
draw_status_pic(RisingPhoenix::CharacterFullPics[@actor.id])
end
draw_actor_name(@actor, 4, 0)
self.contents.font.size = RisingPhoenix::SmallFontSize
draw_actor_class(@actor, 18, WLH + 4)
draw_basic_info(4, WLH * 2 + 8)
draw_parameters(4, WLH * 7 + 18)
draw_equipments(4, WLH * 11 + 28)
end
#--------------------------------------------------------------------------
# ● Define a function to draw the status picture
#--------------------------------------------------------------------------
def draw_status_pic(pic_name)
bitmap = Cache.system(pic_name)
rect = Rect.new(0, 0, 0, 0)
rect.width = bitmap.width
rect.height = bitmap.height
x = RisingPhoenix::X_Offset
self.contents.blt(x, 0, bitmap, rect)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 基本情報の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
#draw_actor_state(@actor, x, y + WLH * 1)
draw_exp_info(x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 3)
draw_actor_mp(@actor, x, y + WLH * 4)
end
#--------------------------------------------------------------------------
# ● 能力値の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
end
#--------------------------------------------------------------------------
# ● 経験値情報の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, s1, 2)
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s2, 2)
end
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
#--------------------------------------------------------------------------
# ● 装備品の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_equipments(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
for i in 0..4
draw_item_name(@actor.equips[i], x, y + 22 * (i + 1))
end
end
end
# ■ RisingPhoenix_Window_Status
#------------------------------------------------------------------------------
# Make the status window with room on the right for a large picture
# Author: RisingPhoenix
#==============================================================================
module RisingPhoenix
SmallFontSize = 18 #Size of smaller font on status screen
WLH = 20 #Define line height for small font size; change for different font sizes
X_Offset = 100 #How far to the right you want the picture to be
CharacterFullPics = Array.new
CharacterFullPics = {
#(Leave file name blank for no picture for that character; picture files are stored in the System folder)
#(Try to stick to a height of 390ish, anything below that is cut off - widths can vary but the picture will be right-aligned)
#ID => "file name"
1 => "",
}
DefaultFullPic = "" #Leave blank for no picture as the default
end
class Window_Status < Window_Base
WLH = RisingPhoenix::WLH
#--------------------------------------------------------------------------
# ● Object initialization
# actor :The actor for which the window is being made
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 544, 416)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if RisingPhoenix::CharacterFullPics[@actor.id] == nil
if RisingPhoenix::DefaultFullPic != ""
draw_status_pic(RisingPhoenix::DefaultFullPic)
end
elsif RisingPhoenix::CharacterFullPics[@actor.id] != ""
draw_status_pic(RisingPhoenix::CharacterFullPics[@actor.id])
end
draw_actor_name(@actor, 4, 0)
self.contents.font.size = RisingPhoenix::SmallFontSize
draw_actor_class(@actor, 18, WLH + 4)
draw_basic_info(4, WLH * 2 + 8)
draw_parameters(4, WLH * 7 + 18)
draw_equipments(4, WLH * 11 + 28)
end
#--------------------------------------------------------------------------
# ● Define a function to draw the status picture
#--------------------------------------------------------------------------
def draw_status_pic(pic_name)
bitmap = Cache.system(pic_name)
rect = Rect.new(0, 0, 0, 0)
rect.width = bitmap.width
rect.height = bitmap.height
x = RisingPhoenix::X_Offset
self.contents.blt(x, 0, bitmap, rect)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 基本情報の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
#draw_actor_state(@actor, x, y + WLH * 1)
draw_exp_info(x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 3)
draw_actor_mp(@actor, x, y + WLH * 4)
end
#--------------------------------------------------------------------------
# ● 能力値の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
end
#--------------------------------------------------------------------------
# ● 経験値情報の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, s1, 2)
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s2, 2)
end
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
#--------------------------------------------------------------------------
# ● 装備品の描画
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_equipments(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
for i in 0..4
draw_item_name(@actor.equips[i], x, y + 22 * (i + 1))
end
end
end
Comments and feedback would be appreciated; if you find and errors/bugs let me know so I can try to fix them.
[Show/Hide] Screenshots






