Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help me with an error in RGSS script ; Side-view battle

RPGS

Member

:cry:        The sideview battle is like this ; The enemies AND characters are split SQUARES that blinks , I dont know ,

can anyone help me ?  :dead:  :cry:  :)thumb: )

maybe I must edit the script further !?  :crazy:


Help Mee !!!!  :ssj: :angel:
 

RPGS

Member




No , I havent time to show ; But this is the code I used

#==============================================================================
# ** Animated Battlers - Enhanced  ver. 10.5                      (01-20-2007)
#
#------------------------------------------------------------------------------
#  * (0) Credits:  Includes features included & additional system notes
#------------------------------------------------------------------------------
#  Animated Battlers by Minkoff
#  Enhancements by DerVVulfman       
#  Low percentage and Status Poses
#    Concept & Base coding by Twin Matrix
#  Hero & Enemy z.depth concept by Min-Chan and Caldaron ( totally redone :) )
#  Collapse stack-error found by JirbyTaylor(fixed) / Code by SephirothSpawn
#  Default 'Battle Animation' glitch found by Mimi Chan (Note, can't fully fix)
#  Compatability Fix for 'Gradient Bars v3.4+' by Trickster.
#  AT Battle Pause code supplied by Fomar0153
#  'None/All' Target error found by daigotsu. Solution found & fixed... mostly.
#  Configurables now saved in save file.  Feature requested by MasterMind5823.
#  Viewport error (related to Gradient Bar fix) detected by Alistor.  Fixed.
#  Long-running Full-Screen 'Battle Animation' glitch found by Mimi-Chan. Fixed.
#  Dead battlers found still on battlefield at combat start (found by Angel_FX).
#  Variable frames per poses glitch found by Mimi-Chan... found source n fixed.

#==============================================================================
#
#  INTRODUCTION:
#
#  This script is not a battlesystem but a graphic overlay system that can con-
#  vert a frontview 'Strategy'  battlesystem into a Sideview battlesystem.  It
#  has gone through a number of changes over the months that I have put my spin
#  on the system, originally coded by Minkoff himself.
#
#  As of now, this system works  with the default battlesystem, the RTAB system
#  by Cogwheel, ParaDog's ATB, XRXS's system,  and a number of systems designed
#  by Trickster.
#
#  Again,  this system  changes the  'graphic'  overlay system  and is meant to
#  change the battlers  and battler's startup positions  for a sideview system.
#  It is not meant  to alter  anything else,  including combat values,  defense
#  levels, or any other graphics other than those related to the battlers them-
#  selves.
#
#==============================================================================
#
#  REGARDING:
#  Skill and Item Scopes:
#  Until recently,  the revised system did not allow  for target scopes beyond
#  a single target.  This was unintentional and unforseen.  However, with the
#  revision made in version 7.3, this was corrected. But, skills or items that
#  have a target scope of  'None'  would still create an error if this form of
#  attack is set in either $moving_item_atk or $moving_skill_atk hashe arrays.
#  Don't supply the id #'s of any 'None' scope skills/items into these hashes.
#
#==============================================================================
#
#  COMPATABILITY ISSUES:
#
#  RTAB:  Connected Attacking
#  A powerful add-on to the RTAB system by Cogwheel, this script allows an ac-
#  tor to apply multiple hits on a target.  At first, there was no auto-detect
#  feature which gave ME MIGRANES... having to use insert switch in the config
#  section.  Now there is one.  The only caveat is that you must STILL comment
#  out or remove the entire 'action_phase' routine in Con. Attacking (which is
#  roughly lines 30 to 80).
#
#  LARGE PARTY (Fomar0153's)
#  In order  to take advantage of the 'Large Party' system,  and still keep the
#  actors and enemies in the proper viewport,  the second half of Fomar's Large
#  Party script (the Battlestatus Page) must be placed under Animated Battlers.
#  The first page  must still  be pasted  above the  battlesystem script(s)  as
#  before.  Please follow all of Fomar0153's instructions as always.
#
#==============================================================================
#
#  ADDITIONAL CALLS AVAILABLE PRIOR TO COMBAT:
#
#------------------------------------------------------------------------------
#  SIDEVIEW MIRROR:    This value switches  the positions  of both enemies and
#                      heroes to opposite ends of the screen.
#
#  Script : $sideview_mirror = [number]
#  number : a value indicating whether the hero & enemy positions are switched
#            0 = Default:  Enemies on the left, Heroes on the right
#            1 = Switched: Heroes on the left, Enemies on the right
#
#------------------------------------------------------------------------------
#  BATTLER FORMATIONS:  This value changes the way your heroes line up when the
#                      battle starts.
#
#  Script : $formation_style = [number]
#  number : a value indicating the type of formation your heroes will use
#            0 = Diagonal (Default)    4 = Column Pattern 1
#            1 = Diagonal Pattern 2    5 = Column Pattern 2
#            2 = Slanted Pattern 1    6 = Wave Formation 1
#            3 = Slanted Pattern 2    7 = Wave Formation 2
#
#            8 = Randomized (system will choose from 0 to 7)
#
#------------------------------------------------------------------------------
#  FORMATION OPTIONS:  These values  may expand your system  to go beyond the
#                      default four player system.
#
#  Script : $formation_max_member = [number]
#  number : A value indicating the maximum number of members in your party.
#            (default = 4)
#           
#  Script : $formation_max_height = [number]
#  number : A value indicating (in pixels) the top height of your party shown
#            in the Battle Screen.  The higher the number, the lower the party
#            on the screen. (default = 220)
#
#  Script : $formation_max_width  = [number]
#  number : The left/right width of the party's formation.  (default = 128)
#
#  Script : $battlestatus_height = [number]
#  number : The actual height of your battlestatus window. (default = 160)
#
#  NOTE: The combined $formation_max_height and $battlestatus_height determines
#        the vertical distance between battlers in their formation.
#
#==============================================================================
#
#  Things added since original version by Minkoff:
#
#  Can reverse the battler positions
#  Editable spritesheet layout in script
#  Able to define total/max frames per pose
#  Can define individual # of frames per each pose
#  Can use 'red-out' RTP death or 'battler death' pose
#  Can show battler falling before death.
#  'Casting' pose now available for RTAB/Skill Timing users
#  Can show battler celebrating before victory pose
#  Can tag battlers who's victory pose loops indefinitely
#  Can show actor battlers get ready before battle starts.
#  Separate poses for 'skills', 'items' or 'weapons' based on their id
#  Can allow the battlers to step forward before using items & skills (FFVII+)
#  Attacking battlers rush towards their targets while item & skill users don't
#  Certain weapons can force the battler NOT to move
#  Certain items & skills can force battlers to 'rush' the enemy
#  Certain skills or items can force movement to the center of the screen
#  Stationary enemies. In case enemies do NOT move when they attack.
#  Adjustable 'low health' checker. Set your low health to 25%... 30%... 10%...
#  Poses now available for status ailments
#  Dead revert to 'victory' pose bug fixed.
#  Default battlers now available for actors and/or enemies
#  Default battlers now usable by ID number (had to rewrite red-out for that)
#  Escaping Enemies bug found by SteveE22.  Fixed just as fast.
#  Hero Formations (total of 8 hardwired -& 1 random- ... add at your own risk)
#  Z-Depth for attack overlapping purposes
#  Corrected attack overlap offset routine.  Overlap now based on battler size
#  Certain skills and items can now prevent movement
#  Can allow battlers to take step forward before performing 'attack' pose.(FF)
#  Certain weapons can move battlers to center screen instead of a full move.
#  Escaping Enemies can now have a pose before disappearing (was a rush pose)
#  Redesigned Scene_Battle's movement routine
#  Added pose for Critical Hits
#  Added the enemy's hash for frame number based on poses
#  Added the actor's hash for frame number based on poses
#  Re-Tooled the formations to go beyond the default four party system
#  Minor value added for compatability with Delissa's Battle Cry script
#  Default Collapse Stack-Error fixed(code by SephirothSpawn) found JirbyTaylor
#  Removed dependancy on $game_system for the Sideview Mirror system
#  Fixed the 'Blocking during Victory State' bug discovered by Kaze950
#  Battler tones now adapt to the background tones, requested by doom900
#  Fixed changing battler/battler system.  Include fade-in switch req by Neonyo
#  Set individual Actors/Enemies that phase on an attack
#  Translucent battlers... a personal desire for ghosts you can see through!
#  Adjustable opacity for translucent battlers... can't forget that.
#  FREAKIN'!!!  Fixed the Battler tones.  I forgot to 'untone' the 1st viewport.
#  Adjustable 'attack/skill/item' movement speeds requested by KAIRE.
#  Removed annoying translucency 'flicker' (excess code totally unneeded).
#  Individual 'Woozy' Rates per battlers added (JirbyTaylor gave me the idea).
#  Woozy and Status poses now override any blocking pose.  Makes sense, eh?
#  Can now use individually sized spritesheets for enemies and actors.
#  'Casting' pose now available for ParaDog's Spell Residence/Delay users.
#  Another escaping enemies (do-nothing switch) bug found by Boomy. Lengthy fix
#  Redefined the casting pose values.  Now set up for 'each' battler.  Better.
#  ---Noted: 'FullScreen' Battle Animation bug found by Mimi Chan.
#  A combination 'Nil'-Pose/Nil-State bug was fixed.  Found by Gaxx
#  'Templates per Spritesheet' system for Actors and Enemies now available.
#  ---Noted: Removed Battle Animation attempted fix. (Can't fix.  Removed.)
#  Created 'Obtain Pose' for multiple spritesheet types to shorten code.
#  Added additional 'Custom Spritesheet' poses for the Casting pose & the like.
#  Added individual 'Casting' poses hash for each skill used.
#  Added addt. Advanced 'Custom Spritesheet' pose system for Casting & the like
#  Removed the unnecessary 'viewport.z' statement, compatible with Grad. Bars!
#  System 'can' pause the AT bar growth when performing attack, skill & item!
#  A 'None / All'-Target bug was found by daigotsu.  Taken care of... mostly.
#  Configurables (like $sideview_mirror) not saved. Bug found by MasterMind5823
#  Now a 'casting' pose available when used with the Skill Casting Delay system
#  Bug squashed related to Casting Pose addition
#  Random Formation/Custom Battlesystem bug found by Alistor.  Very small fix.
#  The Actor Command Window was 'under' the battlers.  Found by Alistor. Fixed.
#  Moves actor battlers into viewport 1.  Fixes hero/window menu glitches.
#  Fixes the battle animation glitch found by Mimi Chan by relocating enemies!
#  Additional compatability with Fomar0153's Large Party (v2) system added.
#  Fixed a minor bug with battle poses if called from a Custom Sheet template.
#  Can tag battlers who's defeat poses loops indefinitely (Hakuya suggestion).
#  Dead guys now hidden at battle start (visible if 'raised) Thanks Angel_FX.
#  Converted the CONFIG section to use 'constants' to reduce resources used.
#  Converted the $global RTAB/ParaDog/Fomar detection values to $game_system.
#  Includes an Adaptation Switch for use with RTAB's Connected Attacking script
#  -Finally- Connected Attacking is auto-detected.  Adaption switch not needed.
#  Got tired of referring to IDX nos for template.  Poses start at 1, not 0!!!
#  Replaced all but '7' $global values with $game_system values.  Resources!!!
#  Revised the AT bar growth system for Trickster's newer battlesystems.
#  Repaired the Victory Pose looop/no-loop glitch found by joooda
#  Now you can config where the targetting arrow is (long overdue).
#  Repaired some CTBs 'non-existant' moved values - found by bojox3m.
#  System cleanup.  Condensed a number of existing routines.  Made new ones.
#  Added Flatrate HP feature to the 'low health' checker. A Boo Mansion request.
#  Battlers can seem to be attacked from behind with the 'Advantages!' system.
#  Added 'STRUCK by...' poses. Indiv. poses based how you're attacked Kaze950)!
#  Fixed the DEFAULT_ACTOR_ID collapse bug. RTP battlers die collapse style!
#  Repaired a bug in the 'Casting Pose' routine for ParaDog's Spell Delay.
#  Reduced the number of instance variables & set up as 'locals'.
#  Repaired a 'Variable Frames per Pose' glitch found by Mimi-Chan.
#  Better handling of 'same pose' attack pausing.
#  New overlap offset routine.  Overlap now based on individual battler sizes
#  Minor:  Renamed the 'Final Fantasy Stepping' values in the config section.

#  95 counted
#==============================================================================
#==============================================================================

 
  #==========================================================================
  #  ****                    GENERAL CONTROLS                      ****  #
  #==========================================================================

  # * Default Battler Style Switches
  #--------------------------------------------------------------------------       
  DEFAULT_ENEMY          = false  # If true, these switches allows the use
  DEFAULT_ACTOR          = false  # of default battlers for actors/enemies
  DEFAULT_ENEMY_ID        = [3]    # Ids of enemies using default battlers
  DEFAULT_ACTOR_ID        = [1]    # Ids of actors using default battlers
  DEFAULT_COLLAPSE_ACTOR  = false  # If true, restores the old 'red fade'
  DEFAULT_COLLAPSE_ENEMY  = false  #  collapse effect (using spritesheets)

 
  # * Animation Frames and Animation Speed
  #--------------------------------------------------------------------------   
  MNK_SPEED              = 4      # Framerate speed of the battlers
  MNK_RUSH_SPEED          = 1.5    # Melee/Skill/Item motion speed of the battlers
  MNK_POSES              = 11      # Maximum # of poses (stances) in the template
  MNK_FRAMES              = 4      # Maximum # of frames in each pose
  MNK_FRAMES_STANDARD    = 4      # Standard # of frames played in each pose.
 
  # Individual Spritesheet Control Center
  #--------------------------------------------------------------------------       
  MNK_POSES_ENEMY        = {1 => 4}  # ID and # of poses for each enemy
  MNK_FRAMES_ENEMY        = nil      # ID and # of frames for each enemy
  MNK_POSES_ACTOR        = {2 => 4}  # ID and # of poses for each actor
  MNK_FRAMES_ACTOR        = nil      # ID and # of frames for each actor.
     
  # * Wooziness Rates
  #--------------------------------------------------------------------------
  MNK_LOW_HP_PERCENTAGE  = 0.25                    # Health% for WOOZY pose.
  MNK_LOW_HP_ACTOR        = {7 => 0.50, 8 => 0.75}  # Ind. health% for actors.
  MNK_LOW_HP_ENEMY        = {1 => 0.50}            # Ind. health% for enemies.
  MNK_LOW_HP_FLAT        = true                    # If true, flat rate hp
 
   
   
  #==========================================================================
  #  ****                  POSE CONTROL CENTER                    ****  #
  #==========================================================================
   
  # Editable Template (Some people wanted to change their template design)
  #--------------------------------------------------------------------------
  MNK_POSE1  =  1  # Sets the 'Ready Pose'  (MNK_POSE1)  #1 in your template
  MNK_POSE2  =  2  # Sets the 'Struck Pose' (MNK_POSE2)  #2 in your template
  MNK_POSE3  =  3  # Sets the 'Woozy Pose'  (MNK_POSE3)  #3 in your template
  MNK_POSE4  =  4  # Sets the 'Block Pose'  (MNK_POSE4)  #4 in your template
  MNK_POSE5  =  5  # Sets the 'Charge Pose' (MNK_POSE5)  #5 in your template
  MNK_POSE6  =  6  # Sets the 'Retreat Pose'(MNK_POSE6)  #6 in your template
  MNK_POSE7  =  7  # Sets the 'Attack Pose' (MNK_POSE7)  #7 in your template
  MNK_POSE8  =  8  # Sets the 'Item Pose'  (MNK_POSE8)  #8 in your template
  MNK_POSE9  =  9  # Sets the 'Skill Pose'  (MNK_POSE9)  #9 in your template
  MNK_POSE10  =  10  # Sets the 'Victory Pose'(MNK_POSE10) #10 in your template
  MNK_POSE11  =  11  # Sets the 'Defeat Pose' (MNK_POSE11) #11 in your template
   
  # Editable Template (for Custom Actor Spritesheets)
  #--------------------------------------------------------------------------
  MNK_APOSE1  =  {2 => 2}
  MNK_APOSE2  =  {2 => 2}  # Hilda is using a Charset graphic as a battler.
  MNK_APOSE3  =  {2 => 2}  # The battler was copied into the Battler folder.
  MNK_APOSE4  =  {2 => 2}  # This setup allows you to use Charactersets for
  MNK_APOSE5  =  {2 => 2}  # battlers battlers.
  MNK_APOSE6  =  {2 => 3}
  MNK_APOSE7  =  {2 => 2}
  MNK_APOSE8  =  {2 => 2}
  MNK_APOSE9  =  {2 => 2}
  MNK_APOSE10  =  {2 => 1}
  MNK_APOSE11  =  {2 => 4}
   
  # Editable Template (for Custom Enemy Spritesheets)
  #--------------------------------------------------------------------------
  MNK_EPOSE1  =  {1 => 2}
  MNK_EPOSE2  =  {1 => 2}  # Did the same to the ghosts.  Note that enemies have
  MNK_EPOSE3  =  {1 => 2}  # no victory pose.
  MNK_EPOSE4  =  {1 => 2} 
  MNK_EPOSE5  =  {1 => 2} 
  MNK_EPOSE6  =  {1 => 3}
  MNK_EPOSE7  =  {1 => 2}
  MNK_EPOSE8  =  {1 => 2}
  MNK_EPOSE9  =  {1 => 2}
  MNK_EPOSE11  =  {1 => 11}  # Setting the ghost to an invalid pose erases it.
                       
                       
  #==========================================================================
  #  ****              EXPANDED POSE CONTROL CENTER                ****  #
  #==========================================================================
 
  # Non-Default Poses (can expand beyond the default 11 poses here)
  # (New system mimics the revised Template system.  Can use 'custom' sheets)
  #--------------------------------------------------------------------------
  # The first value in each set indicates the index number  in a spritesheet.
  # This value is  overrided by a value  in one of the other two accompanying
  # arrays... one for actor battlerss, the other for enemy battlers.
  #
  # To define a pose linked to a specific battler, the syntax is...
  # '' hash array '' = { battler.id => pose# }
  # Where Aluxes and the Ghost (RTP)  would be  the 1st battlers (per array),
  # and the pose# would be the pose in your spritesheet.
  #
  # Combinations in the  hash arrays  are possible,  so if the MNK_POSES_DYING_E
  # array has {1 => 5, 9 => 2},  then the GHOST (enemy #1) would be using the
  # 6th pose (index 5) and the 9th enemy battler would be using the 3rd pose.
  #--------------------------------------------------------------------------
  MNK_POSES_SETUP      = 7          # Choose animation pose for 'preparation'
  MNK_POSES_SETUP_A    = {2 => 4}
  MNK_POSES_SETUP_E    = {1 => 4}   
  MNK_POSES_CASTPREP    = 4          # Set 'casting' pose for skill preparation
  MNK_POSES_CASTPREP_A  = {}         
  MNK_POSES_CASTPREP_E  = {9 => 3}   
  MNK_POSES_DYING      = 6          # Choose animation pose for dying throws.
  MNK_POSES_DYING_a    = {}         
  MNK_POSES_DYING_E    = {9 => 5}   
  MNK_POSES_ESCAPE      = 2          # Set 'coward' pose for fleeing monsters)   
  MNK_POSES_ESCAPE_A    = {}       
  MNK_POSES_ESCAPE_E    = {9 => 5} 
  MNK_POSES_CRITICAL    = nil        # Set pose for BIG hits
  MNK_POSES_CRIT_A      = {}
  MNK_POSES_CRIT_E      = {9 =>5}
  MNK_POSES_WINNING    = 4          # Set winning (Victory Dance before pose)
  MNK_POSES_WINNING_A  = {}
  MNK_POSES_WINNING_E  = {}       
 
  # Looping Poses
  #--------------------------------------------------------------------------
  # These arrays merely hold the ID  of actors or enemies whose poses loop at
  # the end of combat.  Enemies have no 'winning' animation pose.
  MNK_LOOPS_WINNING        = [7]    # Actor IDs if their victory pose loops
  MNK_LOOPS_DEFEATED_ACTOR  = []      # Actor IDs if their defeat pose loops
  MNK_LOOPS_DEFEATED_ENEMY  = []      # Enemy IDs if their defeat pose loops
   
  # Non-Default Pose Hashes (poses dependant on .id values)
  # (New system mimics the revised Template system.)
  #--------------------------------------------------------------------------
  # The first hash in each set  indicates the id number (be it skill, item or
  # otherwise, and the pose it brings up.  These mimic the 2nd array type in
  # the above Non-Default poses.  As such, a hash value of {1 => 10) for the
  # MNK_POSES_WEAPONS hash would make  the 'Bronze Sword' use the 10th index (or
  # 11th spritesheet) pose... aka the 'Defeat' pose.
  #
  # To define an advanced pose linked to a specific battler, the syntax is...
  #  = { battler.id => { item/skill.id => pose#  } }
  # ...so this gets  more complicated.  But this does allow  each battler to
  # have his or her own unique pose, regardless of spritesheet type.
  #--------------------------------------------------------------------------
  MNK_POSES_CASTED    = {61 => 6}  # Set a specific skill to use a pose
  MNK_POSES_CASTED_A  = {}       
  MNK_POSES_CASTED_E  = {}
  MNK_POSES_STATUS    = {3 => 3}  # Set status values to poses here
  MNK_POSES_STAT_A    = {} 
  MNK_POSES_STAT_E    = {}
  MNK_POSES_SKILLS    = {57 => 7}  # Default: #57(Cross Cut) does 'Attack'
  MNK_POSES_SKILLS_A  = {} 
  MNK_POSES_SKILLS_E  = {}
  MNK_POSES_ITEMS      = {13 => 4}  # Default: #13(Sharp Stone) does 'Block'
  MNK_POSES_ITEMS_A    = {}       
  MNK_POSES_ITEMS_E    = {}       
  MNK_POSES_WEAPONS    = {}        # Didn't set any weapons to any poses
  MNK_POSES_WEAPS_A    = {}
  MNK_POSES_WEAPS_E    = {}        # Non-functional (Enemies don't use 'em.)
 
  # Non-Default Pose Hashes (Hits & Critical Hits)
  # (Just like above, but pertains to specific hits and critical hits)
  #--------------------------------------------------------------------------
  MNK_STRUCK_WEAPS    = {}        # Set a specific 'Struck' to a weapon attack
  MNK_STRUCK_WEAPS_A  = {}       
  MNK_STRUCK_WEAPS_E  = {}       
  MNK_STRUCK_SKILLS    = {}        # Set a specific 'Struck' to a skill
  MNK_STRUCK_SKILLS_A  = { 7 => { 7 => 4 }}
  MNK_STRUCK_SKILLS_E  = {}
  MNK_STRUCK_ITEMS    = {}        # Set a specific 'Struck' to an item attack
  MNK_STRUCK_ITEMS_A  = {}
  MNK_STRUCK_ITEMS_E  = {}
  MNK_CRIT_WEAPS      = {}        # Set a specific 'Critical Hit' to a weapon
  MNK_CRIT_WEAPS_A    = {}
  MNK_CRIT_WEAPS_E    = {}     
  MNK_CRIT_SKILLS      = {}        # Set a specific 'Critical Hit' to a skill
  MNK_CRIT_SKILLS_A    = {7 => {7 => 10 }, 5 => {7 => 7}}
  MNK_CRIT_SKILLS_E    = {}
  MNK_CRIT_ITEMS      = {}        # Set a specific 'Critical Hit' to an item
  MNK_CRIT_ITEMS_A    = {}
  MNK_CRIT_ITEMS_E    = {}

   
  #==========================================================================
  #  ****                  FRAME CONTROL CENTER                    ****  #
  #==========================================================================

  # * Frames Control
  #--------------------------------------------------------------------------   
  MNK_FRAMES_PER_POSE    = {}              # Set #of frames to pose(by index)

  # Advanced Individual Pose/Frame Hashes  # Advanced Individual Poses  uses
                                            # hashes within hashes. As a demo
  MNK_POSES_FR_ACTOR = {}                  # you can see that enemy #1 has 2
  MNK_POSES_FR_ENEMY = {}                  # sets of controls:  index 0 (for
                                            # a ready pose is set to 1 frame,
  # while index 3 (block) is set to 'two' frames.  Likewise, for the actor's
  # hash, Actor #7 (Gloria) has only 1 control hash.  It sets index pose '0'
  # (the ready pose again) to use four frames of animation (even though I had
  # set the ready pose to just use '2' with the MNK_FRAMES_PER_POSE hash earlier.

 
  #==========================================================================
  #  ****                  MOVEMENT CONTROL CENTER                ****  #
  #==========================================================================
     
  # * Offset / Battler Overlap System
  #--------------------------------------------------------------------------   
  MNK_OFFSET            = 0      # How much additional space between battlers
  MNK_OFFSET_ACTOR      = {1 => -50}
  MNK_OFFSET_ENEMY      = nil
 
  # * Forward Step System (Final Fantasy-Style)
  #--------------------------------------------------------------------------   
  MNK_STEP_ATTACK      = false  # If true, battler steps forward to attack
  MNK_STEP_SKILL        = true    # If true, battler steps forward to use skill
  MNK_STEP_ITEM        = true    # If true, battler steps forward to use item
   
  # * Movement Arrays (Arrays for skill/weapon/item IDs that affect movement)
  #--------------------------------------------------------------------------   
  MNK_MOVING_ITEM      = [1]    # Examples are items that need to be applied.
  MNK_MOVING_SKILL      = [61]    # Examples are martial-arts and sneak attacks
  MNK_MOVE2CENTER_ATK  = []      # Moves battler to center based on weapon id!
  MNK_MOVE2CENTER_ITEM  = [5]    # Moves battler to center for a big item atk!
  MNK_MOVE2CENTER_SKILL = [7]    # Moves battler to center for a big skill atk!
  #
  # * Remember, do not supply Skill or Item ID#'s that have 'None' scopes into
  #  either the MNK_MOVING_ITEM or MNK_MOVING_SKILL hashes.  These skills &
  #  item attacks have no target and would cause an error when trying to find
  #  an enemy to move towards.


   
  #==========================================================================
  #  ****                STATIONARY CONTROL CENTER                  ****  #
  #==========================================================================
 
  # * Stationary Battlers (simple True/False settings)
  #--------------------------------------------------------------------------   
  MNK_STATIONARY_ENEMIES = false    # If the enemies don't move while attacking
  MNK_STATIONARY_ACTORS  = false    # If the actors don't move while attacking
 
  # * Arrays filled with skill/weapon/item IDs that halt movement
  #--------------------------------------------------------------------------   
  MNK_STATIONARY_ENEMY_IDS = []      # Enemies that don't RUN during melee attacks
  MNK_STATIONARY_WEAPONS = [17,18,19,20,21,22,23,24] # (examples are bows & guns)
  MNK_STATIONARY_SKILLS  = []      # (examples are bows & guns)
  MNK_STATIONARY_ITEMS  = []      # (examples are bows & guns)


   
  #==========================================================================
  #  ****              TRANSPARENCY CONTROL CENTER                ****  #
  #==========================================================================
  MNK_TRANSLUCENCY      = 127      # Degree of transparency
  MNK_TRANSLUCENT_ACTOR = []      # ID of actor at translucency settings
  MNK_TRANSLUCENT_ENEMY = [1, 9]  # ID of enemy at translucency settings
  MNK_PHASING          = true    # If battlers fade in/out while charging
  MNK_PHASING_ACTOR    = [1, 2]  # IDs of actors that fade in/out if charging
  MNK_PHASING_ENEMY    = [9]      # IDs of enemies that fade in/out if charging

  MNK_FADE_IN          = true    # Battler fades in if replaced or transparent

   
   
  #==========================================================================
  #  ****                CUSTOM FEATURE CENTER                      ****  #
  #==========================================================================
       
  MNK_MIRROR_ENEMIES    = true    # Enemy battlers use reversed image
  MNK_CALC_SPEED        = false    # System calculates a mean/average speed
  MNK_AT_DELAY          = true    # Pauses battlesystem until animation done.
  MNK_ADV_OFF_TURN      = 1        # Number of turns before enemies turn around.
#==============================================================================
# ** Animated Battlers - Enhanced  ver. 10.5                      (01-20-2007)
#
#------------------------------------------------------------------------------
#  * (2) Sprite System:  The Sprite Battler Class
#==============================================================================

#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display the battler.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < RPG::Sprite 
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :battler_offset        # Degree of action forcing 
  attr_accessor :skill_used            # Degree of action forcing 
  attr_accessor :item_used              # Degree of action forcing 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias mnk_init initialize
  def initialize(viewport, battler = nil)
    # --Initialize poses
    @frame, @pose, @last_time, @last_move_time  = 0, 0, 0, 0
    # --Initialize Battler placement and pose types
    @battler_offset, @skill_used, @item_used    = 0, 0, 0
    # --Initialize Boolean values
    @statusd              = false
    @dying                = true
    @s_pose              = false
    $game_system.victory  = false
    $game_system.defeat  = false
    @winning              = true
    # ORIGINAL Initialize call
    mnk_init(viewport, battler)
    # EVENT VALUE CALLS
    # --Obtain the Sideview switch
    $game_system.sv_angle = $sideview_mirror
    $game_system.sv_angle = 0 if $sideview_mirror == nil
    # -- Obtain the max party size
    $game_system.max_member = $formation_max_member
    $game_system.max_member = 4 if $formation_max_member == nil
    # --Obtain the highest position for the formation
    $game_system.form_top = $formation_max_height
    $game_system.form_top = 220 if $formation_max_height == nil
    # --Obtain the formation's width
    $game_system.form_wd = $formation_max_width
    $game_system.form_wd = 128 if $formation_max_width == nil
    # --Obtain the height of the Battlestatus Window
    $game_system.bstat_ht = $battlestatus_height
    $game_system.bstat_ht = 160 if $battlestatus_height == nil
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  alias mnk_update update
  def update

    # Only perform sprite edit for valid battlers
    return unless @battler
    if @battler.battler_name != @battler_name
      @started = false
    end   

    # Regular Update
    mnk_update

    # Set Translucency 
    if @battler.is_a?(Game_Enemy)
      battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
    else
      battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
    end
    # Reset hash for Advanced Pose/Frames
    pose_temp = {}
   
    # Start Routine (Performed at startup for each battler)
    unless @started
      # Set the pose based on battler's state
      @pose = state
      # Turn off Casting pose
      @battler.casted  = false
      @battler.casting = false
      # Configure Enemy Spritesheet
      if @battler.is_a?(Game_Enemy)
        # Use spritesheet unless specified
        unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(@battler.id)
          @width  = @width  / cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES)
          @height = @height / cell_divider(MNK_POSES_ENEMY,  MNK_POSES)
        end
      # Or Configure Actor Spritesheet
      else 
        # Use spritesheet unless specified
        unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(@battler.id)
          @width  = @width  / cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES)
          @height = @height / cell_divider(MNK_POSES_ACTOR,  MNK_POSES)
        end
      end
      # Distance the battlers
      @battler_offset = @width * 0.75
      # Obtain battler position (simulating 3-Dness)
      @display_x = @battler.screen_x
      @display_y = @battler.screen_y
      @display_z = @battler.screen_z
      @destination_x = @display_x
      @destination_y = @display_y
      @destination_z = @display_z
      # Opacity fadein feature
      self.opacity = 0 if MNK_FADE_IN
      # Make invisible if dead at battle start
      self.visible = false if @battler.dead?
      # Set the started flag
      @started = true
    # End of Start Routine (for each battler) 
    end
   
    # Again, ensure a pose is set
    @pose = state if @pose == nil

    # Obtain animation cell/frame from Enemy
    if @battler.is_a?(Game_Enemy)
      # Use spritesheet cell unless specified
      unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(@battler.id)
        cell_obtain
      else
        self.src_rect.set(0, 0, @width, @height)
      end
    # Or get it from an actor 
    else
      # Use spritesheet cell unless specified
      unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(@battler.id)
        cell_obtain
      else
        self.src_rect.set(0, 0, @width, @height)
      end
    end
   
    # Position Sprite
    self.x = @display_x
    self.y = @display_y
    self.z = @display_z
    self.ox = @width / 2
    self.oy = @height
   
    #  Party Turned Around
    #  $game_temp.advantage_set == 6
   
    # Adjust sprite direction if facing the other way...
    if $game_system.sv_angle == 1
      if @battler.is_a?(Game_Actor)
        mirror_pose_unless(6)
      else
        if MNK_MIRROR_ENEMIES
          mirror_pose_if(5)
        else
          mirror_pose_unless(5)
        end
      end
    else
      if @battler.is_a?(Game_Actor)
        mirror_pose_if(6)
      else
        if MNK_MIRROR_ENEMIES
          mirror_pose_unless(5)
        else
          mirror_pose_if(5)
        end
      end
    end
   
    # Setup Frames per Pose
    poseframe = MNK_FRAMES_STANDARD
    if @battler.is_a?(Game_Actor)
      poseframe = cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) != nil
    else
      poseframe = cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) != nil
    end
    pose_chk = 0
    pose_chk = @pose+1 if @pose != nil
    poseframe = MNK_FRAMES_PER_POSE[pose_chk] if MNK_FRAMES_PER_POSE.include?(pose_chk)
    # Set Advanced Poses for Actors
    if @battler.is_a?(Game_Actor)
      pose_temp = MNK_POSES_FR_ACTOR[@battler.id] if MNK_POSES_FR_ACTOR.include?(@battler.id)
      poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
    end   
    # Set Advanced Poses for Enemies
    if @battler.is_a?(Game_Enemy)
      pose_temp = MNK_POSES_FR_ENEMY[@battler.id] if MNK_POSES_FR_ENEMY.include?(@battler.id)
      poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
    end
   
    # Make visible if returned to life
    unless @battler.dead?
      self.visible = true if @pose == pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
      @freeze = false unless $game_system.victory
    end

    # Setup Animation
    time = Graphics.frame_count / (Graphics.frame_rate / MNK_SPEED)
    if @last_time < time
      @frame = (@frame + 1) % poseframe
      if @frame == 0
        if @freeze
          @frame = poseframe - 1
          return
        end
        @pose = state
      end
    end
    @last_time = time
   
    # Setup Dying Animation
    if @battler.dead?
      if @dying == true
        @pose = state
        @dying = false
      end
    # Otherwise, all non-dead actions... 
    else
      # Setup/Ready for Battle (Let's get ready to RUMBLE!)
      if @s_pose == false
        tmp_pose = pose_obtain(MNK_POSES_SETUP, MNK_POSES_SETUP_A, MNK_POSES_SETUP_E)
        if tmp_pose != nil
          @pose = tmp_pose
          @s_pose = true           
        end
      end
      # If Victory pose (Who's your daddy?)
      if @battler.is_a?(Game_Actor)
        if $game_system.victory == true
          if @winning == true
            @pose = state
            @winning = false
          end
        end
      end
    end
   
    # Move It
    move if moving
  end
 
  #--------------------------------------------------------------------------
  # * Current State
  #--------------------------------------------------------------------------
  def state
    # Reset Statusd Flag   
    @statusd = false
   
    # Set Translucency if not dead
    unless @battler.dead?
      if @battler.is_a?(Game_Actor)
        battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
      else
        battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
      end
    end
   
    # Damage State
    if [nil,{}].include?(@battler.damage)
      # Battler Fine
      state = pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
      # Battler Wounded
      temp_woozy = MNK_LOW_HP_PERCENTAGE
      if @battler.is_a?(Game_Actor)
        temp_woozy = MNK_LOW_HP_ACTOR[@battler.id] if MNK_LOW_HP_ACTOR[@battler.id] != nil
      end
      if @battler.is_a?(Game_Enemy)
        temp_woozy = MNK_LOW_HP_ENEMY[@battler.id] if MNK_LOW_HP_ENEMY[@battler.id] != nil
      end
      # If Set to Flat Rate
      if MNK_LOW_HP_FLAT
        if @battler.hp < temp_woozy
          state = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3)
          @statusd = true
        end
      # Otherwise, use percentage of battler's health
      else
        if @battler.hp < @battler.maxhp * temp_woozy
          state = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3)
          @statusd = true
        end
      end
      # Battler Status-Effect
      for i in @battler.states
        tmp_pose2 = pose_array_obtain(MNK_POSES_STATUS, MNK_POSES_STAT_A, MNK_POSES_STAT_E, i)
        state = tmp_pose2 if tmp_pose2 != nil
        @statusd = true if tmp_pose2 != nil
      end
      # If Battler Dead
      if @battler.dead?
        # If using default battlers or default collapse
        if (DEFAULT_COLLAPSE_ACTOR and @battler.is_a?(Game_Actor)) or
          (DEFAULT_COLLAPSE_ENEMY and @battler.is_a?(Game_Enemy)) or
          (DEFAULT_ACTOR and @battler.is_a?(Game_Actor)) or
          (DEFAULT_ENEMY and @battler.is_a?(Game_Enemy)) or
          (DEFAULT_ENEMY_ID.include?(@battler.id) and @battler.is_a?(Game_Enemy)) or
          (DEFAULT_ACTOR_ID.include?(@battler.id) and @battler.is_a?(Game_Actor))
          # Do absolutely nothing :)
        else
          # Dying Animation pose
          if @dying == true
            tmp_pose = pose_obtain(MNK_POSES_DYING, MNK_POSES_DYING_a, MNK_POSES_DYING_E)
            if tmp_pose != nil
              state = tmp_pose
            else
              state = dying_pose
            end 
          else
            state = dying_pose
          end
         
          # Fix Opacity
          if @battler.is_a?(Game_Enemy)
            if MNK_TRANSLUCENT_ENEMY.include?(@battler.id)
              set_translucency(@battler, MNK_TRANSLUCENCY)
            else
              set_translucency(@battler, 255)
            end
          else
            if MNK_TRANSLUCENT_ACTOR.include?(@battler.id)
              set_translucency(@battler, MNK_TRANSLUCENCY)
            else
              set_translucency(@battler, 255)
            end
          end
        end
      end
    end
 
    # Casting State
    if @battler.casted
      state = casting_pose if $game_system.mnk_det_para_spell and @battler.spelling?
      state = casting_pose if $game_system.mnk_det_sd_casting and @battler.sd_casting
      state = casting_pose if $game_system.mnk_det_rtab_systm and @battler.rtp != 0
    end
   
    # Victory State
    if @battler.is_a?(Game_Actor)
      if $game_system.victory
        if not @battler.dead?
          if @winning == true
            # A Pre-Winning Pose display
            if MNK_POSES_WINNING != nil
              tmp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
              state = tmp_pose if tmp_pose != nil
            end
          else
            # Final Pose
            state = victory_pose
          end
        else
          # Final Pose
          state = victory_pose
        end       
      end
    # Perform check for Enemies 
    else
      if $game_system.defeat
        if not @battler.dead?
          if @winning == true
            if MNK_POSES_WINNING != nil
              tmp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
              state = tmp_pose if tmp_pose != nil
            end
          else
            # Final Pose
            state = victory_pose
          end
        else
          # Final Pose
          state = victory_pose
        end       
      end
    end
   
    # Guarding State (not if dead OR in victory)
    if not @battler.dead?
      if not $game_system.victory
        if @statusd == false
          state = pose_obtain(MNK_POSE4, MNK_APOSE4, MNK_EPOSE4) if @battler.guarding?
        end
      end
    end
    # Moving State
    if moving
    # Adjust sprite direction if facing the other way...
      if $game_system.sv_angle == 1
        # If enemy battler moving
        if @battler.is_a?(Game_Enemy)
          # Battler Moving Left
          state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
          # Battler Moving Right
          state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
        # Else actor battler moving
        else
          # Battler Moving Left
          state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
          # Battler Moving Right
          state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
        end
      else     
        # If enemy battler moving
        if @battler.is_a?(Game_Enemy)
          # Battler Moving Left
          state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
          # Battler Moving Right
          state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
        # Else actor battler moving
        else
          # Battler Moving Left
          state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
&am
 

RPGS

Member

Format ? do you mean like a special format on the picture or battler ?  (ex. PNG )  :huh:


Because I`ve tried to make it in another SIZE but it doesn`t work  --Graa-- 


Tell me , is it a special FILE format I need ???

Wich ?  :lol:  :wink:
 
No, not a special format, a special battler type.
You can find them on the site, heck, I even think the forum post with the script on has a couple. Maybe look for Dollmage's.
Edit: And since I realise from your previous posts on this forum that you are heavily incompetent, use the SEARCH button to look for DOLLMAGE'S ANIMATED BATTLERS. There. That should be large enough for you.
 
Well, if were you, I would search for Rye's CBS starter pack. It's very handy and instantly turns your characters overworld sprite into a battler. It also contains things like enemy HP bars. It doesn't take long to set up (you only need to import a few pictures) and even includes a demo.
Hope I could help!
 

khmp

Sponsor

RPGS please do not double post. Edit the previous post. I'm sure this is all hilarious to you but could you at least follow the rules. There is also a lack of content to your posts. Telling us, "I need help... giv me script! :smilie1: :smilie2: :smilie3:" is not going to get you help. Worst part is that some people actually try to. Neither does the fact that when that person replies with the answer you request unreasonably more from them because of your laziness. I'm quite impressed with the amount of patience the people, these helpers, have when talking to you. But you continually push. So what if you didn't read all that or didn't understand.

* Do not double post.
* Do not post "but graa the script i cannot fin it in the cbs starter pack                      %/¤%&%  !!!!!! "
* Please read this: http://www.rmxp.org/forums/index.php?topic=18814.0

The problem with the second item isn't a failure in english comprehension. Its a lack of effort to explain a problem. You might benefit from a different medium of communication. Pictures or a demonstration perhaps? Be mindful that someone needs to understand what you are asking in order to help you. Consider this a friendly heads up RPGS.

I guess this came too late :down:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top