AnimBat! - Animated Battlers - Comprehensive

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

  1. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP

    [​IMG]
    Animated Battlers - Comprehensive
    Version 1.2
    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.


    Using Charlie Fleed's CTB Final Fantasy X-Like Battle System v 3.3 (formerly 3.2)
    Link to Charlie Fleed's original "Final Fantasy X-like Battle System" topic
    Revision to his system made solely for the newer AnimBat! system. Everything else is the same



    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
      • redtri17 who noted an error in individual weapon pose

      --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 * redtri17​

    [/LIST]





    • 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.
     
    Last edited: Sep 19, 2019
    #1
    redtri17 likes this.
  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:
    304
    Likes Received:
    149
    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:
    304
    Likes Received:
    149
    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:
    304
    Likes Received:
    149
    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
  8. redtri17

    redtri17 Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Indonesian
    Primarily Uses:
    RMXP
    When Aluxes attacks with weapon number 1, I want he does dead pose. I want to test it, so I added ATTACK_WEAPONS[0] = {1 => 11} on the AnimBat! (the default battlesystem) demo:
    [​IMG]
    But it seems it doesn't work because Aluxes does the same pose. How to fix it?
     
    #8
  9. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    @redtri17

    You are the first person to deliver an accurate bug report after all these years of development.

    Congrats!

    Regarding your claim, your alteration/edit of the configuration system is correct and proper. And your expectation of it changing the pose based on the weapon as you configured is accurate. So yes, there is a bug in version 1.0.

    Simple to track, the ATTACK_WEAPONS value only works within the following page of the system:
    4 - Battle Engine Classes. The error within the code can be corrected by a simple change to line 926 within the animbat_function_update_phase4_step3_pose_attack method.

    Merely change
    Code:
    temp_pose = hash_obtain2(battler, nil, temp_hash)
    to
    Code:
    temp_pose = hash_obtain2(battler, battler.weapon_id, temp_hash)

    This essentially allow the feature that changes the weappn to recognize which weapon by its ID.

    While I have not as yet updated the demos, this does change the system to version 1.1 on today's date of September 14, 2019. And now you, redtri17are now to be included in the credits.
     
    #9
    redtri17 likes this.
  10. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP

    BUMP
    To Version 1.1


    An unexpected bug was discovered by redtri17 of RPGMakerWeb.com. He noticed that he could not make a weapon use a pose not part of the basic template system. A simple one-line fix, all demos uploaded here have been upgraded. And thanks to redtri17 who is now in the system's credits.
     
    #10
    redtri17 likes this.
  11. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    POST UPDATE

    The main post now includes a link to Charlie Fleed's Final Fantasy X-Like Battle System, now employing AnimBat! It was upgraded to version 3.3, but only as a result to minor changes and additions made within AnimBat! Otherwise, it is the same system and the same instructions that Charlie Fleed supplied still apply.

    A link to Charlie Fleed's actual CTB topic is included within the first post.
     
    #11
  12. redtri17

    redtri17 Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Indonesian
    Primarily Uses:
    RMXP
    Thank you for the fix.
    I tried the demo (AnimBat default), ATTACK_WEAPONS[0] = {1 => 11} works well.
    However when I tried ATTACK_WEAPONS[0] = {2 => 11}, it doesn't work. And when I tried ATTACK_WEAPONS[0] = {1 => 3, 2 => 11}, the second weapon used the third pose/woozy pose instead (the first weapon works well, it used the third pose). How to fix these?
     
    #12
  13. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    @redtri17

    :p I already gave ya bug-detecting credit. Now you're just showing off.

    I saw this about midnight... it's 12:15 now. How's that for analysis and system design?

    We have to revisit the same method, the animbat_function_update_phase4_step3_pose_attack method. Just for cleanliness sake, just use THIS in its place. Yeah, it's the same line... but why take chances?

    Code:
      #--------------------------------------------------------------------------
      # * Frame Update (main phase step 3 : animation for action performer)
      #   * Select Attack Pose
      #     battler : battler
      #--------------------------------------------------------------------------
      def animbat_function_update_phase4_step3_pose_attack(battler)
        base_pose   = hash_obtain2(battler, 7, AnimBat::POSE_07)
        temp_hash   = hash_obtain2(battler, nil, AnimBat::ATTACK_WEAPONS)
        unless temp_hash.nil?
          temp_pose = hash_obtain2(battler.weapon_id, nil, temp_hash)
        end
        base_pose = temp_pose unless temp_pose.nil?
        return base_pose
      end
    But we're not done yet.

    Look at the Hash Obtain2 method and how it looks. A clean method, it accepts a 'battler' as its initial value, recognizing it as an actor or enemy, and obtains the actor/enemy ID from it. But look further and see that it also accepts the ID of weapons or skills.

    OOPS! I LEFT THAT PORTION OUT!

    The fault does not lie within the hash_obtain2 method, but the base hash_obtain method which it uses. I needed to let it recognize if the value being sent into the method is an actual battler, or just some value to search... so replace the actual hash_obtain method with this! Erm, leaving hash_obtain2 untouched. That one's fine.

    Code:
      #--------------------------------------------------------------------------
      # * Hash Value Obtain
      #     battler : battler being tested against (or ID if it is not a battler)
      #     default : default value
      #     testval : hash array
      #     minval  : (optional) minimum value
      #     maxval  : (optional) maximum value
      #--------------------------------------------------------------------------
      def hash_obtain(battler, default, testval, minval=nil, maxval=nil)
        if battler.is_a?(Game_Battler)
          id        = (battler.is_a?(Game_Enemy)) ? -battler.id : battler.id
        else
          id        = battler
        end
        returnval = default
        return returnval          if testval.nil?
        returnval = testval[0]    if testval.has_key?(0)
        returnval = testval[id]   if testval.has_key?(id)
        unless default.nil?
          returnval = minval      if minval != nil && returnval < minval
          returnval = maxval      if maxval != nil && returnval > maxval
        end
        return returnval
      end
    And now, it's version 1.2!!! Dated 9/17/2019 (mm/dd/yyyy).

    It'll take some time to generate all the demos. I have obligations to perform tomo--- this morning.
     
    #13
    redtri17 likes this.
  14. redtri17

    redtri17 Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Indonesian
    Primarily Uses:
    RMXP
    Thank you for your quick response, @DerVVulfman. I tried it in the demo version 1.1 and my project, and it works very well!
     
    #14
  15. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    Now for the official...
    BUMP
    to Version 1.2

    All the demos have been updated to the latest version, fixing an error which prevented accurate poses from being played out when a weapon is actively used upon a target. This did require a bit more work than the previous update as it required an alteration to the base system that extracts data from hash arrays within the Battlesystem itself.
     
    #15
  16. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    NOT... an update, but a little treat of a nostalgic sort.

    AnimBat! was formerly entitled 'Minkoff's Animated Battlers - Enhanced', and questioned my permission as it was based upon the work of Minkoff from 2005. For some time, I have stated that I was granted permission by Minkoff. Now it's been years since I was granted permission at RMXP.net (now gone), over a decade in fact. And perhaps nearly as long since I last spoken to Minkoff at Creation Asylum.

    However, it appears that Minkoff just discovered that I'm still around, and so is the system. He made a fresh account at my forum (if my signature doesn't identify it ), and gave his thanks. You can click if you want to read:
    https://www.save-point.org/thread-7557.html
     
    #16

Share This Page