Ergebnis 1 bis 5 von 5

Thema: [RMXP] Rataime Shadow Script - Kleines Problem

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1
    Also wenn du das Schattenskript nicht geändert hast, liegt es wohl an 'nem anderen Skript. Ich habe es gerade in ein leeres Projekt und es funktioniert.

    Oder hast du hier die rotmarkierte Zeile auskommentiert?:
    Code:
      #--------------------------------------------------------------------------
       # * Initialize
       #-------------------------------------------------------------------------- 
      def initialize(viewport, character = nil,source = nil,anglemin=0,anglemax=0,distancemax=700)
         super(viewport)
         @anglemin=anglemin.to_f
         @anglemax=anglemax.to_f
         @distancemax=distancemax.to_f
         @character = character
         @source = source
         self.color = Color.new(0, 0, 0)
         update
       end
    Ansonsten, sollte das Skript bei dir 1:1 so eingefügt sein, poste mal das andere Skript (oder die anderen Skripts, falls du mehrere hast), dann könnte man die Fehlerursache finden.

  2. #2
    Nein, habe es nicht auskommentiert. Hab diese Zeile dann extra angeschaut, aber hab das Skript so eingefügt.

    Hm ich denke am besten ist es wenn man das jetzt Schritt für Schritt macht, das CTB Kampfsystem umfasst 26 Skripts.

    Ich fang mal an die Skripts für die animierten Battler zu posten:

    Animated Battler - Configuration
    Code:
    #==============================================================================
    #
    #                     C O N F I G U R A T I O N   P A G E 
    #
    #------------------------------------------------------------------------------
    #  * (1) Configuration:  The Sprite Battler Class (initialize system)
    #------------------------------------------------------------------------------
    #
    # ** Animated Battlers - Enhanced   ver. 13.2                      (03-04-2010)
    #    -and-
    # ** Animated Battlers VX           ver. 3.4                       (03-04-2010)
    #
    #============================================================================== 
    
      #==========================================================================
      #   ****                     ARROW CONTROLS                        ****   #
      #==========================================================================
      # * Just moves the targetting arrow around
      #--------------------------------------------------------------------------
      MNK_ARROW_X             = 14      # The x position for your target cursor
      MNK_ARROW_Y             = 10      # The y position for your target cursor
      
      #==========================================================================
      #   ****                    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        = [ ]     # Ids of enemies using default battlers
      DEFAULT_ACTOR_ID        = [ ]     # Ids of actors using default battlers
      DEFAULT_COLLAPSE_ACTOR  = true    # If true, restores the old 'red fade'
      DEFAULT_COLLAPSE_ENEMY  = true  #   collapse effect (using spritesheets)
      
      # * Background Battler Screentone Switches
      #   Note:  Battle animations and damage pops reside in the same viewport as
      #          the battlers.  If a battler's tone is altered by the screentone,
      #          so shall the battle animation and damage pops for that battler.
      #--------------------------------------------------------------------------        
      SCREENTONE_ENEMY_MATCH  = true    # If true, the actors/enemies tones match
      SCREENTONE_ACTOR_MATCH  = true    # with the background.  If false, no fix.
      
      # * Animation Frames and Animation Speed
      #--------------------------------------------------------------------------    
      MNK_SPEED               = 7       # Framerate speed of the battlers
      MNK_RUSH_SPEED          = 2.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         = {}        # ID and # of poses for each enemy
      MNK_FRAMES_ENEMY        = nil       # ID and # of frames for each enemy
      MNK_POSES_ACTOR         = {9=>1,16=>4,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,
      25=>1}
      # ID and # of poses for each actor
      MNK_FRAMES_ACTOR        = {9=>6,17=>7,25=>6}
      # ID and # of frames for each actor.
          
      # * Wooziness Rates
      #-------------------------------------------------------------------------- 
      MNK_LOW_HP_PERCENTAGE   = 0.25                    # Health% for WOOZY pose.
      MNK_LOW_HP_ACTOR        = {}                      # Ind. health% for actors.
      MNK_LOW_HP_ENEMY        = {}                      # 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   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1} 
      MNK_APOSE2   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}   # Basil is using a Charset graphic as a battler.
      MNK_APOSE3   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}   # The battler was copied into the Battler folder.
      MNK_APOSE4   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}   # This setup allows you to use Charactersets for
      MNK_APOSE5   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}   # battlers.
      MNK_APOSE6   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1} 
      MNK_APOSE7   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1} 
      MNK_APOSE8   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1} 
      MNK_APOSE9   =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1} 
      MNK_APOSE10  =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}
      MNK_APOSE11  =   {9=>1,16=>2,17=>1,20=>1,21=>1,22=>1,23=>1,24=>1,25=>1}
        
      # Editable Template (for Custom Enemy Spritesheets)
      #--------------------------------------------------------------------------
      MNK_EPOSE1   =   {} 
      MNK_EPOSE2   =   {}   # Did the same to the ghosts.  Note that enemies have
      MNK_EPOSE3   =   {}   # no victory pose.
      MNK_EPOSE4   =   {}   
      MNK_EPOSE5   =   {}   
      MNK_EPOSE6   =   {} 
      MNK_EPOSE7   =   {} 
      MNK_EPOSE8   =   {} 
      MNK_EPOSE9   =   {} 
      MNK_EPOSE10  =   {}   
      MNK_EPOSE11  =   {}  # Setting the ghost to an invalid pose erases it.
         
      
      #==========================================================================
      #   ****                 RANDOM ATTACK POSE CENTER                 ****   #
      #==========================================================================
      
      # Each value can be set to nil so no optional melee attack poses are avail-
      # able, or you can enter an array [ ] of poses that can be chosen randomly
      # along with your battler's pre-set attack pose.
      #--------------------------------------------------------------------------
      
      MNK_RANDOM_ATTACKS    = nil           # -- no random attacks here --
      MNK_RANDOM_ATTACKS_A  = {}            # Sets the 7th battler to use 8&9 too.
      MNK_RANDOM_ATTACKS_E  = nil           # -- no random attacks here --
      
      
      #==========================================================================
      #   ****               EXPANDED POSE CONTROL CENTER                ****   #
      #==========================================================================
      
      # 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_ACTOR   = []      # Actor IDs if their victory pose loops
      MNK_LOOPS_WINNING_ENEMY   = []      # Enemy 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 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       = nil        # Choose animation pose for 'preparation'
      MNK_POSES_SETUP_A     = {}
      MNK_POSES_SETUP_E     = {}    
      MNK_POSES_CASTPREP    = nil        # Set 'casting' pose for skill preparation
      MNK_POSES_CASTPREP_A  = {}          
      MNK_POSES_CASTPREP_E  = {}    
      MNK_POSES_DYING       = nil        # Choose animation pose for dying throws.
      MNK_POSES_DYING_A     = {}          
      MNK_POSES_DYING_E     = {}    
      MNK_POSES_ESCAPE      = nil        # Set 'coward' pose for fleeing monsters)    
      MNK_POSES_ESCAPE_A    = {}         
      MNK_POSES_ESCAPE_E    = {}   
      MNK_POSES_CRITICAL    = nil        # Set pose for BIG hits 
      MNK_POSES_CRIT_A      = {}
      MNK_POSES_CRIT_E      = {}
      MNK_POSES_WINNING     = nil        # Set winning (Victory Dance before pose)
      MNK_POSES_WINNING_A   = {}
      MNK_POSES_WINNING_E   = {}         
      
      # 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     = {}         # Set a specific skill to use a pose
      MNK_POSES_CASTED_A   = {}         
      MNK_POSES_CASTED_E   = {}
      MNK_POSES_STATUS     = {}         # Set status values to poses here
      MNK_POSES_STAT_A     = {}  
      MNK_POSES_STAT_E     = {}
      MNK_POSES_SKILLS     = {133 => 1} # Default: #57(Cross Cut) does 'Attack'
      MNK_POSES_SKILLS_A   = {}  
      MNK_POSES_SKILLS_E   = {}
      MNK_POSES_ITEMS      = {}         # 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 (Charging Animation)
      # (Like above, but pertains to Charge-to-attack poses based on conditions)
      #--------------------------------------------------------------------------  
      MNK_POSES_S_CHARGE   = {73 => 6}  # Set a charging motion based on skill
      MNK_POSES_S_CHARGE_A = {}         
      MNK_POSES_S_CHARGE_E = {}
      MNK_POSES_I_CHARGE   = {73 => 6}  # Set a charging motion based on an item
      MNK_POSES_I_CHARGE_A = {}         
      MNK_POSES_I_CHARGE_E = {}
      MNK_POSES_W_CHARGE   = {25 => 1}  # Set a charging motion based on a weapon
      MNK_POSES_W_CHARGE_A = {}         
      MNK_POSES_W_CHARGE_E = {}         # Non-functional (Enemies don't use 'em.)
          
      # Non-Default Pose Hashes (Dodging Animation)
      # (Like above, but pertains to Targets dodging an attack based on conditions)
      #--------------------------------------------------------------------------   
      MNK_DODGE            = 3          # Sets a pose if a target dodges an attack
      MNK_ADODGE           = {}         # Dodging poses for individual actors
      MNK_EDODGE           = {}         # Dodging poses for individual enemies
      MNK_DODGE_WEAPS      = {}         # Set a specific 'Dodge' to a weapon attack
      MNK_DODGE_WEAPS_A    = {}         
      MNK_DODGE_WEAPS_E    = {}         
      MNK_DODGE_SKILLS     = {}         # Set a specific 'Dodge' to a skill
      MNK_DODGE_SKILLS_A   = {}
      MNK_DODGE_SKILLS_E   = {}
      MNK_DODGE_ITEMS      = {}         # Set a specific 'Dodge' to an item attack
      MNK_DODGE_ITEMS_A    = {}
      MNK_DODGE_ITEMS_E    = {}
      
      # 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 addtl space between battlers
      MNK_OFFSET_ATK_A      = {}         # Space between Actor attacker & target
      MNK_OFFSET_DEF_A      = {}         # Space between Actor defender & attacker
      MNK_OFFSET_ATK_E      = {}         # Space between Enemy attacker & target
      MNK_OFFSET_DEF_E      = {}         # Space between Enemy defender & attacker
      
      # * 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
    
      # * Jumping Attack System (FF Dragoon-Style)
      #--------------------------------------------------------------------------      
      JUMPING_ENEMY         = {3 => 12} #nil         # Weapon IDs for jumping rush attacks
      JUMPING_WEAPONS       = {1 => 24}   # Weapon IDs for jumping rush attacks
      JUMPING_SKILLS        = {61 => 24}  # Skill IDs for jumping rush skills
      JUMPING_ITEMS         = nil         # Item IDs for jumping rush item usage
      
      # * 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,115,149,150,151,152,153,154,156,160]    
      # 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,155,157]     
      # 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  = [111,112,120,121,122,123,124,125,126,127,128,129,
                                130,131,132,133,134,135,136]
      # (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, 3]   # 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          = false    # Pauses battlesystem until animation done.
      MNK_ADV_OFF_TURN      = 1        # Number of turns before enemies turn around.

    Animated Battler - Spritesystem
    Code:
    #==============================================================================
    # ** Animated Battlers - Enhanced   ver. 13.2                      (03-04-2010)
    #
    #------------------------------------------------------------------------------
    #  * (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  
      attr_accessor :width
      #--------------------------------------------------------------------------
      # * 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, @width, @skill_used, @item_used  = 0, 0, 0, 0
        # --Initialize Boolean values
        @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
      end
      #--------------------------------------------------------------------------
      # * Update
      #--------------------------------------------------------------------------
      alias mnk_update update
      def update
        # Only perform sprite edit for valid battlers
        return unless @battler
        @started = false if @battler.battler_name != @battler_name
        # 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
          # Opacity fadein feature
          self.opacity = 0 if MNK_FADE_IN      
          # 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)
          @destination_x = @display_x = @battler.screen_x
          @destination_y = @display_y = @battler.screen_y
          @destination_z = @display_z = @battler.screen_z
          # 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
        # 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
            MNK_MIRROR_ENEMIES ? mirror_pose_if(5) : mirror_pose_unless(5)
          end
        else
          if @battler.is_a?(Game_Actor)
            mirror_pose_if(6)
          else
            MNK_MIRROR_ENEMIES ? mirror_pose_unless(5) : mirror_pose_if(5)
          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) && $game_system.victory == true && @winning == true
            @pose = state
            @winning = false
          end
        end
        # Move It
        move if moving
      end
      #-------------------------------------------------------------------------- 
      # * Current State
      #--------------------------------------------------------------------------
      def state
        # Set Translucency if not dead
        if @battler.is_a?(Game_Actor)
          battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
        else
          battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
        end
        # Battler Fine
        state = pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
        # Damaged states
          if [nil,{}].include?(@battler.damage)
          # Battler Wounded (and damage inflicted)
          state = state_woozy     if state_woozy != nil
          # Set sprite to 'Block' pose
          state = pose_obtain(MNK_POSE4, MNK_APOSE4, MNK_EPOSE4) if @battler.guarding?
          # Set sprite to 'Status Ailment' pose (and damage inflicted)
          state = state_status    if state_status != nil
          # Set sprite to 'Dead' pose (and damage inflicted)
          state = state_dead      if state_dead != nil
        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 States
        if @battler.is_a?(Game_Actor) && $game_system.victory
          if @winning == true
            state = winning_pose unless @battler.dead? && winning_pose == nil
          else
            state = victory_pose unless @battler.dead?
          end
        end   
        # Defeat States
        if @battler.is_a?(Game_Enemy) && $game_system.defeat
          if @winning == true
            state = winning_pose unless @battler.dead? && winning_pose == nil
          else
            state = victory_pose unless @battler.dead?
          end
        end       
        # Moving state
        state = sprite_move if sprite_move != nil
        # Return State
        return state
      end
      #-------------------------------------------------------------------------- 
      # * Move
      #--------------------------------------------------------------------------
      def move
        time = Graphics.frame_count / (Graphics.frame_rate.to_f / (MNK_SPEED * 5))
        if @last_move_time < time
          # Pause for Animation
          return if @pose != state
            # The standard 'full' opacity
            opa = 255
            if @battler.is_a?(Game_Enemy) and MNK_TRANSLUCENT_ENEMY.include?(@battler.id)
              opa = MNK_TRANSLUCENCY
            end
            if @battler.is_a?(Game_Actor) and MNK_TRANSLUCENT_ACTOR.include?(@battler.id)
              opa = MNK_TRANSLUCENCY
            end
          # Phasing
          self.opacity = phasing(opa)   if MNK_PHASING
          if @battler.is_a?(Game_Actor)
            self.opacity = phasing(opa) if MNK_PHASING_ACTOR.include?(@battler.id)
          else      
            self.opacity = phasing(opa) if MNK_PHASING_ENEMY.include?(@battler.id)
          end
          # Calculate Difference
          difference_x = (@display_x - @destination_x).abs
          difference_y = (@display_y - @destination_y).abs
          difference_z = (@display_z - @destination_z).abs  
          # Done? Reset, Stop
          if [difference_x, difference_y].max.between?(0, 8)
            @display_x = @destination_x
            @display_y = @destination_y
            @display_z = @destination_z
            @pose = state
            return
          end
          # Calculate Movement Increments
          increment_x = increment_y = 1
          if difference_x < difference_y
            increment_x = 1.0 / (difference_y.to_f / difference_x)
          elsif difference_y < difference_x
            increment_y = 1.0 / (difference_x.to_f / difference_y)
          end
          increment_z = increment_y
          # Calculate Movement Speed 
          if MNK_CALC_SPEED
            total = 0; $game_party.actors.each{ |actor| total += actor.agi }
            speed = @battler.agi.to_f / (total / $game_party.actors.size)
            increment_x *= speed
            increment_y *= speed
            increment_z *= speed
          end
          # Multiply and Move
          multiplier_x = MNK_RUSH_SPEED * (@destination_x - @display_x > 0 ? 8 : -8)
          multiplier_y = MNK_RUSH_SPEED * (@destination_y - @display_y > 0 ? 8 : -8)
          multiplier_z = MNK_RUSH_SPEED * (@destination_z - @display_z > 0 ? 8 : -8)      
          @display_x += (increment_x * multiplier_x).to_i
          if @battler.jump != nil
            if multiplier_x < 0
              middle_ground = (((@destination_x - @original_x)/2).abs)+ @destination_x
              if @display_x > middle_ground #320
                @display_y -= 24 * MNK_RUSH_SPEED
              else
                multiplier_y = MNK_RUSH_SPEED * (@destination_y - @display_y > 0 ? 24 : -24)
                @display_y += (increment_y * multiplier_y).to_i
              end
            end
            if multiplier_x > 0
              middle_ground = (((@destination_x - @original_x)/2).abs)+ @original_x
              if @display_x < middle_ground #320
                @display_y -= 24 * MNK_RUSH_SPEED
              else
                multiplier_y = MNK_RUSH_SPEED * (@destination_y - @display_y > 0 ? 24 : -24)
                @display_y += (increment_y * multiplier_y).to_i
              end
            end
          else
            @display_y += (increment_y * multiplier_y).to_i
          end
          @display_z += (increment_z * multiplier_z).to_i
        end
        @last_move_time = time
      end
      #--------------------------------------------------------------------------
      # * Set Movement
      #--------------------------------------------------------------------------
      def setmove(destination_x, destination_y, destination_z)
        movekind = @battler.current_action.kind
        unless (@battler.is_a?(Game_Enemy) and MNK_STATIONARY_ENEMIES) or
               (@battler.is_a?(Game_Actor) and MNK_STATIONARY_ACTORS)
          unless (MNK_STATIONARY_WEAPONS.include?(@battler.weapon_id) && movekind == 0) or
                 (MNK_STATIONARY_SKILLS.include?(@battler.skill_used) && movekind == 1) or
                 (MNK_STATIONARY_ITEMS.include?(@battler.item_used) && movekind == 2)
            @original_x = @display_x
            @original_y = @display_y
            @original_z = @display_z          
            @destination_x = destination_x
            @destination_y = destination_y
            @destination_z = destination_z
          end
        end
      end
      #-------------------------------------------------------------------------- 
      # * Movement Check
      #--------------------------------------------------------------------------
      def moving
        if (@display_x != @destination_x and @display_y != @destination_y and !@battler.dead?)
          return (@display_x > @destination_x ? 0 : 1)
        end
      end
      #-------------------------------------------------------------------------- 
      # * Fallen Pose
      #--------------------------------------------------------------------------
      if @derv_anim_bat_stack.nil?
        @derv_anim_bat_stack = true
        alias mnk_collapse collapse
        def collapse
          if @battler.is_a?(Game_Actor)
            mnk_collapse if DEFAULT_ACTOR
            mnk_collapse if DEFAULT_COLLAPSE_ACTOR
            if DEFAULT_ACTOR_ID != nil
              mnk_collapse if DEFAULT_ACTOR_ID.include?(@battler.id)
            end
          else
            mnk_collapse if DEFAULT_ENEMY
            mnk_collapse if DEFAULT_COLLAPSE_ENEMY
            if DEFAULT_ENEMY_ID != nil
              mnk_collapse if DEFAULT_ENEMY_ID.include?(@battler.id)
            end
          end
        end
      end
      #-------------------------------------------------------------------------- 
      # * Mirror Pose If...
      #--------------------------------------------------------------------------
      def mirror_pose_if(adv_value)
        if $game_temp.advantage_set == adv_value
          self.mirror = true
        else
          self.mirror = false
        end
      end
      #-------------------------------------------------------------------------- 
      # * Mirror Pose Unless...
      #--------------------------------------------------------------------------
      def mirror_pose_unless(adv_value)
        unless $game_temp.advantage_set == adv_value
          self.mirror = true
        else
          self.mirror = false
        end
      end
      #--------------------------------------------------------------------------
      # * State:  Dying/Dead/Collapse
      #--------------------------------------------------------------------------  
      def state_dead
        # Reset state return
        state_return = nil
        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    
            if @dying == true
              tmp_pose = pose_obtain(MNK_POSES_DYING, MNK_POSES_DYING_A, MNK_POSES_DYING_E)
              state_return = tmp_pose if tmp_pose != nil
            else  
              state_return = dying_pose
            end
          end
        end
        return state_return
      end  
      #-------------------------------------------------------------------------- 
      # * State:  Defeat
      #--------------------------------------------------------------------------
      def dying_pose
        state_return = nil
        state_return = pose_obtain(MNK_POSE11, MNK_APOSE11, MNK_EPOSE11)
        if @battler.is_a?(Game_Actor)
          @freeze = true if not MNK_LOOPS_DEFEATED_ACTOR.include?(@battler.id)
        else
          @freeze = true if not MNK_LOOPS_DEFEATED_ENEMY.include?(@battler.id)
        end
        return state_return
      end
      #--------------------------------------------------------------------------
      # * State:  Movement
      #--------------------------------------------------------------------------  
      def sprite_move
        state_return = nil
        # 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
              if moving.eql?(0)
                skill_return = nil
                state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
                if @battler.current_action.kind == 1 
                  skill_return = pose_array_obtain(MNK_POSES_S_CHARGE, MNK_POSES_S_CHARGE_A, MNK_POSES_S_CHARGE_E, @battler.skill_used)
                end
                if @battler.current_action.kind == 2
                  skill_return = pose_array_obtain(MNK_POSES_I_CHARGE, MNK_POSES_I_CHARGE_A, MNK_POSES_I_CHARGE_E, @battler.item_used)
                end
                state_return = skill_return if skill_return != nil
              end
              # Battler Moving Right
              state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
            # Else actor battler moving
            else
              # Battler Moving Left
              state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
              # Battler Moving Right
              if moving.eql?(1)
                skill_return = nil
                state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5)
                if @battler.current_action.kind == 0
                  skill_return = pose_array_obtain(MNK_POSES_W_CHARGE, MNK_POSES_W_CHARGE_A, MNK_POSES_W_CHARGE_E, @battler.weapon_id)
                end
                if @battler.current_action.kind == 1
                  skill_return = pose_array_obtain(MNK_POSES_S_CHARGE, MNK_POSES_S_CHARGE_A, MNK_POSES_S_CHARGE_E, @battler.skill_used)
                end
                if @battler.current_action.kind == 2
                  skill_return = pose_array_obtain(MNK_POSES_I_CHARGE, MNK_POSES_I_CHARGE_A, MNK_POSES_I_CHARGE_E, @battler.item_used)
                end
                state_return = skill_return if skill_return != nil
              end
              
            end
          else      
            # If enemy battler moving
            if @battler.is_a?(Game_Enemy) 
              # Battler Moving Left
              state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
              # Battler Moving Right
              if moving.eql?(1)
                skill_return = nil
                state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5)
                if @battler.current_action.kind == 1
                  skill_return = pose_array_obtain(MNK_POSES_S_CHARGE, MNK_POSES_S_CHARGE_A, MNK_POSES_S_CHARGE_E, @battler.skill_used)
                end
                if @battler.current_action.kind == 2
                  skill_return = pose_array_obtain(MNK_POSES_I_CHARGE, MNK_POSES_I_CHARGE_A, MNK_POSES_I_CHARGE_E, @battler.item_used)
                end
                state_return = skill_return if skill_return != nil
              end
            # Else actor battler moving
            else
              # Battler Moving Left
              if moving.eql?(0)
                skill_return = nil
                state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5)
                if @battler.current_action.kind == 0
                  skill_return = pose_array_obtain(MNK_POSES_W_CHARGE, MNK_POSES_W_CHARGE_A, MNK_POSES_W_CHARGE_E, @battler.weapon_id)
                end
                if @battler.current_action.kind == 1
                  skill_return = pose_array_obtain(MNK_POSES_S_CHARGE, MNK_POSES_S_CHARGE_A, MNK_POSES_S_CHARGE_E, @battler.skill_used)
                end
                if @battler.current_action.kind == 2
                  skill_return = pose_array_obtain(MNK_POSES_I_CHARGE, MNK_POSES_I_CHARGE_A, MNK_POSES_I_CHARGE_E, @battler.item_used)
                end
                state_return = skill_return if skill_return != nil
              end
              # Battler Moving Right
              state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
            end
          end
        end
        return state_return
      end  
      #--------------------------------------------------------------------------
      # * State:  Status Ailments
      #--------------------------------------------------------------------------    
      def state_status
        state_return = nil
        # Battler Status-Effect
        for i in @battler.states
          temp_pose = pose_array_obtain(MNK_POSES_STATUS, MNK_POSES_STAT_A, MNK_POSES_STAT_E, i)
          state_return = temp_pose if temp_pose != nil
        end
        return state_return  
      end    
      #-------------------------------------------------------------------------- 
      # * State:  Winning
      #--------------------------------------------------------------------------
      def winning_pose
        state_return = nil
        temp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
        state_return = temp_pose if temp_pose != nil
        return state_return
      end    
      #--------------------------------------------------------------------------
      # * State:  Woozy
      #--------------------------------------------------------------------------  
      def state_woozy
        # Reset state return    
        state_return = nil
        # Battler Wounded
        temp_pose = MNK_LOW_HP_PERCENTAGE
        if @battler.is_a?(Game_Actor)
          temp_pose = MNK_LOW_HP_ACTOR[@battler.id] if MNK_LOW_HP_ACTOR[@battler.id] != nil
        else
          temp_pose = 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 
          state_return = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3) if @battler.hp < temp_pose
        # Otherwise, use percentage of battler's health
        else
          state_return = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3) if @battler.hp < @battler.maxhp * temp_pose
        end
        return state_return
      end
      #-------------------------------------------------------------------------- 
      # * State:  Victory
      #--------------------------------------------------------------------------
      def victory_pose
        state_return = nil
        state_return = pose_obtain(MNK_POSE10, MNK_APOSE10, MNK_EPOSE10)
        if @battler.is_a?(Game_Actor)
          @freeze = true unless MNK_LOOPS_WINNING_ACTOR.include?(@battler.id)
        else
          @freeze = true unless MNK_LOOPS_WINNING_ENEMY.include?(@battler.id)
        end
        return state_return
      end
      #-------------------------------------------------------------------------- 
      # * State:  Casting
      #--------------------------------------------------------------------------
      def casting_pose
        tmp_pose = pose_obtain(MNK_POSES_CASTPREP, MNK_POSES_CASTPREP_A, MNK_POSES_CASTPREP_E)
        tmp_pose2 = pose_array_obtain(MNK_POSES_CASTED, MNK_POSES_CASTED_A, MNK_POSES_CASTED_E, @battler.skill_casted)
        tmp_pose = tmp_pose2 if tmp_pose2 != nil
        state = tmp_pose if tmp_pose != nil
        return state
      end
      #-------------------------------------------------------------------------- 
      # * Phasing / Vanishing
      #--------------------------------------------------------------------------
      def phasing(opa)
        d1 = (@display_x - @original_x).abs
        d2 = (@display_y - @original_y).abs
        d3 = (@display_x - @destination_x).abs
        d4 = (@display_y - @destination_y).abs
        return [opa - ([d1 + d2, d3 + d4].min * 1.75).to_i, 0].max
      end  
      #--------------------------------------------------------------------------
      # * Battler Translucency
      #     battler            : actor or enemy battler
      #     battler_trans      : translucency array for battler
      #--------------------------------------------------------------------------
      def battler_translucency(battler, battler_trans)
        tcheck = {}
        tcheck = battler_trans
        
        battler_dead_trans = true
        if battler.dead?
          if battler.is_a?(Game_Enemy)
            battler_dead_trans = false if DEFAULT_ENEMY
            battler_dead_trans = false if DEFAULT_COLLAPSE_ENEMY
            if DEFAULT_ENEMY_ID != nil
              battler_dead_trans = false if DEFAULT_ENEMY_ID.include?(battler.id)
            end
          else
            battler_dead_trans = false if DEFAULT_ACTOR
            battler_dead_trans = false if DEFAULT_COLLAPSE_ACTOR
            if DEFAULT_ACTOR_ID != nil
              battler_dead_trans = false if DEFAULT_ACTOR_ID.include?(battler.id)
            end      
          end
        end    
        
        if battler_dead_trans
          set_translucency(battler, MNK_TRANSLUCENCY) if tcheck.include?(battler.id)
        end
      end
      #--------------------------------------------------------------------------
      # * Set Translucency
      #     battler            : actor or enemy battler
      #     trans_level        : translucency level
      #--------------------------------------------------------------------------
      def set_translucency(battler, trans_level)
        # Check for default RTP battler type
        default_flag = false
        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))
          default_flag = true
        end    
        self.opacity = (battler.hidden ? 0 : MNK_TRANSLUCENCY)
        # Perform translucency check
        if battler.hidden 
          self.opacity = 0
        elsif battler.dead? && default_flag == true
          self.opacity = 0 if @collapsing = false
        else
          self.opacity  = trans_level
        end    
      end
      #--------------------------------------------------------------------------
      # * Set Pose
      #--------------------------------------------------------------------------
      def pose=(pose)
        @pose = pose
        @frame = 0
      end
      #--------------------------------------------------------------------------
      # * Freeze
      #--------------------------------------------------------------------------
      def freeze
        @freeze = true
      end  
      #--------------------------------------------------------------------------
      # * Cell Divider
      #     divider_check      : array to divide cells by custom actor or enemy
      #     divider_standard   : standard number to divide by
      #--------------------------------------------------------------------------
      def cell_divider(divider_check, divider_standard)
        dcheck = {}
        divided_cell = divider_standard
        dcheck = divider_check
        if dcheck != nil
          if dcheck.include?(@battler.id)
            divided_cell = dcheck[@battler.id] if dcheck[@battler.id] != nil
          end
        end
        return divided_cell        
      end
      #--------------------------------------------------------------------------
      # * Obtain Individual Cell
      #--------------------------------------------------------------------------
      def cell_obtain
        # Only permit for valid poses & frames
        if @pose != nil
          if @frame != nil
            self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Obtain Pose
      #     pose_base   : default pose to return
      #     pose_actor  : list of poses for actors
      #     pose_enemy  : list of poses for enemies
      #--------------------------------------------------------------------------
      def pose_obtain(pose_base, pose_actor, pose_enemy)
        # create Arrays
        pos_a = {}
        pos_e = {}
        # fill created Arrays & Set pose
        pos_a = pose_actor
        pos_e = pose_enemy
        pose_now = pose_base
        # Obtain pose if not a standard pose
        if @battler.is_a?(Game_Actor)
          pose_now = pos_a[@battler.id] if pos_a[@battler.id] != nil
        else
          pose_now = pos_e[@battler.id] if pos_e[@battler.id] != nil
        end
        # Return the final pose (minus 1 for neceties)
        pose_now -= 1 if pose_now != nil
        return pose_now
      end
      #--------------------------------------------------------------------------
      # * Obtain Pose from hashes
      #     hash_base   : hash with default poses
      #     hash_actor  : advanced list of poses for actors
      #     hash_enemy  : advanced list of poses for enemies
      #     condition   : value determining where to get the final pose
      #--------------------------------------------------------------------------
      def pose_array_obtain(hash_base, hash_actor, hash_enemy, condition)
        # create Arrays
        hash_b    = {}
        hash_a    = {}
        hash_e    = {}
        pose_temp = {}
        # fill created Arrays & Set pose
        hash_b = hash_base
        hash_a = hash_actor
        hash_e = hash_enemy
        # Setup the temp Array
        if @battler.is_a?(Game_Actor)
          pose_temp = hash_a[@battler.id] if hash_a.include?(@battler.id)
        else
          pose_temp = hash_e[@battler.id] if hash_e.include?(@battler.id)
        end
        # Obtain the base pose based on condition (or nil)
        pose_now = hash_b[condition] if hash_b.include?(condition)
        # Obtain the optional actor/enemy pose based on condition (unless nil)
        pose_now = pose_temp[condition] if pose_temp.include?(condition)
        # Return the final pose (minus 1 for neceties)
        pose_now -= 1 if pose_now != nil
        return pose_now
      end
    end
    Animated Battler - Battle System
    Code:
    #==============================================================================
    # ** Animated Battlers - Enhanced   ver. 13.2                      (03-04-2010)
    #
    #------------------------------------------------------------------------------
    #  * (3) Battle System:  The Scene Battle class
    #==============================================================================    
    
    #==============================================================================
    # ** Scene_Battle 
    #------------------------------------------------------------------------------ 
    #  This class performs battle screen processing.
    #==============================================================================
    
    class Scene_Battle
      #--------------------------------------------------------------------------
      # * Main Processing
      #--------------------------------------------------------------------------
      alias mnkmain main
      def main
        # Initialize wait count
        @delay_count = 0
        # Perform the original call
        mnkmain
      end
      #--------------------------------------------------------------------------
      # * Frame Update (main phase)
      #--------------------------------------------------------------------------
      alias mnk_anim_sp3 start_phase3
      def start_phase3
        # Remove flag after set number of turns
        if $game_temp.battle_turn >= MNK_ADV_OFF_TURN
          # Turn sideview advantage mirror flag off
          $game_temp.advantage_set = 0
        end
        # Perform the original call
        mnk_anim_sp3
      end  
      #--------------------------------------------------------------------------
      # * Frame Update (main phase step 1 : action preparation)
      #--------------------------------------------------------------------------
      alias mkf_up4s1 update_phase4_step1
      def update_phase4_step1(battler = @active_battler)
        if $game_system.mnk_det_rtab_systm == true
          mkf_up4s1(battler)
        else
          mkf_up4s1
        end
        if battler != nil
          if $game_system.mnk_det_sd_casting == true
            if battler.sd_casting
              battler.casted = true
            end
          end
        end
      end  
      #--------------------------------------------------------------------------
      # *  End Skill Selection
      #--------------------------------------------------------------------------  
      alias mkf_endss end_skill_select
      def end_skill_select
        mkf_endss
        if $game_system.mnk_det_rtab_systm
          @active_actor.skill_casted = @skill.id
        else
          @active_battler.skill_casted = @skill.id
        end
      end  
      #--------------------------------------------------------------------------
      # * Make Skill Action Results (alias used to determine skill used)
      #--------------------------------------------------------------------------
      alias make_skill_action_result_anim make_skill_action_result
      def make_skill_action_result(battler = @active_battler, plus_id = 0)
        @rtab = !@target_battlers
        if $game_system.mnk_det_rtab_attck
          make_skill_action_result_anim(battler, plus_id)
        else
          @rtab ? make_skill_action_result_anim(battler) : make_skill_action_result_anim
        end
        battler.skill_used = @skill.id
        battler.strike_skill   = @skill.id
        if $game_system.mnk_det_para_spell == true
          #if battler.spelling?
            battler.casted = true
          #end
        end       
        for target in (@rtab ? battler.target : @target_battlers)
          target.struck_skill = @skill.id
        end
      end
      #--------------------------------------------------------------------------
      # * Make Item Action Results (alias used to determine item used)
      #--------------------------------------------------------------------------
      alias make_item_action_result_anim make_item_action_result
      def make_item_action_result(battler = @active_battler)
        @rtab = !@target_battlers
        @rtab ? make_item_action_result_anim(battler) : make_item_action_result_anim
        battler.item_used = @item.id
        @item_usage = @item.scope
        battler.strike_item = @item.id
        for target in (@rtab ? battler.target : @target_battlers)
          target.struck_item = @item.id
        end
      end  
      #-------------------------------------------------------------------------- 
      # * Frame Update (main phase step 1 : action preparation) (Casting Routine)
      #--------------------------------------------------------------------------
      alias update_phase4_step1_anim update_phase4_step1
      def update_phase4_step1(battler = @active_battler) 
        @rtab = !@target_battlers
        if $game_system.mnk_det_rtab_systm == true
          update_phase4_step1_anim(battler)
          if battler.current_action.kind == 1 and
            (not battler.current_action.forcing or @force != 2)
            if battler.rtp != 0    
              battler.casted = true
            end
          end
        else
          update_phase4_step1_anim
        end
      end
      #-------------------------------------------------------------------------- 
      # * Action Animation, Movement
      #--------------------------------------------------------------------------
      alias mnk_update_phase4_step3 update_phase4_step3
      def update_phase4_step3(battler = @active_battler)
        @rtab = !@target_battlers
        target = (@rtab ? battler.target : @target_battlers)[0]
        # Battle Delay System
        minkoff_delay_on
        # Flash system
        minkoff_flash(battler)
        # Reset the 'Do Nothing' flag
        dn_flag = false
        # Set values and poses based on Action 
        case battler.current_action.kind
        when 0  # Attack
          # if Do Nothing, just return
          if battler.current_action.basic == 3
            dn_flag = true
          end
          if dn_flag != true
            unless JUMPING_WEAPONS == nil
              if battler.is_a?(Game_Actor)
                battler.jump = JUMPING_WEAPONS[battler.weapon_id] if JUMPING_WEAPONS[battler.weapon_id] != nil
              end
            end
            unless JUMPING_ENEMY == nil
              if battler.is_a?(Game_Enemy)
                battler.jump = JUMPING_ENEMY[battler.id] if JUMPING_ENEMY[battler.id] != nil
              end
            end
            rush_type = MNK_STEP_ATTACK
            full_moving = true ; if rush_type; full_moving = false; end
            if MNK_MOVE2CENTER_ATK.include?(battler.weapon_id); center_move=true ; end
            if MNK_STATIONARY_ENEMY_IDS.include?(battler.id) and battler.is_a?(Game_Enemy)
              full_moving = false
              center_move = false
              rush_type = false
            end
            # Select Attack Pose
            base_pose   = motion_pose_attack(battler)  
            base_pose2  = motion_pose_attack_random(battler)
            base_pose   = base_pose2 unless base_pose2 == nil
            if battler.current_action.basic == 2
              # If escaping, disable all movement
              full_moving = false
              center_move = false
              rush_type = false    
              # Select Escape Pose
              base_pose = motion_pose_escape(battler)
            end
          end
        when 1  # Skill
          @spriteset.battler(battler).skill_used = battler.skill_used
          unless JUMPING_SKILLS == nil
            battler.jump = JUMPING_SKILLS[battler.skill_used] if JUMPING_SKILLS[battler.skill_used] != nil
          end
          rush_type = MNK_STEP_SKILL
          if MNK_MOVING_SKILL.include?(battler.skill_used) ; full_moving = true ; end
          # Charlie Fleed's CTB Detection
          if $game_system.mnk_det_cfc_detect
            # For Charlie Fleed's Select All System
            if MNK_MOVING_SKILL.include?(battler.skill_used) and
              ($game_temp.selecting_all_enemies==true or $game_temp.selecting_all_allies==true); full_moving = false ; center_move = true ; end
          end        
          if MNK_MOVE2CENTER_SKILL.include?(battler.skill_used) ; center_move = true ; end        
          # Select Skill Pose        
          base_pose = motion_pose_skill(battler)        
        when 2  # Item
          @spriteset.battler(battler).item_used = battler.item_used
          unless JUMPING_ITEMS == nil
            battler.jump = JUMPING_ITEMS[battler.item_used] if JUMPING_ITEMS[battler.item_used] != nil
          end
          rush_type = MNK_STEP_ITEM
          if MNK_MOVING_ITEM.include?(battler.item_used) or @item_scope == 1..2 ; full_moving = true ; end
          if MNK_MOVE2CENTER_ITEM.include?(battler.item_used); center_move = true; end
          # Select Item Pose  
          base_pose = motion_pose_item(battler)
        end
        # Only perform action if 'Do Nothing' flag is off, ie... doing something...
        if dn_flag != true
          # Control Movement and use current pose 
          @moved = {} unless @moved
          return if @spriteset.battler(battler).moving
          if not (@moved[battler] or battler.guarding?)
            offset = offset_value(target, battler)
            if rush_type        # Steps forward
              @spriteset.battler(battler).setmove(battler.screen_x - offset, battler.screen_y + 1, battler.screen_z)
            end
            if full_moving      # Runs to target
              @spriteset.battler(battler).setmove(target.screen_x + offset, target.screen_y - 1, target.screen_z + 10)
            end
            if center_move      # Runs to center
              @spriteset.battler(battler).setmove(320+(offset/4), battler.screen_y-1, battler.screen_z)
            end
            @moved[battler] = true
            return
            @spriteset.battler(battler).pose = base_pose
          elsif not battler.guarding?
            @spriteset.battler(battler).pose = base_pose
            @spriteset.battler(battler).setmove(battler.screen_x, battler.screen_y, battler.screen_z)
          end     
          # Finish Up Skill and Item Use
          case battler.current_action.kind
          when 1
            # Flag system that skill was used
            battler.casted = false
            battler.casting = false
            @spriteset.battler(battler).skill_used = 0
          when 2
            # Flag system that item was used
            @spriteset.battler(battler).item_used = 0
          end      
          # Battle_Charge value for BattleCry script
          $battle_charge = true
        end  
        # Battle Delay System (off)
        minkoff_delay_off    
        # Prevent 'removed battler' moved state
        unless @moved == nil
          @moved[battler] = false
        end
        # Start attack, do not move from spot
        battler.attacking = true
        # Erase Battler Jumping value
        battler.jump = nil
        # Perform the original call
        @rtab ? mnk_update_phase4_step3(battler) : mnk_update_phase4_step3
      end
      #--------------------------------------------------------------------------
      # * Battle Delay System (turned on)
      #--------------------------------------------------------------------------
      def minkoff_delay_on
        if MNK_AT_DELAY    
          # Fomar's Action Cost Detection
          if $game_system.mnk_det_acb_detect
            for actor in $game_party.actors
              actor.vitality= 0
            end
            for enemy in $game_troop.enemies
              enemy.vitality= 0
            end
          end
          # Trickster's AT Detection
          if $game_system.mnk_det_abs_detect
            for actor in $game_party.actors
              actor.at_bonus= [0,0]
            end
            for enemy in $game_troop.enemies
              enemy.at_bonus= [0,0]
            end
          end
          # Cogwheel RTAB Detection
          if $game_system.mnk_det_rtab_systm
            @rtab_wait_flag = true
          end
        end    
      end
      #--------------------------------------------------------------------------
      # * Battle Delay System (turned off)
      #--------------------------------------------------------------------------
      def minkoff_delay_off
        if MNK_AT_DELAY    
          # Fomar's Action Cost Detection
          if $game_system.mnk_det_acb_detect
            for actor in $game_party.actors
              actor.vitality = 1
            end
            for enemy in $game_troop.enemies
              enemy.vitality = 1
            end
          end
          # Trickster's AT Detection
          if $game_system.mnk_det_abs_detect
            for actor in $game_party.actors
              actor.at_bonus = [1,0]
            end
            for enemy in $game_troop.enemies
              enemy.at_bonus = [1,0]
            end
          end
          # Cogwheel RTAB Detection
          if $game_system.mnk_det_rtab_systm
            @rtab_wait_flag = false
          end
        end
      end  
      #--------------------------------------------------------------------------
      # * Minkoff Flash system
      #--------------------------------------------------------------------------
      def minkoff_flash(battler)
        # If enemy is a default battler
        if battler.is_a?(Game_Enemy)
          if DEFAULT_ENEMY
            if @rtab then battler.white_flash = true end
            if @rtab then battler.wait = 10 end
          end
          if DEFAULT_ENEMY_ID != nil
            if DEFAULT_ENEMY_ID.include?(battler.id)
              if @rtab then battler.white_flash = true end
              if @rtab then battler.wait = 10 end
            end 
          end        
        end
        # If actor is a default battler
        if battler.is_a?(Game_Actor)
          if DEFAULT_ACTOR
            if @rtab then battler.white_flash = true end
            if @rtab then battler.wait = 10 end
          end
          if DEFAULT_ACTOR_ID != nil
            if DEFAULT_ACTOR_ID.include?(battler.id)
              if @rtab then battler.white_flash = true end
              if @rtab then battler.wait = 10 end
            end 
          end                
        end
      end
      #--------------------------------------------------------------------------
      # * Select Attack Pose
      #--------------------------------------------------------------------------  
      def motion_pose_attack(battler)
        base_pose = pose_obtain(battler, MNK_POSE7, MNK_APOSE7, MNK_EPOSE7)
        base_pose2 = pose_array_obtain(battler, MNK_POSES_WEAPONS, MNK_POSES_WEAPS_A, MNK_POSES_WEAPS_E, battler.weapon_id)
        base_pose = base_pose2 if base_pose2 != nil    
        return base_pose
      end
      #--------------------------------------------------------------------------
      # * Select Random Attack Pose
      #--------------------------------------------------------------------------  
      def motion_pose_attack_random(battler)
        base_pose   = nil
        # Create Random pose if a set exists.
        unless MNK_RANDOM_ATTACKS == nil
          base_pose2  = rand((MNK_RANDOM_ATTACKS.size)+1 )
          base_pose   = MNK_RANDOM_ATTACKS[base_pose2 - 1] unless base_pose2 == 0
        end
        # Determine if there's an existing actor/enemy specific random pose
        pose_temp   = nil
        if battler.is_a?(Game_Actor)
          unless MNK_RANDOM_ATTACKS_A == nil
            pose_temp = MNK_RANDOM_ATTACKS_A[battler.id] if MNK_RANDOM_ATTACKS_A.include?(battler.id)
          end
        else
          unless MNK_RANDOM_ATTACKS_E == nil
            pose_temp = MNK_RANDOM_ATTACKS_E[battler.id] if MNK_RANDOM_ATTACKS_E.include?(battler.id)
          end
        end
        # Replace Random Pose with new actor/enemy based random pose
        unless pose_temp == nil
          base_pose2  = rand((pose_temp.size)+1 )
          base_pose   = pose_temp[base_pose2 - 1] - 1 unless base_pose2 == 0
        end
        return base_pose
      end
      #--------------------------------------------------------------------------
      # * Select Escape Pose
      #--------------------------------------------------------------------------  
      def motion_pose_escape(battler)
        temp_pose = pose_obtain(battler, MNK_POSES_ESCAPE, MNK_POSES_ESCAPE_A, MNK_POSES_ESCAPE_E)
        base_pose = temp_pose if temp_pose != nil  
        return base_pose
      end
      #--------------------------------------------------------------------------
      # * Select Skill Pose
      #--------------------------------------------------------------------------  
      def motion_pose_skill(battler)
        base_pose = pose_obtain(battler, MNK_POSE9, MNK_APOSE9, MNK_EPOSE9)
        base_pose2 = pose_array_obtain(battler, MNK_POSES_SKILLS, MNK_POSES_SKILLS_A, MNK_POSES_SKILLS_E, battler.skill_used)
        base_pose = base_pose2 if base_pose2 != nil    
        return base_pose
      end
      #--------------------------------------------------------------------------
      # * Select Item Pose
      #--------------------------------------------------------------------------  
      def motion_pose_item(battler)
        base_pose = pose_obtain(battler, MNK_POSE8, MNK_APOSE8, MNK_EPOSE8)
        base_pose2 = pose_array_obtain(battler, MNK_POSES_ITEMS, MNK_POSES_ITEMS_A, MNK_POSES_ITEMS_E, battler.item_used)
        base_pose = base_pose2 if base_pose2 != nil
        return base_pose
      end
      #--------------------------------------------------------------------------
      # * Offset Calculation
      #--------------------------------------------------------------------------
      def offset_value(target, battler = @active_battler)
        # Obtain attacking battler width
        ww = @spriteset.battler(battler).width / 2
        # Set current attack offset    
        offst = @spriteset.battler(battler).battler_offset
        offst += MNK_OFFSET
        # Oversized or special Battler offsets
        if target.is_a?(Game_Enemy) && battler.is_a?(Game_Actor)
          unless MNK_OFFSET_ATK_A == nil
            offst -= MNK_OFFSET_ATK_A[battler.id] if MNK_OFFSET_ATK_A.include?(battler.id)
          end
          unless MNK_OFFSET_DEF_E == nil
            offst += MNK_OFFSET_DEF_E[target.id]  if MNK_OFFSET_DEF_E.include?(target.id)
          end
        end
        if target.is_a?(Game_Actor) && battler.is_a?(Game_Enemy)
          unless MNK_OFFSET_ATK_E == nil
            offst -= MNK_OFFSET_ATK_E[battler.id] if MNK_OFFSET_ATK_E.include?(battler.id)
          end
          unless MNK_OFFSET_DEF_A == nil
            offst += MNK_OFFSET_DEF_A[target.id]  if MNK_OFFSET_DEF_A.include?(target.id)
          end
        end
        # Offset calc dependant on sideview
        if $game_system.sv_angle == 1
          offset = (battler.is_a?(Game_Actor) ? -(offst-ww) : offst-ww)
        else
          offset = (battler.is_a?(Game_Actor) ? offst-ww : -(offst-ww))
        end
        return offset
      end
      #--------------------------------------------------------------------------
      # * Hit Animation
      #--------------------------------------------------------------------------
      alias mnk_update_phase4_step4 update_phase4_step4
      def update_phase4_step4(battler = @active_battler)
        # Cycle through the targets
        for target in (@rtab ? battler.target : @target_battlers)
          damage = (@rtab ? target.damage[battler] : target.damage)
          critical = (@rtab ? target.critical[battler] : target.critical)
          if damage.is_a?(Numeric) and damage > 0
            base_pose = pose_obtain(target, MNK_POSE2, MNK_APOSE2, MNK_EPOSE2)
            weapon_used = battler.weapon_id
            weapon_used = 0 if weapon_used == nil
            base_pose2 = pose_array_obtain(target, MNK_STRUCK_WEAPS, MNK_STRUCK_WEAPS_A, MNK_STRUCK_WEAPS_E, weapon_used)
            base_pose = base_pose2 if base_pose2 != nil
            if battler.strike_skill != 0
              if battler.strike_skill == target.struck_skill
                base_pose2 = pose_array_obtain(target, MNK_STRUCK_SKILLS, MNK_STRUCK_SKILLS_A, MNK_STRUCK_SKILLS_E, target.struck_skill)
                base_pose = base_pose2 if base_pose2 != nil
              end
            end
            if battler.strike_item != 0
              if battler.strike_item == target.struck_item
                base_pose2 = pose_array_obtain(target, MNK_STRUCK_ITEMS, MNK_STRUCK_ITEMS_A, MNK_STRUCK_ITEMS_E, target.struck_item)
                base_pose = base_pose2 if base_pose2 != nil
              end
            end
            @spriteset.battler(target).pose = base_pose
            if critical == true
              temp_pose = pose_obtain(target, MNK_POSES_CRITICAL, MNK_POSES_CRIT_A, MNK_POSES_CRIT_E)
              weapon_used = battler.weapon_id
              weapon_used = 0 if weapon_used == nil
              base_pose2 = pose_array_obtain(target, MNK_CRIT_WEAPS, MNK_CRIT_WEAPS_A, MNK_CRIT_WEAPS_E, weapon_used)
              base_pose = base_pose2 if base_pose2 != nil
              if battler.skill_used != 0
                if battler.skill_used == target.struck_skill
                  base_pose2 = pose_array_obtain(target, MNK_CRIT_SKILLS, MNK_CRIT_SKILLS_A, MNK_CRIT_SKILLS_E, target.struck_skill)
                  base_pose = base_pose2 if base_pose2 != nil
                end
              end
              if battler.item_used != 0
                if battler.item_used == target.struck_item
                  base_pose2 = pose_array_obtain(target, MNK_CRIT_ITEMS, MNK_CRIT_ITEMS_A, MNK_CRIT_ITEMS_E, target.struck_item)
                  base_pose = base_pose2 if base_pose2 != nil
                end
              end
              @spriteset.battler(target).pose = temp_pose if temp_pose != nil
            end
          else
            base_pose = pose_obtain(target, MNK_DODGE, MNK_ADODGE, MNK_EDODGE)
            weapon_used = battler.weapon_id
            weapon_used = 0 if weapon_used == nil
            base_pose2 = pose_array_obtain(target, MNK_DODGE_WEAPS, MNK_DODGE_WEAPS_A, MNK_DODGE_WEAPS_E, weapon_used)
            base_pose = base_pose2 if base_pose2 != nil
            if battler.strike_skill != 0
              if battler.strike_skill == target.struck_skill
                base_pose2 = pose_array_obtain(target, MNK_DODGE_SKILLS, MNK_DODGE_SKILLS_A, MNK_DODGE_SKILLS_E, target.struck_skill)
                base_pose = base_pose2 if base_pose2 != nil
              end
            end
            if battler.strike_item != 0
              if battler.strike_item == target.struck_item
                base_pose2 = pose_array_obtain(target, MNK_DODGE_ITEMS, MNK_DODGE_ITEMS_A, MNK_DODGE_ITEMS_E, target.struck_item)
                base_pose = base_pose2 if base_pose2 != nil
              end
            end
            @spriteset.battler(target).pose = base_pose
          end
        end
        # Reset/zero out the battler's skill & item
        battler.strike_skill  = 0
        battler.strike_item   = 0
        # Perform the original call
        @rtab ? mnk_update_phase4_step4(battler) : mnk_update_phase4_step4
        # Finish attack n battle animation, free to move
        battler.attacking = false
      end  
      #-------------------------------------------------------------------------- 
      # * Victory Animation
      #--------------------------------------------------------------------------
      alias mnk_start_phase5 start_phase5
      def start_phase5
        unless $game_system.mnk_det_trtab_syst == true
          for actor in $game_party.actors
            return if @spriteset.battler(actor).moving
          end
        end
        # See if an actor remains alive
        for actor in $game_party.actors
          unless actor.dead?
            $game_system.victory = true
          end
        end
        # See if an enemy remains alive
        for enemy in $game_troop.enemies.reverse
          unless enemy.dead?
            $game_system.defeat = true
          end
        end
        # Perform the original call    
        mnk_start_phase5
      end
      #--------------------------------------------------------------------------
      # * Change Arrow Viewport
      #--------------------------------------------------------------------------
      alias mnk_start_enemy_select start_enemy_select
      def start_enemy_select
        # Perform the original call
        mnk_start_enemy_select
        # Arrow manipulation
        @enemy_arrow.dispose
        @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
        @enemy_arrow.help_window = @help_window
      end
      #--------------------------------------------------------------------------
      # * Obtain Pose (Scene Battle version)
      #     battler     : battler performing attack
      #     pose_base   : default pose to return
      #     pose_actor  : list of poses for actors
      #     pose_enemy  : list of poses for enemies
      #--------------------------------------------------------------------------
      def pose_obtain(battler, pose_base, pose_actor, pose_enemy)
        # create Arrays
        pos_a = {}
        pos_e = {}
        # fill created Arrays & Set pose
        pos_a = pose_actor
        pos_e = pose_enemy
        pose_now = pose_base
        # Obtain pose if not a standard pose
        if battler.is_a?(Game_Actor)
          pose_now = pos_a[battler.id] if pos_a[battler.id] != nil
        else
          pose_now = pos_e[battler.id] if pos_e[battler.id] != nil
        end
        # Return the final pose (minus 1 for niceties)
        pose_now -= 1 if pose_now != nil
        return pose_now
      end
      #--------------------------------------------------------------------------
      # * Obtain Pose from hashes (Scene Battle version)
      #     battler     : battler performing attack
      #     hash_base   : hash with default poses
      #     hash_actor  : advanced list of poses for actors
      #     hash_enemy  : advanced list of poses for enemies
      #     condition   : value determining where to get the final pose
      #--------------------------------------------------------------------------
      def pose_array_obtain(battler, hash_base, hash_actor, hash_enemy, condition)
        # create Arrays
        # create Arrays
        hash_b    = {}
        hash_a    = {}
        hash_e    = {}
        pose_temp = {}
        # fill created Arrays & Set pose
        hash_b = hash_base
        hash_a = hash_actor
        hash_e = hash_enemy
        # Setup the temp Array
        if battler.is_a?(Game_Actor)
          pose_temp = hash_a[battler.id] if hash_a.include?(battler.id)
        else
          pose_temp = hash_e[battler.id] if hash_e.include?(battler.id)
        end
        # Obtain the base pose based on condition (or nil)
        pose_now = hash_b[condition] if hash_b.include?(condition)
        # Obtain the optional actor/enemy pose based on condition (unless nil)
        pose_now = pose_temp[condition] if pose_temp.include?(condition)
        # Return the final pose (minus 1 for niceties)
        pose_now -= 1 if pose_now != nil
        return pose_now
      end
    end
    Animated Battler - Misc Code
    Code:
    #==============================================================================
    # ** Animated Battlers - Enhanced   ver. 13.2                      (03-04-2010)
    #
    #------------------------------------------------------------------------------
    #  * (4) Miscellaneous:  Formations, Viewport and various Detection routines.
    #==============================================================================  
     
    #============================================================================
    # ** Game_Temp
    #------------------------------------------------------------------------------
    #  This class handles temporary data that is not included with save data.
    #  Refer to "$game_temp" for the instance of this class.
    #==============================================================================
    
    class Game_Temp
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :advantage_set            # holds value for sideview systems  
      attr_accessor :mnk_battlers_reloaded    # if battler spriteset resets
      
    end
    
    
    #============================================================================== 
    # ** Game_System
    #------------------------------------------------------------------------------
    #  This class handles data surrounding the system. Backround music, etc.
    #  is managed here as well. Refer to "$game_system" for the instance of 
    #  this class.
    #==============================================================================
    
    class Game_System
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      # Auto-Detection Values
      attr_accessor :mnk_det_abs_detect       # Trickster's ATB System Detection
      attr_accessor :mnk_det_acb_detect       # Action Cost Battlesystem Detection
      attr_accessor :mnk_det_claihms_ts       # Claihm's Tactical Skills Detection
      attr_accessor :mnk_det_para_spell       # ParaDog Detection
      attr_accessor :mnk_det_cfc_detect       # Charlie Fleed's CTB Detection
      attr_accessor :mnk_det_rtab_attck       # Connected Attacking Detection
      attr_accessor :mnk_det_rtab_systm       # RTAB Detection
      attr_accessor :mnk_det_trtab_syst       # TRTAB Detection  
      attr_accessor :mnk_det_sd_casting       # DBS Skill Delay Detection
      # Inter-Class variables
      attr_accessor :sv_angle                 # sideview system angle  
      attr_accessor :victory                  # victory boolean
      attr_accessor :defeat                   # defeat boolean
      # Additional values for the $global's save/load feature
      attr_accessor :mnk_sm                   # sideview mirror
      #--------------------------------------------------------------------------
      # * Object Initialization
      #--------------------------------------------------------------------------
      alias mnk_init initialize
      def initialize
        # Perform the original call
        mnk_init
        # Create the savable values
        @mnk_sm  = 0
      end  
    end  
    
    
    
    #==============================================================================
    # ** Interpreter
    #------------------------------------------------------------------------------
    #  This interpreter runs event commands. This class is used within the
    #  Game_System class and the Game_Event class.
    #==============================================================================
    
    class Interpreter
      #-------------------------------------------------------------------------
      # * Change Party Member
      #--------------------------------------------------------------------------
      alias mnk_c129 command_129
      def command_129
        $game_temp.mnk_battlers_reloaded = nil
        mnk_c129
      end
    end
    
    
    
    #===================================================\==========================
    # ** Scene_Save
    #------------------------------------------------------------------------------
    #  This class performs save screen processing.
    #==============================================================================
    
    class Scene_Save < Scene_File
      #--------------------------------------------------------------------------
      # * Write Save Data
      #     file : write file object (opened)
      #--------------------------------------------------------------------------
      alias mnk_wsd write_save_data
      def write_save_data(file)
        # Store the globals
        $game_system.mnk_sm  = $sideview_mirror
        # Perform the original call
        mnk_wsd(file)
      end
    end
    
    
    #==============================================================================
    # ** Scene_Load
    #------------------------------------------------------------------------------
    #  This class performs load screen processing.
    #==============================================================================
    
    class Scene_Load < Scene_File
      #--------------------------------------------------------------------------
      # * Read Save Data
      #     file : file object for reading (opened)
      #--------------------------------------------------------------------------
      alias mnk_rsd read_save_data
      def read_save_data(file)
        #Perform the original call
        mnk_rsd(file)
        # ReStore the globals
        $sideview_mirror      = $game_system.mnk_sm
      end
    end
    
    
    #==============================================================================
    # ** Game_Battler
    #------------------------------------------------------------------------------
    #  This class deals with battlers. It's used as a superclass for the Game_Actor
    #  and Game_Enemy classes.
    #==============================================================================
    
    class Game_Battler
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :attacking                # if attacking
      attr_accessor :casted                   # if spell is casted
      attr_accessor :casting                  # if currently casting
      attr_accessor :skill_casted             # ID of skill used
      attr_accessor :strike_skill
      attr_accessor :strike_item
      attr_accessor :struck_weapon
      attr_accessor :struck_skill
      attr_accessor :struck_item
      attr_accessor :skill_used
      attr_accessor :item_used  
      attr_accessor :jump
      #--------------------------------------------------------------------------
      # * Object Initialization
      #--------------------------------------------------------------------------
      alias mnk_init initialize
      def initialize
        @attacking      = false
        @casted         = false 
        @casting        = false
        @skill_casted   = 0
        @strike_skill   = 0
        @strike_item    = 0
        @struck_weapon  = 0
        @struck_skill   = 0
        @struck_item    = 0
        @skill_used     = 0
        @item_used      = 0   
        @jump           = nil
        mnk_init
        # ParaDog's Spell Delay Detection
        if defined?(spelling?)
          $game_system.mnk_det_para_spell = true
        end
        # DBS Spell Delay Detection
        if @sd_casting != nil
          $game_system.mnk_det_sd_casting = true
        end
        # Fomar's Action Cost Detection
        if @vitality != nil
          $game_system.mnk_det_acb_detect = true
        end
        # Trickster's AT Detection
        if @at_bonus != nil
          $game_system.mnk_det_abs_detect = true
        end    
        # Charlie Fleed's CTB Detection
        if $charlie_lee_ctb
          $game_system.mnk_det_cfc_detect = true
        end    
        # ParaDog's Spell Delay Detection
        if defined?(SDK.enabled?('RTAB Battle System'))
          $game_system.mnk_det_trtab_syst = true
        end    
      end
    end
    
    
    
    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #  This class handles the actor. It's used within the Game_Actors class
    #  ($game_actors) and refers to the Game_Party class ($game_party).
    #==============================================================================
    
    class Game_Actor
      alias mnk_ini initialize
      def initialize(actor_id)
        mnk_ini(actor_id)
        if defined?(change_weapon)
          $game_system.mnk_det_rtab_attck = true
        end    
      end    
      #--------------------------------------------------------------------------
      # * Actor X Coordinate
      #--------------------------------------------------------------------------
      def screen_x
        return 0 if self.index == nil
        if $game_system.sv_angle == 1
          if self.index > 3
            return 640 - ((self.index - 2) * 45 + 360)
          else
            return 640 - (self.index * 45 + 360)
          end
        else
          if self.index > 3
            return (self.index - 2) * 45 + 360
          else
            return self.index * 45 + 360
          end
        
        end
      end
      #-------------------------------------------------------------------------- 
      # * Actor Y Coordinate
      #--------------------------------------------------------------------------
      def screen_y
        return 0 if self.index == nil
        if self.index > 3
          return (self.index - 4) * 35 + 200
        else
          return self.index * 35 + 200
        end
      end
      #--------------------------------------------------------------------------
      # * Actor Z Coordinate
      #--------------------------------------------------------------------------
      def screen_z
        return screen_y
      end
    end
    
    
    #==============================================================================
    # ** Game_Enemy
    #------------------------------------------------------------------------------
    #  This class handles enemies. It's used within the Game_Troop class
    #  ($game_troop).
    #==============================================================================
    
    class Game_Enemy < Game_Battler 
      #--------------------------------------------------------------------------
      # * Get Battle Screen X-Coordinate
      #--------------------------------------------------------------------------
      def screen_x
        if self.index != nil
          if $game_system.sv_angle == 1
            return 640 - $data_troops[@troop_id].members[@member_index].x
          else
            return $data_troops[@troop_id].members[@member_index].x
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Actor Z Coordinate
      #--------------------------------------------------------------------------
      def screen_z
        return screen_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
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_reader   :party_size
    end
    
    
    #============================================================================== 
    # ** Spriteset_Battle
    #------------------------------------------------------------------------------
    #  This class brings together battle screen sprites. It's used within
    #  the Scene_Battle class.
    #==============================================================================
    
    class Spriteset_Battle
      #--------------------------------------------------------------------------
      # * Change Enemy Viewport
      #--------------------------------------------------------------------------
      alias mnk_initialize initialize
      def initialize
        mnk_initialize
        # Determine if RTAB system in use
        if @real_zoom != nil
          $game_system.mnk_det_rtab_systm = true
        end
        @enemy_sprites = []
        for enemy in $game_troop.enemies.reverse
          if SCREENTONE_ENEMY_MATCH
            @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
          else
            @enemy_sprites.push(Sprite_Battler.new(@viewport2, enemy))
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      alias mnk_update update
      def update
        # Set current number of battlers
        mnkps = 4
        mnkps = $game_party.party_size if $game_party.party_size != nil
        # Added routine to load battlers during combat
        unless $game_temp.mnk_battlers_reloaded
          @actor_sprites = []
          @viewport1.update
          @viewport2.update
          for i in 0...mnkps
            if SCREENTONE_ACTOR_MATCH
              @actor_sprites.push(Sprite_Battler.new(@viewport1))
            else
              @actor_sprites.push(Sprite_Battler.new(@viewport2))
            end
          end
          $game_temp.mnk_battlers_reloaded = true
        end      
        # Perform the original call    
        mnk_update
        # 'Re-'Update actor sprite contents (corresponds with actor switching)
        for i in 0...mnkps
          @actor_sprites[i].battler = $game_party.actors[i]
        end    
      end
      #--------------------------------------------------------------------------
      # * Find Sprite From Battler Handle
      #--------------------------------------------------------------------------
      def battler(handle)
        for sprite in @actor_sprites + @enemy_sprites
          return sprite if sprite.battler == handle
        end
      end
    end
    
    
    #==============================================================================
    # ** Arrow_Base
    #------------------------------------------------------------------------------
    #  This sprite is used as an arrow cursor for the battle screen. This class
    #  is used as a superclass for the Arrow_Enemy and Arrow_Actor classes.
    #==============================================================================
    
    class Arrow_Base < Sprite
      #--------------------------------------------------------------------------
      # * Reposition Arrows
      #--------------------------------------------------------------------------
      alias mnk_initialize initialize
      def initialize(viewport)
        mnk_initialize(viewport)
        self.ox = MNK_ARROW_X
        self.oy = MNK_ARROW_Y
      end
    end

    Animated Battler - RTAB PATCH

    Code:
    #==============================================================================
    # ** Animated Battlers - Enhanced   ver. 13.2                      (03-04-2010)
    #
    #------------------------------------------------------------------------------
    #  * (5) RTAB PATCH:  To allow specialized pausing system (unlike other AT's)
    #============================================================================== 
    
    =begin
    
                                    W A R N I N G
    
    This section of the script should be used exclusively with RTAB.  Though it is
    part of the  Animated Battlers system,  this is merely a patch  to allow it to
    perform the AT Delay feature for the RTAB system... and RTAB system only.   If
    you intend to use this patch on any other battlesystem, your project may crash,
    your computer may blow up,  the Eiffel Tower may melt,  dogs and cats may start
    to live together... 
    
    You have been warned...
    
    =end
    
    =begin
    #==============================================================================
    # ** Scene_Battle 
    #------------------------------------------------------------------------------ 
    #  This class performs battle screen processing.
    #==============================================================================
    
    class Scene_Battle
      #-------------------------------------------------------------------------- 
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :rtab_wait_flag
      #-------------------------------------------------------------------------- 
      # * Main Processing
      #--------------------------------------------------------------------------
      alias mnk_main main    
      def main
        @rtab_wait_flag = false
        mnk_main
      end  
      #--------------------------------------------------------------------------
      # * Frame renewal (AT gauge renewal phase)
      #--------------------------------------------------------------------------
      alias mnk_up0 update_phase0
      def update_phase0  
        unless @rtab_wait_flag
          mnk_up0
        end
      end
      #-------------------------------------------------------------------------- 
      # * Frame Update (main phase step 1 : action preparation)
      #--------------------------------------------------------------------------
      alias mnk_awr anime_wait_return
      def anime_wait_return
        if @rtab_wait_flag
          return true
        end
        mnk_awr
      end
    end
    =end
    Animated Battler - Formations
    Code:
    #==============================================================================
    # ** Minkoff's Animated Battlers Add-On:
    #    Animated Battler Formations
    #------------------------------------------------------------------------------
    #    by DerVVulfman
    #    version 1.0
    #    05-20-2008
    #    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.
    #  STANDARD: { 0 => [ [350, 200], [395, 235], [440, 270], [485, 305], [350,235], [395, 270] ],
    #==============================================================================
    
      # THE  FORMATION
      # SETTING  ARRAY
      # ==============
      #                   ID      Battler 1   Battler 2   Battler 3   Battler 4
      ABATXP_FORMATION = { 0 => [ [475, 230], [395, 235], [440, 270], [485, 305], [350,235], [395, 270] ],
                           1 => [ [485, 200], [440, 235], [395, 270], [350, 305], [350,235] ] }
    
      
      
    #==============================================================================
    # ** 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
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :abatxp_form_id           # Formation ID
      attr_accessor :abatxp_mirror            # Mirror Effect (used by AnimBatVX)
      #--------------------------------------------------------------------------
      # * Object Initialization
      #--------------------------------------------------------------------------
      alias init_game_system initialize
      def initialize
        init_game_system
        @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
      #--------------------------------------------------------------------------
      # * Actor X Coordinate
      #--------------------------------------------------------------------------
      def screen_x
        if $game_system.sv_angle == 1
          return 640 - ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][0]
        else
          return ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][0]
        end
      end
      #--------------------------------------------------------------------------
      # * Actor Y Coordinate
      #--------------------------------------------------------------------------
      def screen_y
        return ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][1]
      end
    end

  3. #3
    Hey,
    erst einmal sorry für die verzögerte Antwort. Ich schiebe gerade zuviele Überstunden. Habe mir das Ganze auch jetzt nur während der Arbeit angeschaut und konnte es daher nicht so genau betrachten.
    Es liegt wohl an folgender stelle:
    Script Area: CTB by Charlie - Damage and Colors
    Methode: Update (ab Zeile 250+)
    betroffener Code (ab Zeile ~410):
    Code:
          # Support for blinking targets
          if @battler != nil and @battler.targeted
            @_target_blink_count = (@_target_blink_count + 1) % 12
            if @_target_blink_count < 6
              alpha = (6 - @_target_blink_count) * 24
            else
              alpha = (@_target_blink_count - 6) * 24
            end
            self.color.set(255, 255, 255, alpha)        
          else
            self.color.set(0, 0, 0, 0) 
          end
          
          if @_blink
            @_blink_count = (@_blink_count + 1) % 32
            if @_blink_count < 16
              alpha = (16 - @_blink_count) * 6
            else
              alpha = (@_blink_count - 16) * 6
            end
            self.color.set(255, 255, 255, alpha)
          end
          @@_animations.clear
    Hier wird für das CTB das Blinkverhalten der Sprites bestimmt. Der Shadow-Sprite greift mit seinem Update auch darauf zu und wird an dieser Stelle wieder sichtbar gemacht. Als "Hotfix", da ich leider keine Zeit gerade habe, würde ich dir folgende Lösung vorschlagen:
    Füge die rote Zeile über dem Code ein:
    Code:
          return if($shadow_char)
          
          # Support for blinking targets
          if @battler != nil and @battler.targeted
            @_target_blink_count = (@_target_blink_count + 1) % 12
            if @_target_blink_count < 6
              alpha = (6 - @_target_blink_count) * 24
            else
              alpha = (@_target_blink_count - 6) * 24
            end
            self.color.set(255, 255, 255, alpha)        
          else
            self.color.set(0, 0, 0, 0) 
          end
          
          if @_blink
            @_blink_count = (@_blink_count + 1) % 32
            if @_blink_count < 16
              alpha = (16 - @_blink_count) * 6
            else
              alpha = (@_blink_count - 16) * 6
            end
            self.color.set(255, 255, 255, alpha)
          end
          @@_animations.clear
    Im Schattenskript fügst du folgendes unter der Update-Methode in der Shadow_Sprite Klasse ein (ca. Zeile 220):
    Code:
      def update
        if @character.transparent or @character.opacity <= SHADOWS_OPACITY_THRESHOLD
          self.visible = false
          return
        end
        @deltax=(@source.real_x-@character.real_x)/4
        @deltay= (@source.real_y-@character.real_y)/4
        @distance = (((@deltax ** 2) + (@deltay ** 2))** 0.5)
        if @distancemax !=0 and @distance>@distancemax
          self.visible = false
          return
        end
        self.angle = 57.3*Math.atan2(@deltax, @deltay )
        @angle_trigo= (self.angle+90) % 360
        if @anglemin !=0 or @anglemax !=0
          if (@angle_trigo<@anglemin or @angle_trigo>@anglemax) and \
              @anglemin<@anglemax
            self.visible = false
            return
          elsif (@angle_trigo<@anglemin and @angle_trigo>@anglemax) and \
                 @anglemin>@anglemax
            self.visible = false
            return
          end     
        end
        super
        if @tile_id != @character.tile_id or
           @character_name != @character.character_name or
           @character_hue != @character.character_hue
           @tile_id = @character.tile_id
          @character_name = @character.character_name
          @character_hue = @character.character_hue
          if @tile_id >= 384
            self.bitmap = RPG::Cache.tile($game_map.tileset_name,
            @tile_id, @character.character_hue)
            self.src_rect.set(0, 0, 32, 32)
            self.ox = 16
            self.oy = 32
          else
            self.bitmap = RPG::Cache.character(@character.character_name,
              @character.character_hue)
            @cw = bitmap.width / 4
            @ch = bitmap.height / 4
            self.ox = @cw / 2
            self.oy = @ch
          end
        end
        self.visible = true
        self.x = @character.screen_x
        self.y = @character.screen_y-8
        self.z = @character.screen_z(@ch)-1
        if @character.animation_id != 0
          animation = $data_animations[@character.animation_id]
          animation(animation, true)
          @character.animation_id = 0
        end
        if @tile_id == 0
          sx = @character.pattern * @cw
          quarter = ((@angle_trigo/90+0.5).floor)%4
          # The quarter is the position of the event relative to the source.
          # Imagine the source is the o point (0,0). Trace the 2 lines
          # y=x and y=-x : you get something like a big X
          # On the right, quarter=0. Up, quarter = 1, and so on
          # Take the @character.direction row (2,4,6,8), and the quarter
          # column (0,1,2,3) (remember, it starts at 0), and you'll get
          # a number between 1 and 4. It correspond to the row of the charset
          # the shadow will be, and mirrored if negative.
          # Yes, it isn't obvious, but I didn't find any simple operation to
          # get those.
         magic = SHADOWS_DIRECTION_ARRAY[@character.direction][quarter]
          magic = -magic
          if magic < 0
            self.mirror = true
            magic = -magic
          else
            self.mirror = false
          end
          sy = (magic-1)*@ch
          self.src_rect.set(sx, sy, @cw, @ch)
        end
        # This is the formula of the opacity in function of the distance
        # ** 2 means square
        self.opacity = 1200/((@distance ** 2)/ 1000 + 6)
        # This is the formula of the size in function of the distance
        # The 0.75 is here so you have a size of 1:1 when next to the source.
        self.zoom_y=0.75 + @distance / 256 if SHADOW_GETS_LONGER
        
      end
      
      alias update_fix update
      def update
        $shadow_char = true
        update_fix
        $shadow_char = false
      end
      
    end
    Ich kann dir das Ganze bei Gelegenheit auch mal "schöner" lösen - aber da komme ich wohl erst im Dezember zu.

    Hoffe es klappt, so wie es soll.

    Viele liebe Grüße,
    Linkey

  4. #4
    Finde nicht dass die Antwort verzögert war, war sehr fix meiner Meinung nach. Ausserdem ist es nicht selbstverständlich
    wenn man jemanden bei einem Hobby von der Arbeit aus hilft.

    Dankesehr, klappt alles wunderbar! Sollte das Projekt mal rauskommen gibts fix einen Creditseintrag.

    Liebe Grüße,
    Mithrandir

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •