Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Compatibility Patch : v1.0 (1/24/12)
- # YEA Victory Aftermath + KMS Generic Gauge
- #==============================================================================
- # Script by:
- # Mr. Bubble
- #--------------------------------------------------------------------------
- # Place this script below both YEA Victory Aftermath and KMS Generic Gauge
- # in your script edtior.
- #==============================================================================
- module Bubs
- module GGPatch
- # * Gauge File Names
- # Images must be placed in the "Graphics/System" folder of your project
- VA_EXP_IMAGE = "GaugeEXP" # Victory Aftermath EXP
- VA_MAX_LEVEL_IMAGE = "GaugeEXP" # MAX Level Victory Aftermath EXP,
- # Gauge file name for when the actor
- # is at MAX level
- # * Gauge Position Offset [x, y]
- VA_EXP_OFFSET = [-23, -2] # Victory Aftermath EXP
- # * Gauge Length Adjustment
- VA_EXP_LENGTH = -4 # Victory Aftermath EXP
- # * Gauge Slope
- # Must be between -89 ~ 89 degrees
- VA_EXP_SLOPE = 30 # Victory Aftermath EXP
- end
- end
- #==============================================================================
- # ■ Window_VictoryEXP_Front
- #==============================================================================
- $imported = {} if $imported.nil?
- $kms_imported = {} if $kms_imported.nil?
- class Window_VictoryEXP_Front < Window_VictoryEXP_Back
- if $imported["YEA-VictoryAftermath"] && $kms_imported["GenericGauge"]
- #--------------------------------------------------------------------------
- # overwrite : draw_exp_gauge
- #--------------------------------------------------------------------------
- def draw_exp_gauge(actor, rect, rate)
- rate = [[rate, 1.0].min, 0.0].max
- dx = (rect.width - [rect.width, 96].min) / 2 + rect.x
- dy = rect.y + line_height * 2 + 96
- dw = [rect.width, 96].min
- image = rate >= 1.0 ? Bubs::GGPatch::VA_MAX_LEVEL_IMAGE : Bubs::GGPatch::VA_EXP_IMAGE
- draw_gauge(image, dx, dy, dw,
- rate,
- Bubs::GGPatch::VA_EXP_OFFSET,
- Bubs::GGPatch::VA_EXP_LENGTH,
- Bubs::GGPatch::VA_EXP_SLOPE)
- fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT
- text = sprintf(fmt, [rate * 100, 100.00].min)
- if [rate * 100, 100.00].min == 100.00
- text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT
- text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level?
- end
- draw_text(dx, dy, dw, line_height, text, 1)
- end
- end # end $imported
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement