Jump to content


Photo

Multiple Battle Systems


  • Please log in to reply
10 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 05 May 2012 - 09:09 PM

Multiple Battle Systems
Tsukihime

Introduction

Ever wanted multiple battle systems in a game?

This script allows you to create multiple battle managers that may have their own unique set of battle logic. Different battle scenes with their own battle windows can be added as well.

You can easily add support for many different battle systems in the game using this battle manager.

Usage

See demo for general set-up.
BattleManager module is still treated as the default manager, so scripts should in theory work unless you are overriding (eg: not alias, calling the wrong battle manager, etc)) any of the methods in the "Multiple Battle Systems" script.

Examples

Posted Image Posted Image Posted Image

Maybe you prefer ATB. Or you prefer side-view. Or both. Depending on the event, you may require specialized battles, for example the use of timers or custom sprite behavior. Any battle that you feel needs to behave differently can use its own battle manager to alter some of the default battle logic.

Download

Demo: http://db.tt/olGlXy4u
Demo (with ace): http://db.tt/zEk0S329

Note that Ace support makes the other systems look weird.

Compatibility

Probably not with complex systems that override many things.

But for scripts that focus on specific parts of the game like window-based scripts or additional attributes or things like that, then it should not be a problem.

Notes

For developers

Any battle system that requires their own scene should in theory be compatible. For example, if we had a tactical battle system, that would likely be easily added to the system.

If you need to override some existing classes for a specific system, consider subclassing. The advantage to this is that you don't need to override any of the default systems like you usually would. However the disadvantage is that you may end up with a bunch of scripts that are too specialized and don't work with each other.

Adapting an existing system to support these plugins shouldn't be too hard either, since the only change that's made is all references to BattleManager having a couple characters and a dollar sign added to them.

To add new battle systems,
1: if you have a custom battle manager (or you alias any methods), turn it into a class and inherit from BattleManagerPlus.

2: if you have a custom battle scene, inherit from Scene_Battle and rename all instances of BattleManager to @battle_manager

3: make sure that the engine knows to use your battle manager and your scene battle. $game_system.battle_manager stores the current battle manager in use.

4: if you are planning to have different battle HUD's, you should consider defining a set of subclasses all defining functions from abstract versions of the battle windows. This allows different battle systems to use their own windows without conflicting with each other.

Edited by Tsukihime, 15 May 2012 - 08:25 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#2 Nathan Rutherford

Nathan Rutherford

    Member

  • Ace Member
  • 19 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Posted 15 May 2012 - 06:42 PM

Finally got around to downloading, once I installed Ace again, haha. They work well, except for Ace battle engine, there was an error in the interpreter - "Script 'Game_Interpreter' line 1411: NamError occured. uninitialiser constant Game_Interpreter::AceBattleManager". I think this might have something to do with my Ace program/version but I'm not sure, what is the line 1411 area?

#3 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 15 May 2012 - 07:08 PM

Oh, I removed ace battle engine cause it wasn't working.
Looks like I forgot to remove it from the map lol

I have just looked at ace battle engine again cause I have a better understanding of the system in general and have tried adding it to the list.

Try the latest version and let me know if ace battle works. Everything else doesn't work properly cause Ace battle engine is re-writing too many methods in shared classes.

The main focus of this script is to provide support for multiple battle managers, although it would be possible to support multiple HUD's through subclassing.

I'm just not interested in the ace battle engine enough to add support for it myself.

Edited by Tsukihime, 15 May 2012 - 08:01 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#4 Nathan Rutherford

Nathan Rutherford

    Member

  • Ace Member
  • 19 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Posted 17 May 2012 - 08:31 AM

It was going great, they all worked, but then I used a TP special with the 4th guy, Fire weapon speciffically, script 'Ace Battle' line 275, it wasn't a method error but the defining of the class as you said, very confusing to me, haha.

#5 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 17 May 2012 - 10:44 AM

Ya, it would take some work to fully support ace battle engine..
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#6 Nathan Rutherford

Nathan Rutherford

    Member

  • Ace Member
  • 19 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 01:16 AM

Yh, I had a look at the Main site for it (Yanfly Channel) it seemed that it didn't change anything to drastic but merely added to it (I could be completely wrong) so couldn't you use the a.b.e as a base and have the other engine load through it? or is that impossible?

#7 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 09:21 AM

It did add a lot of things but it also overwrote a lot of things.

In particular, it overwrites several methods in shared classes and how they are implemented, which may cause conflicts with other types of battle systems.

I write scripts that extend to base engine, as I believe that's how most scripters do things.
Compatibility versions are made for custom scripts if necessary unless the base engine simply does not provide the functionality, but I don't think there's anything special in ace battle engine that the base engine must be overwritten in order to provide.

Like those pop-ups and stuff...that probably could've been written as an add-on rather than directly integrated into the battle system.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#8 Nathan Rutherford

Nathan Rutherford

    Member

  • Ace Member
  • 19 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Posted 21 May 2012 - 07:45 AM

Yh, I think Yanfly did it his way for a bit of simplicity, or maybe it was easier to change then to make, I need to make a script to understand, haha. But It shouldn't be too hard to add/extend than to modify would it?

#9 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 13 August 2012 - 05:10 PM

I'm re-writing the script. Came up with something that should be more flexible and can still keep the default BattleManager references.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#10 Nee Millon

Nee Millon

    Teaser

  • Ace Member
  • 202 posts
  • LocationLand Of Milks and Honeys
  • RM Skill - Jack of All Trades

Posted 30 January 2013 - 12:15 PM

how would you switch in between battle systems?


Click me...Click me hard...

Spoiler


Stop by the shop...I don't bite...much...
Spoiler

#11 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,367 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 30 January 2013 - 12:18 PM

$game_system.battle_manager = ?

I don't remember whether it uses numbers or symbols, but you would just make a script call.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users