赞 | 1 |
VIP | 5 |
好人卡 | 4 |
积分 | 1 |
经验 | 23670 |
最后登录 | 2014-11-20 |
在线时间 | 378 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 378 小时
- 注册时间
- 2013-10-14
- 帖子
- 215
|
本帖最后由 batfjtn 于 2014-2-9 16:18 编辑
第一个问题:
是你的字体问题~!!
修改下自己问题就解决了~~!!
第二个问题:
应该是你商店物品随机没有定义生成孔数的问题~~!!!
那个脚本比较大~!!!
所以无能为力~~!!
第三个问题:
修改脚本: ■魔力石·窗口·魔石
在67行开始修改- #--------------------------------------------------------------------------
- # ● 描繪項目
- # index : 項目標號
- #--------------------------------------------------------------------------
- def draw_item(index)
- item = @data[index]
- number = $game_party.item_number(item.id)
- #------------------------------------------------------------------------
- # ● 文字顔色
- #------------------------------------------------------------------------
- self.contents.font.color = normal_color
- #------------------------------------------------------------------------
- # ● 文字描述
- #------------------------------------------------------------------------
- x = 4
- y = index * 32
- rect = Rect.new(x, y, self.width / @column_max - 32, 32)
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(x + 28-28, y, 212, 32, item.name, 0)
- self.contents.draw_text(x + 240-68, y, 16, 32, ":", 1)
- self.contents.draw_text(x + 240-64, y, 24, 32, number.to_s, 2)
- end
复制代码 定义一个NUMBER~~!!
number = $game_party.item_number(item.id)
添加了两个描绘~~!!
在物品名字后面添加冒号~!!
self.contents.draw_text(x + 240-68, y, 16, 32, ":", 1)
在冒号后面添加物品数量~~!!
self.contents.draw_text(x + 240-64, y, 24, 32, number.to_s, 2)
第四个问题:
这个脚本本身就没有物理防御和魔法防御的帮助脚本~!!
如果需要是自己添加~!!
可能作者考虑到说明文本不现实下难受吧~~!!!
需要添加的话修改脚本:■魔力石·幫助·說明
从第52行开始修改:
#-------------------------------------------------------------------------- # ● 物品幫助窗口 #-------------------------------------------------------------------------- def set_item_text(item) # 1 @item=item # 取得描述,屬性,狀態等副本 description = @item.description.clone element_set = @item.element_set.clone plus_state_set = @item.plus_state_set.clone minus_state_set = @item.minus_state_set.clone element_set -= @unshow_elements plus_state_set -= @unshow_states minus_state_set -= @unshow_states x=0 y=0 y2=0 y3=0 text_0 = Array.new(8) self.contents.clear # text_1 = "添加位置:" #------------------------------------------------------------------------ # ● 添加位置的描述文字: #------------------------------------------------------------------------ text_0[0] = "任意" text_0[1] = $data_system.words.weapon text_0[2] = $data_system.words.armor1 text_0[3] = $data_system.words.armor2 text_0[4] = $data_system.words.armor3 text_0[5] = $data_system.words.armor4 text_0[6] = "未知" text_0[7] = "未知" #------------------------------------------------------------------------ # ● 附加屬性的描述文字: #------------------------------------------------------------------------ text_10 = "魔力石价格:" text_11 = "回复HP:" text_12 = "回复SP:" text_13 = "HP增加:" text_14 = "SP增加:" text_15 = "物理防御增加:" text_16 = "魔法防御增加:" text_17 = "精靈附加" text_18 = "防禦状态附加:" text_19 = "攻防状态附加:" text_20 = "攻擊状态附加:" text_21 = "自動状态附加:" parameter_type={1=>"MaxHP",2=>"MaxSP",3=>$data_system.words.str,4=>$data_system.words.dex,5=>$data_system.words.agi,6=>$data_system.words.int} # font_size = 14 # 描述文字大小 word_size = 25 # 每行字數 picture_x = 80 # 描述偏移 # text = description #描繪描述 while ((text = description.slice!(/./m)) != nil) self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x * font_size, y*font_size+5, 14, 14, text, 0) x+=1 if x== word_size#每行10个字 x=0 y+=1 y2+=1 y3+=1 end end #描繪圖標 bitmap = RPG::Cache.icon(item.icon_name) if item.icon_name!=nil opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(0 ,y*font_size+20, bitmap, Rect.new(0, 0, 95, 100), 225) # 添加位置 text= text_1 + text_0[@item.scope] x=0 y+=1 self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) #攻擊力 unless @item.price.zero? x=0 y+=1 text= text_10 + @item.price.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #HP 回复率 unless @item.recover_hp_rate.zero? x=0 y+=1 text= text_11 +@item.recover_hp_rate.to_s+"%" self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #SP 回复率 unless @item.recover_sp_rate.zero? x=0 y+=1 text= text_12 +@item.recover_sp_rate.to_s+"%" self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #HP增加量 unless @item.recover_hp.zero? x=0 y+=1 text= text_13 +@item.recover_hp.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #SP 增加量 unless @item.recover_sp.zero? x=0 y+=1 text= text_14 +@item.recover_sp.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #物理防御 unless @item.pdef_f.zero? x=0 y+=1 text=text_15+@item.pdef_f.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #魔法防御 unless @item.mdef_f.zero? x=0 y+=1 text= text_16 +item.mdef_f.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #能力值增加 unless @item.parameter_type.zero? x=0 y+=1 text=parameter_type[@item.parameter_type]+"增加:"+@item.parameter_points.to_s self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0) end #物品属性 unless element_set.empty?#属性。为属性 ID 的数组 text="" @item.element_set.each do |i| text=$data_system.elements[i]+ text_17 x = 100 y2+= 1 self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y2*font_size+5, text.size*6, 14, text, 0) end end #附加状态 unless plus_state_set.empty? #附加状态。为状态 ID 的数组 text= text_18 case @item.scope when 0 text= text_19 when 1 text= text_20 end y3+=1 x=180 self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0) x=210 plus_state_set.each do |i| y3+=1 text_2 = $data_states[i].name self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text_2, 0) end end # 解除状态。为状态 ID 的数组 unless minus_state_set.empty? text = text_21 x=180 y3+=1 self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0) x=210 minus_state_set.each do |i| y3+=1 text=$data_states[i].name self.contents.font.color = normal_color self.contents.font.size=font_size self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0) end end end
#--------------------------------------------------------------------------
# ● 物品幫助窗口
#--------------------------------------------------------------------------
def set_item_text(item) # 1
@item=item
# 取得描述,屬性,狀態等副本
description = @item.description.clone
element_set = @item.element_set.clone
plus_state_set = @item.plus_state_set.clone
minus_state_set = @item.minus_state_set.clone
element_set -= @unshow_elements
plus_state_set -= @unshow_states
minus_state_set -= @unshow_states
x=0
y=0
y2=0
y3=0
text_0 = Array.new(8)
self.contents.clear
#
text_1 = "添加位置:"
#------------------------------------------------------------------------
# ● 添加位置的描述文字:
#------------------------------------------------------------------------
text_0[0] = "任意"
text_0[1] = $data_system.words.weapon
text_0[2] = $data_system.words.armor1
text_0[3] = $data_system.words.armor2
text_0[4] = $data_system.words.armor3
text_0[5] = $data_system.words.armor4
text_0[6] = "未知"
text_0[7] = "未知"
#------------------------------------------------------------------------
# ● 附加屬性的描述文字:
#------------------------------------------------------------------------
text_10 = "魔力石价格:"
text_11 = "回复HP:"
text_12 = "回复SP:"
text_13 = "HP增加:"
text_14 = "SP增加:"
text_15 = "物理防御增加:"
text_16 = "魔法防御增加:"
text_17 = "精靈附加"
text_18 = "防禦状态附加:"
text_19 = "攻防状态附加:"
text_20 = "攻擊状态附加:"
text_21 = "自動状态附加:"
parameter_type={1=>"MaxHP",2=>"MaxSP",3=>$data_system.words.str,4=>$data_system.words.dex,5=>$data_system.words.agi,6=>$data_system.words.int}
#
font_size = 14 # 描述文字大小
word_size = 25 # 每行字數
picture_x = 80 # 描述偏移
#
text = description
#描繪描述
while ((text = description.slice!(/./m)) != nil)
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x * font_size, y*font_size+5, 14, 14, text, 0)
x+=1
if x== word_size#每行10个字
x=0
y+=1
y2+=1
y3+=1
end
end
#描繪圖標
bitmap = RPG::Cache.icon(item.icon_name) if item.icon_name!=nil
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(0 ,y*font_size+20, bitmap, Rect.new(0, 0, 95, 100), 225)
# 添加位置
text= text_1 + text_0[@item.scope]
x=0
y+=1
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
#攻擊力
unless @item.price.zero?
x=0
y+=1
text= text_10 + @item.price.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#HP 回复率
unless @item.recover_hp_rate.zero?
x=0
y+=1
text= text_11 +@item.recover_hp_rate.to_s+"%"
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#SP 回复率
unless @item.recover_sp_rate.zero?
x=0
y+=1
text= text_12 +@item.recover_sp_rate.to_s+"%"
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#HP增加量
unless @item.recover_hp.zero?
x=0
y+=1
text= text_13 +@item.recover_hp.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#SP 增加量
unless @item.recover_sp.zero?
x=0
y+=1
text= text_14 +@item.recover_sp.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#物理防御
unless @item.pdef_f.zero?
x=0
y+=1
text=text_15+@item.pdef_f.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#魔法防御
unless @item.mdef_f.zero?
x=0
y+=1
text= text_16 +item.mdef_f.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#能力值增加
unless @item.parameter_type.zero?
x=0
y+=1
text=parameter_type[@item.parameter_type]+"增加:"+@item.parameter_points.to_s
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y*font_size+5, text.size*6, 14, text, 0)
end
#物品属性
unless element_set.empty?#属性。为属性 ID 的数组
text=""
@item.element_set.each do |i|
text=$data_system.elements[i]+ text_17
x = 100
y2+= 1
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y2*font_size+5, text.size*6, 14, text, 0)
end
end
#附加状态
unless plus_state_set.empty? #附加状态。为状态 ID 的数组
text= text_18
case @item.scope
when 0
text= text_19
when 1
text= text_20
end
y3+=1
x=180
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0)
x=210
plus_state_set.each do |i|
y3+=1
text_2 = $data_states[i].name
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text_2, 0)
end
end
# 解除状态。为状态 ID 的数组
unless minus_state_set.empty?
text = text_21
x=180
y3+=1
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0)
x=210
minus_state_set.each do |i|
y3+=1
text=$data_states[i].name
self.contents.font.color = normal_color
self.contents.font.size=font_size
self.contents.draw_text(x+picture_x, y3*font_size+5, text.size*6, 14, text, 0)
end
end
end
这个是已经修改好的~~!!
修改位置是第49行开始到251行~~!!
力所能及的修改好的脚本~!!!
下载地址:http://pan.baidu.com/s/1mgoICJI
剩下的就比较困难了~~!!!
PS:版主我不知道这样发是不是犯规了~!!
如果是的话麻烦删除下就好了~~!!
因为我找不到只允许楼主观看的功能~~!!
第一次回复悬赏贴..... |
评分
-
查看全部评分
|