Query: Two battle systems in one game

Discussion in 'RGSSx Script Support' started by redcachalot, Feb 8, 2018.

  1. redcachalot

    redcachalot Villager Member

    Messages:
    5
    Likes Received:
    3
    First Language:
    English
    Hi,

    I’m designing a game that is going to need two battle systems to add variety to the gameplay’s combat.

    My Game's Design

    I specifically want the YSA Battle System - Classical ATB (CATB ) to work for random encounters and some map-enemy events and the GubiD Tactical Battle System (GTBS) for certain other map-enemy events…

    My Problem

    Currently I’m having trouble with activating each battle system at correct points in the game.

    Once I’ve enabled the GTBS scripts and it is functioning on playtesting, it seems that I cannot enable the the CATB (in fact, when GTBS is enabled, the map sprites of any CATB map-enemy events disappear from the map and Region ID specific random battles do not trigger while playtesting even if the steps average is reduced to 1!)

    And, vice versa, if I enable the CATB, then the GTBS doesn’t work.

    My Attempted Solution

    I enable the CATB by using: Yanfly Engine Ace - Ace Battle Engine v1.22

    I do it by by changing:

    DEFAULT_BATTLE_SYSTEM = :dtb

    To

    DEFAULT_BATTLE_SYSTEM = :catb

    And the GTBS has the prerequisites of:

    Victor Engine - Basic Module and Victor Engine - Damage Popup.

    I then realized that I don’t know how to even enable the simple Default Turn Battle System (DTB ) for certain map-enemies/random encounters and the (CATB ) for other map enemies/random encounters in the same game!
    Enabling the CATB in the Yanfly Battle Engine Ace causes all random encounters and all map-enemy events to be CATB battles.

    The Yanfly Ace Battle Engine v1.22 gives only one option for DEFAULT_BATTLE_SYSTEM, not two.

    My Query
    Does RMVXA really support ONLY ONE BATTLE SYSTEM PER GAME?

    Or is it somehow possible to have TWO BATTLE SYSTEMS inside ONE RMVXA game?

    My Request

    I request, that, if it is possible, please let me know how to enable at least:

    1. the DTB for map-enemy events
    2. and the CATB for random encounters
    3. and vice versa.

    Also, enabling the CATB with the GTBS will be much appreciated.

    Thanks.

    The Scripts:
    DTB: Comes with RMVXA by default
    Yanfly Engine Ace - Ace Battle Engine: https://rpgmaker.net/scripts/77/
    GTBS: https://forums.rpgmakerweb.com/index.php?threads/gubids-tactical-battle-system-v2-4-for-ace.16085/
    CATB: https://yamiworld.wordpress.com/rgs...a-battle-system-classical-active-time-battle/
     
    Last edited: Feb 8, 2018
    #1
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,278
    Likes Received:
    4,802
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    It's not RMVXAce that support it. It's the script that support it. Technically you can own two battle systems in game. It just how the script writer never expect any developer would think to have two battle systems in one game, that each other type of battle system scripts would overwrite the same function, thus make both incompatible

    Making two battle systems to work may require understanding how the both scripts works, and make an edit in either script. I'm afraid it's not an easy task to do, as understanding one's battle system is already hard. (even understanding default battle system might be hard enough)
     
    #2
    redcachalot likes this.
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,586
    Likes Received:
    10,507
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Would you please edit your opening post to include links to the web pages where you got those scripts. That way if anyone who wants to help needs to check something, they don't have to go hunting around the internet for them.

    Thanks.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,313
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    The problem here is that most scripts work by overwriting base functions. And in the case of an overwrite it will only be the last overwrite that functions, the previous versions will not exist for the computer even if they are still stored in the script editor.

    For two battlescripts to function in a single game, they need to be written independently and connected by some form of branch on a switch.
    That is what Yanfly prepared with the configuration you used, but for another battlescript to use that switch it needs to be programmed compatibly to yanfly's structure. At the moment (and to my knowledge) only yanfly's own battlescripts, battle engine symphony and one of Fomar's battlescripts are compatible to that structure.

    I don't know if it would be possible to modify the tactical engine in a way to be compatible to yanfly's battlesystem-switch, but a compatibility script for that is the minimum you'll need to make this work.
    But that is better as it would be if yanfly hadn't implemented such a switch for his own variants...
     
    #4
    redcachalot likes this.
  5. redcachalot

    redcachalot Villager Member

    Messages:
    5
    Likes Received:
    3
    First Language:
    English
    Done!

    I agree. Understanding one battlescript was very difficult for me. :yswt:
    Thank you for showing me that this is a scripting problem!

    I guess there aren't enough base functions to go around huh?
    Thanks for clarifying. :yhappy:
     
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,313
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    You misunderstood what I meant with base function - it has nothing to do with the number of functions.

    The engine calls a specific function to start a battle. Because a battle can be started by event or by random encounter, there are several places in the engine that call this function this is what I named the base function.
    So if you want a different battlesystem, you need to redirect this specific function from the default battle to whatever other battle you want. Because if you don't redirect this specific function, you would have to add your battlesystem everywhere in the engine where a battle can be started.

    If you only overwrite that function, it remains targeted on the last battlescript that overwrites it.
    To allow for two or more battlesystems, you would have to overwrite it with a selection function that then redirect to the different battlesystems depending on when you want to call which one, and none of the different battlescripts must overwrite any of the existing functions because that would interfere with each other.
     
    #6

Share This Page