赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 22 |
经验 | 6476 |
最后登录 | 2024-6-19 |
在线时间 | 607 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2249
- 在线时间
- 607 小时
- 注册时间
- 2016-4-10
- 帖子
- 27
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 封尘 于 2017-6-17 10:44 编辑
本人不才,想让物品和装备一样拥有颜色,当然这个颜色是自己设定的,于是稍微在随机属性脚本里添加了一点东西,以下是脚本#============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window def draw_item_name(item, x, y, enabled = true) if item != nil draw_icon(item.icon_index, x, y, enabled) if RPG::Weapon self.contents.font.color = text_color(item.text_color.to_i) end if RPG::Armor self.contents.font.color = text_color(item.text_color.to_i) end if RPG::Item case item.id when 1 self.contents.font.color = text_color(24) when 3 self.contents.font.color = text_color(30) when 4,15,19,36,81,172 self.contents.font.color = text_color(24) when 5,29,6,38,7,2,107,152..154,174 self.contents.font.color = text_color(6) when 8..14,16,18,20,39,42,108,122,123,159,175 self.contents.font.color = text_color(30) when 21,23..28,40,44,45,53,55..64,80,102,103,109,176,201..210 self.contents.font.color = text_color(27) when 22,31,35,161 self.contents.font.color = text_color(0) when 30,48..51,105,110,113..115,125..137,162,165 self.contents.font.color = text_color(17) when 33,37,101,106,158,173 self.contents.font.color = text_color(1) when 41,111,112 self.contents.font.color = text_color(18) when 71..77,104,160,177 self.contents.font.color = text_color(2) end end self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y, 172, WLH, item.name) end end end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
if RPG::Weapon
self.contents.font.color = text_color(item.text_color.to_i)
end
if RPG::Armor
self.contents.font.color = text_color(item.text_color.to_i)
end
if RPG::Item
case item.id
when 1
self.contents.font.color = text_color(24)
when 3
self.contents.font.color = text_color(30)
when 4,15,19,36,81,172
self.contents.font.color = text_color(24)
when 5,29,6,38,7,2,107,152..154,174
self.contents.font.color = text_color(6)
when 8..14,16,18,20,39,42,108,122,123,159,175
self.contents.font.color = text_color(30)
when 21,23..28,40,44,45,53,55..64,80,102,103,109,176,201..210
self.contents.font.color = text_color(27)
when 22,31,35,161
self.contents.font.color = text_color(0)
when 30,48..51,105,110,113..115,125..137,162,165
self.contents.font.color = text_color(17)
when 33,37,101,106,158,173
self.contents.font.color = text_color(1)
when 41,111,112
self.contents.font.color = text_color(18)
when 71..77,104,160,177
self.contents.font.color = text_color(2)
end
end
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
end
但是使用后道具的颜色是改了,但是得到的装备颜色就变得乱七八糟,我想知道这是什么原因呢?或者说如何将武器、防具、物品彻底区分开呢?希望大神能够帮帮我 |
|