#============================================================================== # ■ RGSS3 限界突破&限界変動特徴表示補助スクリプト Ver1.01 by 星潟 #------------------------------------------------------------------------------ # HP/MP/TPが5桁のアクターの表示が短縮されないように調整します。 #------------------------------------------------------------------------------ # Ver1.01 5桁になることで戦闘中のHP/MP/TPの項目名と # 特定のスクリプトとの兼ね合いで # 項目名と数字が被る場合がある問題を回避するための # 追加設定項目を追加しました。 #============================================================================== module LB #HP/MP/TPの描写領域調整値(0以上でWindow_Baseの能力描写を上書きして調整する) #デフォルトでは5桁の表示に適した値である10を入れています。 #他の何らかの作用によって調整が行われている場合は0にするか #このスクリプトそのものを削除して下さい。 PRDRW3 = 10 #HP/MP/TPが4桁の場合にPを省略するか否かの設定を行います。 #trueで省略、falseで省略しません。 SHORT = true #描写時に短縮を行う条件となる領域の長さを取得。 #(長ければ長いほど短縮を行わない。分からない方はスルー推奨) LONG_WIDTH = 96 #シーン別の短縮可否を設定します。 #0の場合は戦闘時のみ #1の場合は非戦闘時 #2の場合は常時となります。 SHORT_FLAG = 0 #HPの更なる短縮名を指定します。 SHORT_H = "H" #MPの更なる短縮名を指定します。 SHORT_M = "M" #TPの更なる短縮名を指定します。 SHORT_T = "T" end if LB::PRDRW3 > 0 class Window_Base < Window #-------------------------------------------------------------------------- # HP の描画 #-------------------------------------------------------------------------- alias draw_actor_hp_130 draw_actor_hp def draw_actor_hp(actor, x, y, width = 130) draw_actor_hp_130(actor, x, y, width) end #-------------------------------------------------------------------------- # MP の描画 #-------------------------------------------------------------------------- alias draw_actor_mp_130 draw_actor_mp def draw_actor_mp(actor, x, y, width = 130) draw_actor_mp_130(actor, x, y, width) end #-------------------------------------------------------------------------- # TP の描画 #-------------------------------------------------------------------------- alias draw_actor_tp_130 draw_actor_tp def draw_actor_tp(actor, x, y, width = 130) draw_actor_tp_130(actor, x, y, width) end #-------------------------------------------------------------------------- # 現在値/最大値を分数形式で描画 #-------------------------------------------------------------------------- def draw_current_and_max_values(x, y, width, current, max, color1, color2) change_color(color1) xr = x + width if width < 96 draw_text(xr - 40 - LB::PRDRW3, y, 42 + LB::PRDRW3, line_height, current, 2) else draw_text(xr - 92 - LB::PRDRW3 * 2, y, 42 + LB::PRDRW3, line_height, current, 2) change_color(color2) draw_text(xr - 52 - LB::PRDRW3, y, 12, line_height, "/", 2) draw_text(xr - 42 - LB::PRDRW3, y, 42 + LB::PRDRW3, line_height, max, 2) end end end end if LB::SHORT class Game_Temp attr_accessor :short_flag end class Window_Base < Window #-------------------------------------------------------------------------- # HP の描画 #-------------------------------------------------------------------------- alias draw_actor_hp_130_short draw_actor_hp def draw_actor_hp(actor, x, y, width = 130) $game_temp.short_flag = true if actor.hp > 9999 && hmt_short_flag && width < LB::LONG_WIDTH draw_actor_hp_130_short(actor, x, y, width) $game_temp.short_flag = nil end #-------------------------------------------------------------------------- # MP の描画 #-------------------------------------------------------------------------- alias draw_actor_mp_130_short draw_actor_mp def draw_actor_mp(actor, x, y, width = 130) $game_temp.short_flag = true if actor.mp > 9999 && hmt_short_flag && width < LB::LONG_WIDTH draw_actor_mp_130_short(actor, x, y, width) $game_temp.short_flag = nil end #-------------------------------------------------------------------------- # TP の描画 #-------------------------------------------------------------------------- alias draw_actor_tp_130_short draw_actor_tp def draw_actor_tp(actor, x, y, width = 130) $game_temp.short_flag = true if actor.tp > 9999 && hmt_short_flag && width < LB::LONG_WIDTH draw_actor_tp_130_short(actor, x, y, width) $game_temp.short_flag = nil end def hmt_short_flag case LB::SHORT_FLAG when 0#戦闘時のみ SceneManager.scene_is?(Scene_Battle) when 1#戦闘時以外のみ !SceneManager.scene_is?(Scene_Battle) when 2#常時 true end end end class << Vocab alias hp_a_more_short hp_a def hp_a $game_temp.short_flag ? LB::SHORT_H : hp_a_more_short end alias mp_a_more_short mp_a def mp_a $game_temp.short_flag ? LB::SHORT_M : mp_a_more_short end alias tp_a_more_short tp_a def tp_a $game_temp.short_flag ? LB::SHORT_T : tp_a_more_short end end end