Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

DerVVulfman's Limit Break Menu

Status
Not open for further replies.
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.
Gain Mode Window
gainmodewindow.jpg

Limit Viewer
Limitbreakswindow.jpg
Demo

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

Script

Code:
 

#==============================================================================

# DerVVulfman's Limit Break Menu v 2.7

# By Alistor, with Edits by DerVVulfman

# Original Concept by SephirothSpawn

#==============================================================================

# This script has an Auto-Detect function that, when used with SDK, replaces the 

# internal Window_HorizCommand with the SDK version. Thanks go to DerVVulfman for that

# method. Added a second Auto-Detect function that, when used with the Attack Replacer LB 

# Add-On, removes limits from the skill window in battle and vice-versa.

#==============================================================================

 

 

 

   #=======================================================================#

   #  **  C  O  N  F  I  G  U  R  A  T  I  O  N      S  Y  S  T  E  M  **  #

   #=======================================================================#

 

 

  # Allows you to hide SP values of zero:

  # =====================================

  HIDE_ZERO_SP    = true

 

  

  # Basic Menu Text:

  # ================

  LB_MENU_TITLE   = 'Limits'        # Menu Title

  LB_HEADING_1    = 'View Limits'   # Option 1 Text:  List of Limit Break Skills

  LB_HEADING_2    = 'Set Gain Mode' # Option 2 Text:  List of Limit Break Types

 

  

  # Preset Gain Mode Help Text System:

  # =================================+

  # This customizes the text shown after you choose the limit break style for an

  # actor.  Originally hardwired, you can now edit the layout right here.

  #

  # {lb_a_name}  :Actor's Name

  # {lb_a_type}  :Actor's Gain Mode Text (Limit Type)

  LB_GAIN_TEXT = "{lb_a_name}'s Gain Mode is Now {lb_a_type}"

  # - Sample output:  Aluxes's Gain Mode is now Stotic -

  #

  # Optionally, you could have it be this:

  # LB_GAIN_TEXT = "Gain Mode of {lb_a_type} now set to {lb_a_name}"

  # - Sample output:  Gain Mode of Victor now set to Gloria -

  

  

  # Array of Limit Break types:

  # ===========================

  # This allows you to list the limit break styles or settings available in your

  # system. You can choose to list them in any order and pick and choose whether

  # a limit break style  will even be  in your game.   You no longer have to use 

  # 'all' the limit break types available.   And as such, this system is already 

  # designed to accomodate any newer limit break types not yet available.

  #

  # Idx:        The index/setting of a 'limit break type' as defined by LB_START

  # Type Name:  The basic choice/option of a 'limit break type' in the menu

  # Type Desc:  A help text description of a 'limit break type'

  #

  # FORMAT:

  # LB_MENU_ARRAY = [  [Limit Array], [Limit Array],... ]

  # with...

  # Limit Array   = [Idx(as number), Type Name(as string), Type Desc(as string)]

  #

  # NOTE: The array can be set in any order, so the menu options can be arranged

  #       in any order.   What controls the limit break type in use is the 'Idx'

  #       number in the array.

  #

  #                   Idx     Type Name       Type Desc

  LB_MENU_ARRAY   = [ [0,    'Warrior',      'Warrior - Gains When Hero Damages Enemy'] ,

                      [1,    'Heavy Hitter', 'Heavy Hitter - Gains When Hero Lands a Critical Hit'],

                      [2,    'Stoic',        'Stoic - Gains When Hero Receives Damage'] ,

                      [3,    'Slayer',       'Slayer - Gains When Hero Kills Enemy'],

                      [4,    'Godslayer',    'GodSlayer - Gains When Hero Defeats a Boss'],

                      [5,    'Victim',       'Victim - Gains When Hero is Slain'],

                      [6,    'Victor',       'Victor - Gains When Party Wins Battle'],

                      [7,    'Coward',       'Coward - Gains When Hero Escapes Battle'],

                      [8,    'Defender',     'Defender - Gains When Hero Chooses to Guard'],

                      [9,    'Loner',        'Loner - Gains When Hero Is Only Member in Party'],

                      [10,   'Active',       'Active - Gains When Hero Performs an Action'],

                      [11,   'Daredevil',    'Daredevil - Gains When Hero is in Critical Condition'] ]

  

                      

   #=======================================================================#

   #            C O N F I G U R A T I O N   S Y S T E M   E N D            #

   #=======================================================================#  

 

   

   

#==============================================================================

# ** RMXP Standard Development Kit (SDK)

#------------------------------------------------------------------------------

#  A system aimed to increase compatibility between RGSS scripts

#==============================================================================

module SDK

  # Set Autodetect global to false

  $lbadd_menu_sdk = false

  # SDK Autodetect routine

  if defined?(log_alias)

    # Set Autodetect global to true

    $lbadd_menu_sdk = true

  end  

end

 

 

 

#==============================================================================

# ** Game_System

#------------------------------------------------------------------------------

#  This class handles data surrounding the system. Backround music, etc.

#  is managed here as well. Refer to "$game_system" for the instance of 

#  this class.

#==============================================================================

 

class Game_System

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_accessor :lb_attack_detected

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  alias lbadd1_init initialize

  def initialize

    lbadd1_init

    if @lb_height != nil

      @lb_attack_detected = true

    end

  end

end

 

 

 

#==============================================================================

# ** Game_Temp

#------------------------------------------------------------------------------

#  This class handles temporary data that is not included with save data.

#  Refer to "$game_temp" for the instance of this class.

#==============================================================================

 

class Game_Temp

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_accessor :seperation               # Seperation flag

  attr_accessor :limitbreak_skills        # Limit Break skill flag

  attr_accessor :limit_menu               # Limit Break menu flag

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  alias lbadd1_init initialize

  def initialize

    lbadd1_init

    @seperation         = true

    @limitbreak_skills  = false

    @limit_menu         = false

  end

end

 

 

 

#==============================================================================

# ** Window_Skill

#------------------------------------------------------------------------------

#  This window displays usable skills on the skill and battle screens.

#==============================================================================

 

class Window_Skill < Window_Selectable

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  unless $gnd_lb_patch  

  def refresh

    if self.contents != nil

      self.contents.dispose

      self.contents = nil

    end

    @data = []

    unless @actor == nil

      for i in [email=0...@actor.skills.size]0...@actor.skills.size[/email]

        skill = $data_skills[@actor.skills[i]]

        unless skill == nil

          if $game_temp.seperation

            if $game_temp.limitbreak_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

    $game_temp.seperation        = true

    $game_temp.limitbreak_skills = false

  end    

  end

  #--------------------------------------------------------------------------

  # * Draw Item

  #     index : item number

  #--------------------------------------------------------------------------

  def draw_item(index)

    skill = @data[index]

    if @actor.skill_can_use?(skill.id)

      self.contents.font.color = normal_color

    else

      self.contents.font.color = disabled_color

    end

    x = 4 + index % 2 * (288 + 32)

    y = index / 2 * 32

    rect = Rect.new(x, y, self.width / @column_max - 32, 32)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    bitmap = RPG::Cache.icon(skill.icon_name)

    opacity = self.contents.font.color == normal_color ? 255 : 128

    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)

    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)

    unless HIDE_ZERO_SP && skill.sp_cost == 0

      self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)

    end

  end

  #--------------------------------------------------------------------------

  # * Check Data

  #--------------------------------------------------------------------------

  def data

    return @data

  end

end

 

 

 

#==============================================================================

# ** Window Horizontal Command (conditional on SDK system)

#------------------------------------------------------------------------------

#  This window deals with general command choices, horizontally.

#==============================================================================

 

# If no SDK exists...

if !$lbadd_menu_sdk

  # Use the Non-SDK system 

  class Window_HorizCommand < Window_Selectable

    #--------------------------------------------------------------------------

    # * Object Initialization

    #--------------------------------------------------------------------------

    def initialize(commands, width = 640, height = 64)

      super(0, 0, width, height)

      self.contents = Bitmap.new(width - 32, height - 32)

      @commands = commands

      @item_max = @commands.size

      @column_max = @commands.size

      refresh

      self.index = 0

    end

    #--------------------------------------------------------------------------

    # * Refresh

    #--------------------------------------------------------------------------

    def refresh

      self.contents.clear

      for i in 0...@item_max

        draw_item(i, normal_color)

      end

    end

    #--------------------------------------------------------------------------

    # * Draw Item

    #     index : item number

    #--------------------------------------------------------------------------

    def draw_item(index, color)

      self.contents.font.color = color

      x = width / @item_max * index

      off = width / @item_max - 32

      self.contents.draw_text(x, 0, off, 32, @commands[index], 1)

    end

    #--------------------------------------------------------------------------

    # * Disable Item

    #     index : item number

    #--------------------------------------------------------------------------

    def disable_item(index)

      draw_item(index, disabled_color)

    end

  end

end

 

 

 

#==============================================================================

# ** Scene_LimitMenu

#------------------------------------------------------------------------------

#  This class performs limit break screen processing.

#==============================================================================

 

class Scene_LimitMenu

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     actor_index : actor index

  #--------------------------------------------------------------------------

  def initialize(actor_index = 0)

    @actor_index = actor_index

    # Attach the Limit Menu flag

    $game_temp.limit_menu = true

  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

    # If the SDK is disabled

    if $lbadd_menu_sdk

      @command_window = Window_HorizCommand.new(640, [LB_HEADING_1, LB_HEADING_2])

    else

      @command_window = Window_HorizCommand.new([LB_HEADING_1, LB_HEADING_2])

    end

      @command_window.y = 128

    # Skill Window

    @skill_window = Window_Skill.new(@actor)

    @skill_window.y = 192

    @skill_window.height = 288

    $game_temp.seperation       = true

    $game_temp.limitbreak_skills = true

    @skill_window.refresh

    @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(LB_MENU_TITLE, 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(LB_MENU_TITLE, 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(LB_MENU_TITLE, 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 triggered once or pressed continuously)

    if Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN) || 

      Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT) || 

      Input.press?(Input::UP) || Input.press?(Input::DOWN) || 

      Input.press?(Input::RIGHT) || Input.press?(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(LB_MENU_TITLE, 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)

      # Retrieve Limit Type from array

      actor_lb_type = LB_MENU_ARRAY[@lb_type_window.index][0]

      # Set Actor Limit Type

      @actor.lb_type = actor_lb_type

      # Set the character's gain text

      lb_a_name = @actor.name

      lb_a_type = LB_MENU_ARRAY[@lb_type_window.index][1]

      text = LB_GAIN_TEXT.dup

      begin

        text[/{lb_a_name}/] = "#{lb_a_name}"

      rescue

      end

      begin

        text[/{lb_a_type}/] = "#{lb_a_type}"

      rescue

      end

      @help_window.set_text(text, 1)

      return

    end

  end

end 

 

 

 

#==============================================================================

# ** Window_Limit_Types

#------------------------------------------------------------------------------

#  This window displays the available limit types on the limit break screen.

#==============================================================================

 

class Window_Limit_Types < Window_Selectable

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 128, 640, 288)

    @column_max = 2

    @data = []

    for i in 0...LB_MENU_ARRAY.size

      @data.push(LB_MENU_ARRAY[i][1])

    end

    refresh

    self.index = 0

  end

  #--------------------------------------------------------------------------

  # * Get Type

  #--------------------------------------------------------------------------

  def get_type

    return @data[self.index]

  end

  #--------------------------------------------------------------------------

  # * Help Text

  #--------------------------------------------------------------------------

  def help_text

    for i in 0...LB_MENU_ARRAY.size

      text = LB_MENU_ARRAY[i][2] if LB_MENU_ARRAY[i][0] == index

    end

    return text

   end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    if self.contents != nil

      self.contents.dispose

      self.contents = nil

    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

  #--------------------------------------------------------------------------

  # * 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

 

 

 

#==============================================================================

# ** Scene_Battle

#------------------------------------------------------------------------------

#  This class performs battle screen processing.

#==============================================================================

 

class Scene_Battle

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  alias lbmenu_main main

  def main

      # Autodetect value added

      @lb_menu = true

      # Perform the original call

      lbmenu_main

  end

  #--------------------------------------------------------------------------

  # * Start Skill Selection

  #--------------------------------------------------------------------------

  unless $gnd_lb_patch

    def start_skill_select

      # RTAB detection value built into Limit Break (DVV)

      # Assigns 'battler' value for the Skill Window.

      if $game_system.lb_rtab_detected

        battler = @active_actor

      else

        battler = @active_battler

      end

      # Make skill window

      @skill_window = Window_Skill.new(battler)

      if $game_system.lb_attack_detected 

        $game_temp.seperation       = true

        $game_temp.limitbreak_skills = false

        @skill_window.refresh

      else 

        $game_temp.seperation       = false

        $game_temp.limitbreak_skills = false

        @skill_window.refresh

      end

      @skill_window.z = 1000

      # Associate help window

      @skill_window.help_window = @help_window

      # Disable actor command window

      @actor_command_window.active = false

      @actor_command_window.visible = false

    end

  end

end

 
This next section adds the Limit command to the main menu. Paste it in a new section, or replace Scene_Menu entirely.

Code:
 

#==============================================================================

# ** Scene_Menu

#------------------------------------------------------------------------------

#  This class performs menu screen processing.

#==============================================================================

 

class Scene_Menu

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     menu_index : command cursor's initial position

  #--------------------------------------------------------------------------

  def initialize(menu_index = 0)

    @menu_index = menu_index

  end

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Make command window

    s1 = $data_system.words.item

    s2 = $data_system.words.skill

    s3 = $data_system.words.equip

    s4 = "Status"

    s5 = "Limit"

    s6 = "Save"

    s7 = "End Game"

    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])

    @command_window.index = @menu_index

    # If number of party members is 0

    if $game_party.actors.size == 0

      # Disable items, skills, equipment, and status

      @command_window.disable_item(0)

      @command_window.disable_item(1)

      @command_window.disable_item(2)

      @command_window.disable_item(3)

      @command_window.disable_item(4)

    end

    # If save is forbidden

    if $game_system.save_disabled

      # Disable save

      @command_window.disable_item(5)

    end

    # Make play time window

    @playtime_window = Window_PlayTime.new

    @playtime_window.x = 0

    @playtime_window.y = 320

    # Make gold window

    @gold_window = Window_Gold.new

    @gold_window.x = 0

    @gold_window.y = 416

    # Make status window

    @status_window = Window_MenuStatus.new

    @status_window.x = 160

    @status_window.y = 0

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of windows

    @command_window.dispose

    @playtime_window.dispose

    @gold_window.dispose

    @status_window.dispose

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update windows

    @command_window.update

    @playtime_window.update

    @gold_window.update

    @status_window.update

    # If command window is active: call update_command

    if @command_window.active

      update_command

      return

    end

    # If status window is active: call update_status

    if @status_window.active

      update_status

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when command window is active)

  #--------------------------------------------------------------------------

  def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 5

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to item screen

        $scene = Scene_Item.new

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 3  # status

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 4  # limit

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0              

      when 5  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new

      when 6  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when status window is active)

  #--------------------------------------------------------------------------

  def update_status

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Make command window active

      @command_window.active = true

      @status_window.active = false

      @status_window.index = -1

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to skill screen

        $scene = Scene_Skill.new(@status_window.index)

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to equipment screen

        $scene = Scene_Equip.new(@status_window.index)

      when 3  # status

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to status screen

        $scene = Scene_Status.new(@status_window.index)

      when 4  # limits

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to skill screen

        $scene = Scene_LimitMenu.new(@status_window.index)      

      end

      return

    end

  end

end

 
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.

First you'll see that there are two values to look at.
Code:
 

def refresh([u]seperation = true[/u], [u]overdrive_skills = false[/u])

    if self.contents != nil

      self.contents.dispose

      self.contents = nil

    end

 
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
  • 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
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...

 
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.
 
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...
Code:
          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
...to...
Code:
          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

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!
 
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".
 
SephirothSpawn;183994 said:
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...

......

Oh no! What have I done!


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.
 
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.
 
MasterMind5823;183716 said:
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.

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

Code:
#==============================================================================
# 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 0...@actor.skills.size
        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
 
Kick ass MM. Uhoh got an error on line 201 wrong number of arguments

@command_window = Window_HorizCommand.new(['View Limits', 'Set Gain Mode'])
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top