AnimBat! - Animated Battlers - Comprehensive

Discussion in 'RGSS Scripts (RMXP)' started by DerVVulfman, Nov 22, 2018.

  1. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    217
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMXP

    [​IMG]
    Animated Battlers - Comprehensive
    Version 1.0
    Title graphics by Lunarberry
    http://www.lunarberrystudio.com



    Introduction
    This script adapts front-view battle systems (like the default battle system, or the RTAB system), and turns it into a side-view battle system. Battlers can bob and weave while waiting to attack, charge forward to attack, and strike a victory pose when they win.




    Screenshots
    [​IMG]
    Aluxes, Gloria and Ghost battlers courtesy of Green Raven. Artist for Felix battler is unknown.




    Script
    Broken up into 7 pages.
    Credits
    Configuration - Basic Settings
    Configuration - Pose Control
    Configuration - Movement and Frames
    Engine - Game Classes
    Engine - Sprite Systems
    Engine - Battle Engine




    Demos
    By battlesystem title (except the default system)
    *Battlers by Green Raven and various artists

    AnimBat! (the default battlesystem)
    * Battlesystem by Yoji Ojima & Enterbrain
    AnimBat! Holder Edition (the default battlesystem)
    * Battlesystem by Yoji Ojima & Enterbrain - But with Holder's 13-pose battlers
    The Action Cost CBS
    * Battlesystem by Fomar0153
    The Active Timer Battle System
    * Battlesystem by Trickster
    Agility Based Battle System
    * Battlesystem by Syvkal (an XRXS edit)
    Conditional Turns/Timer System
    * Battlesystem by Trickster
    Individual Turns Battle System
    * Battlesystem by Trickster
    MakirouAru's ATB
    * Battlesystem by Makirou Aku
    ParaDog's CTB v2.58
    * Battlesystem by ParaDog
    RTAB with Extras
    * Battlesystem by Cogwheel
    The Soul Rage System
    * Battlesystem by Blizzard
    Speed Based Battle System
    * Battlesystem by Trickster
    TRTAB - Trickster's RTAB
    * Battlesystem by Trickster
    XRXS's #65 System
    * Battlesystem by XRXS (Cherry Tree Elegance Resident in Earth)


    Original Demo(with the old 10-pose system)
    The earliest version by Minkoff (w/ RTAB) that I know


    With the Battle Animations 'Flip' system
    Another system that literally 'flips' the battle animations horizontally and/or vertically.




    Instructions
    Please refer to the following manual (in .chm help format) now available for download.
    >Help File Manual<
    If you are having problems reading the help file (the AnimBat.chm), follow these steps...

    1. Right-Click the AnimBat.chm
    2. Select Properties
    3. Click the Unblock button at the bottom of the Properties dialog (above the OK and Cancel buttons)
    4. You should now be able to read the CHM file.





    Pre-Rendered Configs
    The demo and the scripts above show how to generate a system that uses multiple types of spritesheets and RTP battlers. Below are two configuration files you may wish to use in it's place.
    Minkoff Configuration ... the typical Minkoff system without any extra.
    Cybersam Configuration ... a configuration system for Cybersam's 7-pose system.
    Charset Configuration ... a configuration system to use Charactersets for battlers.
    Holder Configuration ... a 13-pose system designed by Holder.
    RM2K3 Styled Configuration ... based on RPGMaker 2003's style, but after formed into a single 1-row sheet.
    RMMV Styled Configuration ... based on RPGMaker MV's style, but after formed into a single 1-row sheet.



    The Formation System
    Removed from Animated Battlers is the formation system. A new one (roughly similar in nature to Claihm's system) is available below if you want to make custom battle formations.
    Code:
    #==============================================================================
    # ** AnimBat Add-On:
    #    Animated Battler Formations
    #------------------------------------------------------------------------------
    #    by DerVVulfman
    #    version 1.0
    #    11-22-2018 (MM-DD-YYYY)
    #    RGSS / RPGMaker XP
    #==============================================================================
    #
    #  INTRODUCTION:
    #
    #  It has been a  long time coming  in that I  wanted to  replace the  built-in
    #  formation system I hardwired into  "Minkoff's Animated Battlers - Enhanced",
    #  and finally that time has arrived.  While the base system now has the origi-
    #  ginal single formation,  it is by  this system  the end user  can design the
    #  battle formations  for the actor battlers.   They will start out  and remain
    #  lined up in the order the end user sets up.
    #
    #  The system recognizes the  'Mirror Effect'  system  in Animated Battlers XP,
    #  and will adjust and reverse the battler positions accordingly.  You need not
    #  worry about  creating duplicate  formation entries  for both left  and right
    #  sided formations.
    #
    #------------------------------------------------------------------------------
    # 
    #  CREATING THE FORMATIONS:
    #
    #  This system allows you to create multiple formations.   This is accomplished
    #  by the way you use the 'ABATXP_FORMATION' array.  The syntax is as follows:
    #
    #  ABATXP_FORMATION = { id => [ formation set ], id => [formation set],... }
    #
    #  So...  with that,  you can make  multiple sets  of formations  which you can
    #  switch to while the game is running..
    #
    #  Now...  each formation set holds the x and y position for each actor battler
    #  in combat.  Not by their 'Actor ID' mind you,  merely by party member order.
    #  So the first member in your party,regardless of their position in your actor
    #  database, will be first battler position defined in the formation set.  The
    #  layout for each formation set is as follows:
    #
    #             [ [Battler 1's X & Y], [Battler 2's X & Y],... ]
    #
    #  Most people would set a formation set with allowances for 4 battlers. But if
    #  you wanted to use a large party script  to increase the number of members in
    #  your battle party, you can add more than 4 battler arrays like so:
    #
    #  ...ON = { 0 => [ [350,200], [395,235], [440,270], [485,305], [530,340] ],
    #            1 => [ [530,200], [485,235], [440,275], [395,305], [350,340] ]  }
    # 
    #------------------------------------------------------------------------------
    #
    #  SCRIPT CALL:
    #
    #  There's only one script call you should be familiar with right now, and that
    #  is the script call that changes the formation you want to use in battle.  By
    #  default, the system uses the formation set by ID #0.  But you can change the
    #  formation being used with the following call:
    #
    #
    #  The call is simple:  $game_system.abatxp_form_id = number
    #
    #  Where the number is the ID number of your formation.  That's it.
    #
    #
    #------------------------------------------------------------------------------
    #
    #  NOTE:
    #
    #  While designed and intended for use with Animated Battlers VX,  it can be
    #  used with only the Actor Battler Graphics script to change the basic for-
    #  mation of  the heroes.   With this,  you can make  a very simple sideview
    #  system... just not animated.
    #
    #------------------------------------------------------------------------------
    #
    #  TERMS AND CONDITIONS:
    #
    #  Free to use, even in commercial projects.  Just note that I need some form
    #  of due credit... even a mere mention in some end titles.
    #
    #==============================================================================
    
    
    module Formation
     
      # --------------------------------------------------------------------------
      POSITION = {} # Do Not Touch
      # --------------------------------------------------------------------------
     
      #          ID      Battler 1      Battler 2      Battler 3      Battler 4
      # ===========      ============   ============   ============   ============
        POSITION[0] = [ [450, 200, 0], [495, 235, 0], [540, 270, 0], [585, 305, 0] ]
        POSITION[1] = [ [485, 200, 0], [440, 235, 0], [395, 270, 0], [350, 305, 0] ]
        POSITION[2] = [ [350, 200, 0], [350, 275, 0], [495, 200, 2], [495, 275 ,2] ]
     
    end
    
    
    
    #==============================================================================
    # ** Game_System
    #------------------------------------------------------------------------------
    #  This class handles system-related data. Also manages vehicles and BGM, etc.
    # The instance of this class is referenced by $game_system.
    #==============================================================================
    
    class Game_System
      #--------------------------------------------------------------------------
      # * Alias Listings
      #--------------------------------------------------------------------------
      alias formations_game_system_initialize initialize
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :abatxp_form_id           # Formation ID
      attr_accessor :abatxp_mirror            # Mirror Effect (used by AnimBatVX)
      #--------------------------------------------------------------------------
      # * Object Initialization
      #--------------------------------------------------------------------------
      def initialize
        formations_game_system_initialize
        @abatxp_form_id = 0                # Initial formation
      end
    end
    
    
    
    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #  This class handles actors. It's used within the Game_Actors class
    # ($game_actors) and referenced by the Game_Party class ($game_party).
    #==============================================================================
    
    class Game_Actor < Game_Battler
      #--------------------------------------------------------------------------
      # * Alias Listings
      #--------------------------------------------------------------------------
      alias formations_game_actor_screen_x screen_x
      alias formations_game_actor_screen_y screen_y
      #--------------------------------------------------------------------------
      # * Actor X Coordinate
      #--------------------------------------------------------------------------
      def screen_x
        # Set a default retieve value
        pos_x       = nil
        # Obtain which position is in use
        position_id = $game_system.abatxp_form_id
        # Assign retrieve value if the formation is properly configured
        if Formation::POSITION.has_key?(position_id)
          pos_x = Formation::POSITION[position_id][self.index][0]
        end
        # Exit with the original call if the retrieve value is still nil
        return formations_game_actor_screen_x if pos_x.nil?
        # Exit with the new retrieve value with accommodations for sideview
        return ($game_system.sideview_mirror == true) ? (640-pos_x) : pos_x
      end
      #--------------------------------------------------------------------------
      # * Actor Y Coordinate
      #--------------------------------------------------------------------------
      def screen_y
        # Set a default retieve value
        pos_y       = nil
        # Obtain which position is in use
        position_id = $game_system.abatxp_form_id
        # Assign retrieve value if the formation is properly configured
        if Formation::POSITION.has_key?(position_id)
          pos_y = Formation::POSITION[position_id][self.index][1]
        end
        # Exit with the original call if the retrieve value is still nil
        return formations_game_actor_screen_y if pos_y.nil?
        # Exit with the new retrieve value
        return pos_y
      end
    end
    
    
    
    #==============================================================================
    # ** Game_Party
    #------------------------------------------------------------------------------
    #  This class handles the party. It includes information on amount of gold
    #  and items. Refer to "$game_party" for the instance of this class.
    #==============================================================================
    
    class Game_Party
      #--------------------------------------------------------------------------
      # * Random Selection of Target Actor
      #     hp0 : limited to actors with 0 HP
      #--------------------------------------------------------------------------
      def random_target_actor(hp0 = false)
        # Initialize roulette
        roulette = []
        # Loop
        for actor in @actors
          # If it fits the conditions
          if (not hp0 and actor.exist?) or (hp0 and actor.hp0?)
            # Get actor class [position]
            position = formations_function_actor_target_position(actor)
            # Front guard: n = 4; Mid guard: n = 3; Rear guard: n = 2
            n = 4 - position
            # Add actor to roulette n times
            n.times do
              roulette.push(actor)
            end
          end
        end
        # Exit nil if roulette size is 0
        return nil if roulette.size == 0
        # Spin the roulette, choose an actor
        return roulette[rand(roulette.size)]
      end
      #--------------------------------------------------------------------------
      # * Random Selection of Target Actor
      #     actor : Actor
      #--------------------------------------------------------------------------
      def formations_function_actor_target_position(actor)
        # Get actor position in party
        idx         = @actors.index(actor)
        # Obtain which position is in use
        position_id = $game_system.abatxp_form_id
        # Obtain original position based on class
        position    = $data_classes[actor.class_id].position
        # Reset position if the formation is properly configured
        if Formation::POSITION.has_key?(position_id)
          position  = Formation::POSITION[position_id][idx][2]
        end
        # Return with position
        return position
      end
    end




    The Window Depth Adjuster
    The battlers in this system tend to draw themselves over the battlesystem's command windows. This patch can fix this for you.
    Code:
    #==============================================================================
    # ** AnimBat Add-On:
    #    Window Depth Adjuster
    #------------------------------------------------------------------------------
    #    by DerVVulfman
    #    version 1.0
    #    11-22-2018 (MM-DD-YYYY)
    #    RGSS / RPGMaker XP
    #==============================================================================
    #
    #  INTRODUCTION:
    #
    #  This is a simple script addition  that lets the game developer (you) set the
    #  depth perspective of the battlesystem's windows. Under normal circumstances,
    #  the Item, Skill, and other windows appear behind the Animated Battlers. This
    #  add-on patch lets you adjust the depth of the windows as you see fit.
    #
    #  It's pretty simple.  If you're creating your own battlesystem with this as
    #  a basis, you can use these simple calls on your own.  ^_^
    #
    #
    #------------------------------------------------------------------------------
    #
    #  THANKS:
    #
    #  To Boomy of House Slashers for pointing out the Skill Window overlap.
    #
    #
    #------------------------------------------------------------------------------
    #
    #  TERMS AND CONDITIONS:
    #
    #  Free to use, even in commercial projects.  Just note that I need some form
    #  of due credit for both Boomy and myself... even a mere mention in some end
    #  titles.
    #
    #==============================================================================
    
    
    module AnimDepth
      #==========================================================================
      #   ****         C O N F I G U R A T I O N   S E C T I O N         ****   #
      #==========================================================================
      #
      # * Set the window depth here.  Higher numbers are closer to the player
    
      PARTY    = 1000  # Depth of the Party Window (Fight/Escape)
      COMMAND  = 1000  # Depth of the Actor Command Window
      HELP     = 1000  # Depth of the Help Window
      SKILL    = 1000  # Depth of the Skill Window
      ITEM     = 1000  # Depth of the Item Window
    
      #==========================================================================
      #   ****             C O N F I G U R A T I O N   E N D             ****   #
      #========================================================================== 
    end 
     
     
    #==============================================================================
    # ** Scene_Battle
    #------------------------------------------------------------------------------
    #  This class performs battle screen processing.
    #==============================================================================
    
    class Scene_Battle
      #--------------------------------------------------------------------------
      # * Alias Listings
      #--------------------------------------------------------------------------
      alias animbat_depth_start_phase2 start_phase2
      alias animbat_depth_start_phase3 start_phase3
      alias animbat_depth_start_skill_select start_skill_select
      alias animbat_depth_start_item_select start_item_select
      #--------------------------------------------------------------------------
      # * Start Party Command Phase
      #--------------------------------------------------------------------------
      def start_phase2
        # Set Party and Help Window Depths
        @party_command_window.z = AnimDepth::PARTY
        @help_window.z          = AnimDepth::HELP
        # Perform the original call
        animbat_depth_start_phase2
      end
      #--------------------------------------------------------------------------
      # * Frame Update (main phase)
      #--------------------------------------------------------------------------
      def start_phase3
        # Set Actor Command Window Depth
        @actor_command_window.z = AnimDepth::COMMAND
        # Perform the original call
        animbat_depth_start_phase3
      end
      #--------------------------------------------------------------------------
      # * Start Skill Selection
      #--------------------------------------------------------------------------
      def start_skill_select
        # Perform the original call
        animbat_depth_start_skill_select
        # Set Skill Window Depth
        @skill_window.z = AnimDepth::SKILL
      end
      #--------------------------------------------------------------------------
      # * Start Item Selection
      #--------------------------------------------------------------------------
      def start_item_select
        # Perform the original call
        animbat_depth_start_item_select
        # Set Item Window Depth
        @item_window.z = AnimDepth::ITEM
      end 
    end




    Awards and Badges
    A few awards of note for Animated Battlers
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]




    Compatibility
    This side-view battler script was designed to work with both, the default battle system AND the RTAB system. It was also instrumental in making Charlie Fleed's CTB. And it apparently works with a whole host of others ranging from ParaDog's and the XRXS systems and those by Trickster. But I cannot account for it working with any other systems.




    Credits and Thanks



      • Minkoff for the original 2005 base system.
      • ccoa who designed the spritestrips system as opposed to the spritesheet concept
      • Twin Matrix who requested a Low Percentages option and coded the basis for status effect poses
      • Min-Chan and Caldaron who requested fixes to Hero and enemy z-Depth
      • Jirby Taylor -or- Taylor who discovered an F12 stack error with the collapse code
      • SephirrothSpawn who instructed me on code to eliminate F12 Stack errors
      • Mimi-Chan who detected a timing fault with battle animations, especially full screen battle animations, and saw a variable frames-per-pose bug
      • Trickster for compatability code for his Gradient Bars v 3.4
      • Fomar0153 who supplied code to halt AT bar growth for certain battle actions
      • daigotsu who noticed an 'None/All' targeting error
      • MasterMine5823 who requested a fix on saved data issues
      • Alistor who notice an issue with viewports and certain gradient bar code
      • Angel_FX who noticed that dead hero battlers were still visible in new battles
      • Yin who requested the use of ccoa spritesheets
      • Jaberwocky who supplied dodge pose mechanices
      • Alistor who requested a variation of the center-pose system whereby attackers were still vertically lined up with their targets
      • hanetzer who requested that both individual poses and red-out collapse deaths to be available at the same time[/list[

        --or-


        by DerVVulfman
        (M. B. Randolph)

        Based on the original system by
        Minkoff

        Spritestrip Concepts by
        ccoa / S. Harlow

        Additional Pptions and Programming by
        Twin Matrix * SephirothSpawn * Trickster * Fomar0153 * Jaberwocky

        Expansion Concepts by
        Twin Matrix * Min-Chan * Caldaron * MasterMine5823 * Yin * Alistor * hanetzer

        Additional Betatesting and Reports by
        Jirby Taylor / Taylor * Mimi-Chan * daigotsu * Alistor * Angel_FX​





    • Terms and Conditions
      Required for distribution:
      This system is available royalty free. I make no claim as to the usage of this system, even for commercial use. Edits to the system may be permitted as to suit your needs, but I cannot guarantee these edits effectiveness nor can I guarantee support for these same edits.

      When using the system, the name of the animation system must be prominent along with my name and name of the scripter who created the basis of this work (that's Minkoff... if you didn't know :D ). If your project includes a end-of-game 'Credit Roll', I would also require the listing of all parties in the Credits and Thanks section (above) as contributers and betatesters of this system. Given their assistance, I wouldn't ask no less.




      Author's Notes
      Originally posted over the years as Minkoff's Animated Battlers Enhanced.
     
    #1
  2. Antoff7

    Antoff7 Warper Member

    Messages:
    4
    Likes Received:
    0
    Location:
    Italia
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Hi, i have a problem with the section "1b - Config - Pose Control".
    I would like to set an alternative animation using a spell, and I went to the section "Attacking Pose Hashes", but it does not work...

    Based on the demo, I went to see this paragraph:

    But when I cast the "Cross Cut" spell, it always shows the animation that casts a spell, and not that attacks the target.
    My intent is to create magic, which attacks the target with the sword, how can I do it?
     
    #2
  3. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    217
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMXP
    This section covers that 'attacker' that delivers the attack and his battler's animation pose. It does not handle the pose performed by the receiver of the attack. That would be the Struck Pose system.

    Now while the initial 'basic' demo only holds the following in the default Pose configuration page:
    Code:
      # Struck/Hurt Pose Hashes
      # Extension to POSE_02
      # ----------------------
      # Here, you can define the poses that are performed by the battler when
      # the battler is hurt by an attack.  There are three actual entry types
      # based on the attack, one if the battler is hit by a weapon, one if the
      # battler is hit by a skill attack, and one if the attack was by an item.
      # It is an extension of the POSE_02 value.
      #
      STRUCK_WEAPONS[0]     = nil           # Default:  no expansion
      STRUCK_SKILLS[0]      = nil           # Default:  no expansion
      STRUCK_ITEMS[0]       = nil           # Default:  no expansion
    The accompanying help file shows that one can change on of these options (in this case an ITEM based attack for an individual battler for a singular item thus:
    Code:
    STRUCK_ITEMS[3]        = {17 => 9}     # Item #17 (Life Seed) uses Skill (Pose 9)
    This structure being similar in nature to what you were attempting to alter, but covering the defender.

    Now if you are considering the battle 'animations' and not battler poses... this doesn't handle such.
     
    #3
  4. Antoff7

    Antoff7 Warper Member

    Messages:
    4
    Likes Received:
    0
    Location:
    Italia
    First Language:
    Italian
    Primarily Uses:
    RMXP
    So i can't create a spell, which shows my character hitting the enemy with the sword?
    Because I'm creating two types of magics, one is the classic magic that is thrown from afar, similar to Firaga from Final Fantasy. (and here I have no problems)
    But if I want to create a "magic" that hits the enemy with the sword it's not possible, right?

    However I tried to change this string, but it doesn't work.
     
    Last edited: Jun 10, 2019
    #4
  5. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    217
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMXP
    That... is the ITEM attack system. Hence, STRUCK_ITEMS. And you may not realize that the STRUCK_ITEMS[3] only affects attacks on actor #3... while STRUCK_ITEMS[0] is a carte-blanche 'all-battlers' effect.

    I am going to assume, that this attack is supposed to affect every battler, is meant to be a SKILL strike, is meant to deliver pose #3 upon anyone inflicted with skill #57, the cross cut....
    Code:
    STRUCK_SKILLS[0] = {57 => 3} # Skill #57 (Cross Cut) uses HIT (Pose 3)
    But again, this shows only the character's poses from their spritesheet. If you think the Struck Skills is going to show Battle Animation #67: Sword-skill 1, you will be wrong.

    This is covered in the help file (a .chm file) that is included with each demo
     
    #5
  6. Antoff7

    Antoff7 Warper Member

    Messages:
    4
    Likes Received:
    0
    Location:
    Italia
    First Language:
    Italian
    Primarily Uses:
    RMXP
    I made several attempts but I could not create the effect I want.
    I thank you for the help, if I find a solution to my problem, I will update this post with the solution.
     
    #6
  7. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    217
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMXP
    If the effect is a battle animation (ie 000: Sword, 067: Sword-skill 1, or the like), this system does not handle such. You would be utilizing another system. It shouldn't be a language issue since my good friend Charlie Fleed in Naples made a battlesystem using this as its graphics basis.
     
    #7

Share This Page