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

Project1

 找回密码
 注册会员
搜索
查看: 2486|回复: 4

[已经解决] 求教大神这个装备品级脚本的修改(已经解决!)

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4863
在线时间
485 小时
注册时间
2018-6-18
帖子
613
发表于 2018-9-14 11:11:09 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 RMVXA 于 2018-9-14 20:01 编辑

找到了一个好脚本,但是希望能有一点点功能上的改进,求大神帮忙改一下,谢谢啦:
1.可以把下图装备后面的冒号和数量改成白色字体吗?
2.可以在技能里的图标去掉边框,只有道具和装备的图标有边框吗?
2018-09-14_110159.png     2018-09-14_110242.png


脚本如下:

#==============================================================================
# ■ 物品颜色描绘
# By :VIPArcher [email: [email protected]]
#  -- 本脚本来自 http://rm.66rpg.com 使用或转载请保留以上信息。

#==============================================================================
$VIPArcherScript ||= {};$VIPArcherScript[:itemcolor] = __FILE__ #20141007
#-------------------------------------------------------------------------------
module VIPArcher end
#==============================================================================
# ★ 设定部分 ★
#==============================================================================

module VIPArcher::ItemColor
  RIM = true #是否描绘边框
  FILL = true #是否填充边框
  #为了方便设置品质等级,
  Color_Lv = {
# 品质 => 控制符颜色编号,
    0  =>  0,
    1  =>  3,
    2  =>  12,
    3  =>  27,
    # 继续添加
  };Color_Lv.default = 0 #这行不能删
end
#==============================================================================
# ☆ 设定结束 ☆
#==============================================================================

class RPG::BaseItem
  include VIPArcher::ItemColor
  #--------------------------------------------------------------------------
  # ● 获取道具的品质
  #--------------------------------------------------------------------------

  def color
    @note =~ /\<(?:color|品质|颜色)\s*(\d+)\>/i
    [[$1.to_i,Color_Lv.size - 1].min,0].max
  end
end
#-------------------------------------------------------------------------------
class Window_Base < Window
  include VIPArcher::ItemColor
  #--------------------------------------------------------------------------
  # ● 描绘物品
  #--------------------------------------------------------------------------

  def draw_item_name(item, x, y, enabled = true, width = 172)
    return unless item
    item_color = text_color(Color_Lv[item.color])
    change_color(item_color, enabled)
    self.color_fill_rect(x,y,item_color) if RIM
    draw_icon(item.icon_index, x, y, enabled)
    draw_text(x + 24, y, width, line_height, item.name)
  end
  #--------------------------------------------------------------------------
  # ● 绘制图标边框
  #--------------------------------------------------------------------------

  def color_fill_rect(x,y,item_color)
    item_alpha = item_color.clone
    item_alpha.alpha = 160
    contents.fill_rect(x+1 ,y+1 ,22, 22 ,item_alpha) if FILL
    contents.fill_rect(x+1 ,y+1 ,22, 1  ,item_color)
    contents.fill_rect(x   ,y+2 ,1 , 20 ,item_color)
    contents.fill_rect(x+1 ,y+22,22, 1  ,item_color)
    contents.fill_rect(x+23,y+2 ,1 , 20 ,item_color)
  end
end





Lv4.逐梦者

梦石
0
星屑
19279
在线时间
3074 小时
注册时间
2013-1-11
帖子
1288
发表于 2018-9-14 12:01:40 | 显示全部楼层
替换
  1. def draw_item_name(item, x, y, enabled = true, width = 172)
  2.     return unless item
  3.     item_color = text_color(Color_Lv[item.color])
  4.     change_color(item_color, enabled)
  5.     self.color_fill_rect(x,y,item_color) if RIM and not item.is_a?(RPG::Skill)
  6.     draw_icon(item.icon_index, x, y, enabled)
  7.     draw_text(x + 24, y, width, line_height, item.name)
  8.     change_color(normal_color)
  9. end
复制代码

点评

太厉害了,一下都解决了!  发表于 2018-9-14 20:01

评分

参与人数 3星屑 +100 +2 收起 理由
VIPArcher + 100 认可答案
唐咚咚 + 1 塞糖
RMVXA + 1 认可答案

查看全部评分

回复 支持 3 反对 0

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2323
在线时间
274 小时
注册时间
2017-7-25
帖子
163
发表于 2018-9-15 14:57:16 | 显示全部楼层
想问一下LZ这个脚本是怎么使用的……

点评

在装备备注里写<品质 1> <品质 2>……  发表于 2018-9-16 07:04
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-18 23:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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