查看: 2919|回复: 2

[已经解决] 锻造屋脚本属性对比的问题

[复制链接]
梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
回帖
96
发表于 2013-3-21 15:46:59 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 yjl494356020 于 2013-3-21 18:11 编辑

VXAce-RGSS3-16 鍛冶屋 [Ver.1.0.0] by Claimh的脚本,属性对比的地方只有增减的数值比如“+23”或“-16”, 请问怎样能加入对应属性的名称,使其变成“物理攻击+23”或“魔法攻击-16”呢???
QQ截图20130321180934.jpg
梦石
0
星屑
55
在线时间
131 小时
注册时间
2012-7-3
回帖
118
发表于 2013-3-23 21:53:52 | 显示全部楼层
约第870行(我用的是Ver.1.0.3 不行再告诉我
  1.   #--------------------------------------------------------------------------
  2.   # ● 項目の描画
  3.   #--------------------------------------------------------------------------
  4.   def draw_item(index)
  5.     actor = data_i(index)
  6.     r = item_rect(index)
  7.     e = enable_i?(index)
  8.     hh = (r.height+32)/2
  9.     draw_actor_graphic(actor, 20, r.y + hh, e)
  10.     return if @item.nil? or !@item.obj.is_a?(RPG::EquipItem)
  11.     return unless equip_ok?(actor, @item.obj)
  12.     prms = @item.obj.is_a?(RPG::Weapon) ? [2,4] : [3,5]
  13.     equips = actor.equips.select { |a| a != nil }
  14.     equips = equips.select { |a| a.etype_id == @item.obj.etype_id }
  15.     r.y += r.height / 2 - line_height
  16.     prms.each_index do |i|
  17.       diff = diff_item_param(equips, prms[i])
  18.       draw_item_diff(28, r.y+i*(line_height),diff, e, prms[i])
  19.     end
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● グラフィックの描画
  23.   #--------------------------------------------------------------------------
  24.   def draw_actor_graphic(actor, x, y, enble)
  25.     return if actor == nil
  26.     bitmap = Cache.character(actor.character_name)
  27.     sign = actor.character_name[/^[\!\$]./]
  28.     if sign != nil and sign.include?(')
  29.       cw = bitmap.width / 3
  30.       ch = bitmap.height / 4
  31.     else
  32.       cw = bitmap.width / 12
  33.       ch = bitmap.height / 8
  34.     end
  35.     n = actor.character_index
  36.     src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  37.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enble ? 255 : translucent_alpha)
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ● アイテムパラメータ差分取得
  41.   #--------------------------------------------------------------------------
  42.   def diff_item_param(equips, prm)
  43.     e_items = equips.sort { |a, b| b.params[prm] - a.params[prm] }
  44.     new_prm = e_items.empty? ? 0 : e_items[0].params[prm]
  45.     return @item.obj.params[prm] - new_prm
  46.   end
  47.   #--------------------------------------------------------------------------
  48.   # ● 装備差分値の描画
  49.   #--------------------------------------------------------------------------
  50.   def draw_item_diff(x, y, change, able, prm)
  51.     change_color(param_change_color(change), able)
  52.     draw_text(x, y, contents_width-x-4, line_height, Vocab::param(prm)+sprintf("%+d",change), 2)
  53.   end
  54. end
复制代码

评分

参与人数 1星屑 +100 收起 理由
Mic_洛洛 + 100 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
回帖
96
 楼主| 发表于 2013-3-24 09:28:30 | 显示全部楼层
冰鎮史萊姆 发表于 2013-3-23 21:53
约第870行(我用的是Ver.1.0.3 不行再告诉我

终于解决了,十分感谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部