Project1
标题:
请教关于角色状态窗口中的装备显示
[打印本页]
作者:
自动贩卖机
时间:
2008-12-19 08:27
标题:
请教关于角色状态窗口中的装备显示
用了VX之后,就想移植一些XP上的脚本(因为是脚本菜鸟,不会自己写……)
今天把XP上的角色状态窗口脚本复制到了VX里,然后就出现了问题。
能够显示,但是我XP上的脚本是把显示装备品做了分歧,武器上定义了双手武器和单手武器(在属性里面加上了个“双手武器”属性,装备上这类属性的武器之后就在状态栏的装备品中“盾牌“一栏与”武器“显示的是同种装备)
但VX里面本身就有二刀流。。所以就不知道怎么改了- -
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# 显示状态画面、完全规格的状态窗口。
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 544, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_face(@actor, 0, 0)
draw_actor_name(@actor, 260, 0)
draw_actor_class(@actor, 400, 0)
draw_actor_level(@actor, 260, 20)
draw_actor_state(@actor, 400, 20)
draw_actor_hp(@actor, 260, 92, 172)
draw_actor_mp(@actor, 260, 116, 172)
self.contents.font.color = Color.new(120, 130, 220, 255)
self.contents.draw_text(260, 142, 84, 32, "角色能力")
self.contents.font.color = system_color
draw_actor_parameter(@actor, 260, 168, 0)
draw_actor_parameter(@actor, 260, 188, 1)
draw_actor_parameter(@actor, 260, 208, 2)
draw_actor_parameter(@actor, 260, 228, 3)
draw_actor_parameter(@actor, 360, 168, 4)
draw_actor_parameter(@actor, 360, 188, 5)
draw_actor_parameter(@actor, 360, 208, 6)
draw_actor_parameter(@actor, 360, 228, 7)
self.contents.font.color = system_color
self.contents.draw_text(260, 44, 80, 32, "EXP")
self.contents.draw_text(260, 68, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(260 + 80, 44, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(260 + 80, 68, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = Color.new(120, 130, 220, 255)
self.contents.draw_text(260, 256, 84, 32, "武器&装备")
self.contents.font.color = Color.new(120, 220, 130, 255)
self.contents.draw_text(260, 280, 84, 32, "右手:")
self.contents.draw_text(260, 300, 84, 32, "左手:")
self.contents.draw_text(260, 320, 84, 32, "头部:")
self.contents.draw_text(260, 340, 84, 32, "身体:")
self.contents.draw_text(260, 360, 84, 32, "饰品:")
draw_item_name($data_weapons[@actor.weapon_id], 260 + 60, 260+64)
if actor_weapon(11)
draw_item_name($data_weapons[@actor.weapon_id], 260 + 60, 284+64)
else
draw_item_name($data_armors[@actor.armor1_id], 260 + 60, 284+64)
end
draw_item_name($data_armors[@actor.armor2_id], 260 + 60, 308+64)
draw_item_name($data_armors[@actor.armor3_id], 260 + 60, 332+64)
draw_item_name($data_armors[@actor.armor4_id], 260 + 60, 356+64)
end
def dummy
self.contents.font.color = system_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
def actor_weapon(id)
return @actor.weapon_id == 0 ? false :$data_weapons[@actor.weapon_id].element_set.include?(id)
end
end
复制代码
就是最后面从draw_item_name($data_weapons[@actor.weapon_id], 260 + 60, 260+64)
if actor_weapon(11)
这里开始不知道怎么写了,XP里面那个11就是双刀属性。
我想请教下,怎么样才能定义在二刀流情况下的装备品显示。。。 [LINE]1,#dddddd[/LINE]
此贴于 2008-12-21 11:44:17 被版主八云紫提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
版务信息:版主帮忙结贴~
作者:
水仙晶女
时间:
2008-12-19 13:44
提示:
作者被禁止或删除 内容自动屏蔽
作者:
自动贩卖机
时间:
2008-12-19 14:05
不行啊。。。还是出错。。
要定义actor吗。。?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1