Project1

标题: 关于EXP显示的问题 [打印本页]

作者: zx903193387    时间: 2016-5-20 19:46
标题: 关于EXP显示的问题
请问怎么在如下的脚本上修改,把EXP的显示从【当前总EXP/到下一级的总EXP】修改成【当前级别剩余的EXP/到下一级需要的EXP】
打个比方,就是10级升到11级需要1000EXP,显示出来是【0/1000】,而不是VXA所默认的【10000/11000]
  1. #--------------------------------------------------------------------------
  2. # ● 経験値情報の描画(针对640*456的视觉效果修改)
  3. #--------------------------------------------------------------------------
  4.   def draw_exp_info(x, y)
  5.     s1 = @actor.max_level? ? "-------" : @actor.exp - @actor.past_level_exp
  6.     s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
  7.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  8.     change_color(system_color)
  9.     draw_text(x+80, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
  10.     draw_text(x+80, y + line_height * 1.2, 180, line_height, s_next)
  11.     change_color(normal_color)
  12.     draw_text(x+100, y + line_height * 0.6, 180, line_height, s1, 2)
  13.     draw_text(x+100, y + line_height * 1.8, 180, line_height, s2, 2)
  14.   end
  15. #--------------------------------------------------------------------------
  16. # ● EXP の描画(针对640*456的视觉效果修改)
  17. #--------------------------------------------------------------------------
  18.   def draw_actor_exp(actor, x, y, display = true, width = 328)
  19.     this_level = (actor.exp - actor.past_level_exp)
  20.     next_level = (actor.next_level_exp - actor.past_level_exp)
  21.     draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
  22.     change_color(system_color)
  23.     if display
  24.       draw_text(x, y, 30, line_height, "EXP")
  25.       draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
  26.     end
  27.   end
  28.   def draw_actor_exp2(actor, x, y, display = true, width = 448)
  29.     this_level = actor.exp - actor.past_level_exp
  30.     next_level = actor.next_level_exp - actor.past_level_exp
  31.     draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
  32.     change_color(system_color)
  33.     if display
  34.       draw_text(x, y, 30, line_height, "EXP")
  35.       draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
  36.     end
  37.   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