Project1
标题: 怎样来区分各角色装备状态里HP的名字? [打印本页]
作者: shengfeng 时间: 2018-12-17 16:57
标题: 怎样来区分各角色装备状态里HP的名字?
默认显示是HP ! 怎样把11号后面的几个角色HP改成SP
作者: KB.Driver 时间: 2018-12-17 17:55
module Vocab
HP2 = "SP"
#更换后的HP名
end
class Window_Base
#--------------------------------------------------------------------------
# ● 绘制 HP
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
#==================================================================
vocab_hp_a = actor.id < 3 ? Vocab::hp_a : Vocab::HP2 #3号角色开始更换用语
draw_text(x, y, 30, line_height, vocab_hp_a)
#==================================================================
draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
end
module Vocab
HP2 = "SP"
#更换后的HP名
end
class Window_Base
#--------------------------------------------------------------------------
# ● 绘制 HP
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
#==================================================================
vocab_hp_a = actor.id < 3 ? Vocab::hp_a : Vocab::HP2 #3号角色开始更换用语
draw_text(x, y, 30, line_height, vocab_hp_a)
#==================================================================
draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
end
将注释那行的3改成11就是你要的效果了
作者: shengfeng 时间: 2018-12-17 18:18
我说的是装备的状态栏不是人物的状态栏。装备栏左边那一行显示增减物防、物攻、魔防等数字的
作者: shengfeng 时间: 2018-12-17 20:41
- class Window_Status < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 绘制能力值
- #--------------------------------------------------------------------------
- def draw_parameters(x, y)
- [0,1].each do |i|
- draw_actor_param(@actor, x, y + line_height * i, i + 2)
- end
- draw_actor_param(@actor, x, y + line_height * 2, 4)
- draw_actor_param(@actor, x, y + line_height * 3, 6)
- end
- end
-
- class Window_EquipStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- draw_actor_name(@actor, 4, 0) if @actor
- [0,1,2,3].each do |i|
- draw_item(0, line_height * (1 + i), i)
- end
- draw_item(0, line_height * (1 + 4), 6)
- end
-
- end
复制代码
作者: shengfeng 时间: 2018-12-17 20:44
用了这个脚本在装备状态栏里显示HP
作者: KB.Driver 时间: 2018-12-18 11:33
module Vocab
NEW_HP = "最大SP"
#最大HP的新名字
end
class Window_EquipStatus
#--------------------------------------------------------------------------
# ● 绘制能力值的名字
#--------------------------------------------------------------------------
def draw_param_name(x, y, param_id)
change_color(system_color)
#==================================================================
return unless @actor
vocab = (param_id == 0 && @actor.id > 6 ? Vocab::NEW_HP : Vocab::param(param_id))
draw_text(x, y, 120, line_height, vocab)
#==================================================================
draw_text(x, y, 80, line_height, vocab)
end
end
module Vocab
NEW_HP = "最大SP"
#最大HP的新名字
end
class Window_EquipStatus
#--------------------------------------------------------------------------
# ● 绘制能力值的名字
#--------------------------------------------------------------------------
def draw_param_name(x, y, param_id)
change_color(system_color)
#==================================================================
return unless @actor
vocab = (param_id == 0 && @actor.id > 6 ? Vocab::NEW_HP : Vocab::param(param_id))
draw_text(x, y, 120, line_height, vocab)
#==================================================================
draw_text(x, y, 80, line_height, vocab)
end
end
把@actor.id > 6的6改成10就是11号以后改名字
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |