Project1
标题:
角色满级后经验条仍然会继续增加的问题
[打印本页]
作者:
JN1412
时间:
2013-7-12 19:15
标题:
角色满级后经验条仍然会继续增加的问题
我给角色设定的最大等级为20级,但当角色满级后,菜单中的经验条还在继续增加,而且会越来越长,影响美观。求各位大侠帮忙看看这个“显示EXP经验条”的脚本,看看是脚本该如何修改,或者是VA数据库中设置的问题。谢谢了!!!
脚本在此:
---------------
#===================================
# ●設定區域
#===================================
module WD
module Exp_Gauge
#EXP條COLOR,請修改成TEXT文字
EXP_GAUGE_COLOR1 = 6
EXP_GAUGE_COLOR2 = 14
#EXP條文字顯示設定,true為打開,false為關閉
EXP_TEXT_DISPLAY = true
end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# ゲーム中の全てのウィンドウのスーパークラスです。
#==============================================================================
class Window_Base < Window
include WD::Exp_Gauge
def exp_gauge_color1; text_color(EXP_GAUGE_COLOR1); end; # EXP ゲージ 1
def exp_gauge_color2; text_color(EXP_GAUGE_COLOR2); end; # EXP ゲージ 2
#--------------------------------------------------------------------------
# ● シンプルなステータスの描画
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y + line_height * 0.5)
draw_actor_level(actor, x, y - line_height * 0.5)
draw_actor_icons(actor, x, y + line_height * 1.5)
draw_actor_class(actor, x + 120, y - line_height * 0.5)
draw_actor_hp(actor, x + 120, y + line_height * 0.5)
draw_actor_mp(actor, x + 120, y + line_height * 1.5)
draw_actor_exp(actor, x, y + line_height * 2.5, EXP_TEXT_DISPLAY)
end
#--------------------------------------------------------------------------
# ● EXP の描画
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, display = true, width = 244)
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, 72, 40, line_height, "EXP")
draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
end
end
end
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP の割合を取得
#--------------------------------------------------------------------------
def exp_rate
this_level = exp - past_level_exp
next_level = next_level_exp - past_level_exp
next_level > 0 ? this_level.to_f / next_level : 0
end
#--------------------------------------------------------------------------
# ● 前のレベルの経験値を取得
#--------------------------------------------------------------------------
def past_level_exp
[url=home.php?mod=space&uid=22147]@level[/url] > 1 ? exp_for_level(@level - 1) : 0
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1