DerVVulfman's Limit Break Menu

DerVVulfman's Limit Break Menu
An Official DerVVulfman Limit System Add-On
Version: 2.7

Disclaimer

I've been quite busy, so in my absence, I left the upkeep and care of this script in the hands of DVV. Any update after 5-16-07 is entirely his doing.

Introduction

Based off the menu found in SephirothSpawn's Limit System, this allows a player to set the limit type for each and every character, as well view overdrive skills on a separate screen from the regular skills.

Features
  • Allows the user to choose limit break gain mode
  • Allows user to view limit break skills in a separate screen from the regular skills.
  • Changed element tagging style to match that of the Limit system.
  • NEW! 4/1/07 Added edited method that removes SP display when cost is zero. Affects both LB Skills, and regular skills.
  • NEW! 4/20/07Added a new method to the original script, allowing menu skills to be on separate screens, but in the same screen in battle.
  • NEW! 4/26/07Added SDK version of script. Enjoy!
  • NEW! 5/3/07Fixed minor bug. Thanks to DVV for pointing it out.
  • NEW! 5/7/07 Due to a new method added to my script, courtesy of DerVVulfman, this script no longer requires separate SDK and Non-SDK scripts. Yay to DVV!
  • NEW! 5/7/07 Figured out a second auto detect function that changes the skill window when using the Attack Replacer LB Add-On. Thanks to DVV for teaching me how to auto detect.
  • NEW! 5/16/07 Error brought to my attention, and fixed by DVV. Error was in SDK auto detect coding. Fixed and updated.
  • NEW! 5/20/07 DVV Revised 'refresh' definition. LB_Skills and separation dealt with through game_temp
  • NEW! 7/01/07 DVV Fixed a button.press error. Scrolling through limit types keeping button pressed down did not change the help text.
  • NEW! 7/04/07 DVV Compatability Patch finished
  • NEW! 7/05/07 DVV Config reworked, switch added to show zero SP cost or not


Screenshots

Just a few.
Content Hidden Spoiler
Gain Mode Window
Image
Limit Viewer
Image

Demo

Limit Menu Demo
Featuring:
  • DerVVulfman's Limit Break System
  • DerVVulfman's Attack Replacer
  • Alistor's LBS Menu
  • Seph's Slant Bars

Script

Limit Menu Script Spoiler
  1.  
  2. #==============================================================================
  3. # DerVVulfman's Limit Break Menu v 2.7
  4. # By Alistor, with Edits by DerVVulfman
  5. # Original Concept by SephirothSpawn
  6. #==============================================================================
  7. # This script has an Auto-Detect function that, when used with SDK, replaces the
  8. # internal Window_HorizCommand with the SDK version. Thanks go to DerVVulfman for that
  9. # method. Added a second Auto-Detect function that, when used with the Attack Replacer LB
  10. # Add-On, removes limits from the skill window in battle and vice-versa.
  11. #==============================================================================
  12.  
  13.  
  14.  
  15.     #=======================================================================#
  16.     #   **   C   O   N   F   I   G   U   R   A   T   I   O   N         S   Y   S   T   E   M   **   #
  17.     #=======================================================================#
  18.  
  19.  
  20.   # Allows you to hide SP values of zero:
  21.   # =====================================
  22.   HIDE_ZERO_SP      = true
  23.  
  24.  
  25.   # Basic Menu Text:
  26.   # ================
  27.   LB_MENU_TITLE    = 'Limits'            # Menu Title
  28.   LB_HEADING_1      = 'View Limits'    # Option 1 Text:   List of Limit Break Skills
  29.   LB_HEADING_2      = 'Set Gain Mode' # Option 2 Text:   List of Limit Break Types
  30.  
  31.  
  32.   # Preset Gain Mode Help Text System:
  33.   # =================================+
  34.   # This customizes the text shown after you choose the limit break style for an
  35.   # actor.   Originally hardwired, you can now edit the layout right here.
  36.   #
  37.   # {lb_a_name}   :Actor's Name
  38.   # {lb_a_type}   :Actor's Gain Mode Text (Limit Type)
  39.   LB_GAIN_TEXT = "{lb_a_name}'s Gain Mode is Now {lb_a_type}"
  40.   # - Sample output:   Aluxes's Gain Mode is now Stotic -
  41.   #
  42.   # Optionally, you could have it be this:
  43.   # LB_GAIN_TEXT = "Gain Mode of {lb_a_type} now set to {lb_a_name}"
  44.   # - Sample output:   Gain Mode of Victor now set to Gloria -
  45.  
  46.  
  47.   # Array of Limit Break types:
  48.   # ===========================
  49.   # This allows you to list the limit break styles or settings available in your
  50.   # system. You can choose to list them in any order and pick and choose whether
  51.   # a limit break style   will even be   in your game.    You no longer have to use
  52.   # 'all' the limit break types available.    And as such, this system is already
  53.   # designed to accomodate any newer limit break types not yet available.
  54.   #
  55.   # Idx:            The index/setting of a 'limit break type' as defined by LB_START
  56.   # Type Name:   The basic choice/option of a 'limit break type' in the menu
  57.   # Type Desc:   A help text description of a 'limit break type'
  58.   #
  59.   # FORMAT:
  60.   # LB_MENU_ARRAY = [   [Limit Array], [Limit Array],... ]
  61.   # with...
  62.   # Limit Array    = [Idx(as number), Type Name(as string), Type Desc(as string)]
  63.   #
  64.   # NOTE: The array can be set in any order, so the menu options can be arranged
  65.   #          in any order.    What controls the limit break type in use is the 'Idx'
  66.   #          number in the array.
  67.   #
  68.   #                            Idx       Type Name          Type Desc
  69.   LB_MENU_ARRAY    = [ [0,      'Warrior',         'Warrior - Gains When Hero Damages Enemy'] ,
  70.                                 [1,      'Heavy Hitter', 'Heavy Hitter - Gains When Hero Lands a Critical Hit'],
  71.                                 [2,      'Stoic',            'Stoic - Gains When Hero Receives Damage'] ,
  72.                                 [3,      'Slayer',          'Slayer - Gains When Hero Kills Enemy'],
  73.                                 [4,      'Godslayer',      'GodSlayer - Gains When Hero Defeats a Boss'],
  74.                                 [5,      'Victim',          'Victim - Gains When Hero is Slain'],
  75.                                 [6,      'Victor',          'Victor - Gains When Party Wins Battle'],
  76.                                 [7,      'Coward',          'Coward - Gains When Hero Escapes Battle'],
  77.                                 [8,      'Defender',       'Defender - Gains When Hero Chooses to Guard'],
  78.                                 [9,      'Loner',            'Loner - Gains When Hero Is Only Member in Party'],
  79.                                 [10,    'Active',          'Active - Gains When Hero Performs an Action'],
  80.                                 [11,    'Daredevil',      'Daredevil - Gains When Hero is in Critical Condition'] ]
  81.  
  82.                                
  83.     #=======================================================================#
  84.     #                  C O N F I G U R A T I O N    S Y S T E M    E N D                  #
  85.     #=======================================================================#   
  86.  
  87.     
  88.     
  89. #==============================================================================
  90. # ** RMXP Standard Development Kit (SDK)
  91. #------------------------------------------------------------------------------
  92. #   A system aimed to increase compatibility between RGSS scripts
  93. #==============================================================================
  94. module SDK
  95.   # Set Autodetect global to false
  96.   $lbadd_menu_sdk = false
  97.   # SDK Autodetect routine
  98.   if defined?(log_alias)
  99.      # Set Autodetect global to true
  100.      $lbadd_menu_sdk = true
  101.   end   
  102. end
  103.  
  104.  
  105.  
  106. #==============================================================================
  107. # ** Game_System
  108. #------------------------------------------------------------------------------
  109. #   This class handles data surrounding the system. Backround music, etc.
  110. #   is managed here as well. Refer to "$game_system" for the instance of
  111. #   this class.
  112. #==============================================================================
  113.  
  114. class Game_System
  115.   #--------------------------------------------------------------------------
  116.   # * Public Instance Variables
  117.   #--------------------------------------------------------------------------
  118.   attr_accessor :lb_attack_detected
  119.   #--------------------------------------------------------------------------
  120.   # * Object Initialization
  121.   #--------------------------------------------------------------------------
  122.   alias lbadd1_init initialize
  123.   def initialize
  124.      lbadd1_init
  125.      if @lb_height != nil
  126.         @lb_attack_detected = true
  127.      end
  128.   end
  129. end
  130.  
  131.  
  132.  
  133. #==============================================================================
  134. # ** Game_Temp
  135. #------------------------------------------------------------------------------
  136. #   This class handles temporary data that is not included with save data.
  137. #   Refer to "$game_temp" for the instance of this class.
  138. #==============================================================================
  139.  
  140. class Game_Temp
  141.   #--------------------------------------------------------------------------
  142.   # * Public Instance Variables
  143.   #--------------------------------------------------------------------------
  144.   attr_accessor :seperation                      # Seperation flag
  145.   attr_accessor :limitbreak_skills            # Limit Break skill flag
  146.   attr_accessor :limit_menu                      # Limit Break menu flag
  147.   #--------------------------------------------------------------------------
  148.   # * Object Initialization
  149.   #--------------------------------------------------------------------------
  150.   alias lbadd1_init initialize
  151.   def initialize
  152.      lbadd1_init
  153.      @seperation             = true
  154.      @limitbreak_skills   = false
  155.      @limit_menu             = false
  156.   end
  157. end
  158.  
  159.  
  160.  
  161. #==============================================================================
  162. # ** Window_Skill
  163. #------------------------------------------------------------------------------
  164. #   This window displays usable skills on the skill and battle screens.
  165. #==============================================================================
  166.  
  167. class Window_Skill < Window_Selectable
  168.   #--------------------------------------------------------------------------
  169.   # * Refresh
  170.   #--------------------------------------------------------------------------
  171.   unless $gnd_lb_patch   
  172.   def refresh
  173.      if self.contents != nil
  174.         self.contents.dispose
  175.         self.contents = nil
  176.      end
  177.      @data = []
  178.      unless @actor == nil
  179.         for i in [email hidden]
  180.            skill = $data_skills[@actor.skills[i]]
  181.            unless skill == nil
  182.               if $game_temp.seperation
  183.                  if $game_temp.limitbreak_skills
  184.                     @data.push(skill) if skill.element_set.include?($lb_element_id)
  185.                  else
  186.                     @data.push(skill) unless skill.element_set.include?($lb_element_id)
  187.                  end
  188.               else
  189.                  @data.push(skill)
  190.               end
  191.            end
  192.         end
  193.      end
  194.      # If item count is not 0, make a bit map and draw all items
  195.      @item_max = @data.size
  196.      if @item_max > 0
  197.         self.contents = Bitmap.new(width - 32, row_max * 32)
  198.         for i in 0...@item_max
  199.            draw_item(i)
  200.         end
  201.      end
  202.      $game_temp.seperation            = true
  203.      $game_temp.limitbreak_skills = false
  204.   end      
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # * Draw Item
  208.   #       index : item number
  209.   #--------------------------------------------------------------------------
  210.   def draw_item(index)
  211.      skill = @data[index]
  212.      if @actor.skill_can_use?(skill.id)
  213.         self.contents.font.color = normal_color
  214.      else
  215.         self.contents.font.color = disabled_color
  216.      end
  217.      x = 4 + index % 2 * (288 + 32)
  218.      y = index / 2 * 32
  219.      rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  220.      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  221.      bitmap = RPG::Cache.icon(skill.icon_name)
  222.      opacity = self.contents.font.color == normal_color ? 255 : 128
  223.      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  224.      self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
  225.      unless HIDE_ZERO_SP && skill.sp_cost == 0
  226.         self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  227.      end
  228.   end
  229.   #--------------------------------------------------------------------------
  230.   # * Check Data
  231.   #--------------------------------------------------------------------------
  232.   def data
  233.      return @data
  234.   end
  235. end
  236.  
  237.  
  238.  
  239. #==============================================================================
  240. # ** Window Horizontal Command (conditional on SDK system)
  241. #------------------------------------------------------------------------------
  242. #   This window deals with general command choices, horizontally.
  243. #==============================================================================
  244.  
  245. # If no SDK exists...
  246. if !$lbadd_menu_sdk
  247.   # Use the Non-SDK system
  248.   class Window_HorizCommand < Window_Selectable
  249.      #--------------------------------------------------------------------------
  250.      # * Object Initialization
  251.      #--------------------------------------------------------------------------
  252.      def initialize(commands, width = 640, height = 64)
  253.         super(0, 0, width, height)
  254.         self.contents = Bitmap.new(width - 32, height - 32)
  255.         @commands = commands
  256.         @item_max = @commands.size
  257.         @column_max = @commands.size
  258.         refresh
  259.         self.index = 0
  260.      end
  261.      #--------------------------------------------------------------------------
  262.      # * Refresh
  263.      #--------------------------------------------------------------------------
  264.      def refresh
  265.         self.contents.clear
  266.         for i in 0...@item_max
  267.            draw_item(i, normal_color)
  268.         end
  269.      end
  270.      #--------------------------------------------------------------------------
  271.      # * Draw Item
  272.      #       index : item number
  273.      #--------------------------------------------------------------------------
  274.      def draw_item(index, color)
  275.         self.contents.font.color = color
  276.         x = width / @item_max * index
  277.         off = width / @item_max - 32
  278.         self.contents.draw_text(x, 0, off, 32, @commands[index], 1)
  279.      end
  280.      #--------------------------------------------------------------------------
  281.      # * Disable Item
  282.      #       index : item number
  283.      #--------------------------------------------------------------------------
  284.      def disable_item(index)
  285.         draw_item(index, disabled_color)
  286.      end
  287.   end
  288. end
  289.  
  290.  
  291.  
  292. #==============================================================================
  293. # ** Scene_LimitMenu
  294. #------------------------------------------------------------------------------
  295. #   This class performs limit break screen processing.
  296. #==============================================================================
  297.  
  298. class Scene_LimitMenu
  299.   #--------------------------------------------------------------------------
  300.   # * Object Initialization
  301.   #       actor_index : actor index
  302.   #--------------------------------------------------------------------------
  303.   def initialize(actor_index = 0)
  304.      @actor_index = actor_index
  305.      # Attach the Limit Menu flag
  306.      $game_temp.limit_menu = true
  307.   end
  308.   #--------------------------------------------------------------------------
  309.   # * Main Processing
  310.   #--------------------------------------------------------------------------
  311.   def main
  312.      if @actor_index < $game_party.actors.size
  313.           @actor = $game_party.actors[@actor_index]
  314.      else
  315.           @actor = $game_party.reserve_actors[@actor_index - $game_party.actors.size]
  316.      end
  317.      # Make Help Window
  318.      @help_window = Window_Help.new
  319.      # Command Window
  320.      # If the SDK is disabled
  321.      if $lbadd_menu_sdk
  322.         @command_window = Window_HorizCommand.new(640, [LB_HEADING_1, LB_HEADING_2])
  323.      else
  324.         @command_window = Window_HorizCommand.new([LB_HEADING_1, LB_HEADING_2])
  325.      end
  326.         @command_window.y = 128
  327.      # Skill Window
  328.      @skill_window = Window_Skill.new(@actor)
  329.      @skill_window.y = 192
  330.      @skill_window.height = 288
  331.      $game_temp.seperation          = true
  332.      $game_temp.limitbreak_skills = true
  333.      @skill_window.refresh
  334.      @skill_window.active = false
  335.      # Skill Status Window
  336.      @status_window = Window_SkillStatus.new(@actor)
  337.      @status_window.y = 64
  338.      # Limit Break Types Window
  339.      @lb_type_window = Window_Limit_Types.new
  340.      @lb_type_window.y = 192
  341.      @lb_type_window.index = @actor.lb_type
  342.      @lb_type_window.visible = @lb_type_window.active = false
  343.      # Associate help window
  344.      if @skill_window.help_window == nil
  345.         @help_window.set_text(LB_MENU_TITLE, 1)
  346.      else
  347.         @skill_window.help_window = @help_window
  348.      end
  349.      # Scene Objects
  350.      @objects = [@help_window, @command_window, @skill_window, @lb_type_window, @status_window]
  351.      # Execute transition
  352.      Graphics.transition
  353.      # Main loop
  354.      loop do
  355.         # Update game screen
  356.         Graphics.update
  357.         # Update input information
  358.         Input.update
  359.         # Objects Update
  360.         @objects.each {|x| x.update}
  361.         # Frame update
  362.         update
  363.         # Abort loop if screen is changed
  364.         if $scene != self
  365.            break
  366.         end
  367.      end
  368.      # Prepare for transition
  369.      Graphics.freeze
  370.      # Dispose of Objects
  371.      @objects.each {|x| x.dispose}
  372.   end
  373.   #--------------------------------------------------------------------------
  374.   # * Frame Update
  375.   #--------------------------------------------------------------------------
  376.   def update
  377.      # If Main Command Active : call update_main
  378.      if @command_window.active
  379.         update_main
  380.         return
  381.      end
  382.      # If skill window is active: call update_skill
  383.      if @skill_window.active
  384.         update_skill
  385.         return
  386.      end
  387.      # If Limit Type is active: call update_type
  388.      if @lb_type_window.active
  389.         update_type
  390.         return
  391.      end
  392.   end
  393.   #--------------------------------------------------------------------------
  394.   # * Frame Update (if main window is active)
  395.   #--------------------------------------------------------------------------
  396.   def update_main
  397.      # Toggles Windows Visiblity
  398.      @skill_window.visible    = @command_window.index == 0 ? true : false
  399.      @lb_type_window.visible = @command_window.index == 1 ? true : false
  400.      # If B button was pressed
  401.      if Input.trigger?(Input::B)
  402.         # Play cancel SE
  403.         $game_system.se_play($data_system.cancel_se)
  404.         # Switch to menu screen
  405.         $scene = Scene_Menu.new(0)
  406.         return
  407.      end
  408.      # If C button was pressed
  409.      if Input.trigger?(Input::C)
  410.         # Branch Point
  411.         case @command_window.index
  412.         when 0   # View Skills
  413.            if @skill_window.data.size == 0
  414.               $game_system.se_play($data_system.buzzer_se)
  415.               @help_window.set_text(LB_MENU_TITLE, 1)
  416.            else
  417.               $game_system.se_play($data_system.decision_se)
  418.               @command_window.active   = false
  419.               @skill_window.active      = true
  420.            end
  421.         when 1   # Set Limit Break Type
  422.               $game_system.se_play($data_system.decision_se)
  423.               @command_window.active = false
  424.               @lb_type_window.active = true
  425.               @help_window.set_text(@lb_type_window.help_text, 1)
  426.         end
  427.      end
  428.      # If R button was pressed
  429.      if Input.trigger?(Input::R)
  430.         # Play cursor SE
  431.         $game_system.se_play($data_system.cursor_se)
  432.         # To next actor
  433.         @actor_index += 1
  434.         @actor_index %= $game_party.actors.size
  435.         # Switch to different skill screen
  436.         $scene = Scene_LimitMenu.new(@actor_index)
  437.         return
  438.      end
  439.      # If L button was pressed
  440.      if Input.trigger?(Input::L)
  441.         # Play cursor SE
  442.         $game_system.se_play($data_system.cursor_se)
  443.         # To previous actor
  444.         @actor_index += $game_party.actors.size - 1
  445.         @actor_index %= $game_party.actors.size
  446.         # Switch to different skill screen
  447.         $scene = Scene_LimitMenu.new(@actor_index)
  448.         return
  449.      end
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # * Frame Update (if main window is active)
  453.   #--------------------------------------------------------------------------
  454.   def update_skill
  455.      # Refreshes Help Window Text
  456.      @skill_window.help_window = @help_window
  457.      # If B button was pressed
  458.      if Input.trigger?(Input::B)
  459.         # Play cancel SE
  460.         $game_system.se_play($data_system.cancel_se)
  461.         @help_window.set_text(LB_MENU_TITLE, 1)
  462.         # Switch to main menu
  463.         @command_window.active = true
  464.         @skill_window.active   = false
  465.         return
  466.      end
  467.   end
  468.   #--------------------------------------------------------------------------
  469.   # * Frame Update (if main window is active)
  470.   #--------------------------------------------------------------------------
  471.   def update_type
  472.      # Refreshes Help Window Text (if triggered once or pressed continuously)
  473.      if Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN) ||
  474.         Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT) ||
  475.         Input.press?(Input::UP) || Input.press?(Input::DOWN) ||
  476.         Input.press?(Input::RIGHT) || Input.press?(Input::LEFT)
  477.         @help_window.set_text(@lb_type_window.help_text, 1)
  478.      end
  479.      # If B button was pressed
  480.      if Input.trigger?(Input::B)
  481.         # Play cancel SE
  482.         $game_system.se_play($data_system.cancel_se)
  483.         @help_window.set_text(LB_MENU_TITLE, 1)
  484.         # Switch to main menu
  485.         @command_window.active = true
  486.         @lb_type_window.active = false
  487.         return
  488.      end
  489.      # If C button was pressed
  490.      if Input.trigger?(Input::C)
  491.         # Play cancel SE
  492.         $game_system.se_play($data_system.decision_se)
  493.         # Retrieve Limit Type from array
  494.         actor_lb_type = LB_MENU_ARRAY[@lb_type_window.index][0]
  495.         # Set Actor Limit Type
  496.         @actor.lb_type = actor_lb_type
  497.         # Set the character's gain text
  498.         lb_a_name = @actor.name
  499.         lb_a_type = LB_MENU_ARRAY[@lb_type_window.index][1]
  500.         text = LB_GAIN_TEXT.dup
  501.         begin
  502.            text[/{lb_a_name}/] = "#{lb_a_name}"
  503.         rescue
  504.         end
  505.         begin
  506.            text[/{lb_a_type}/] = "#{lb_a_type}"
  507.         rescue
  508.         end
  509.         @help_window.set_text(text, 1)
  510.         return
  511.      end
  512.   end
  513. end
  514.  
  515.  
  516.  
  517. #==============================================================================
  518. # ** Window_Limit_Types
  519. #------------------------------------------------------------------------------
  520. #   This window displays the available limit types on the limit break screen.
  521. #==============================================================================
  522.  
  523. class Window_Limit_Types < Window_Selectable
  524.   #--------------------------------------------------------------------------
  525.   # * Object Initialization
  526.   #--------------------------------------------------------------------------
  527.   def initialize
  528.      super(0, 128, 640, 288)
  529.      @column_max = 2
  530.      @data = []
  531.      for i in 0...LB_MENU_ARRAY.size
  532.         @data.push(LB_MENU_ARRAY[i][1])
  533.      end
  534.      refresh
  535.      self.index = 0
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # * Get Type
  539.   #--------------------------------------------------------------------------
  540.   def get_type
  541.      return @data[self.index]
  542.   end
  543.   #--------------------------------------------------------------------------
  544.   # * Help Text
  545.   #--------------------------------------------------------------------------
  546.   def help_text
  547.      for i in 0...LB_MENU_ARRAY.size
  548.         text = LB_MENU_ARRAY[i][2] if LB_MENU_ARRAY[i][0] == index
  549.      end
  550.      return text
  551.     end
  552.   #--------------------------------------------------------------------------
  553.   # * Refresh
  554.   #--------------------------------------------------------------------------
  555.   def refresh
  556.      if self.contents != nil
  557.         self.contents.dispose
  558.         self.contents = nil
  559.      end
  560.      # If item count is not 0, make a bit map and draw all items
  561.      @item_max = @data.size
  562.      if @item_max > 0
  563.         self.contents = Bitmap.new(width - 32, row_max * 32)
  564.         for i in 0...@item_max
  565.            draw_item(i)
  566.         end
  567.      end
  568.   end
  569.   #--------------------------------------------------------------------------
  570.   # * Draw Item
  571.   #       index : item number
  572.   #--------------------------------------------------------------------------
  573.   def draw_item(index)
  574.      x = 4 + index % 2 * (288 + 32)
  575.      y = index / 2 * 32
  576.      self.contents.draw_text(x, y, contents.width / 2 - 32, 32, @data[index], 1)
  577.   end
  578. end
  579.  
  580.  
  581.  
  582. #==============================================================================
  583. # ** Scene_Battle
  584. #------------------------------------------------------------------------------
  585. #   This class performs battle screen processing.
  586. #==============================================================================
  587.  
  588. class Scene_Battle
  589.   #--------------------------------------------------------------------------
  590.   # * Main Processing
  591.   #--------------------------------------------------------------------------
  592.   alias lbmenu_main main
  593.   def main
  594.         # Autodetect value added
  595.         @lb_menu = true
  596.         # Perform the original call
  597.         lbmenu_main
  598.   end
  599.   #--------------------------------------------------------------------------
  600.   # * Start Skill Selection
  601.   #--------------------------------------------------------------------------
  602.   unless $gnd_lb_patch
  603.      def start_skill_select
  604.         # RTAB detection value built into Limit Break (DVV)
  605.         # Assigns 'battler' value for the Skill Window.
  606.         if $game_system.lb_rtab_detected
  607.            battler = @active_actor
  608.         else
  609.            battler = @active_battler
  610.         end
  611.         # Make skill window
  612.         @skill_window = Window_Skill.new(battler)
  613.         if $game_system.lb_attack_detected
  614.            $game_temp.seperation          = true
  615.            $game_temp.limitbreak_skills = false
  616.            @skill_window.refresh
  617.         else
  618.            $game_temp.seperation          = false
  619.            $game_temp.limitbreak_skills = false
  620.            @skill_window.refresh
  621.         end
  622.         @skill_window.z = 1000
  623.         # Associate help window
  624.         @skill_window.help_window = @help_window
  625.         # Disable actor command window
  626.         @actor_command_window.active = false
  627.         @actor_command_window.visible = false
  628.      end
  629.   end
  630. end
  631.  
Expand to see the code.

Main Menu Script - Limit Edit Spoiler
This next section adds the Limit command to the main menu. Paste it in a new section, or replace Scene_Menu entirely.

  1.  
  2. #==============================================================================
  3. # ** Scene_Menu
  4. #------------------------------------------------------------------------------
  5. #   This class performs menu screen processing.
  6. #==============================================================================
  7.  
  8. class Scene_Menu
  9.   #--------------------------------------------------------------------------
  10.   # * Object Initialization
  11.   #       menu_index : command cursor's initial position
  12.   #--------------------------------------------------------------------------
  13.   def initialize(menu_index = 0)
  14.      @menu_index = menu_index
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # * Main Processing
  18.   #--------------------------------------------------------------------------
  19.   def main
  20.      # Make command window
  21.      s1 = $data_system.words.item
  22.      s2 = $data_system.words.skill
  23.      s3 = $data_system.words.equip
  24.      s4 = "Status"
  25.      s5 = "Limit"
  26.      s6 = "Save"
  27.      s7 = "End Game"
  28.      @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
  29.      @command_window.index = @menu_index
  30.      # If number of party members is 0
  31.      if $game_party.actors.size == 0
  32.         # Disable items, skills, equipment, and status
  33.         @command_window.disable_item(0)
  34.         @command_window.disable_item(1)
  35.         @command_window.disable_item(2)
  36.         @command_window.disable_item(3)
  37.         @command_window.disable_item(4)
  38.      end
  39.      # If save is forbidden
  40.      if $game_system.save_disabled
  41.         # Disable save
  42.         @command_window.disable_item(5)
  43.      end
  44.      # Make play time window
  45.      @playtime_window = Window_PlayTime.new
  46.      @playtime_window.x = 0
  47.      @playtime_window.y = 320
  48.      # Make gold window
  49.      @gold_window = Window_Gold.new
  50.      @gold_window.x = 0
  51.      @gold_window.y = 416
  52.      # Make status window
  53.      @status_window = Window_MenuStatus.new
  54.      @status_window.x = 160
  55.      @status_window.y = 0
  56.      # Execute transition
  57.      Graphics.transition
  58.      # Main loop
  59.      loop do
  60.         # Update game screen
  61.         Graphics.update
  62.         # Update input information
  63.         Input.update
  64.         # Frame update
  65.         update
  66.         # Abort loop if screen is changed
  67.         if $scene != self
  68.            break
  69.         end
  70.      end
  71.      # Prepare for transition
  72.      Graphics.freeze
  73.      # Dispose of windows
  74.      @command_window.dispose
  75.      @playtime_window.dispose
  76.      @gold_window.dispose
  77.      @status_window.dispose
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # * Frame Update
  81.   #--------------------------------------------------------------------------
  82.   def update
  83.      # Update windows
  84.      @command_window.update
  85.      @playtime_window.update
  86.      @gold_window.update
  87.      @status_window.update
  88.      # If command window is active: call update_command
  89.      if @command_window.active
  90.         update_command
  91.         return
  92.      end
  93.      # If status window is active: call update_status
  94.      if @status_window.active
  95.         update_status
  96.         return
  97.      end
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # * Frame Update (when command window is active)
  101.   #--------------------------------------------------------------------------
  102.   def update_command
  103.      # If B button was pressed
  104.      if Input.trigger?(Input::B)
  105.         # Play cancel SE
  106.         $game_system.se_play($data_system.cancel_se)
  107.         # Switch to map screen
  108.         $scene = Scene_Map.new
  109.         return
  110.      end
  111.      # If C button was pressed
  112.      if Input.trigger?(Input::C)
  113.         # If command other than save or end game, and party members = 0
  114.         if $game_party.actors.size == 0 and @command_window.index < 5
  115.            # Play buzzer SE
  116.            $game_system.se_play($data_system.buzzer_se)
  117.            return
  118.         end
  119.         # Branch by command window cursor position
  120.         case @command_window.index
  121.         when 0   # item
  122.            # Play decision SE
  123.            $game_system.se_play($data_system.decision_se)
  124.            # Switch to item screen
  125.            $scene = Scene_Item.new
  126.         when 1   # skill
  127.            # Play decision SE
  128.            $game_system.se_play($data_system.decision_se)
  129.            # Make status window active
  130.            @command_window.active = false
  131.            @status_window.active = true
  132.            @status_window.index = 0
  133.         when 2   # equipment
  134.            # Play decision SE
  135.            $game_system.se_play($data_system.decision_se)
  136.            # Make status window active
  137.            @command_window.active = false
  138.            @status_window.active = true
  139.            @status_window.index = 0
  140.         when 3   # status
  141.            # Play decision SE
  142.            $game_system.se_play($data_system.decision_se)
  143.            # Make status window active
  144.            @command_window.active = false
  145.            @status_window.active = true
  146.            @status_window.index = 0
  147.         when 4   # limit
  148.            # Play decision SE
  149.            $game_system.se_play($data_system.decision_se)
  150.            # Make status window active
  151.            @command_window.active = false
  152.            @status_window.active = true
  153.            @status_window.index = 0                     
  154.         when 5   # save
  155.            # If saving is forbidden
  156.            if $game_system.save_disabled
  157.               # Play buzzer SE
  158.               $game_system.se_play($data_system.buzzer_se)
  159.               return
  160.            end
  161.            # Play decision SE
  162.            $game_system.se_play($data_system.decision_se)
  163.            # Switch to save screen
  164.            $scene = Scene_Save.new
  165.         when 6   # end game
  166.            # Play decision SE
  167.            $game_system.se_play($data_system.decision_se)
  168.            # Switch to end game screen
  169.            $scene = Scene_End.new
  170.         end
  171.         return
  172.      end
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # * Frame Update (when status window is active)
  176.   #--------------------------------------------------------------------------
  177.   def update_status
  178.      # If B button was pressed
  179.      if Input.trigger?(Input::B)
  180.         # Play cancel SE
  181.         $game_system.se_play($data_system.cancel_se)
  182.         # Make command window active
  183.         @command_window.active = true
  184.         @status_window.active = false
  185.         @status_window.index = -1
  186.         return
  187.      end
  188.      # If C button was pressed
  189.      if Input.trigger?(Input::C)
  190.         # Branch by command window cursor position
  191.         case @command_window.index
  192.         when 1   # skill
  193.            # Play decision SE
  194.            $game_system.se_play($data_system.decision_se)
  195.            # Switch to skill screen
  196.            $scene = Scene_Skill.new(@status_window.index)
  197.         when 2   # equipment
  198.            # Play decision SE
  199.            $game_system.se_play($data_system.decision_se)
  200.            # Switch to equipment screen
  201.            $scene = Scene_Equip.new(@status_window.index)
  202.         when 3   # status
  203.            # Play decision SE
  204.            $game_system.se_play($data_system.decision_se)
  205.            # Switch to status screen
  206.            $scene = Scene_Status.new(@status_window.index)
  207.         when 4   # limits
  208.            # Play decision SE
  209.            $game_system.se_play($data_system.decision_se)
  210.            # Switch to skill screen
  211.            $scene = Scene_LimitMenu.new(@status_window.index)         
  212.         end
  213.         return
  214.      end
  215.   end
  216. end
  217.  
Expand to see the code.

Apparently, this is good for families?

Instructions

Paste in a new section above main, but below the DVV's Overdrive script. The Scene_Menu can be pasted into a new section above main, or used to replace Scene_Menu completely.

Set Up Spoiler
First you'll see that there are two values to look at.
  1.  
  2. def refresh(seperation = true, overdrive_skills = false)
  3.      if self.contents != nil
  4.         self.contents.dispose
  5.         self.contents = nil
  6.      end
  7.  
Expand to see the code.

Leave this the way it is. It separates skills in the Menu screen. There is a def I edited in Scene_Battle that puts skills and Overdrives in the same window, as to make it battle compatible.


FAQ

None, yet.

Compatibility
This, as well as DerVVulfman's Limit System, should be placed under any scripts that might affect Scene_Battle, such as DerVVulfman's "Skills That Consume Items". This ensures that the last call in the battle scene comes from the limit system and menu.

Requires DerVVulfman's Limit System Script. Complements DerVVulfman's Attack/Limit Switcher quite nicely.

Credits and Thanks
Credits and Thanks Spoiler
  • Thanks to SephirothSpawn for the Original Concept behind this Limit Menu.
  • Thanks to DerVVulfman, for helping me improve this script numerous times, and for creating the Limit System, and for finding the more recent missing end bugs. It pays to slow down and look at things before posting them it seems.
  • Thanks to MasterMind for pointing out the SDK Window_HorizCommand compatibility issue.
  • Thanks to XP Learner for noticing the first missing end bug.

Terms and Conditions
Terms and Conditions Spoiler
This system is available royalty free. I make no claim as to the usage of this system, even for commercial use. Edits to the system may be permitted as to suit your needs, but I cannot guarantee these edits effectiveness nor can I guarantee support for these same edits.

When using the system, the name of the Menu System must be prominent along with my name and the original concept designer's name (that's SephirothSpawn... if you didn't know :D ), along with the Limit System creator's name (you know who... DerVVulfman). If your game features a credit roll, I ask that you include all those listed in the Credits and Thanks section above. With out them, I'd still be at version 1.0...


Author's Notes
Well, this is now an official DerVVulfman Limit System Add-On. So, with that...

Image
Simple yet effective. I was going to script my own, but this will do. I'll just edit this further to suit my needs. Oh and, I don't think it's SDK 2.1 compatible, but all I had to do was replace the Window_HorizCommand in this script with the one in the SDK and it worked.
Where did the families thing came from ??? I still don't get it!
Thanks to Master mind for Determining SDK Compatibility. Kinda, just needs some editing.

as for you, Meâ„¢, I dunno. just seems it's mentioned in all the recent script topics. ask trickster, he should know.
You should update the version number and replace the Window_HorizCommand in this script with the one in the SDK. That way, people won't have to do it themselves. And as for the families, I have no clue where they came from, but whenever the script isn't there, the families go hungry.
I'll post an alternate SDK version later tonight. Personally, I don't use it, cause alot of the scripts I use are from pre-SDK days, and it's gonna be very difficult to make all of them SDK compatible.
Good work man.

@The Families thing : It's a little inside joke we all started. Sit down boys and girls for another... Tales of n00bs...

There once was a user who didn't own the legal version. He created help topic after help topic and request after request. No one would help the poor n00b. But the n00b was not going to give up easily...

One day, he asked for a demo of a script he really wanted. Unfortunately for him, PK cannot open legal rmxp projects. As an act of desperation, "No, um... I can't use a demo. I am no good with demos. Can you just post the scripts."

But the wise n00b slayer Trickster was too wise to be fooled by the n00b. After a long battle and questioning, it was found that the n00b didn't have the PK version. When asked, "Why don't you download and pay for the legal version?", all the n00b could reply was "My family is too poor and depends on me to make my game with this script."

The war between the n00b and n00b Slayer Trickster waged on for eons (ok, a few weeks), but after warns and warns, infraction after infraction, n00b slayer banned the n00b for rmxp.org land, but this isn't the last we would hear from our n00b.

The n00b continued with his multis before he finally was completely banished from the land, but the n00b had found a new kingdom to annoy the hell out of...

The new community he found seemed to be his new home. He posted like crazy, spammed with illogical thoughts, flamed, etc. (essientially, picking up in a new community where he left off in his old one).

Unfortunately for the n00b, the n00b Slayer had a twin with n00b Slayer status within this kingdom : SephirothSpawn.

After months of forgiveness, SephirothSpawn eventually vanquished the n00b from the new kingdom. But you know our n00b ; he would not go down quitely.

Within a days time, the n00b returned. "F-U SephirothSpawn! How dare you banish me from my new home. People liked me here and you ruined it. I just found out I have lung cancer at 14 for smoking too much. This kingdom was the only thing that made me continue to fight the illness, create my game and save my family. You have now ruined it. It is all your fault. I am now going to kill myself, and my family will suffer. I hope this is your life's lesson and that you will grow as a person from this experience." (Not that will put, for you know, he is a n00b, so you would actually have to attempt multiple times to understand what he actually said).

The n00b slayers rejoiced with laughter, but it appears our n00b was lying!

* dun dun dun *

Within a few days and for a week, new members were joining the community with the same characteristics as the fallen n00b. To make a long story short, they were all slain in epic fashion, and the tale of the n00b was lost.


No one has heard the legend of the n00b until this point. You must not speak of it or the n00b may return, and we don't want that to happen now do we?

Oh no! What have I done!
* Laughing a lot *

I now this is off-topic, but this tale is really funny :D. Everything explained now.

And nice script ;) even though i'd like to use it with trickster's gradient bars (for some reason that Derrv explained me, they simply don't show with his limit break).
ROTGDMFFLMGDMFAO!!!!!!!

And so the story of the families is finally told. That's flamin hilarious. I'm gonna laugh my ass off or several weeks on that one.

! idea! The n00b slayers: legend of the family. fan game.
Hey, Alistor.
As a suggestion, change the...
          if seperation
            if overdrive_skills
              @data.push(skill) if skill.element_set.include?(17)
            else
              @data.push(skill) unless skill.element_set.include?(17)
            end
Expand to see the code.
...to...
          if seperation
            if overdrive_skills
              @data.push(skill) if skill.element_set.include?($lb_element_id)
            else
              @data.push(skill) unless skill.element_set.include?($lb_element_id)
            end
Expand to see the code.


Then it will use the same element-tagging system, and the same global element value that Limit Break uses... making it automatic and unnecessary for end-users to edit.

PS: SWEET!
Nice system, and something NOT made by DerVVulfman ;)
UPDATE!

Version up to 1.1!

Changed element tagging to match that of the limit system.  End users no longer have to edit elemental tag values in the menu script. Thanks go to DerVVulfman for the help.

Also changed unsightly errors in the script. Previously, the help windows would read "Final Strikes", due to this being pulled directly from my project.  Now changed to read "Limits".
[QUOTE=SephirothSpawn;183994]Good work man.

@The Families thing : It's a little inside joke we all started. Sit down boys and girls for another... Tales of n00bs...

[i]There once was a user who didn't own the legal version. He created help topic after help topic and request after request. No one would help the poor n00b. But the n00b was not going to give up easily...

......

Oh no! What have I done![/QUOTE]

AHAHAHAHAHAHAHA... I've never laughed so much on rmxp before, I've been around since even before I could buy the english version (it didn't exist back then), but now that it's out and all our projects don't run on the illegal versions it becomes priceless to read the desperate noobs fight for help.

Thank God for cheap noobs :D.

Now where was I... oh yeah, for the skills still showing up in the skills menu, shouldnt it be possible to simply edit that scene (skills) to not show a certain element (i.e the limit break). Or am I missing something?
i'm working on an update, but it's getting difficult to figure out. I'm actually a scripting newbie, so i'm really still learning what to do. I'll have it updated soon.
Quote:
Not sure of SDK Compatibility. Someone should really check that out.


Been tested and it does not work with it.

error on line 6757 - self.cursor_rect.set(@c_spacing * @index, 0, @c_spacing, 32)

:D
I'm using it with sdk 1.5 (sorry but v2 is conflicting with TOO many scripts), and I don't have any problems.

It would be great to get to CHOOSE the limitbreak and not just view it, furthermore to get a script working to hide certain skills from showing in the skills menu. That could even allow for a larger in game command such as attack, elemental-skill, destruction, limit-breaks, summons, etc.

Anyway got an idea, I remember a script that hid the event items from showing in the items menu.
Ah i am using v2 lol maybe that is why, yea and it does mess with ALOT of scripts
[QUOTE=MasterMind5823;183716]You should update the version number and replace the Window_HorizCommand in this script with the one in the SDK. That way, people won't have to do it themselves. And as for the families, I have no clue where they came from, but whenever the script isn't there, the families go hungry.[/QUOTE]

There's your solution. Or you can just copy the script below. ;)

Limit Menu SDK 2.1 Spoiler
#==============================================================================
# DerVVulfman's Limit Break Menu
# Original Concept By SephirothSpawn
# Small Edits By Alistor
#==============================================================================

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :limitbreak
  attr_accessor :lb_type
  #--------------------------------------------------------------------------
  # Alias Listings
  #--------------------------------------------------------------------------
  alias seph_gameactor_setup setup
  #--------------------------------------------------------------------------
  # Setup Actors
  #--------------------------------------------------------------------------
  def setup(actor_id)
    seph_gameactor_setup(actor_id)
    @limitbreak = 0
    @lb_type = 0
  end
  #--------------------------------------------------------------------------
  # * Set Limit
  #--------------------------------------------------------------------------
  def limit=(limit)
    @limitbreak = limitbreak
    @limitbreak = 1000 if @limit > 1000
  end
end

#==============================================================================
# ** Window_Skill
#==============================================================================
class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(seperation = false, overdrive_skills = true)
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    unless @actor == nil
      for i in [email hidden]
        skill = $data_skills[@actor.skills[i]]
        unless skill == nil
          if seperation
            if overdrive_skills
              @data.push(skill) if skill.element_set.include?($lb_element_id)
            else
              @data.push(skill) unless skill.element_set.include?($lb_element_id)
            end
          else
            @data.push(skill)
          end
        end
      end
    end
    # If item count is not 0, make a bit map and draw all items
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Check Data
  #--------------------------------------------------------------------------
  def data
    return @data
  end
end

#==============================================================================
# ** Window_HorizCommand
#------------------------------------------------------------------------------
#  This window deals with general command choices. (Horizontal)
#==============================================================================

class Window_HorizCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :commands
  attr_accessor :c_spacing
  attr_accessor :alignment
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(width, commands, c_spacing = (width - 32) / commands.size)
    # Compute window height from command quantity
    super(0, 0, width, 64)
    @commands     = commands
    @item_max     = commands.size
    @column_max   = @item_max
    @c_spacing    = c_spacing
    @alignment    = 1
    self.contents = Bitmap.new(@item_max * @c_spacing, height - 32)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Command
  #--------------------------------------------------------------------------
  def command(index = self.index)
    return @commands[index]
  end
  #--------------------------------------------------------------------------
  # * Commands
  #--------------------------------------------------------------------------
  def commands=(commands)
    # Return if Commands Are Same
    return if @commands == commands
    # Reset Commands
    @commands = commands
    # Resets Item Max
    item_max    = @item_max
    @item_max   = @commands.size
    @column_max = @item_max
    # If Item Max Changes
    unless item_max == @item_max
      # Deletes Existing Contents (If Exist)
      unless self.contents.nil?
        self.contents.dispose
        self.contents = nil
      end
      # Recreates Contents
    self.contents = Bitmap.new(@item_max * @c_spacing, height - 32)
    end
    # Refresh Window
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    command = commands[index]
    x = index * @c_spacing + 4
    self.contents.font.color = color
    self.contents.draw_text(x, 0, @c_spacing - 8, 32, command, @alignment)
  end
  #--------------------------------------------------------------------------
  # * Disable Item
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    self.cursor_rect.set(@c_spacing * @index, 0, @c_spacing, 32)
  end
end

#==============================================================================
# ** Scene_LimitMenu
#==============================================================================
class Scene_LimitMenu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    if @actor_index < $game_party.actors.size
       @actor = $game_party.actors[@actor_index]
    else
       @actor = $game_party.reserve_actors[@actor_index - $game_party.actors.size]
    end
    # Make Help Window
    @help_window = Window_Help.new
    # Command Window
    @command_window = Window_HorizCommand.new(['View Limits', 'Set Gain Mode'])
      @command_window.y = 128
    # Skill Window
    @skill_window = Window_Skill.new(@actor)
    @skill_window.y = 192
    @skill_window.height = 288
    @skill_window.refresh(true, true)
    @skill_window.active = false
    # Skill Status Window
    @status_window = Window_SkillStatus.new(@actor)
    @status_window.y = 64
    # Limit Break Types Window
    @lb_type_window = Window_Limit_Types.new
    @lb_type_window.y = 192
    @lb_type_window.index = @actor.lb_type
    @lb_type_window.visible = @lb_type_window.active = false
    # Associate help window
    if @skill_window.help_window == nil
      @help_window.set_text('Limits', 1)
    else
      @skill_window.help_window = @help_window
    end
    # Scene Objects
    @objects = [@help_window, @command_window, @skill_window, @lb_type_window, @status_window]
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Objects Update
      @objects.each {|x| x.update}
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of Objects
    @objects.each {|x| x.dispose}
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If Main Command Active : call update_main
    if @command_window.active
      update_main
      return
    end
    # If skill window is active: call update_skill
    if @skill_window.active
      update_skill
      return
    end
    # If Limit Type is active: call update_type
    if @lb_type_window.active
      update_type
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (if main window is active)
  #--------------------------------------------------------------------------
  def update_main
    # Toggles Windows Visiblity
    @skill_window.visible = @command_window.index == 0 ? true : false
    @lb_type_window.visible = @command_window.index == 1 ? true : false
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(0)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch Point
      case @command_window.index
      when 0  # View Skills
        if @skill_window.data.size == 0
          $game_system.se_play($data_system.buzzer_se)
          @help_window.set_text('Limits', 1)
        else
          $game_system.se_play($data_system.decision_se)
          @command_window.active = false
          @skill_window.active = true
        end
      when 1  # Set Limit Break Type
          $game_system.se_play($data_system.decision_se)
          @command_window.active = false
          @lb_type_window.active = true
          @help_window.set_text(@lb_type_window.help_text, 1)
      end
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different skill screen
      $scene = Scene_LimitMenu.new(@actor_index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different skill screen
      $scene = Scene_LimitMenu.new(@actor_index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (if main window is active)
  #--------------------------------------------------------------------------
  def update_skill
    # Refreshes Help Window Text
    @skill_window.help_window = @help_window
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      @help_window.set_text('Limits', 1)
      # Switch to main menu
      @command_window.active = true
      @skill_window.active = false
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (if main window is active)
  #--------------------------------------------------------------------------
  def update_type
    # Refreshes Help Window Text
    if Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN) || Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
      @help_window.set_text(@lb_type_window.help_text, 1)
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      @help_window.set_text('Limits', 1)
      # Switch to main menu
      @command_window.active = true
      @lb_type_window.active = false
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Play cancel SE
      $game_system.se_play($data_system.decision_se)
      # Set Actor Limit Type
      @actor.lb_type = @lb_type_window.index
      @help_window.set_text("#{@actor.name}'s Gain Mode is Now #{@lb_type_window.get_type}", 1)
      return
    end
  end
end

#==============================================================================
# ** Window_Limit_Types
#==============================================================================
class Window_Limit_Types < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
   super(0, 128, 640, 288)
   @column_max = 2
   refresh
   self.index = 0
end
#--------------------------------------------------------------------------
# * Get Type
#--------------------------------------------------------------------------
def get_type
   return @data[self.index]
end
#--------------------------------------------------------------------------
# * Help Text
#--------------------------------------------------------------------------
def help_text
   case index
   when 0    ; text = 'Warrior - Gains When Hero Damages Enemy'
   when 1    ; text = 'Heavy Hitter - Gains When Hero Lands a Critical Hit' 
   when 2    ; text = 'Stotic - Gains When Hero Receives Damage'
   when 3    ; text = 'Slayer - Gains When Hero Kills Enemy'
   when 4    ; text = 'GodSlayer - Gains When Hero Defeats a Boss'
   when 5    ; text = 'Victim - Gains When Hero is Slain' 
   when 6    ; text = 'Victor - Gains When Party Wins Battle'
   when 7    ; text = 'Coward - Gains When Hero Escapes Battle'
   when 8    ; text = 'Defender - Gains When Hero Chooses to Guard'
   when 9    ; text = 'Loner - Gains When Hero Is Only Member in Party'
   when 10   ; text = 'Active - Gains When Hero Performs an Action'
   when 11   ; text = 'Daredevil - Gains When Hero is in Critical Condition'
   end
   return text
  end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = ['Warrior','Heavy Hitter', 'Stotic', 'Slayer', 'Godslayer', 'Victim',
                  'Victor', 'Coward', 'Defender', 'Loner', 'Active', 'Daredevil',]
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
end
#--------------------------------------------------------------------------
# * Draw Item
#     index : item number
#--------------------------------------------------------------------------
def draw_item(index)
   x = 4 + index % 2 * (288 + 32)
   y = index / 2 * 32
   self.contents.draw_text(x, y, contents.width / 2 - 32, 32, @data[index], 1)
end
end
Expand to see the code.
Kick ass MM. Uhoh got an error on line 201 wrong number of arguments

@command_window = Window_HorizCommand.new(['View Limits', 'Set Gain Mode'])
Oh crap. Just out a "640," before the "[" and it'll work.
[QUOTE=MasterMind5823;184847]Oh crap. Just out a "640," before the "[" and it'll work.[/QUOTE]

Totaly did not understand any of that :D

Edit: I figured out what u meant

would it be easier to say replace it with this
@command_window = Window_HorizCommand.new(640, ['View Limits', 'Set Gain Mode'])

EDIT2: Damn Alistor! lol
what he means, is the section that says:
@command_window = Window_HorizCommand.new(['View Limits', 'Set Gain Mode'])
make it look like:
@command_window = Window_HorizCommand.new(640, ['View Limits', 'Set Gain Mode'])
Yeah... sticking to SDK v1.5 for now, just like I'm sticking to winXp instead of Vista. Gotta hate those bugs.
Updated first post with new script. Nothing big, just a cosmetic update. new feature removes unneeded zeros in the menu screen.
EX Arshes LB Skill Mighty Blade of God Doom costs 0 SP. instead of displaying:

[icon]Mighty Blade of God Doom 0

you see

[icon]Mighty Blade of God Doom

pretty basic, eh?
BUMPAROONEY!!
[/FONT]


Ok, added a whole second script. It adds a functional Limit command to the default battle system. It still requires the menu script from the first spoiler, but it now separates skills, and adds battle functionality.

Will look into updating compatibility with other CBS's, but right now, only works with the default and animated battlers systems.
I have found that it is UNCOMPATABLE with the SDK based upon an error;

Scrpit 'SDK Part IV' line 219: NoMethodError occured.

undefined method `*' for nil:NilClass

I'm no scripter so there is probably an easy way to fix this that I just can't figure out right?
Bumping this back up with updated script posted and such.
Changed a few things, got rid of some redundant code, (thanks to DVV for that.)

Expect a major update later on, when DVV updates the LB system with a little surprise.
I'm noticing an error on the last line of the Menu script.

Line 394 SyntaxError occured.
hmm... Add an end under the last line... i forgot one somewhere... i'l have to go through and look into it. thanks, XPLearner.
Your welcome but now you have a new problem

It's line 210.

Uninitalized constant Scene_Menu::Scene_LimitMenu

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=18319