- 注册时间
- 2007-2-19
- 最后登录
- 2019-5-19
②入门
- 积分
- 24
|
我使用了一个可以显示升级手动加点和人物介绍的脚本,在人物介绍里面可以显示姓名年龄性格什么的并且配上战斗图像
- -但是,但是不知道为什么只能显示战斗图像的下半部分,就是一双腿...谁可以帮忙看一下让图像显示上半部分呢[s:3]~?谢谢大家了
下面是那个脚本的一部分,不知道用不用的上= =b
谢谢~
# 人物介绍 Ver. 1.1 作者: Claimh 翻译与修正:柳柳
#------------------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
#——功能简介:在状态页面按下回车键会进入人物介绍页面。
#——如果想自行建立功能,使用$scene = Scene_Charactor(角色编号).new即可
#——如果自行建立了功能不想使用默认的切换,去掉217行以后的内容
#——以下数组,如果人物超过8人,请自行继续添加(一般游戏没那么多主人公吧)
#——如果想更改内容,比如把“体重”改为“智商”,请修改102-107行的文字内容
# 从状态页面切换至人物介绍页面的按键
CHENGE_KEY = Input::C
#--------------------------------------------------------------------------
# 人物年龄 (自定义)
#--------------------------------------------------------------------------
CHARA_AGE = ["18","25","19","25","23","24","28","27"]
#--------------------------------------------------------------------------
# 人物字号
#--------------------------------------------------------------------------
CHARA_FROM = ["临砚","","","","兴霸","","仲达",""]
#--------------------------------------------------------------------------
# 人物身高
#--------------------------------------------------------------------------
CHARA_H = ["165","180","170","180","182","183","176","192"]
#--------------------------------------------------------------------------
# 人物性格
#--------------------------------------------------------------------------
CHARA_W = ["女仆","温和","冷静","智谋无双","爽利","正义感强","精明","副所性格"]
#--------------------------------------------------------------------------
# 人物介绍,可以写多行
#--------------------------------------------------------------------------
# 人物1号介绍
L1 = "事务所的专职女仆,同时也是女仆控。"
L2 = "
L3 = ""
L_SET1 = [L1, L2, L3] # 人物1号的数组
# 人物2号介绍
L1 = "事务所主要战斗成员之一"
L2 = "正直美青年"
L3 = "似乎和浅草...?"
L_SET2 = [L1, L2, L3] # 人物2号的数组
# 人物3号介绍
L1 = ""
L2 = "浅草的好友"
L3 = "同时担任事务所谋略和战斗上的双重支援"
L_SET3 = [L1, L2, L3]
# 人物4号介绍
L1 = ""
L2 = "事务所主要谋略成员之一"
L3 = ""
L_SET4 = [L1, L2, L3]
# 人物5号介绍
L1 = "曾经在长江以锦帆为字号盘踞。"
L2 = "性格似乎有点单纯暴躁的青年,行为带着水上男儿特有的爽利"
L3 = "事务所主要战斗成员之一"
L_SET5 = [L1, L2, L3]
# 人物6号介绍
L1 = ""
L2 = "事务所主要战斗成员之一"
L3 = ""
L_SET6 = [L1, L2, L3]
# 人物7号介绍
L1 = "事务所所长"
L2 = "事务所主要谋略策划成员"
L3 = "轻易不出现"
L4 = ""
L_SET7 = [L1, L2, L3, L4]
# 人物8号介绍
L1 = "拥有可怕的战斗力"
L2 = ""
L3 = ""
L_SET8 = [L1, L2, L3]
# 人物介绍数组,如果不够继续添加。
CHARA_INFO = [L_SET1,L_SET2,L_SET3,L_SET4,L_SET5,L_SET6,L_SET7,L_SET8]
#==============================================================================
# Window_Charactor
#==============================================================================
class Window_Charactor < Window_Base
#--------------------------------------------------------------------------
# actor : 初始化的角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_battler_graphics(@actor, 100, 200)
self.contents.font.color.set(255, 255,50)
self.contents.draw_text(250, 10, 80, 32, "姓名")
self.contents.draw_text(250, 50, 80, 32, "年龄")
self.contents.draw_text(250, 90, 80, 32, "字号")
self.contents.draw_text(250, 130, 80, 32, "身高")
self.contents.draw_text(250, 170, 80, 32, "性格")
self.contents.font.color = normal_color
draw_actor_name(@actor, 350, 10)
draw_actor_age(@actor, 350, 50)
draw_actor_from(@actor, 350, 90)
draw_actor_height(@actor, 350, 130)
draw_actor_weight(@actor, 350, 170)
draw_actor_other(@actor, 50, 250)
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_battler_graphics(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))
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_age(actor, x, y)
self.contents.draw_text(x, y, 80, 32, CHARA_AGE[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_from(actor, x, y)
self.contents.draw_text(x, y, 180, 32, CHARA_FROM[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_height(actor, x, y)
self.contents.draw_text(x, y , 200, 32, CHARA_H[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_weight(actor, x, y)
self.contents.draw_text(x, y, 250, 32, CHARA_W[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_other(actor, x, y)
info = CHARA_INFO[actor.id-1]
for i in 0...info.size
self.contents.draw_text(x, y+32*i, 600, 32, info)
end
end
end
#==============================================================================
# Scene_Charactor
#==============================================================================
class Scene_Charactor
#--------------------------------------------------------------------------
# actor_index :角色编号
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def main
@actor = $game_party.actors[@actor_index]
@status_window = Window_Charactor.new(@actor)
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@status_window.dispose
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(8)
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Charactor.new(@actor_index)
return
end
if Input.trigger?(Input: )
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Charactor.new(@actor_index)
return
end
end
end
#==============================================================================
# Scene_Status
#==============================================================================
class Scene_Status
alias update_chara update
def update
if Input.trigger?(CHENGE_KEY)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Charactor.new(@actor_index)
return
end
update_chara
end
end |
|