Advertisement
mrbubble

Comp. Patch: YSA Classical ATB + KMS Generic Gauge

Jan 25th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.38 KB | None | 0 0
  1. #==============================================================================
  2. # Compatibility Patch :                                          v1.1 (2/1/12)
  3. #   YSA Battle System: Classical ATB + KMS Generic Gauge
  4. #==============================================================================
  5. # Script by:
  6. #     Mr. Bubble
  7. #--------------------------------------------------------------------------
  8. # Place this script below both YSA Battle System: Classical ATB and
  9. # KMS Generic Gauge in your script edtior.
  10. #
  11. # ATB Generic Gauge support for enemies is not yet implemented.
  12. #==============================================================================
  13.  
  14. module Bubs
  15. module GGPatch
  16.   # * Gauge File Names
  17.   #  Images must be placed in the "Graphics/System" folder of your project
  18.   CATB_GAUGE_IMAGE  = "GaugeCATB"        # CATB Gauge
  19.   CATB_CHARGE_IMAGE = "GaugeCATBCharge"  # CATB Charge Gauge
  20.  
  21.   # * Gauge Position Offset [x, y]
  22.   CATB_OFFSET = [-23, -2]
  23.  
  24.   # * Gauge Length Adjustment
  25.   CATB_LENGTH = -4
  26.  
  27.   # * Gauge Slope
  28.   #   Must be between -89 ~ 89 degrees
  29.   CATB_SLOPE = 30
  30. end
  31. end
  32.  
  33. #==============================================================================
  34. # ■ Window_BattleStatus
  35. #==============================================================================
  36.  
  37. $imported = {} if $imported.nil?
  38. $kms_imported = {} if $kms_imported.nil?
  39.  
  40. class Window_BattleStatus < Window_Selectable
  41.   if $imported["YSA-CATB"] && $kms_imported["GenericGauge"]
  42.   #--------------------------------------------------------------------------
  43.   # overwrite: draw_actor_catb
  44.   #--------------------------------------------------------------------------
  45.   def draw_actor_catb(actor, dx, dy, width = 124)
  46.     width -= 4
  47.     dy -= 5
  48.     draw_gauge(Bubs::GGPatch::CATB_GAUGE_IMAGE,
  49.               dx, dy, width, actor.catb_filled_rate,
  50.               Bubs::GGPatch::CATB_OFFSET,
  51.               Bubs::GGPatch::CATB_LENGTH,
  52.               Bubs::GGPatch::CATB_SLOPE)
  53.     if actor.catb_ct_filled_rate > 0
  54.       draw_gauge(Bubs::GGPatch::CATB_CHARGE_IMAGE,
  55.                 dx, dy, width, actor.catb_ct_filled_rate,
  56.                 Bubs::GGPatch::CATB_OFFSET,
  57.                 Bubs::GGPatch::CATB_LENGTH,
  58.                 Bubs::GGPatch::CATB_SLOPE)
  59.     end
  60.     change_color(system_color)
  61.     draw_text(dx, dy, 30, line_height, YSA::CATB::ATB_PHRASE)
  62.   end
  63.  
  64.   end # end $imported
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement