赞 | 0 |
VIP | 0 |
好人卡 | 12 |
积分 | 1 |
经验 | 5827 |
最后登录 | 2020-5-5 |
在线时间 | 116 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 116 小时
- 注册时间
- 2008-5-12
- 帖子
- 264
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 shinliwei 于 2013-6-15 21:14 编辑
http://rpg.blue/forum.php?mod=vi ... id%3D368&page=1
下载了这位大神的脚本,是根据强化等级显示物品颜色的。而我期望是根据装备的前缀来显示物品颜色。
@paramsplus = [ [30,"猛虎",[[2,10],[6,10]]], #攻击+10、敏捷+10 [30,"野熊",[[2,10],[0,50]]], #攻击+10、最大HP+50 [30,"野猪",[[3,10],[0,50]]], #防御+10、最大HP+50 [30,"灵猴",[[6,10],[3,10]]], #敏捷+10、防御+10 [30,"雄鹰",[[6,10],[4,10]]], #敏捷+10、精神+10 [30,"夜枭",[[4,10],[3,10]]], #精神+10、防御+10 [30,"孤狼",[[6,10],[5,10]]], #敏捷+10、魔御+10 [30,"巨鲸",[[4,10],[5,10]]], #精神+10、魔御+10 [30,"巨猿",[[2,10],[4,10]]], #攻击+10、精神+10 [30,"猎鹰",[[2,10],[5,10]]], #攻击+10、魔御+10 [90,"士兵",[[3,20],[5,20],[0,100]]], #防御+20、魔御+20、最大HP+100 [90,"强盗",[[2,20],[6,20],[0,100]]], #攻击+20、敏捷+20、最大HP+100 [90,"刺客",[[2,20],[6,20],[7,20]]], #攻击+20、敏捷+20、幸运+20 [90,"射手",[[2,20],[3,20],[6,20]]], #攻击+20、防御+20、敏捷+20 [90,"巫师",[[4,20],[5,20],[0,100]]], #精神+20、魔御+20、最大HP+100 [90,"先知",[[4,20],[6,20],[7,20]]], #精神+20、魔御+20、幸运+20 [90,"勇士",[[2,20],[3,20],[5,20]]], #攻击+20、防御+20、幸运+20 [90,"祭司",[[4,20],[5,20],[3,20]]], #精神+20、魔御+20、防御+20 [90,"导师",[[4,20],[7,20],[0,100]]], #精神+20、幸运+20、最大HP+100 [90,"僧侣",[[3,20],[6,20],[0,100]]], #防御+20、敏捷+20、最大HP+100 ]
@paramsplus = [
[30,"猛虎",[[2,10],[6,10]]], #攻击+10、敏捷+10
[30,"野熊",[[2,10],[0,50]]], #攻击+10、最大HP+50
[30,"野猪",[[3,10],[0,50]]], #防御+10、最大HP+50
[30,"灵猴",[[6,10],[3,10]]], #敏捷+10、防御+10
[30,"雄鹰",[[6,10],[4,10]]], #敏捷+10、精神+10
[30,"夜枭",[[4,10],[3,10]]], #精神+10、防御+10
[30,"孤狼",[[6,10],[5,10]]], #敏捷+10、魔御+10
[30,"巨鲸",[[4,10],[5,10]]], #精神+10、魔御+10
[30,"巨猿",[[2,10],[4,10]]], #攻击+10、精神+10
[30,"猎鹰",[[2,10],[5,10]]], #攻击+10、魔御+10
[90,"士兵",[[3,20],[5,20],[0,100]]], #防御+20、魔御+20、最大HP+100
[90,"强盗",[[2,20],[6,20],[0,100]]], #攻击+20、敏捷+20、最大HP+100
[90,"刺客",[[2,20],[6,20],[7,20]]], #攻击+20、敏捷+20、幸运+20
[90,"射手",[[2,20],[3,20],[6,20]]], #攻击+20、防御+20、敏捷+20
[90,"巫师",[[4,20],[5,20],[0,100]]], #精神+20、魔御+20、最大HP+100
[90,"先知",[[4,20],[6,20],[7,20]]], #精神+20、魔御+20、幸运+20
[90,"勇士",[[2,20],[3,20],[5,20]]], #攻击+20、防御+20、幸运+20
[90,"祭司",[[4,20],[5,20],[3,20]]], #精神+20、魔御+20、防御+20
[90,"导师",[[4,20],[7,20],[0,100]]], #精神+20、幸运+20、最大HP+100
[90,"僧侣",[[3,20],[6,20],[0,100]]], #防御+20、敏捷+20、最大HP+100
]
权重30的前缀名装备作为品质2 显示绿色
权重90的前缀名装备作为品质3 显示蓝色
颜色描绘脚本用的是这个
#============================================================================== # [PS0]物品颜色描绘 # Window_Base_Itemcolor #------------------------------------------------------------------------------ # 在物品、技能选项中显示物品品质并显示品质框和修改物品名颜色。 #============================================================================== # [更新记录] # - 2012.01.03 By 仲秋启明 # * 修改为VA定义 # - 2011.12.27 By 仲秋启明 # * 移植至RGSS3,遵循PS0协议; # * 优化数据库备注中设定方法 # - 2011.08.22 By 冰舞蝶恋 # * 蓝本(实用·极简 -- 按品质,给物品描绘色彩边框) # - 2010.08.06 By 仲秋启明 # * 蓝本(物品颜色描绘脚本(完整无冲突版)) #------------------------------------------------------------------------------ # [使用方法] # - 替换原Window_Base中的draw_item_name定义或复制到Main之前 #============================================================================== $_PS0 = {} if $_PS0 == nil $_PS0["Window_Base_Itemcolor"] = 20111227 #============================================================================== # [PS0] 通用配置模块 #============================================================================== module PS0 module Window_Base_Itemcolor Color1 = Color.new(255, 255, 255) # 普通品质的色彩(白,1) Color2 = Color.new(128, 255, 128) # 优秀品质的色彩(绿,2) Color3 = Color.new(128, 128, 255) # 精良品质的色彩(蓝,3) Color4 = Color.new(255, 0, 255) # 史诗品质的色彩(紫,4) Color5 = Color.new(255, 128, 0) # 传说品质的色彩(橙,5) end end #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window def draw_item_name(item, x, y, enabled = true, width = 172) if item != nil n = item.note a = n.split{/<(?:Quality|品质)\s*(.+)>/i} c = a[1].to_i if c <= 1 color = PS0::Window_Base_Itemcolor::Color1 elsif c == 2 color = PS0::Window_Base_Itemcolor::Color2 elsif c == 3 color = PS0::Window_Base_Itemcolor::Color3 elsif c == 4 color = PS0::Window_Base_Itemcolor::Color4 elsif c == 5 color = PS0::Window_Base_Itemcolor::Color5 else color = Color.new(0, 0, 0, 0) end self.contents.fill_rect(x, y, 24, 1, color) self.contents.fill_rect(x, y, 1, 24, color) self.contents.fill_rect(x, y+23, 24, 1, color) self.contents.fill_rect(x+23, y, 1, 24, color) draw_icon(item.icon_index, x, y, enabled) change_color(color, enabled) draw_text(x + 24, y, width, line_height, item.name) end end end #============================================================================== # [PS0] End of Script #==============================================================================
#==============================================================================
# [PS0]物品颜色描绘
# Window_Base_Itemcolor
#------------------------------------------------------------------------------
# 在物品、技能选项中显示物品品质并显示品质框和修改物品名颜色。
#==============================================================================
# [更新记录]
# - 2012.01.03 By 仲秋启明
# * 修改为VA定义
# - 2011.12.27 By 仲秋启明
# * 移植至RGSS3,遵循PS0协议;
# * 优化数据库备注中设定方法
# - 2011.08.22 By 冰舞蝶恋
# * 蓝本(实用·极简 -- 按品质,给物品描绘色彩边框)
# - 2010.08.06 By 仲秋启明
# * 蓝本(物品颜色描绘脚本(完整无冲突版))
#------------------------------------------------------------------------------
# [使用方法]
# - 替换原Window_Base中的draw_item_name定义或复制到Main之前
#==============================================================================
$_PS0 = {} if $_PS0 == nil
$_PS0["Window_Base_Itemcolor"] = 20111227
#==============================================================================
# [PS0] 通用配置模块
#==============================================================================
module PS0
module Window_Base_Itemcolor
Color1 = Color.new(255, 255, 255) # 普通品质的色彩(白,1)
Color2 = Color.new(128, 255, 128) # 优秀品质的色彩(绿,2)
Color3 = Color.new(128, 128, 255) # 精良品质的色彩(蓝,3)
Color4 = Color.new(255, 0, 255) # 史诗品质的色彩(紫,4)
Color5 = Color.new(255, 128, 0) # 传说品质的色彩(橙,5)
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
def draw_item_name(item, x, y, enabled = true, width = 172)
if item != nil
n = item.note
a = n.split{/<(?:Quality|品质)\s*(.+)>/i}
c = a[1].to_i
if c <= 1
color = PS0::Window_Base_Itemcolor::Color1
elsif c == 2
color = PS0::Window_Base_Itemcolor::Color2
elsif c == 3
color = PS0::Window_Base_Itemcolor::Color3
elsif c == 4
color = PS0::Window_Base_Itemcolor::Color4
elsif c == 5
color = PS0::Window_Base_Itemcolor::Color5
else
color = Color.new(0, 0, 0, 0)
end
self.contents.fill_rect(x, y, 24, 1, color)
self.contents.fill_rect(x, y, 1, 24, color)
self.contents.fill_rect(x, y+23, 24, 1, color)
self.contents.fill_rect(x+23, y, 1, 24, color)
draw_icon(item.icon_index, x, y, enabled)
change_color(color, enabled)
draw_text(x + 24, y, width, line_height, item.name)
end
end
end
#==============================================================================
# [PS0] End of Script
#==============================================================================
再额外问一个问题,就是装备随机属性的几率在哪改 |
|