Project1
标题:
追加描绘角色状态和属性槽描绘兼容
[打印本页]
作者:
Cherry
时间:
2011-7-3 13:30
标题:
追加描绘角色状态和属性槽描绘兼容
本帖最后由 Cherry 于 2011-7-3 13:32 编辑
追加描绘角色的命中、回避、会心一击:
http://rpg.blue/thread-83071-1-1.html
在显示属性旁加下属性槽:
#==============================================================================
# ■ draw_actor_parameter美化 By Rion幻音
#------------------------------------------------------------------------------
# 在显示属性旁加下属性槽
#==============================================================================
class Window_Base < Window
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
gc1 = text_color(0)
gc2 = text_color(1)
when 1
parameter_name = Vocab::def
parameter_value = actor.def
gc1 = text_color(0)
gc2 = text_color(2)
when 2
parameter_name = Vocab::spi
parameter_value = actor.spi
gc1 = text_color(0)
gc2 = text_color(3)
when 3
parameter_name = Vocab::agi
parameter_value = actor.agi
gc1 = text_color(0)
gc2 = text_color(4)
when 4
parameter_name = "命中"
parameter_value = actor.hit
gc1 = text_color(0)
gc2 = text_color(5)
when 5
parameter_name = "回避修正"
parameter_value = actor.eva
gc1 = text_color(0)
gc2 = text_color(6)
when 6
parameter_name = "要害修正"
parameter_value = actor.cri
gc1 = text_color(0)
gc2 = text_color(7)
end
gw = 160 * parameter_value / 500
self.contents.fill_rect(x, y + WLH - 8, 160, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
end
end
复制代码
其中when4,when5,when6是我添加的,这样两个脚本就能同时使用了。
无标题.png
(118.91 KB, 下载次数: 17)
下载附件
保存到相册
2011-7-3 13:29 上传
顺便问一下高手,命中、回避、会心一击的最大值只有100,如何把 gw = 160 * parameter_value / 500
这句改掉,让每个能力值有不同的值槽。
如图,后三项属性太短了。
PS:作为一个脚本新手已经不容易了,看了半天······
作者:
月夜神音
时间:
2011-7-3 14:02
本帖最后由 月夜神音 于 2011-7-3 14:04 编辑
把那个
gw = 160 * parameter_value /
500
中加红的数值用变量代替,比如
length
,
然后在when 6(啥号码都好)的下面加入
length = 100#要多少就多少
如脚本:
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
gc1 = text_color(0)
gc2 = text_color(1)
length = 500
when 1
parameter_name = Vocab::def
parameter_value = actor.def
gc1 = text_color(0)
gc2 = text_color(2)
length = 500
when 2
parameter_name = Vocab::spi
parameter_value = actor.spi
gc1 = text_color(0)
gc2 = text_color(3)
length = 500
when 3
parameter_name = Vocab::agi
parameter_value = actor.agi
gc1 = text_color(0)
gc2 = text_color(4)
length = 500
when 4
parameter_name = "命中"
parameter_value = actor.hit
gc1 = text_color(0)
gc2 = text_color(5)
length = 100
when 5
parameter_name = "回避修正"
parameter_value = actor.eva
gc1 = text_color(0)
gc2 = text_color(6)
length = 100
when 6
parameter_name = "要害修正"
parameter_value = actor.cri
gc1 = text_color(0)
gc2 = text_color(7)
length = 100
end
作者:
wsmyzc
时间:
2011-7-8 11:13
这个。。颜色可以改渐变吗?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1