设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2305|回复: 2
打印 上一主题 下一主题

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
跳转到指定楼层
1
发表于 2013-3-21 15:46:59 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

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

VXAce-RGSS3-16 鍛冶屋 [Ver.1.0.0] by Claimh的脚本,属性对比的地方只有增减的数值比如“+23”或“-16”, 请问怎样能加入对应属性的名称,使其变成“物理攻击+23”或“魔法攻击-16”呢???

Lv1.梦旅人

梦石
0
星屑
55
在线时间
131 小时
注册时间
2012-7-3
帖子
121
2
发表于 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 [email protected]_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 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
143
在线时间
347 小时
注册时间
2010-7-7
帖子
128
3
 楼主| 发表于 2013-3-24 09:28:30 | 只看该作者
冰鎮史萊姆 发表于 2013-3-23 21:53
约第870行(我用的是Ver.1.0.3 不行再告诉我

终于解决了,十分感谢!
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-17 01:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表