Project1
标题:
状态菜单重排 修改为自定义图
[打印本页]
作者:
悠悠炸弹
时间:
2009-8-28 13:50
标题:
状态菜单重排 修改为自定义图
本帖最后由 悠悠炸弹 于 2009-8-28 14:02 编辑
这是 状态菜单重排加图
本来是在菜单中是以战斗图来显示的.现在我想把它改成自定义的头像.
要怎么改动呢?谢谢
#==============================================================================
# ■ 本脚本源自www.66rpg.com,转载与使用请保留此信息
#==============================================================================
#==============================================================================
# by Claimh, http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
class Window_Base
def draw_battler_graphic(actor, x, y)
battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
w = battler.width
h = battler.height
self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h),150)
end
end
class Window_MenuStatus < Window_Selectable
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors[i]
if (i % 2) == 0
draw_battler_graphic(actor, x - 5, y + 180 - i * 20)
draw_actor_name(actor, x+50, y)
draw_actor_class(actor, x + 144+50, y)
draw_actor_level(actor, x+50, y + 32)
draw_actor_state(actor, x + 90+40, y + 32)
draw_actor_exp(actor, x+50, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
else
draw_battler_graphic(actor, x +315, y + 180 - i * 20)
draw_actor_name(actor, x-60, y)
draw_actor_class(actor, x +144-60, y)
draw_actor_level(actor, x-60, y + 32)
draw_actor_state(actor, x + 90-60, y + 32)
draw_actor_exp(actor, x-60, y + 64)
draw_actor_hp(actor, x +196-60, y + 32)
draw_actor_sp(actor, x +196-60, y + 64)
end
end
end
end
复制代码
作者:
「旅」
时间:
2009-8-28 13:58
class Window_Base
Name = {1=>"囧懒散",2=>"囧小柯"}
alias lv_draw_battler_graphic draw_battler_graphic
def draw_battler_graphic(actor, x, y)
if Name[actor.id]==nil
lv_draw_battler_graphic(actor, x, y)
return
end
battler=RPG::Cache.picture(Name[actor.id])
w = battler.width
h = battler.height
self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h),150)
end
end
复制代码
插到原脚本下面。
(1=>"囧懒散",1是角色编号,"囧懒散"是图片名.如果没有指定的话,会用成原来的战斗图)
作者:
悠悠炸弹
时间:
2009-8-28 14:01
强人啊.这么快就弄好了...........
谢谢「旅」前辈.
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1