Project1
标题:
关于EXP显示的问题
[打印本页]
作者:
zx903193387
时间:
2016-5-20 19:46
标题:
关于EXP显示的问题
请问怎么在如下的脚本上修改,把EXP的显示从【当前总EXP/到下一级的总EXP】修改成【当前级别剩余的EXP/到下一级需要的EXP】
打个比方,就是10级升到11级需要1000EXP,显示出来是【0/1000】,而不是VXA所默认的【10000/11000]
#--------------------------------------------------------------------------
# ● 経験値情報の描画(针对640*456的视觉效果修改)
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.max_level? ? "-------" : @actor.exp - @actor.past_level_exp
s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
s_next = sprintf(Vocab::ExpNext, Vocab::level)
change_color(system_color)
draw_text(x+80, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
draw_text(x+80, y + line_height * 1.2, 180, line_height, s_next)
change_color(normal_color)
draw_text(x+100, y + line_height * 0.6, 180, line_height, s1, 2)
draw_text(x+100, y + line_height * 1.8, 180, line_height, s2, 2)
end
#--------------------------------------------------------------------------
# ● EXP の描画(针对640*456的视觉效果修改)
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, display = true, width = 328)
this_level = (actor.exp - actor.past_level_exp)
next_level = (actor.next_level_exp - actor.past_level_exp)
draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
change_color(system_color)
if display
draw_text(x, y, 30, line_height, "EXP")
draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
end
end
def draw_actor_exp2(actor, x, y, display = true, width = 448)
this_level = actor.exp - actor.past_level_exp
next_level = actor.next_level_exp - actor.past_level_exp
draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
change_color(system_color)
if display
draw_text(x, y, 30, line_height, "EXP")
draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
end
end
复制代码
作者:
御曹司
时间:
2016-5-20 21:46
this_level = actor.exp - actor.past_level_exp
next_level = actor.next_level_exp - actor.past_level_exp
这个应该就是当前级别剩余的EXP/到下一级需要的EXP啊?
怎么会显示到那样。。。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1