AUTO BATTLE COMMAND

RPG Maker VX Ace

A simple script that adds an "auto battle" to the default battle system.

  • TDS
  • 01/30/2013 09:49 AM
  • 7666 views
Version:1.0

Introduction
This script adds a command to battle that makes characters select their actions automatically.

Features
- A command to automate Actor battler actions.

Instructions
Just put it in your game under the "Materials" area of the script list and enjoy.

Author's Notes
In theory it should work with any battle system that uses the default "Party_Command_window" since all the script does is process battlers default auto commands.

Restrictions
Only for use in non-commercial games.

Posts

Pages: 1
Hi,

Your script doesn't work with Yami ATB.
I can select the command but it do nothing.
It's probably because of the nature of ATB systems, which require waiting in order to take your turn and as a result have no need of the "Start Turn" method which encompasses all turns.

In order to add an auto battle feature to an ATB battle system it would probably require a brand new script specifically designed for it that can be turned on/off at any time to regain control of the characters.

It's a simple feature to add, so I'm sure if you ask the creator of the script he/she could add it to their battle system.
OK, I wasn't planning on using this script ever. Now that I'm through my 3rd test play through of my game, I realize that I'm a fan of hard hitters so I usually just space bar through battles after I reach a certain level in a dungeon. So figured I'd give this a try.
OH MY GOSH I DIDN'T KNOW WHAT I WAS MISSING.

I was wondering, is there any way I could get the auto-battle above 'escape' ? Maybe that takes way more effort than it's worth. It doesn't matter to me too much, the script is here to stay.
Glad to hear you liked it. As for changing the position of the auto-battle command, I originally put it at the bottom because you could just press up and instantly select it because it's at the bottom, and it would not affect other custom commands.

Use the edited version of the script provided below if you want the command to appear above escape.

#==============================================================================
# ** TDS Auto Battle Command
#    Ver: 1.0
#------------------------------------------------------------------------------
#  * Description:
#  This script adds a command to battle that makes characters select their 
#  actions automatically.
#------------------------------------------------------------------------------
#  * Features: 
#  A command to automate Actor battler actions.
#------------------------------------------------------------------------------
#  * Instructions:
#  Just put it in your game under the "Materials" area of the script list and
#  enjoy.
#------------------------------------------------------------------------------
#  * Notes:
#  None.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written 
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================
# * Import to Global Hash *
#==============================================================================
($imported ||= {})[:TDS_Auto_Battle_Command] = true

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------  
  alias tds_auto_battle_command_scene_battle_create_party_command_window  create_party_command_window
  #--------------------------------------------------------------------------
  # * Create Party Commands Window
  #--------------------------------------------------------------------------
  def create_party_command_window(*args, &block)    
    # Run Original Method
    tds_auto_battle_command_scene_battle_create_party_command_window(*args, &block)
    # Set Auto Battle Handler
    @party_command_window.set_handler(:auto_battle, method(:command_auto_battle))
  end
  #--------------------------------------------------------------------------
  # * [Auto Battle] Command
  #--------------------------------------------------------------------------
  def command_auto_battle
    # Make Auto Battle Actions for Alive Party Members
    $game_party.alive_members.each {|a| a.make_auto_battle_actions}
    # Start Turn
    turn_start
  end
end


#==============================================================================
# ** Window_PartyCommand
#------------------------------------------------------------------------------
#  This window is used to select whether to fight or escape on the battle
# screen.
#==============================================================================

class Window_PartyCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------  
  alias tds_auto_battle_command_window_partycommand_make_command_list make_command_list
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list(*args, &block)
    # Run Original Method
    tds_auto_battle_command_window_partycommand_make_command_list(*args, &block)    
    # Add Auto Battle Command    
    @list.insert(1,{:name=>"Auto Battle", :symbol=>:auto_battle, :enabled=>true, :ext=>nil})    
  end
end
yes I love it super much and it goes great with my more fight oriented game. I grew up in the era where you don't use magic, as magic points were so valuable because they don't refill without a $10,000 item. So I kinda never got into the whole 'use all skills all the time in every battle' thing people around here like.

You've really made it to the top of my credits list, is there anything besides 'TDS' you want listed?
author=LeviathanIce
yes I love it super much and it goes great with my more fight oriented game. I grew up in the era where you don't use magic, as magic points were so valuable because they don't refill without a $10,000 item. So I kinda never got into the whole 'use all skills all the time in every battle' thing people around here like.

You've really made it to the top of my credits list, is there anything besides 'TDS' you want listed?


And even when you had 99 of those 10,000$ items they fell into the "too good to use" category.

And TDS is fine for credits. Have a nice day.
Pages: 1