Disabling AI Triggers and AI Behaviors in BlizzABS

Started by ThalliumShine, January 31, 2015, 12:34:36 pm

Previous topic - Next topic

ThalliumShine

I just want to ask how to remove the AI Triggers and AI Behaviors on my Menu, as to I think my game players would not find it useful or confused what it really is, so I want it removed. How can I do this? Thanks in advance for the help.

KK20


BlizzABS::Cache::CommandsPreMenu = ['Menu', 'Hotkeys', 'Cancel']

class Scene_Menu
  #----------------------------------------------------------------------------
  # override main
  #----------------------------------------------------------------------------
  def main
    # if index flag does not exist
    if @index_flag == nil
      # set in_battle flag
      $game_temp.in_battle = true
      # create HUD if HUD is turned on and HUD active
      @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
      # if ASSIGNMENT is turned on and assignment display active
      if BlizzABS::Config::HOTKEYS && $game_system.hotkeys
        # create assignment display
        @hotkeys = Hotkey_Assignment.new
      end
      # if MINIMAP is turned on and minimap active
      if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
        # create HUD
        @minimap = Minimap.new
        # create HUD
        @minimap.update
      end
      # create options window
      @window = Window_Command.new(192, BlizzABS::Cache::CommandsPreMenu)
      # if no actors in the party
      if $game_party.actors.size == 0
        # disable options
        @window.disable_item(1)
      end
      # set x and y position
      @window.x, @window.y = 320 - @window.width/2, 240 - @window.height/2
      # set z position
      @window.z = 21000
      # set back opacity
      @window.back_opacity = 160
      # create spriteset
      @spriteset = Spriteset_Map.new
      # create viewport
      @view = Viewport.new(0, 0, 640, 480)
      # if using a fixed tint
      if BlizzABS::Config::MENU_COLOR_TINT > 0
        # get tint
        tint = BlizzABS::Config::MENU_COLOR_TINT
      else
        # randomize tint
        tint = rand(8) + 1
      end
      # tint viewport
      case tint
      # black-white tint
      when 1 then @view.tone = Tone.new(-40, -40, -40, 255)
      # blue tint
      when 2 then @view.tone = Tone.new(-255, -255, 0, 255)
      # green tint
      when 3 then @view.tone = Tone.new(-255, 0, -255, 255)
      # red tint
      when 4 then @view.tone = Tone.new(0, -255, -255, 255)
      # yellow tint
      when 5 then @view.tone = Tone.new(0, 0, -255, 255)
      # mangenta tint
      when 6 then @view.tone = Tone.new(0, -255, 0, 255)
      # cyan tint
      when 7 then @view.tone = Tone.new(-255, 0, 0, 255)
      # darker tint
      when 8 then @view.tone = Tone.new(-60, -60, -60, 0)
      end
      # transition
      Graphics.transition
      # loop
      loop do
        # update game screen
        Graphics.update
        # update input
        Input.update
        # stop if frame update
        break if update_before_main
      end
      # freeze screen
      Graphics.freeze
      # delete HUD elements that exist
      [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
      # delete window
      @window.dispose
      @window = nil
      # delete spriteset
      @spriteset.dispose
      @spriteset = nil
      # delete viewport (screen tint) if new scene is still the menu or map
      @view.dispose if $scene.is_a?(Scene_Menu) || $scene.is_a?(Scene_Map)
      @view = nil
    end
    # call original method if scene is still the menu
    main_blizzabs_later if $scene.is_a?(Scene_Menu)
  end
  #----------------------------------------------------------------------------
  # update_before_main
  #  Processes the pre-menu.
  #----------------------------------------------------------------------------
  def update_before_main
    # updates path finder
    $BlizzABS.AI.update
    # update window
    @window.update
    # if window is active
    if @window.active
      # if B is pressed
      if Input.trigger?(Input::B)
        # play cancel sound
        $game_system.se_play($data_system.cancel_se)
        # create map scene
        $scene = Scene_Map.new
        # exit this scene
        return true
      # if C is pressed
      elsif Input.trigger?(Input::C)
        # which option
        case @window.index
        when 0
          # play sound
          $game_system.se_play($data_system.decision_se)
          # set in_battle flag
          $game_temp.in_battle = false
        when 1
          # if not actors in the party
          if $game_party.actors.size == 0
            # play buzzer sound effect
            $game_system.se_play($data_system.buzzer_se)
            # exit method
            return
          end
          # play sound
          $game_system.se_play($data_system.decision_se)
          # create hotkey assignment scene with the current screen tint
          $scene = Scene_Hotkeys.new(@view.tone)
=begin
        when 2
          # if not actors in the party
          if $game_party.actors.size == 0
            # play buzzer sound effect
            $game_system.se_play($data_system.buzzer_se)
            # exit method
            return
          end
          # play sound
          $game_system.se_play($data_system.decision_se)
          # create AI setup scene with the current screen tint
          $scene = Scene_AI_Behavior.new(@view.tone)
        when 3
          # if not actors in the party
          if $game_party.actors.size == 0
            # play buzzer sound effect
            $game_system.se_play($data_system.buzzer_se)
            # exit method
            return
          end
          # play sound
          $game_system.se_play($data_system.decision_se)
          # create AI setup scene with the current screen tint
          $scene = Scene_AI_Triggers.new(@view.tone)
=end
        when 2#4
          # play sound
          $game_system.se_play($data_system.decision_se)
          # create map scene
          $scene = Scene_Map.new
        end
        # exit this scene
        return true
      end
    end
    # don't exit this scene
    return false
  end
end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

ThalliumShine