Project1

标题: 如何更改 hp、mp、tp 值槽的颜色? [打印本页]

作者: 真の玛娜君    时间: 2019-9-21 22:47
标题: 如何更改 hp、mp、tp 值槽的颜色?
本帖最后由 真の玛娜君 于 2019-9-21 23:21 编辑

找了一个在状态栏显示TP的脚本,想让TP是淡紫色的,然后让HP和MP更鲜艳一些,但是找不到在那改。
RUBY 代码复制
  1. # 显示 TP #
  2. # 即插即用 #
  3. class Window_Base
  4.   alias csca_snippets_simple_status draw_actor_simple_status
  5.   def draw_actor_simple_status(actor, x, y)
  6.     csca_snippets_simple_status(actor,x,y)
  7.     draw_actor_tp(actor,x,y+line_height*2,100)
  8.   end
  9. end

作者: KB.Driver    时间: 2019-9-21 22:47


RUBY 代码复制
  1. class Window_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● 获取各种文字颜色
  4.   #--------------------------------------------------------------------------
  5.   def hp_gauge_color1;   text_color(20);  end;    # HP 值槽 1
  6.   def hp_gauge_color2;   text_color(21);  end;    # HP 值槽 2
  7.   def mp_gauge_color1;   text_color(22);  end;    # MP 值槽 1
  8.   def mp_gauge_color2;   text_color(23);  end;    # MP 值槽 2
  9.   def tp_gauge_color1;   text_color(28);  end;    # TP 值槽 1
  10.   def tp_gauge_color2;   text_color(29);  end;    # TP 值槽 2
  11. end


在下面找个空档插入这段,自己把里面的text_color改成需要的颜色
写法是Color.new(红, 绿, 蓝, 透明度),自己根据需要填写各个颜色的数值,0~255
透明度一般都是255所以不用写,以你需要紫色为例:
Color.new(255, 0, 255)

作者: 真の玛娜君    时间: 2019-9-21 23:05
KB.Driver 发表于 2019-9-21 22:56
class Window_Base
  #--------------------------------------------------------------------------
  ...


好像直接改()里的数字也可以?
  1.   def tp_gauge_color1;   text_color(31);  end;    # TP 值槽 1
  2.   def tp_gauge_color2;   text_color(31);  end;    # TP 值槽 2
  3.   def tp_cost_color;     text_color(0);  end;    # 消费 TP
复制代码

作者: KB.Driver    时间: 2019-9-22 11:58
真の玛娜君 发表于 2019-9-21 23:05
好像直接改()里的数字也可以?

你改变数字的话,只能用窗口皮肤里定好的那些颜色。
如果要根据自己喜好来定的话,还是用Color.new(r,g,b,a)


作者: 真の玛娜君    时间: 2019-9-22 12:20
KB.Driver 发表于 2019-9-22 11:58
你改变数字的话,只能用窗口皮肤里定好的那些颜色。
如果要根据自己喜好来定的话,还是用Color.new(r,g,b ...

都可以,大不了,我改窗口皮肤的颜色




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1