Battle Manager – Multiple battle systems

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

The Battle Manager provides support for multiple battle systems in a single game. The script uses an intuitive script call based approach to determining which battle system
should be used.

Under this script, your project would consist of three types of battle systems

  1. Primary battle systems. These are the main battle system that will be used
    in your game. There can only be one in your project.

  2. Secondary battle systems. These are battle systems that change the primary
    battle system in some way, such as adding new features. You can have many secondary battle systems.

  3. Plugin battle systems. These are battle systems that can be run stand-alone. They do not use the primary battle system as a base and therefore allow you to have a completely different battle system if needed.

Download

Script: download here

Plugins

These are battle system plugins that I have prepared as demo scripts. You should be able to plug them into your project and begin using them. If you would like to submit a plugin just leave a message.

Kread-EX’s Chain Battle – original page can be found here.
Fomar’s Customizable ATB – original page can be found here.

Usage

Users

First you have to convert your existing battle system to become a “primary” battle system. This will be the default battle system for your project.

This could be any battle system, such as Yanfly’s Ace Battle Engine, or Yami’s Battle Engine Symphony, or Victor’s animated battle system.

To convert your battle system into a primary battle system, follow these steps

  1. In the script, search for
module BattleManager
  1. Change it to
class BaseBattleManager

And then you’re done! If you can’t find one, then it is a primary battle system already.
Now you can add battle system plugins and begin using them.

To determine the battle system to use, make the script call

battle_system(TYPE)

Where TYPE is the name of the battle system. The battle system plugins should
tell you what the name of their battle system is.

The default battle system
is “BaseBattle”, so if you wanted to use the default battle system you would
write

battle_system("BaseBattle")

Note that the battle system will continue to be used even after a battle is over, so if you are using a battle system for a specific event, you need to change the battle system again after the battle is over.

This script does not automatically convert any arbitrary battle system into a compatible system. Each system must be set up to support this Battle Manager.

Developers

The Battle Manager is a factory interface that will set up the battle scene
and battle manager for you based on what the current battle system is. It
will redirect all calls to BattleManager to the correct battle manager.

It is very easy to setup a battle system as a primary battle system and is described in the user usage section.

You will typically be developing secondary battle systems for this script, as
the primary battle system is fairly easy to implement.

To add your own secondary battle system, you will need to define a few things.
First, begin by choosing a name for your battle system. In this example,

I will use “HimeBattle” as my battle system’s name.

  1. Define your battle manager and inherit it from BaseBattleManager.
    class HimeBattleManager < BaseBattleManager
  2. Define your battle scene and inherit it from Scene_Battle
    class Scene_HimeBattle < Scene_Battle
  3. Define your battle windows and spriteset_battle. In order for a project to support multiple battle systems, you CANNOT overwrite any of the default classes. Instead, you should inherit from them and make your changes as needed.
  4. If you must overwrite data, do an alias and check that the current scene is your battle scene. You should consider all built-in scripts to be “shared” objects, and users will likely run into compatibility issues between plugins if you overwrite methods however you wish.

If you have an existing battle system already, you would follow the same procedure. I have provided two example plugins using Kread-EX’s Chain Battle system and Fomar’s  Customizable ATB system.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

3 Responses

  1. Anonymous says:

    I tried this with Fomar’s ABS and Falcao’s Pearl ABS, but I couldn’t get it to work. I’m trying to use Fomar’s for World Map Encounters, Pearl ABS for Dungeons, and Ra’s Tactical Battle System for large story events. I got Pearl and Ra’s TBS to work fine together, but I can’t get Fomar’s ABS to do anything, I’m not getting any errors and the side view script works, but the ABS isn’t working…. strange. BTW I love your scripts Hime, so far they’ve all been compatible with my project.

  2. Anonymous says:

    can this work with Falcao Pearl ABS liquid?

    • Hime says:

      It might, if you use Pearl ABS as the primary battle system and use the others as secondary.
      It overwrites a lot of things so I’m not sure.

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax