Side View Battle:Request

Anything Simpler?

Out of 3-4 of the script I found. All had demos, I rifled through said demo's and ALL OF THEM either needed more of another script or some extra sprites with more than what I just basically want. XD

What I wold like is a simple Side view system. Using XP sprites as my battlers, and either the full artwork put into XP already or sprite versions of the enemies.

If noone has or either seen said simplistic battle system, I'm going to have to make my own with events. -_-
(Which I'm really good at.)
Check this one out:
[ Atoa's Custom Battle System ]
Probably the most customizable, and simplest one out there. It doesn't need extra scripts to run, and you can use whatever kind of battle sprites you want, with the right settings.

Hope this helps ;)
-abreaction
It doesn't help me a whole lot.... thanks though.

It just seems to pop up more errors
can I see an example of the battler you are using?
Did you try the Super Simple Sideview System?

The only thing you need to do is put the battler images in the battler folder.
If you're using the RTP, simply grab a copy from the RTP (C:\Program Files\Common Files\Enterbrain\RGSS\Standard\Graphics\Characters)
Paste in your projects "Battlers" folder. Then edit the file & crop the image to the first cell in the second row (for Actors), first cell in 3rd row for enemies. i.e.

Image --------> Image

Then just assign the battlers in the database (Actors & Enemies tabs), and adjust the enemy positions in the Troops tab
@abreaction

Its not the battler, I added that. Its just something that collides with another script I had put in.

@Brewmeister

Never tried, trying now.
Reply to both

@ first, tried the first, Didn't like, required minkoffish like battlers, I don't have the time to make'em, second, my project is a simple one.

@ Second, re-trying
@Outcast
I think you didn't read the instructions or tested deeply the demo.
The ACBS allows varios types of battler sprites: minkoff, ccoa and even totally custom sprites. Also it allows non animated battlers. just add an "$" on the begin of the filename. Also there's an setting to make enemies and actors don't move.

So, unless you're using another script that is incompatible, i don't see a reason to not use the ACBS.
Here you go! Cant be simpler: Post this above main in different sections:

Part I:
  1. #==============================================================================
  2. # ** Animated Battlers - Enhanced   ver. 10.7                      (06-17-2008)
  3. #
  4. #------------------------------------------------------------------------------
  5. #  * (1) Configuration:  The Sprite Battler Class (initialize system)
  6. #==============================================================================
  7.  
  8.   #==========================================================================
  9.   #   ****                     ARROW CONTROLS                        ****   #
  10.   #==========================================================================
  11.   # * Just moves the targetting arrow around
  12.   #--------------------------------------------------------------------------
  13.   MNK_ARROW_X             = 14      # The x position for your target cursor
  14.   MNK_ARROW_Y             = 10      # The y position for your target cursor
  15.  
  16.   #==========================================================================
  17.   #   ****                    GENERAL CONTROLS                       ****   #
  18.   #==========================================================================
  19.  
  20.   # * Default Battler Style Switches
  21.   #--------------------------------------------------------------------------        
  22.   DEFAULT_ENEMY           = true   # If true, these switches allows the use
  23.   DEFAULT_ACTOR           = false   # of default battlers for actors/enemies
  24.   DEFAULT_ENEMY_ID        = [1,2,3,4,5,6,7,8,9]     # Ids of enemies using default battlers
  25.   DEFAULT_ACTOR_ID        = [1,2,3,4,5,6,7,8,9]     # Ids of actors using default battlers
  26.   DEFAULT_COLLAPSE_ACTOR  = false   # If true, restores the old 'red fade'
  27.   DEFAULT_COLLAPSE_ENEMY  = false   #   collapse effect (using spritesheets)
  28.  
  29.  
  30.   # * Animation Frames and Animation Speed
  31.   #--------------------------------------------------------------------------    
  32.   MNK_SPEED               = 5       # Framerate speed of the battlers
  33.   MNK_RUSH_SPEED          = 1.5     # Melee/Skill/Item motion speed of the battlers
  34.   MNK_POSES               = 11      # Maximum # of poses (stances) in the template
  35.   MNK_FRAMES              = 4       # Maximum # of frames in each pose
  36.   MNK_FRAMES_STANDARD     = 4       # Standard # of frames played in each pose.
  37.  
  38.   # Individual Spritesheet Control Center
  39.   #--------------------------------------------------------------------------        
  40.   MNK_POSES_ENEMY         = {1 => 4}  # ID and # of poses for each enemy
  41.   MNK_FRAMES_ENEMY        = nil       # ID and # of frames for each enemy
  42.   MNK_POSES_ACTOR         = {2 => 4}  # ID and # of poses for each actor
  43.   MNK_FRAMES_ACTOR        = nil       # ID and # of frames for each actor.
  44.      
  45.   # * Wooziness Rates
  46.   #--------------------------------------------------------------------------
  47.   MNK_LOW_HP_PERCENTAGE   = 0.25                    # Health% for WOOZY pose.
  48.   MNK_LOW_HP_ACTOR        = {7 => 0.50, 8 => 0.75}  # Ind. health% for actors.
  49.   MNK_LOW_HP_ENEMY        = {1 => 0.50}             # Ind. health% for enemies.
  50.   MNK_LOW_HP_FLAT         = true                    # If true, flat rate hp
  51.  
  52.    
  53.    
  54.   #==========================================================================
  55.   #   ****                   POSE CONTROL CENTER                     ****   #
  56.   #==========================================================================
  57.    
  58.   # Editable Template (Some people wanted to change their template design)
  59.   #--------------------------------------------------------------------------
  60.   MNK_POSE1   =   1   # Sets the 'Ready Pose'  (MNK_POSE1)   #1 in your template
  61.   MNK_POSE2   =   2   # Sets the 'Struck Pose' (MNK_POSE2)   #2 in your template
  62.   MNK_POSE3   =   3   # Sets the 'Woozy Pose'  (MNK_POSE3)   #3 in your template
  63.   MNK_POSE4   =   4   # Sets the 'Block Pose'  (MNK_POSE4)   #4 in your template
  64.   MNK_POSE5   =   5   # Sets the 'Charge Pose' (MNK_POSE5)   #5 in your template
  65.   MNK_POSE6   =   6   # Sets the 'Retreat Pose'(MNK_POSE6)   #6 in your template
  66.   MNK_POSE7   =   7   # Sets the 'Attack Pose' (MNK_POSE7)   #7 in your template
  67.   MNK_POSE8   =   8   # Sets the 'Item Pose'   (MNK_POSE8)   #8 in your template
  68.   MNK_POSE9   =   9   # Sets the 'Skill Pose'  (MNK_POSE9)   #9 in your template
  69.   MNK_POSE10  =  10   # Sets the 'Victory Pose'(MNK_POSE10) #10 in your template
  70.   MNK_POSE11  =  11   # Sets the 'Defeat Pose' (MNK_POSE11) #11 in your template
  71.    
  72.   # Editable Template (for Custom Actor Spritesheets)
  73.   #--------------------------------------------------------------------------
  74.   MNK_APOSE1   =   {2 => 2}
  75.   MNK_APOSE2   =   {2 => 2}   # Hilda is using a Charset graphic as a battler.
  76.   MNK_APOSE3   =   {2 => 2}   # The battler was copied into the Battler folder.
  77.   MNK_APOSE4   =   {2 => 2}   # This setup allows you to use Charactersets for
  78.   MNK_APOSE5   =   {2 => 2}   # battlers battlers.
  79.   MNK_APOSE6   =   {2 => 3}
  80.   MNK_APOSE7   =   {2 => 2}
  81.   MNK_APOSE8   =   {2 => 2}
  82.   MNK_APOSE9   =   {2 => 2}
  83.   MNK_APOSE10  =   {2 => 1}
  84.   MNK_APOSE11  =   {2 => 4}
  85.    
  86.   # Editable Template (for Custom Enemy Spritesheets)
  87.   #--------------------------------------------------------------------------
  88.   MNK_EPOSE1   =   {1 => 2}
  89.   MNK_EPOSE2   =   {1 => 2}   # Did the same to the ghosts.  Note that enemies have
  90.   MNK_EPOSE3   =   {1 => 2}   # no victory pose.
  91.   MNK_EPOSE4   =   {1 => 2}  
  92.   MNK_EPOSE5   =   {1 => 2}  
  93.   MNK_EPOSE6   =   {1 => 3}
  94.   MNK_EPOSE7   =   {1 => 2}
  95.   MNK_EPOSE8   =   {1 => 2}
  96.   MNK_EPOSE9   =   {1 => 2}
  97.   MNK_EPOSE11  =   {1 => 11}  # Setting the ghost to an invalid pose erases it.
  98.                        
  99.                        
  100.   #==========================================================================
  101.   #   ****               EXPANDED POSE CONTROL CENTER                ****   #
  102.   #==========================================================================
  103.  
  104.   # Non-Default Poses (can expand beyond the default 11 poses here)
  105.   # (New system mimics the revised Template system.  Can use 'custom' sheets)
  106.   #--------------------------------------------------------------------------
  107.   # The first value in each set indicates the index number  in a spritesheet.
  108.   # This value is  overrided by a value  in one of the other two accompanying
  109.   # arrays... one for actor battlerss, the other for enemy battlers.
  110.   #
  111.   # To define a pose linked to a specific battler, the syntax is...
  112.   # '' hash array '' = { battler.id => pose# }
  113.   # Where Aluxes and the Ghost (RTP)  would be  the 1st battlers (per array),
  114.   # and the pose# would be the pose in your spritesheet.
  115.   #
  116.   # Combinations in the  hash arrays  are possible,  so if the MNK_POSES_DYING_E
  117.   # array has {1 => 5, 9 => 2},  then the GHOST (enemy #1) would be using the
  118.   # 6th pose (index 5) and the 9th enemy battler would be using the 3rd pose.
  119.   #--------------------------------------------------------------------------
  120.   MNK_POSES_SETUP       = 7          # Choose animation pose for 'preparation'
  121.   MNK_POSES_SETUP_A     = {2 => 4}
  122.   MNK_POSES_SETUP_E     = {1 => 4}    
  123.   MNK_POSES_CASTPREP    = 4          # Set 'casting' pose for skill preparation
  124.   MNK_POSES_CASTPREP_A  = {}          
  125.   MNK_POSES_CASTPREP_E  = {9 => 3}    
  126.   MNK_POSES_DYING       = 6          # Choose animation pose for dying throws.
  127.   MNK_POSES_DYING_a     = {}          
  128.   MNK_POSES_DYING_E     = {9 => 5}    
  129.   MNK_POSES_ESCAPE      = 2          # Set 'coward' pose for fleeing monsters)    
  130.   MNK_POSES_ESCAPE_A    = {}        
  131.   MNK_POSES_ESCAPE_E    = {9 => 5}  
  132.   MNK_POSES_CRITICAL    = nil        # Set pose for BIG hits
  133.   MNK_POSES_CRIT_A      = {}
  134.   MNK_POSES_CRIT_E      = {9 =>5}
  135.   MNK_POSES_WINNING     = 4          # Set winning (Victory Dance before pose)
  136.   MNK_POSES_WINNING_A   = {}
  137.   MNK_POSES_WINNING_E   = {}        
  138.  
  139.   # Looping Poses
  140.   #--------------------------------------------------------------------------
  141.   # These arrays merely hold the ID  of actors or enemies whose poses loop at
  142.   # the end of combat.  Enemies have no 'winning' animation pose.
  143.   MNK_LOOPS_WINNING         = [7]     # Actor IDs if their victory pose loops
  144.   MNK_LOOPS_DEFEATED_ACTOR  = []      # Actor IDs if their defeat pose loops
  145.   MNK_LOOPS_DEFEATED_ENEMY  = []      # Enemy IDs if their defeat pose loops
  146.    
  147.   # Non-Default Pose Hashes (poses dependant on .id values)
  148.   # (New system mimics the revised Template system.)
  149.   #--------------------------------------------------------------------------
  150.   # The first hash in each set  indicates the id number (be it skill, item or
  151.   # otherwise, and the pose it brings up.   These mimic the 2nd array type in
  152.   # the above Non-Default poses.   As such, a hash value of {1 => 10) for the
  153.   # MNK_POSES_WEAPONS hash would make  the 'Bronze Sword' use the 10th index (or
  154.   # 11th spritesheet) pose... aka the 'Defeat' pose.
  155.   #
  156.   # To define an advanced pose linked to a specific battler, the syntax is...
  157.   #  = { battler.id => { item/skill.id => pose#  } }
  158.   # ...so this gets  more complicated.   But this does allow  each battler to
  159.   # have his or her own unique pose, regardless of spritesheet type.
  160.   #--------------------------------------------------------------------------
  161.   MNK_POSES_CASTED     = {61 => 6}  # Set a specific skill to use a pose
  162.   MNK_POSES_CASTED_A   = {}        
  163.   MNK_POSES_CASTED_E   = {}
  164.   MNK_POSES_STATUS     = {3 => 3}   # Set status values to poses here
  165.   MNK_POSES_STAT_A     = {}  
  166.   MNK_POSES_STAT_E     = {}
  167.   MNK_POSES_SKILLS     = {57 => 7}  # Default: #57(Cross Cut) does 'Attack'
  168.   MNK_POSES_SKILLS_A   = {}  
  169.   MNK_POSES_SKILLS_E   = {}
  170.   MNK_POSES_ITEMS      = {13 => 4}  # Default: #13(Sharp Stone) does 'Block'
  171.   MNK_POSES_ITEMS_A    = {}        
  172.   MNK_POSES_ITEMS_E    = {}        
  173.   MNK_POSES_WEAPONS    = {}         # Didn't set any weapons to any poses
  174.   MNK_POSES_WEAPS_A    = {}
  175.   MNK_POSES_WEAPS_E    = {}         # Non-functional (Enemies don't use 'em.)
  176.  
  177.   # Non-Default Pose Hashes (Hits & Critical Hits)
  178.   # (Just like above, but pertains to specific hits and critical hits)
  179.   #--------------------------------------------------------------------------
  180.   MNK_STRUCK_WEAPS     = {}         # Set a specific 'Struck' to a weapon attack
  181.   MNK_STRUCK_WEAPS_A   = {}        
  182.   MNK_STRUCK_WEAPS_E   = {}        
  183.   MNK_STRUCK_SKILLS    = {}         # Set a specific 'Struck' to a skill
  184.   MNK_STRUCK_SKILLS_A  = { 7 => { 7 => 4 }}
  185.   MNK_STRUCK_SKILLS_E  = {}
  186.   MNK_STRUCK_ITEMS     = {}         # Set a specific 'Struck' to an item attack
  187.   MNK_STRUCK_ITEMS_A   = {}
  188.   MNK_STRUCK_ITEMS_E   = {}
  189.   MNK_CRIT_WEAPS       = {}         # Set a specific 'Critical Hit' to a weapon
  190.   MNK_CRIT_WEAPS_A     = {}
  191.   MNK_CRIT_WEAPS_E     = {}      
  192.   MNK_CRIT_SKILLS      = {}         # Set a specific 'Critical Hit' to a skill
  193.   MNK_CRIT_SKILLS_A    = {7 => {7 => 10 }, 5 => {7 => 7}}
  194.   MNK_CRIT_SKILLS_E    = {}
  195.   MNK_CRIT_ITEMS       = {}         # Set a specific 'Critical Hit' to an item
  196.   MNK_CRIT_ITEMS_A     = {}
  197.   MNK_CRIT_ITEMS_E     = {}
  198.  
  199.    
  200.   #==========================================================================
  201.   #   ****                   FRAME CONTROL CENTER                    ****   #
  202.   #==========================================================================
  203.  
  204.   # * Frames Control
  205.   #--------------------------------------------------------------------------    
  206.   MNK_FRAMES_PER_POSE    = {}               # Set #of frames to pose(by index)
  207.  
  208.   # Advanced Individual Pose/Frame Hashes   # Advanced Individual Poses  uses
  209.                                             # hashes within hashes. As a demo
  210.   MNK_POSES_FR_ACTOR = {}                   # you can see that enemy #1 has 2
  211.   MNK_POSES_FR_ENEMY = {}                   # sets of controls:  index 0 (for
  212.                                             # a ready pose is set to 1 frame,
  213.   # while index 3 (block) is set to 'two' frames.   Likewise, for the actor's
  214.   # hash, Actor #7 (Gloria) has only 1 control hash.   It sets index pose '0'
  215.   # (the ready pose again) to use four frames of animation (even though I had
  216.   # set the ready pose to just use '2' with the MNK_FRAMES_PER_POSE hash earlier.
  217.  
  218.  
  219.   #==========================================================================
  220.   #   ****                   MOVEMENT CONTROL CENTER                 ****   #
  221.   #==========================================================================
  222.      
  223.   # * Offset / Battler Overlap System
  224.   #--------------------------------------------------------------------------    
  225.   MNK_OFFSET            = 0       # How much additional space between battlers
  226.   MNK_OFFSET_ACTOR      = {1 => -50}
  227.   MNK_OFFSET_ENEMY      = nil
  228.  
  229.   # * Forward Step System (Final Fantasy-Style)
  230.   #--------------------------------------------------------------------------    
  231.   MNK_STEP_ATTACK       = false   # If true, battler steps forward to attack
  232.   MNK_STEP_SKILL        = true    # If true, battler steps forward to use skill
  233.   MNK_STEP_ITEM         = true    # If true, battler steps forward to use item
  234.    
  235.   # * Movement Arrays (Arrays for skill/weapon/item IDs that affect movement)
  236.   #--------------------------------------------------------------------------    
  237.   MNK_MOVING_ITEM       = [1]     # Examples are items that need to be applied.
  238.   MNK_MOVING_SKILL      = [61]    # Examples are martial-arts and sneak attacks
  239.   MNK_MOVE2CENTER_ATK   = []      # Moves battler to center based on weapon id!
  240.   MNK_MOVE2CENTER_ITEM  = [5]     # Moves battler to center for a big item atk!
  241.   MNK_MOVE2CENTER_SKILL = [7]     # Moves battler to center for a big skill atk!
  242.   #
  243.   # * Remember, do not supply Skill or Item ID#'s that have 'None' scopes into
  244.   #   either the MNK_MOVING_ITEM or MNK_MOVING_SKILL hashes.  These skills &
  245.   #   item attacks have no target and would cause an error when trying to find
  246.   #   an enemy to move towards.
  247.  
  248.  
  249.    
  250.   #==========================================================================
  251.   #   ****                STATIONARY CONTROL CENTER                  ****   #
  252.   #==========================================================================
  253.  
  254.   # * Stationary Battlers (simple True/False settings)
  255.   #--------------------------------------------------------------------------    
  256.   MNK_STATIONARY_ENEMIES = false    # If the enemies don't move while attacking
  257.   MNK_STATIONARY_ACTORS  = false    # If the actors don't move while attacking
  258.  
  259.   # * Arrays filled with skill/weapon/item IDs that halt movement
  260.   #--------------------------------------------------------------------------    
  261.   MNK_STATIONARY_ENEMY_IDS = []       # Enemies that don't RUN during melee attacks
  262.   MNK_STATIONARY_WEAPONS = [17,18,19,20,21,22,23,24] # (examples are bows & guns)
  263.   MNK_STATIONARY_SKILLS  = []       # (examples are bows & guns)
  264.   MNK_STATIONARY_ITEMS   = []       # (examples are bows & guns)
  265.  
  266.  
  267.    
  268.   #==========================================================================
  269.   #   ****               TRANSPARENCY CONTROL CENTER                 ****   #
  270.   #==========================================================================
  271.   MNK_TRANSLUCENCY      = 300      # Degree of transparency
  272.   MNK_TRANSLUCENT_ACTOR = []       # ID of actor at translucency settings
  273.   MNK_TRANSLUCENT_ENEMY = [1, 9]   # ID of enemy at translucency settings
  274.   MNK_PHASING           = true     # If battlers fade in/out while charging
  275.   MNK_PHASING_ACTOR     = [1, 2]   # IDs of actors that fade in/out if charging
  276.   MNK_PHASING_ENEMY     = [9]      # IDs of enemies that fade in/out if charging
  277.  
  278.   MNK_FADE_IN           = true     # Battler fades in if replaced or transparent
  279.  
  280.    
  281.    
  282.   #==========================================================================
  283.   #   ****                CUSTOM FEATURE CENTER                      ****   #
  284.   #==========================================================================
  285.        
  286.   MNK_MIRROR_ENEMIES    = false    # Enemy battlers use reversed image
  287.   MNK_CALC_SPEED        = false    # System calculates a mean/average speed
  288.   MNK_AT_DELAY          = true     # Pauses battlesystem until animation done.
  289.   MNK_ADV_OFF_TURN      = 1        # Number of turns before enemies turn
Expand to see the code.


Part II:
  1. #==============================================================================
  2. # ** Animated Battlers - Enhanced   ver. 10.7                      (06-17-2008)
  3. #
  4. #------------------------------------------------------------------------------
  5. #  * (2) Sprite System:  The Sprite Battler Class
  6. #==============================================================================
  7.  
  8. #==============================================================================
  9. # ** Sprite_Battler
  10. #------------------------------------------------------------------------------
  11. #  This sprite is used to display the battler.It observes the Game_Character
  12. #  class and automatically changes sprite conditions.
  13. #==============================================================================
  14.  
  15. class Sprite_Battler < RPG::Sprite  
  16.   #--------------------------------------------------------------------------
  17.   # * Public Instance Variables
  18.   #--------------------------------------------------------------------------
  19.   attr_accessor :battler_offset         # Degree of action forcing  
  20.   attr_accessor :skill_used             # Degree of action forcing  
  21.   attr_accessor :item_used              # Degree of action forcing  
  22.   #--------------------------------------------------------------------------
  23.   # * Object Initialization
  24.   #--------------------------------------------------------------------------
  25.   alias mnk_init initialize
  26.   def initialize(viewport, battler = nil)
  27.     # --Initialize poses
  28.     @frame, @pose, @last_time, @last_move_time  = 0, 0, 0, 0
  29.     # --Initialize Battler placement and pose types
  30.     @battler_offset, @skill_used, @item_used    = 0, 0, 0
  31.     # --Initialize Boolean values
  32.     @statusd              = false
  33.     @dying                = true
  34.     @s_pose               = false
  35.     $game_system.victory  = false
  36.     $game_system.defeat   = false
  37.     @winning              = true
  38.     # ORIGINAL Initialize call
  39.     mnk_init(viewport, battler)
  40.     # EVENT VALUE CALLS
  41.     # --Obtain the Sideview switch
  42.     $game_system.sv_angle = $sideview_mirror
  43.     $game_system.sv_angle = 0 if $sideview_mirror == nil
  44.     # -- Obtain the max party size
  45.     $game_system.max_member = $formation_max_member
  46.     $game_system.max_member = 4 if $formation_max_member == nil
  47.     # --Obtain the highest position for the formation
  48.     $game_system.form_top = $formation_max_height
  49.     $game_system.form_top = 220 if $formation_max_height == nil
  50.     # --Obtain the formation's width
  51.     $game_system.form_wd = $formation_max_width
  52.     $game_system.form_wd = 128 if $formation_max_width == nil
  53.     # --Obtain the height of the Battlestatus Window
  54.     $game_system.bstat_ht = $battlestatus_height
  55.     $game_system.bstat_ht = 160 if $battlestatus_height == nil
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # * Update
  59.   #--------------------------------------------------------------------------
  60.   alias mnk_update update
  61.   def update
  62.  
  63.     # Only perform sprite edit for valid battlers
  64.     return unless @battler
  65.     if @battler.battler_name != @battler_name
  66.       @started = false
  67.     end    
  68.  
  69.     # Regular Update
  70.     mnk_update
  71.  
  72.     # Set Translucency  
  73.     if @battler.is_a?(Game_Enemy)
  74.       battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
  75.     else
  76.       battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
  77.     end
  78.     # Reset hash for Advanced Pose/Frames
  79.     pose_temp = {}
  80.    
  81.     # Start Routine (Performed at startup for each battler)
  82.     unless @started
  83.       # Set the pose based on battler's state
  84.       @pose = state
  85.       # Turn off Casting pose
  86.       @battler.casted  = false
  87.       @battler.casting = false
  88.       # Configure Enemy Spritesheet
  89.       if @battler.is_a?(Game_Enemy)
  90.         # Use spritesheet unless specified
  91.         unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(@battler.id)
  92.           @width  = @width  / cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES)
  93.           @height = @height / cell_divider(MNK_POSES_ENEMY,   MNK_POSES)
  94.         end
  95.       # Or Configure Actor Spritesheet
  96.       else  
  97.         # Use spritesheet unless specified
  98.         unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(@battler.id)
  99.           @width  = @width  / cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES)
  100.           @height = @height / cell_divider(MNK_POSES_ACTOR,   MNK_POSES)
  101.         end
  102.       end
  103.       # Distance the battlers
  104.       @battler_offset = @width * 0.75
  105.       # Obtain battler position (simulating 3-Dness)
  106.       @display_x = @battler.screen_x
  107.       @display_y = @battler.screen_y
  108.       @display_z = @battler.screen_z
  109.       @destination_x = @display_x
  110.       @destination_y = @display_y
  111.       @destination_z = @display_z
  112.       # Opacity fadein feature
  113.       self.opacity = 0 if MNK_FADE_IN
  114.       # Make invisible if dead at battle start
  115.       self.visible = false if @battler.dead?
  116.       # Set the started flag
  117.       @started = true
  118.     # End of Start Routine (for each battler)  
  119.     end
  120.    
  121.     # Again, ensure a pose is set
  122.     @pose = state if @pose == nil
  123.  
  124.     # Obtain animation cell/frame from Enemy
  125.     if @battler.is_a?(Game_Enemy)
  126.       # Use spritesheet cell unless specified
  127.       unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(@battler.id)
  128.         cell_obtain
  129.       else
  130.         self.src_rect.set(0, 0, @width, @height)
  131.       end
  132.     # Or get it from an actor  
  133.     else
  134.       # Use spritesheet cell unless specified
  135.       unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(@battler.id)
  136.         cell_obtain
  137.       else
  138.         self.src_rect.set(0, 0, @width, @height)
  139.       end
  140.     end
  141.    
  142.     # Position Sprite
  143.     self.x = @display_x
  144.     self.y = @display_y
  145.     self.z = @display_z
  146.     self.ox = @width / 2
  147.     self.oy = @height
  148.    
  149.     #  Party Turned Around
  150.     #  $game_temp.advantage_set == 6
  151.    
  152.     # Adjust sprite direction if facing the other way...
  153.     if $game_system.sv_angle == 1
  154.       if @battler.is_a?(Game_Actor)
  155.         mirror_pose_unless(6)
  156.       else
  157.         if MNK_MIRROR_ENEMIES
  158.           mirror_pose_if(5)
  159.         else
  160.           mirror_pose_unless(5)
  161.         end
  162.       end
  163.     else
  164.       if @battler.is_a?(Game_Actor)
  165.         mirror_pose_if(6)
  166.       else
  167.         if MNK_MIRROR_ENEMIES
  168.           mirror_pose_unless(5)
  169.         else
  170.           mirror_pose_if(5)
  171.         end
  172.       end
  173.     end
  174.    
  175.     # Setup Frames per Pose
  176.     poseframe = MNK_FRAMES_STANDARD
  177.     if @battler.is_a?(Game_Actor)
  178.       poseframe = cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) != nil
  179.     else
  180.       poseframe = cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) != nil
  181.     end
  182.     pose_chk = 0
  183.     pose_chk = @pose+1 if @pose != nil
  184.     poseframe = MNK_FRAMES_PER_POSE[pose_chk] if MNK_FRAMES_PER_POSE.include?(pose_chk)
  185.     # Set Advanced Poses for Actors
  186.     if @battler.is_a?(Game_Actor)
  187.       pose_temp = MNK_POSES_FR_ACTOR[@battler.id] if MNK_POSES_FR_ACTOR.include?(@battler.id)
  188.       poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
  189.     end    
  190.     # Set Advanced Poses for Enemies
  191.     if @battler.is_a?(Game_Enemy)
  192.       pose_temp = MNK_POSES_FR_ENEMY[@battler.id] if MNK_POSES_FR_ENEMY.include?(@battler.id)
  193.       poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
  194.     end
  195.    
  196.     # Make visible if returned to life
  197.     unless @battler.dead?
  198.       self.visible = true if @pose == pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
  199.       @freeze = false unless $game_system.victory
  200.     end
  201.  
  202.     # Setup Animation
  203.     time = Graphics.frame_count / (Graphics.frame_rate / MNK_SPEED)
  204.     if @last_time < time
  205.       @frame = (@frame + 1) % poseframe
  206.       if @frame == 0
  207.         if @freeze
  208.           @frame = poseframe - 1
  209.           return
  210.         end
  211.         @pose = state
  212.       end
  213.     end
  214.     @last_time = time
  215.    
  216.     # Setup Dying Animation
  217.     if @battler.dead?
  218.       if @dying == true
  219.         @pose = state
  220.         @dying = false
  221.       end
  222.     # Otherwise, all non-dead actions...  
  223.     else
  224.       # Setup/Ready for Battle (Let's get ready to RUMBLE!)
  225.       if @s_pose == false
  226.         tmp_pose = pose_obtain(MNK_POSES_SETUP, MNK_POSES_SETUP_A, MNK_POSES_SETUP_E)
  227.         if tmp_pose != nil
  228.           @pose = tmp_pose
  229.           @s_pose = true            
  230.         end
  231.       end
  232.       # If Victory pose (Who's your daddy?)
  233.       if @battler.is_a?(Game_Actor)
  234.         if $game_system.victory == true
  235.           if @winning == true
  236.             @pose = state
  237.             @winning = false
  238.           end
  239.         end
  240.       end
  241.     end
  242.    
  243.     # Move It
  244.     move if moving
  245.   end
  246.  
  247.   #--------------------------------------------------------------------------
  248.   # * Current State
  249.   #--------------------------------------------------------------------------
  250.   def state
  251.     # Reset Statusd Flag    
  252.     @statusd = false
  253.    
  254.     # Set Translucency if not dead
  255.     unless @battler.dead?
  256.       if @battler.is_a?(Game_Actor)
  257.         battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
  258.       else
  259.         battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
  260.       end
  261.     end
  262.    
  263.     # Damage State
  264.     if [nil,{}].include?(@battler.damage)
  265.       # Battler Fine
  266.       state = pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
  267.       # Battler Wounded
  268.       temp_woozy = MNK_LOW_HP_PERCENTAGE
  269.       if @battler.is_a?(Game_Actor)
  270.         temp_woozy = MNK_LOW_HP_ACTOR[@battler.id] if MNK_LOW_HP_ACTOR[@battler.id] != nil
  271.       end
  272.       if @battler.is_a?(Game_Enemy)
  273.         temp_woozy = MNK_LOW_HP_ENEMY[@battler.id] if MNK_LOW_HP_ENEMY[@battler.id] != nil
  274.       end
  275.       # If Set to Flat Rate
  276.       if MNK_LOW_HP_FLAT
  277.         if @battler.hp < temp_woozy
  278.           state = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3)
  279.           @statusd = true
  280.         end
  281.       # Otherwise, use percentage of battler's health
  282.       else
  283.         if @battler.hp < @battler.maxhp * temp_woozy
  284.           state = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3)
  285.           @statusd = true
  286.         end
  287.       end
  288.       # Battler Status-Effect
  289.       for i in @battler.states
  290.         tmp_pose2 = pose_array_obtain(MNK_POSES_STATUS, MNK_POSES_STAT_A, MNK_POSES_STAT_E, i)
  291.         state = tmp_pose2 if tmp_pose2 != nil
  292.         @statusd = true if tmp_pose2 != nil
  293.       end
  294.       # If Battler Dead
  295.       if @battler.dead?
  296.         # If using default battlers or default collapse
  297.         if (DEFAULT_COLLAPSE_ACTOR and @battler.is_a?(Game_Actor)) or
  298.           (DEFAULT_COLLAPSE_ENEMY and @battler.is_a?(Game_Enemy)) or
  299.           (DEFAULT_ACTOR and @battler.is_a?(Game_Actor)) or
  300.           (DEFAULT_ENEMY and @battler.is_a?(Game_Enemy)) or
  301.           (DEFAULT_ENEMY_ID.include?(@battler.id) and @battler.is_a?(Game_Enemy)) or
  302.           (DEFAULT_ACTOR_ID.include?(@battler.id) and @battler.is_a?(Game_Actor))
  303.           # Do absolutely nothing :)
  304.         else
  305.           # Dying Animation pose
  306.           if @dying == true
  307.             tmp_pose = pose_obtain(MNK_POSES_DYING, MNK_POSES_DYING_a, MNK_POSES_DYING_E)
  308.             if tmp_pose != nil
  309.               state = tmp_pose
  310.             else
  311.               state = dying_pose
  312.             end  
  313.           else
  314.             state = dying_pose
  315.           end
  316.          
  317.           # Fix Opacity
  318.           if @battler.is_a?(Game_Enemy)
  319.             if MNK_TRANSLUCENT_ENEMY.include?(@battler.id)
  320.               set_translucency(@battler, MNK_TRANSLUCENCY)
  321.             else
  322.               set_translucency(@battler, 255)
  323.             end
  324.           else
  325.             if MNK_TRANSLUCENT_ACTOR.include?(@battler.id)
  326.               set_translucency(@battler, MNK_TRANSLUCENCY)
  327.             else
  328.               set_translucency(@battler, 255)
  329.             end
  330.           end
  331.         end
  332.       end
  333.     end
  334.    
  335.     # Casting State
  336.     if @battler.casted
  337.       state = casting_pose if $game_system.mnk_det_para_spell and @battler.spelling?
  338.       state = casting_pose if $game_system.mnk_det_sd_casting and @battler.sd_casting
  339.       state = casting_pose if $game_system.mnk_det_rtab_systm and @battler.rtp != 0
  340.     end
  341.    
  342.     # Victory State
  343.     if @battler.is_a?(Game_Actor)
  344.       if $game_system.victory
  345.         if not @battler.dead?
  346.           if @winning == true
  347.             # A Pre-Winning Pose display
  348.             if MNK_POSES_WINNING != nil
  349.               tmp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
  350.               state = tmp_pose if tmp_pose != nil
  351.             end
  352.           else
  353.             # Final Pose
  354.             state = victory_pose
  355.           end
  356.         else
  357.           # Final Pose
  358.           state = victory_pose
  359.         end        
  360.       end
  361.     # Perform check for Enemies  
  362.     else
  363.       if $game_system.defeat
  364.         if not @battler.dead?
  365.           if @winning == true
  366.             if MNK_POSES_WINNING != nil
  367.               tmp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
  368.               state = tmp_pose if tmp_pose != nil
  369.             end
  370.           else
  371.             # Final Pose
  372.             state = victory_pose
  373.           end
  374.         else
  375.           # Final Pose
  376.           state = victory_pose
  377.         end        
  378.       end
  379.     end
  380.    
  381.     # Guarding State (not if dead OR in victory)
  382.     if not @battler.dead?
  383.       if not $game_system.victory
  384.         if @statusd == false
  385.           state = pose_obtain(MNK_POSE4, MNK_APOSE4, MNK_EPOSE4) if @battler.guarding?
  386.         end
  387.       end
  388.     end
  389.     # Moving State
  390.     if moving
  391.     # Adjust sprite direction if facing the other way...
  392.       if $game_system.sv_angle == 1
  393.         # If enemy battler moving
  394.         if @battler.is_a?(Game_Enemy)
  395.           # Battler Moving Left
  396.           state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
  397.           # Battler Moving Right
  398.           state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
  399.         # Else actor battler moving
  400.         else
  401.           # Battler Moving Left
  402.           state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
  403.           # Battler Moving Right
  404.           state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
  405.         end
  406.       else      
  407.         # If enemy battler moving
  408.         if @battler.is_a?(Game_Enemy)
  409.           # Battler Moving Left
  410.           state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
  411.           # Battler Moving Right
  412.           state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
  413.         # Else actor battler moving
  414.         else
  415.           # Battler Moving Left
  416.           state = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
  417.           # Battler Moving Right
  418.           state = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
  419.         end
  420.       end
  421.     end
  422.     # Return State
  423.     return state
  424.   end
  425.  
  426.   #--------------------------------------------------------------------------
  427.   # * Move
  428.   #--------------------------------------------------------------------------
  429.   def move
  430.     time = Graphics.frame_count / (Graphics.frame_rate.to_f / (MNK_SPEED * 5))
  431.    
  432.     if @last_move_time < time
  433.       # Pause for Animation
  434.       return if @pose != state
  435.         # The standard 'full' opacity
  436.         opa = 255
  437.         if @battler.is_a?(Game_Enemy) and MNK_TRANSLUCENT_ENEMY.include?(@battler.id)
  438.           opa = MNK_TRANSLUCENCY
  439.         end
  440.         if @battler.is_a?(Game_Actor) and MNK_TRANSLUCENT_ACTOR.include?(@battler.id)
  441.           opa = MNK_TRANSLUCENCY
  442.         end
  443.  
  444.       # Phasing
  445.       self.opacity = phasing(opa)   if MNK_PHASING
  446.       if @battler.is_a?(Game_Actor)
  447.         self.opacity = phasing(opa) if MNK_PHASING_ACTOR.include?(@battler.id)
  448.       else      
  449.         self.opacity = phasing(opa) if MNK_PHASING_ENEMY.include?(@battler.id)
  450.       end
  451.      
  452.       # Calculate Difference
  453.       difference_x = (@display_x - @destination_x).abs
  454.       difference_y = (@display_y - @destination_y).abs
  455.       difference_z = (@display_z - @destination_z).abs  
  456.       # Done? Reset, Stop
  457.       if [difference_x, difference_y].max.between?(0, 8)
  458.         @display_x = @destination_x
  459.         @display_y = @destination_y
  460.         @display_z = @destination_z
  461.         @pose = state
  462.         return
  463.       end
  464.      
  465.       # Calculate Movement Increments
  466.       increment_x = increment_y = 1
  467.       if difference_x < difference_y
  468.         increment_x = 1.0 / (difference_y.to_f / difference_x)
  469.       elsif difference_y < difference_x
  470.         increment_y = 1.0 / (difference_x.to_f / difference_y)
  471.       end
  472.       increment_z = increment_y
  473.  
  474.       # Calculate Movement Speed
  475.       if MNK_CALC_SPEED
  476.         total = 0; $game_party.actors.each{ |actor| total += actor.agi }
  477.         speed = @battler.agi.to_f / (total / $game_party.actors.size)
  478.         increment_x *= speed
  479.         increment_y *= speed
  480.         increment_z *= speed
  481.       end
  482.      
  483.       # Multiply and Move
  484.       multiplier_x = MNK_RUSH_SPEED * (@destination_x - @display_x > 0 ? 8 : -8)
  485.       multiplier_y = MNK_RUSH_SPEED * (@destination_y - @display_y > 0 ? 8 : -8)
  486.       multiplier_z = MNK_RUSH_SPEED * (@destination_z - @display_z > 0 ? 8 : -8)      
  487.       @display_x += (increment_x * multiplier_x).to_i
  488.       @display_y += (increment_y * multiplier_y).to_i
  489.       @display_z += (increment_z * multiplier_z).to_i
  490.      
  491.     end
  492.     @last_move_time = time
  493.   end
  494.  
  495.   #--------------------------------------------------------------------------
  496.   # * Set Movement
  497.   #--------------------------------------------------------------------------
  498.   def setmove(destination_x, destination_y, destination_z)
  499.     unless (@battler.is_a?(Game_Enemy) and MNK_STATIONARY_ENEMIES) or
  500.            (@battler.is_a?(Game_Actor) and MNK_STATIONARY_ACTORS)
  501.       unless MNK_STATIONARY_WEAPONS.include?(@battler.weapon_id) or
  502.              MNK_STATIONARY_SKILLS.include?(@skill_used) or
  503.              MNK_STATIONARY_ITEMS.include?(@item_used)
  504.         @original_x = @display_x
  505.         @original_y = @display_y
  506.         @original_z = @display_z          
  507.         @destination_x = destination_x
  508.         @destination_y = destination_y
  509.         @destination_z = destination_z
  510.       end
  511.     end
  512.   end
  513.  
  514.   #--------------------------------------------------------------------------
  515.   # * Movement Check
  516.   #--------------------------------------------------------------------------
  517.   def moving
  518.     if (@display_x != @destination_x and @display_y != @destination_y and [email protected]?)
  519.       return (@display_x > @destination_x ? 0 : 1)
  520.     end
  521.   end
  522.  
  523.   #--------------------------------------------------------------------------
  524.   # * Set Pose
  525.   #--------------------------------------------------------------------------
  526.   def pose=(pose)
  527.     @pose = pose
  528.     @frame = 0
  529.   end
  530.  
  531.   #--------------------------------------------------------------------------
  532.   # * Freeze
  533.   #--------------------------------------------------------------------------
  534.   def freeze
  535.     @freeze = true
  536.   end
  537.  
  538.   #--------------------------------------------------------------------------
  539.   # * Fallen Pose
  540.   #--------------------------------------------------------------------------
  541.   if @derv_anim_bat_stack.nil?
  542.     @derv_anim_bat_stack = true
  543.     alias mnk_collapse collapse
  544.     def collapse
  545.       if @battler.is_a?(Game_Actor)
  546.         mnk_collapse if DEFAULT_ACTOR
  547.         mnk_collapse if DEFAULT_COLLAPSE_ACTOR
  548.         if DEFAULT_ACTOR_ID != nil
  549.           mnk_collapse if DEFAULT_ACTOR_ID.include?(@battler.id)
  550.         end
  551.       else
  552.         mnk_collapse if DEFAULT_ENEMY
  553.         mnk_collapse if DEFAULT_COLLAPSE_ENEMY
  554.         if DEFAULT_ENEMY_ID != nil
  555.           mnk_collapse if DEFAULT_ENEMY_ID.include?(@battler.id)
  556.         end
  557.       end
  558.     end
  559.   end
  560.  
  561.   #--------------------------------------------------------------------------
  562.   # * Phasing / Vanishing
  563.   #--------------------------------------------------------------------------
  564.   def phasing(opa)
  565.     d1 = (@display_x - @original_x).abs
  566.     d2 = (@display_y - @original_y).abs
  567.     d3 = (@display_x - @destination_x).abs
  568.     d4 = (@display_y - @destination_y).abs
  569.     return [opa - ([d1 + d2, d3 + d4].min * 1.75).to_i, 0].max
  570.   end
  571.  
  572.   #--------------------------------------------------------------------------
  573.   # * Mirror Pose If...
  574.   #--------------------------------------------------------------------------
  575.   def mirror_pose_if(adv_value)
  576.     if $game_temp.advantage_set == adv_value
  577.       self.mirror = true
  578.     else
  579.       self.mirror = false
  580.     end
  581.   end
  582.  
  583.   #--------------------------------------------------------------------------
  584.   # * Mirror Pose Unless...
  585.   #--------------------------------------------------------------------------
  586.   def mirror_pose_unless(adv_value)
  587.     unless $game_temp.advantage_set == adv_value
  588.       self.mirror = true
  589.     else
  590.       self.mirror = false
  591.     end
  592.   end
  593.  
  594.   #--------------------------------------------------------------------------
  595.   # * Casting Pose
  596.   #--------------------------------------------------------------------------
  597.   def casting_pose
  598.     tmp_pose = pose_obtain(MNK_POSES_CASTPREP, MNK_POSES_CASTPREP_A, MNK_POSES_CASTPREP_E)
  599.     tmp_pose2 = pose_array_obtain(MNK_POSES_CASTED, MNK_POSES_CASTED_A, MNK_POSES_CASTED_E, @battler.skill_casted)
  600.     tmp_pose = tmp_pose2 if tmp_pose2 != nil
  601.     state = tmp_pose if tmp_pose != nil
  602.     return state
  603.   end
  604.  
  605.   #--------------------------------------------------------------------------
  606.   # * Final Victory Pose
  607.   #--------------------------------------------------------------------------
  608.   def victory_pose
  609.     tmp_pose = MNK_POSE10-1
  610.     tmp_pose = MNK_APOSE10[@battler.id]-1 if MNK_APOSE10[@battler.id] != nil
  611.     if not MNK_LOOPS_WINNING.include?(@battler.id)
  612.       @freeze = true
  613.     end
  614.     return tmp_pose
  615.   end
  616.   #--------------------------------------------------------------------------
  617.   # * Final Victory Pose
  618.   #--------------------------------------------------------------------------
  619.   def dying_pose
  620.     state = pose_obtain(MNK_POSE11, MNK_APOSE11, MNK_EPOSE11)
  621.     if @battler.is_a?(Game_Actor)
  622.       @freeze = true if not MNK_LOOPS_DEFEATED_ACTOR.include?(@battler.id)
  623.     else
  624.       @freeze = true if not MNK_LOOPS_DEFEATED_ENEMY.include?(@battler.id)
  625.     end
  626.     return state
  627.   end  
  628.  
  629.   #--------------------------------------------------------------------------
  630.   # * Battler Translucency
  631.   #     battler            : actor or enemy battler
  632.   #     battler_trans      : translucency array for battler
  633.   #--------------------------------------------------------------------------
  634.   def battler_translucency(battler, battler_trans)
  635.     tcheck = {}
  636.     tcheck = battler_trans
  637.     set_translucency(battler, MNK_TRANSLUCENCY) if tcheck.include?(battler.id)
  638.   end
  639.  
  640.   #--------------------------------------------------------------------------
  641.   # * Set Translucency
  642.   #     battler            : actor or enemy battler
  643.   #     trans_level        : translucency level
  644.   #--------------------------------------------------------------------------
  645.   def set_translucency(battler, trans_level)
  646.     if battler.hidden
  647.       self.opacity  = 0
  648.     else
  649.       self.opacity  = MNK_TRANSLUCENCY
  650.     end
  651.   end
  652.    
  653.   #--------------------------------------------------------------------------
  654.   # * Cell Divider
  655.   #     divider_check      : array to divide cells by custom actor or enemy
  656.   #     divider_standard   : standard number to divide by
  657.   #--------------------------------------------------------------------------
  658.   def cell_divider(divider_check, divider_standard)
  659.     dcheck = {}
  660.     divided_cell = divider_standard
  661.     dcheck = divider_check
  662.     if dcheck != nil
  663.       if dcheck.include?(@battler.id)
  664.         divided_cell = dcheck[@battler.id] if dcheck[@battler.id] != nil
  665.       end
  666.     end
  667.     return divided_cell        
  668.   end
  669.  
  670.   #--------------------------------------------------------------------------
  671.   # * Obtain Individual Cell
  672.   #--------------------------------------------------------------------------
  673.   def cell_obtain
  674.     # Only permit for valid poses & frames
  675.     if @pose != nil
  676.       if @frame != nil
  677.         self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
  678.       end
  679.     end
  680.   end
  681.  
  682.   #--------------------------------------------------------------------------
  683.   # * Obtain Pose
  684.   #     pose_base   : default pose to return
  685.   #     pose_actor  : list of poses for actors
  686.   #     pose_enemy  : list of poses for enemies
  687.   #--------------------------------------------------------------------------
  688.   def pose_obtain(pose_base, pose_actor, pose_enemy)
  689.     # create Arrays
  690.     pos_a = {}
  691.     pos_e = {}
  692.     # fill created Arrays & Set pose
  693.     pos_a = pose_actor
  694.     pos_e = pose_enemy
  695.     pose_now = pose_base
  696.     # Obtain pose if not a standard pose
  697.     if @battler.is_a?(Game_Actor)
  698.       pose_now = pos_a[@battler.id] if pos_a[@battler.id] != nil
  699.     else
  700.       pose_now = pos_e[@battler.id] if pos_e[@battler.id] != nil
  701.     end
  702.     # Return the final pose (minus 1 for neceties)
  703.     pose_now -= 1 if pose_now != nil
  704.     return pose_now
  705.   end
  706.  
  707.   #--------------------------------------------------------------------------
  708.   # * Obtain Pose from hashes
  709.   #     hash_base   : hash with default poses
  710.   #     hash_actor  : advanced list of poses for actors
  711.   #     hash_enemy  : advanced list of poses for enemies
  712.   #     condition   : value determining where to get the final pose
  713.   #--------------------------------------------------------------------------
  714.   def pose_array_obtain(hash_base, hash_actor, hash_enemy, condition)
  715.     # create Arrays
  716.     hash_b    = {}
  717.     hash_a    = {}
  718.     hash_e    = {}
  719.     pose_temp = {}
  720.     # fill created Arrays & Set pose
  721.     hash_b = hash_base
  722.     hash_a = hash_actor
  723.     hash_e = hash_enemy
  724.     # Setup the temp Array
  725.     if @battler.is_a?(Game_Actor)
  726.       pose_temp = hash_a[@battler.id] if hash_a.include?(@battler.id)
  727.     else
  728.       pose_temp = hash_e[@battler.id] if hash_e.include?(@battler.id)
  729.     end
  730.     # Obtain the base pose based on condition (or nil)
  731.     pose_now = hash_b[condition] if hash_b.include?(condition)
  732.     # Obtain the optional actor/enemy pose based on condition (unless nil)
  733.     pose_now = pose_temp[condition] if pose_temp.include?(condition)
  734.     # Return the final pose (minus 1 for neceties)
  735.     pose_now -= 1 if pose_now != nil
  736.     return pose_now
  737.   end
  738.  end
  739.  
Expand to see the code.


Part III:
  1. #==============================================================================
  2. # ** Animated Battlers - Enhanced   ver. 10.7                      (06-17-2008)
  3. #
  4. #------------------------------------------------------------------------------
  5. #  * (3) Battle System:  The Scene Battle class
  6. #==============================================================================    
  7.  
  8. #==============================================================================
  9. # ** Scene_Battle
  10. #------------------------------------------------------------------------------
  11. #  This class performs battle screen processing.
  12. #==============================================================================
  13.  
  14. class Scene_Battle
  15.   #--------------------------------------------------------------------------
  16.   # * Main Processing
  17.   #--------------------------------------------------------------------------
  18.   alias mnkmain main
  19.   def main
  20.     # Initialize wait count
  21.     @delay_count = 0
  22.     # Obtain the formation style
  23.     # Only once per battle start
  24.     $game_system.formation = $formation_style
  25.     $game_system.formation = 0 if $formation_style == nil
  26.     # if Formation is random
  27.     if $game_system.formation == 8 then
  28.       $game_system.formation = rand(8).to_i
  29.     end
  30.     # Perform the original call
  31.     mnkmain
  32.   end
  33.  
  34.   #--------------------------------------------------------------------------
  35.   # * Frame Update (main phase)
  36.   #--------------------------------------------------------------------------
  37.   alias mnk_anim_sp3 start_phase3
  38.   def start_phase3
  39.     # Remove flag after set number of turns
  40.     if $game_temp.battle_turn >= MNK_ADV_OFF_TURN
  41.       # Turn sideview advantage mirror flag off
  42.       $game_temp.advantage_set = 0
  43.     end
  44.     # Perform the original call
  45.     mnk_anim_sp3
  46.   end
  47.  
  48.   #--------------------------------------------------------------------------
  49.   # * Frame Update (main phase step 1 : action preparation)
  50.   #--------------------------------------------------------------------------
  51.   alias mkf_up4s1 update_phase4_step1
  52.   def update_phase4_step1(battler = @active_battler)
  53.     if $game_system.mnk_det_rtab_systm == true
  54.       mkf_up4s1(battler)
  55.     else
  56.       mkf_up4s1
  57.     end
  58.     if battler != nil
  59.       if $game_system.mnk_det_sd_casting == true
  60.         if battler.sd_casting
  61.           battler.casted = true
  62.         end
  63.       end
  64.     end
  65.   end
  66.  
  67.   #--------------------------------------------------------------------------
  68.   # *  End Skill Selection
  69.   #--------------------------------------------------------------------------  
  70.   alias mkf_endss end_skill_select
  71.   def end_skill_select
  72.     mkf_endss
  73.     if $game_system.mnk_det_rtab_systm
  74.       @active_actor.skill_casted = @skill.id
  75.     else
  76.       @active_battler.skill_casted = @skill.id
  77.     end
  78.   end
  79.  
  80.   #--------------------------------------------------------------------------
  81.   # * Make Skill Action Results (alias used to determine skill used)
  82.   #--------------------------------------------------------------------------
  83.   alias make_skill_action_result_anim make_skill_action_result
  84.   def make_skill_action_result(battler = @active_battler, plus_id = 0)
  85.     @rtab = !@target_battlers
  86.     if $game_system.mnk_det_rtab_attck
  87.       make_skill_action_result_anim(battler, plus_id)
  88.     else
  89.       @rtab ? make_skill_action_result_anim(battler) : make_skill_action_result_anim
  90.     end
  91.     @skill_used = @skill.id
  92.     battler.strike_skill   = @skill.id
  93.     if $game_system.mnk_det_para_spell == true
  94.       #if battler.spelling?
  95.         battler.casted = true
  96.       #end
  97.     end      
  98.     for target in (@rtab ? battler.target : @target_battlers)
  99.       target.struck_skill = @skill.id
  100.     end
  101.   end
  102.  
  103.   #--------------------------------------------------------------------------
  104.   # * Make Item Action Results (alias used to determine item used)
  105.   #--------------------------------------------------------------------------
  106.   alias make_item_action_result_anim make_item_action_result
  107.   def make_item_action_result(battler = @active_battler)
  108.     @rtab = !@target_battlers
  109.     @rtab ? make_item_action_result_anim(battler) : make_item_action_result_anim
  110.     @item_used = @item.id
  111.     @item_usage = @item.scope
  112.     battler.strike_item = @item.id
  113.     for target in (@rtab ? battler.target : @target_battlers)
  114.       target.struck_item = @item.id
  115.     end
  116.   end
  117.  
  118.   #--------------------------------------------------------------------------
  119.   # * Frame Update (main phase step 1 : action preparation) (Casting Routine)
  120.   #--------------------------------------------------------------------------
  121.   alias update_phase4_step1_anim update_phase4_step1
  122.   def update_phase4_step1(battler = @active_battler)
  123.     @rtab = !@target_battlers
  124.     if $game_system.mnk_det_rtab_systm == true
  125.       update_phase4_step1_anim(battler)
  126.       if battler.current_action.kind == 1 and
  127.         (not battler.current_action.forcing or @force != 2)
  128.         if battler.rtp != 0    
  129.           battler.casted = true
  130.         end
  131.       end
  132.     else
  133.       update_phase4_step1_anim
  134.     end
  135.   end
  136.  
  137.   #--------------------------------------------------------------------------
  138.   # * Action Animation, Movement
  139.   #--------------------------------------------------------------------------
  140.   alias mnk_update_phase4_step3 update_phase4_step3
  141.   def update_phase4_step3(battler = @active_battler)
  142.     @rtab = !@target_battlers
  143.     target = (@rtab ? battler.target : @target_battlers)[0]
  144.     # Battle Delay System
  145.     if MNK_AT_DELAY    
  146.       # Fomar's Action Cost Detection
  147.       if $game_system.mnk_det_acb_detect
  148.         for actor in $game_party.actors
  149.           actor.vitality= 0
  150.         end
  151.         for enemy in $game_troop.enemies
  152.           enemy.vitality= 0
  153.         end
  154.       end
  155.       # Trickster's AT Detection
  156.       if $game_system.mnk_det_abs_detect
  157.         for actor in $game_party.actors
  158.           actor.at_bonus= [0,0]
  159.         end
  160.         for enemy in $game_troop.enemies
  161.           enemy.at_bonus= [0,0]
  162.         end
  163.       end
  164.       # Cogwheel RTAB Detection
  165.       if $game_system.mnk_det_rtab_systm
  166.         @rtab_wait_flag = true
  167.       end
  168.     end
  169.  
  170.     # If enemy is a default battler
  171.     if battler.is_a?(Game_Enemy)
  172.       if DEFAULT_ENEMY
  173.         if @rtab then battler.white_flash = true end
  174.         if @rtab then battler.wait = 10 end
  175.       end
  176.       if DEFAULT_ENEMY_ID != nil
  177.         if DEFAULT_ENEMY_ID.include?(battler.id)
  178.           if @rtab then battler.white_flash = true end
  179.           if @rtab then battler.wait = 10 end
  180.         end
  181.       end        
  182.     end
  183.     # If actor is a default battler
  184.     if battler.is_a?(Game_Actor)
  185.       if DEFAULT_ACTOR
  186.         if @rtab then battler.white_flash = true end
  187.         if @rtab then battler.wait = 10 end
  188.       end
  189.       if DEFAULT_ACTOR_ID != nil
  190.         if DEFAULT_ACTOR_ID.include?(battler.id)
  191.           if @rtab then battler.white_flash = true end
  192.           if @rtab then battler.wait = 10 end
  193.         end
  194.       end                
  195.     end
  196.     # Reset the 'Do Nothing' flag
  197.     dn_flag = false
  198.     # Set values and poses based on Action
  199.     case battler.current_action.kind
  200.     when 0  # Attack
  201.       # if Do Nothing, just return
  202.       if battler.current_action.basic == 3
  203.         dn_flag = true
  204.       end
  205.       if dn_flag != true
  206.         rush_type = MNK_STEP_ATTACK
  207.         full_moving = true ; if rush_type; full_moving = false; end
  208.         if MNK_MOVE2CENTER_ATK.include?(battler.weapon_id); center_move=true ; end
  209.         if MNK_STATIONARY_ENEMY_IDS.include?(battler.id) and battler.is_a?(Game_Enemy)
  210.           full_moving = false
  211.           center_move = false
  212.           rush_type = false
  213.         end
  214.         base_pose = pose_obtain(battler, MNK_POSE7, MNK_APOSE7, MNK_EPOSE7)
  215.         base_pose2 = pose_array_obtain(battler, MNK_POSES_WEAPONS, MNK_POSES_WEAPS_A, MNK_POSES_WEAPS_E, battler.weapon_id)
  216.         base_pose = base_pose2 if base_pose2 != nil        
  217.         if battler.current_action.basic == 2
  218.           # If escaping, disable all movement
  219.           full_moving = false
  220.           center_move = false
  221.           rush_type = false    
  222.           # Set the graphics
  223.           temp_pose = pose_obtain(battler, MNK_POSES_ESCAPE, MNK_POSES_ESCAPE_A, MNK_POSES_ESCAPE_E)
  224.           base_pose = temp_pose if temp_pose != nil
  225.         end
  226.       end
  227.     when 1  # Skill
  228.       @spriteset.battler(battler).skill_used = @skill_used
  229.       rush_type = MNK_STEP_SKILL
  230.       if MNK_MOVING_SKILL.include?(@skill_used) ; full_moving = true ; end
  231.       if MNK_MOVE2CENTER_SKILL.include?(@skill_used) ; center_move = true ; end        
  232.       base_pose = pose_obtain(battler, MNK_POSE9, MNK_APOSE9, MNK_EPOSE9)
  233.       base_pose2 = pose_array_obtain(battler, MNK_POSES_SKILLS, MNK_POSES_SKILLS_A, MNK_POSES_SKILLS_E, @skill_used)
  234.       base_pose = base_pose2 if base_pose2 != nil
  235.     when 2  # Item
  236.       @spriteset.battler(battler).item_used = @item_used
  237.       rush_type = MNK_STEP_ITEM
  238.       if MNK_MOVING_ITEM.include?(@item_used) or @item_scope == 1..2 ; full_moving = true ; end
  239.       if MNK_MOVE2CENTER_ITEM.include?(@item_used); center_move = true; end
  240.       base_pose = pose_obtain(battler, MNK_POSE8, MNK_APOSE8, MNK_EPOSE8)
  241.       base_pose2 = pose_array_obtain(battler, MNK_POSES_ITEMS, MNK_POSES_ITEMS_A, MNK_POSES_ITEMS_E, @item_used)
  242.       base_pose = base_pose2 if base_pose2 != nil
  243.     end
  244.  
  245.     # Only perform action if 'Do Nothing' flag is off, ie... doing something...
  246.     if dn_flag != true
  247.       # Control Movement and use current pose
  248.       @moved = {} unless @moved
  249.       return if @spriteset.battler(battler).moving
  250.       if not (@moved[battler] or battler.guarding?)
  251.         offset = offset_value(target, battler)
  252.         if rush_type        # Steps forward
  253.           @spriteset.battler(battler).setmove(battler.screen_x - offset, battler.screen_y + 1, battler.screen_z)
  254.         end
  255.         if full_moving      # Runs to target
  256.           @spriteset.battler(battler).setmove(target.screen_x + offset, target.screen_y - 1, target.screen_z + 10)
  257.         end
  258.         if center_move      # Runs to center
  259.           @spriteset.battler(battler).setmove(320+(offset/4), battler.screen_y-1, battler.screen_z)
  260.         end
  261.         @moved[battler] = true
  262.         return
  263.         @spriteset.battler(battler).pose = base_pose
  264.       elsif not battler.guarding?
  265.         @spriteset.battler(battler).pose = base_pose
  266.         @spriteset.battler(battler).setmove(battler.screen_x, battler.screen_y, battler.screen_z)
  267.       end
  268.      
  269.       # Finish Up Skill and Item Use
  270.       case battler.current_action.kind
  271.       when 1
  272.         # Flag system that skill was used
  273.         battler.casted = false
  274.         battler.casting = false
  275.         @spriteset.battler(battler).skill_used = 0
  276.       when 2
  277.         # Flag system that item was used
  278.         @spriteset.battler(battler).item_used = 0
  279.       end
  280.      
  281.       # Battle_Charge value for BattleCry script
  282.       $battle_charge = true
  283.     end
  284.  
  285.     # Battle Delay System
  286.     if MNK_AT_DELAY    
  287.       # Fomar's Action Cost Detection
  288.       if $game_system.mnk_det_acb_detect
  289.         for actor in $game_party.actors
  290.           actor.vitality = 1
  291.         end
  292.         for enemy in $game_troop.enemies
  293.           enemy.vitality = 1
  294.         end
  295.       end
  296.       # Trickster's AT Detection
  297.       if $game_system.mnk_det_abs_detect
  298.         for actor in $game_party.actors
  299.           actor.at_bonus = [1,0]
  300.         end
  301.         for enemy in $game_troop.enemies
  302.           enemy.at_bonus = [1,0]
  303.         end
  304.       end
  305.       # Cogwheel RTAB Detection
  306.       if $game_system.mnk_det_rtab_systm
  307.         @rtab_wait_flag = false
  308.       end
  309.     end
  310.     # Prevent 'removed battler' moved state
  311.     unless @moved == nil
  312.       @moved[battler] = false
  313.     end
  314.     # Start attack, do not move from spot
  315.     battler.attacking = true
  316.     # Perform the original call
  317.     @rtab ? mnk_update_phase4_step3(battler) : mnk_update_phase4_step3
  318.   end
  319.   #--------------------------------------------------------------------------
  320.   # * Offset Calculation
  321.   #--------------------------------------------------------------------------
  322.   def offset_value(target, battler = @active_battler)
  323.     offst = @spriteset.battler(battler).battler_offset
  324.     offst += MNK_OFFSET
  325.     # Oversized or special Battler offsets
  326.     if target.is_a?(Game_Enemy) && battler.is_a?(Game_Actor)
  327.       unless MNK_OFFSET_ACTOR == nil
  328.         offst += MNK_OFFSET_ACTOR[battler.id] if MNK_OFFSET_ACTOR.include?(battler.id)
  329.       end
  330.       unless MNK_OFFSET_ENEMY == nil
  331.         offst += MNK_OFFSET_ENEMY[target.id] if MNK_OFFSET_ENEMY.include?(target.id)
  332.       end
  333.     end
  334.     if target.is_a?(Game_Actor) && battler.is_a?(Game_Enemy)
  335.       unless MNK_OFFSET_ENEMY == nil
  336.         offst += MNK_OFFSET_ENEMY[battler.id] if MNK_OFFSET_ENEMY.include?(battler.id)
  337.       end
  338.       unless MNK_OFFSET_ACTOR == nil
  339.         offst += MNK_OFFSET_ACTOR[target.id] if MNK_OFFSET_ACTOR.include?(target.id)
  340.       end
  341.     end
  342.     # Offset calc dependant on sideview
  343.     if $game_system.sv_angle == 1
  344.       offset = (battler.is_a?(Game_Actor) ? -(offst) : offst)
  345.     else
  346.       offset = (battler.is_a?(Game_Actor) ? offst : -(offst))
  347.     end
  348.     return offset
  349.   end
  350.   #--------------------------------------------------------------------------
  351.   # * Hit Animation
  352.   #--------------------------------------------------------------------------
  353.   alias mnk_update_phase4_step4 update_phase4_step4
  354.   def update_phase4_step4(battler = @active_battler)
  355.     # Cycle through the targets
  356.     for target in (@rtab ? battler.target : @target_battlers)
  357.       damage = (@rtab ? target.damage[battler] : target.damage)
  358.       critical = (@rtab ? target.critical[battler] : target.critical)
  359.       if damage.is_a?(Numeric) and damage > 0
  360.         base_pose = pose_obtain(target, MNK_POSE2, MNK_APOSE2, MNK_EPOSE2)
  361.         weapon_used = battler.weapon_id
  362.         weapon_used = 0 if weapon_used == nil
  363.         base_pose2 = pose_array_obtain(target, MNK_STRUCK_WEAPS, MNK_STRUCK_WEAPS_A, MNK_STRUCK_WEAPS_E, weapon_used)
  364.         base_pose = base_pose2 if base_pose2 != nil
  365.         if battler.strike_skill != 0
  366.           if battler.strike_skill == target.struck_skill
  367.             base_pose2 = pose_array_obtain(target, MNK_STRUCK_SKILLS, MNK_STRUCK_SKILLS_A, MNK_STRUCK_SKILLS_E, target.struck_skill)
  368.             base_pose = base_pose2 if base_pose2 != nil
  369.           end
  370.         end
  371.         if battler.strike_item != 0
  372.           if battler.strike_item == target.struck_item
  373.             base_pose2 = pose_array_obtain(target, MNK_STRUCK_ITEMS, MNK_STRUCK_ITEMS_A, MNK_STRUCK_ITEMS_E, target.struck_item)
  374.             base_pose = base_pose2 if base_pose2 != nil
  375.           end
  376.         end
  377.         @spriteset.battler(target).pose = base_pose
  378.         if critical == true
  379.           temp_pose = pose_obtain(target, MNK_POSES_CRITICAL, MNK_POSES_CRIT_A, MNK_POSES_CRIT_E)
  380.           weapon_used = battler.weapon_id
  381.           weapon_used = 0 if weapon_used == nil
  382.           base_pose2 = pose_array_obtain(target, MNK_CRIT_WEAPS, MNK_CRIT_WEAPS_A, MNK_CRIT_WEAPS_E, weapon_used)
  383.           base_pose = base_pose2 if base_pose2 != nil
  384.           if @skill_used != 0
  385.             if @skill_used == target.struck_skill
  386.               base_pose2 = pose_array_obtain(target, MNK_CRIT_SKILLS, MNK_CRIT_SKILLS_A, MNK_CRIT_SKILLS_E, target.struck_skill)
  387.               base_pose = base_pose2 if base_pose2 != nil
  388.             end
  389.           end
  390.           if @item_used != 0
  391.             if @item_used == target.struck_item
  392.               base_pose2 = pose_array_obtain(target, MNK_CRIT_ITEMS, MNK_CRIT_ITEMS_A, MNK_CRIT_ITEMS_E, target.struck_item)
  393.               base_pose = base_pose2 if base_pose2 != nil
  394.             end
  395.           end
  396.           @spriteset.battler(target).pose = temp_pose if temp_pose != nil
  397.         end
  398.       end
  399.     end
  400.     # Reset/zero out the battler's skill & item
  401.     battler.strike_skill  = 0
  402.     battler.strike_item   = 0
  403.     # Perform the original call
  404.     @rtab ? mnk_update_phase4_step4(battler) : mnk_update_phase4_step4
  405.     # Finish attack n battle animation, free to move
  406.     battler.attacking = false
  407.   end
  408.  
  409.   #--------------------------------------------------------------------------
  410.   # * Victory Animation
  411.   #--------------------------------------------------------------------------
  412.   alias mnk_start_phase5 start_phase5
  413.   def start_phase5
  414.     for actor in $game_party.actors
  415.       return if @spriteset.battler(actor).moving
  416.     end
  417.     # See if an actor remains alive
  418.     for actor in $game_party.actors
  419.       unless actor.dead?
  420.         $game_system.victory = true
  421.       end
  422.     end
  423.     # See if an enemy remains alive
  424.     for enemy in $game_troop.enemies.reverse
  425.       unless enemy.dead?
  426.         $game_system.defeat = true
  427.       end
  428.     end    
  429.     # Perform the original call    
  430.     mnk_start_phase5
  431.   end
  432.   #--------------------------------------------------------------------------
  433.   # * Change Arrow Viewport
  434.   #--------------------------------------------------------------------------
  435.   alias mnk_start_enemy_select start_enemy_select
  436.   def start_enemy_select
  437.     # Perform the original call
  438.     mnk_start_enemy_select
  439.     # Arrow manipulation
  440.     @enemy_arrow.dispose
  441.     @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
  442.     @enemy_arrow.help_window = @help_window
  443.   end
  444.   #--------------------------------------------------------------------------
  445.   # * Obtain Pose (Scene Battle version)
  446.   #     battler     : battler performing attack
  447.   #     pose_base   : default pose to return
  448.   #     pose_actor  : list of poses for actors
  449.   #     pose_enemy  : list of poses for enemies
  450.   #--------------------------------------------------------------------------
  451.   def pose_obtain(battler, pose_base, pose_actor, pose_enemy)
  452.     # create Arrays
  453.     pos_a = {}
  454.     pos_e = {}
  455.     # fill created Arrays & Set pose
  456.     pos_a = pose_actor
  457.     pos_e = pose_enemy
  458.     pose_now = pose_base
  459.     # Obtain pose if not a standard pose
  460.     if battler.is_a?(Game_Actor)
  461.       pose_now = pos_a[battler.id] if pos_a[battler.id] != nil
  462.     else
  463.       pose_now = pos_e[battler.id] if pos_e[battler.id] != nil
  464.     end
  465.     # Return the final pose (minus 1 for niceties)
  466.     pose_now -= 1 if pose_now != nil
  467.     return pose_now
  468.   end
  469.  
  470.   #--------------------------------------------------------------------------
  471.   # * Obtain Pose from hashes (Scene Battle version)
  472.   #     battler     : battler performing attack
  473.   #     hash_base   : hash with default poses
  474.   #     hash_actor  : advanced list of poses for actors
  475.   #     hash_enemy  : advanced list of poses for enemies
  476.   #     condition   : value determining where to get the final pose
  477.   #--------------------------------------------------------------------------
  478.   def pose_array_obtain(battler, hash_base, hash_actor, hash_enemy, condition)
  479.     # create Arrays
  480.     # create Arrays
  481.     hash_b    = {}
  482.     hash_a    = {}
  483.     hash_e    = {}
  484.     pose_temp = {}
  485.     # fill created Arrays & Set pose
  486.     hash_b = hash_base
  487.     hash_a = hash_actor
  488.     hash_e = hash_enemy
  489.     # Setup the temp Array
  490.     if battler.is_a?(Game_Actor)
  491.       pose_temp = hash_a[battler.id] if hash_a.include?(battler.id)
  492.     else
  493.       pose_temp = hash_e[battler.id] if hash_e.include?(battler.id)
  494.     end
  495.     # Obtain the base pose based on condition (or nil)
  496.     pose_now = hash_b[condition] if hash_b.include?(condition)
  497.     # Obtain the optional actor/enemy pose based on condition (unless nil)
  498.     pose_now = pose_temp[condition] if pose_temp.include?(condition)
  499.     # Return the final pose (minus 1 for niceties)
  500.     pose_now -= 1 if pose_now != nil
  501.     return pose_now
  502.   end
  503. end
  504.  
Expand to see the code.


Part 4: Post all the parts of this script NEAR each other in different sections.
  1. #==============================================================================
  2. # ** Animated Battlers - Enhanced   ver. 10.7                      (06-17-2008)
  3. #
  4. #------------------------------------------------------------------------------
  5. #  * (3) Battle System:  The Scene Battle class
  6. #==============================================================================    
  7.  
  8. #==============================================================================
  9. # ** Scene_Battle
  10. #------------------------------------------------------------------------------
  11. #  This class performs battle screen processing.
  12. #==============================================================================
  13.  
  14. class Scene_Battle
  15.   #--------------------------------------------------------------------------
  16.   # * Main Processing
  17.   #--------------------------------------------------------------------------
  18.   alias mnkmain main
  19.   def main
  20.     # Initialize wait count
  21.     @delay_count = 0
  22.     # Obtain the formation style
  23.     # Only once per battle start
  24.     $game_system.formation = $formation_style
  25.     $game_system.formation = 0 if $formation_style == nil
  26.     # if Formation is random
  27.     if $game_system.formation == 8 then
  28.       $game_system.formation = rand(8).to_i
  29.     end
  30.     # Perform the original call
  31.     mnkmain
  32.   end
  33.  
  34.   #--------------------------------------------------------------------------
  35.   # * Frame Update (main phase)
  36.   #--------------------------------------------------------------------------
  37.   alias mnk_anim_sp3 start_phase3
  38.   def start_phase3
  39.     # Remove flag after set number of turns
  40.     if $game_temp.battle_turn >= MNK_ADV_OFF_TURN
  41.       # Turn sideview advantage mirror flag off
  42.       $game_temp.advantage_set = 0
  43.     end
  44.     # Perform the original call
  45.     mnk_anim_sp3
  46.   end
  47.  
  48.   #--------------------------------------------------------------------------
  49.   # * Frame Update (main phase step 1 : action preparation)
  50.   #--------------------------------------------------------------------------
  51.   alias mkf_up4s1 update_phase4_step1
  52.   def update_phase4_step1(battler = @active_battler)
  53.     if $game_system.mnk_det_rtab_systm == true
  54.       mkf_up4s1(battler)
  55.     else
  56.       mkf_up4s1
  57.     end
  58.     if battler != nil
  59.       if $game_system.mnk_det_sd_casting == true
  60.         if battler.sd_casting
  61.           battler.casted = true
  62.         end
  63.       end
  64.     end
  65.   end
  66.  
  67.   #--------------------------------------------------------------------------
  68.   # *  End Skill Selection
  69.   #--------------------------------------------------------------------------  
  70.   alias mkf_endss end_skill_select
  71.   def end_skill_select
  72.     mkf_endss
  73.     if $game_system.mnk_det_rtab_systm
  74.       @active_actor.skill_casted = @skill.id
  75.     else
  76.       @active_battler.skill_casted = @skill.id
  77.     end
  78.   end
  79.  
  80.   #--------------------------------------------------------------------------
  81.   # * Make Skill Action Results (alias used to determine skill used)
  82.   #--------------------------------------------------------------------------
  83.   alias make_skill_action_result_anim make_skill_action_result
  84.   def make_skill_action_result(battler = @active_battler, plus_id = 0)
  85.     @rtab = !@target_battlers
  86.     if $game_system.mnk_det_rtab_attck
  87.       make_skill_action_result_anim(battler, plus_id)
  88.     else
  89.       @rtab ? make_skill_action_result_anim(battler) : make_skill_action_result_anim
  90.     end
  91.     @skill_used = @skill.id
  92.     battler.strike_skill   = @skill.id
  93.     if $game_system.mnk_det_para_spell == true
  94.       #if battler.spelling?
  95.         battler.casted = true
  96.       #end
  97.     end      
  98.     for target in (@rtab ? battler.target : @target_battlers)
  99.       target.struck_skill = @skill.id
  100.     end
  101.   end
  102.  
  103.   #--------------------------------------------------------------------------
  104.   # * Make Item Action Results (alias used to determine item used)
  105.   #--------------------------------------------------------------------------
  106.   alias make_item_action_result_anim make_item_action_result
  107.   def make_item_action_result(battler = @active_battler)
  108.     @rtab = !@target_battlers
  109.     @rtab ? make_item_action_result_anim(battler) : make_item_action_result_anim
  110.     @item_used = @item.id
  111.     @item_usage = @item.scope
  112.     battler.strike_item = @item.id
  113.     for target in (@rtab ? battler.target : @target_battlers)
  114.       target.struck_item = @item.id
  115.     end
  116.   end
  117.  
  118.   #--------------------------------------------------------------------------
  119.   # * Frame Update (main phase step 1 : action preparation) (Casting Routine)
  120.   #--------------------------------------------------------------------------
  121.   alias update_phase4_step1_anim update_phase4_step1
  122.   def update_phase4_step1(battler = @active_battler)
  123.     @rtab = !@target_battlers
  124.     if $game_system.mnk_det_rtab_systm == true
  125.       update_phase4_step1_anim(battler)
  126.       if battler.current_action.kind == 1 and
  127.         (not battler.current_action.forcing or @force != 2)
  128.         if battler.rtp != 0    
  129.           battler.casted = true
  130.         end
  131.       end
  132.     else
  133.       update_phase4_step1_anim
  134.     end
  135.   end
  136.  
  137.   #--------------------------------------------------------------------------
  138.   # * Action Animation, Movement
  139.   #--------------------------------------------------------------------------
  140.   alias mnk_update_phase4_step3 update_phase4_step3
  141.   def update_phase4_step3(battler = @active_battler)
  142.     @rtab = !@target_battlers
  143.     target = (@rtab ? battler.target : @target_battlers)[0]
  144.     # Battle Delay System
  145.     if MNK_AT_DELAY    
  146.       # Fomar's Action Cost Detection
  147.       if $game_system.mnk_det_acb_detect
  148.         for actor in $game_party.actors
  149.           actor.vitality= 0
  150.         end
  151.         for enemy in $game_troop.enemies
  152.           enemy.vitality= 0
  153.         end
  154.       end
  155.       # Trickster's AT Detection
  156.       if $game_system.mnk_det_abs_detect
  157.         for actor in $game_party.actors
  158.           actor.at_bonus= [0,0]
  159.         end
  160.         for enemy in $game_troop.enemies
  161.           enemy.at_bonus= [0,0]
  162.         end
  163.       end
  164.       # Cogwheel RTAB Detection
  165.       if $game_system.mnk_det_rtab_systm
  166.         @rtab_wait_flag = true
  167.       end
  168.     end
  169.  
  170.     # If enemy is a default battler
  171.     if battler.is_a?(Game_Enemy)
  172.       if DEFAULT_ENEMY
  173.         if @rtab then battler.white_flash = true end
  174.         if @rtab then battler.wait = 10 end
  175.       end
  176.       if DEFAULT_ENEMY_ID != nil
  177.         if DEFAULT_ENEMY_ID.include?(battler.id)
  178.           if @rtab then battler.white_flash = true end
  179.           if @rtab then battler.wait = 10 end
  180.         end
  181.       end        
  182.     end
  183.     # If actor is a default battler
  184.     if battler.is_a?(Game_Actor)
  185.       if DEFAULT_ACTOR
  186.         if @rtab then battler.white_flash = true end
  187.         if @rtab then battler.wait = 10 end
  188.       end
  189.       if DEFAULT_ACTOR_ID != nil
  190.         if DEFAULT_ACTOR_ID.include?(battler.id)
  191.           if @rtab then battler.white_flash = true end
  192.           if @rtab then battler.wait = 10 end
  193.         end
  194.       end                
  195.     end
  196.     # Reset the 'Do Nothing' flag
  197.     dn_flag = false
  198.     # Set values and poses based on Action
  199.     case battler.current_action.kind
  200.     when 0  # Attack
  201.       # if Do Nothing, just return
  202.       if battler.current_action.basic == 3
  203.         dn_flag = true
  204.       end
  205.       if dn_flag != true
  206.         rush_type = MNK_STEP_ATTACK
  207.         full_moving = true ; if rush_type; full_moving = false; end
  208.         if MNK_MOVE2CENTER_ATK.include?(battler.weapon_id); center_move=true ; end
  209.         if MNK_STATIONARY_ENEMY_IDS.include?(battler.id) and battler.is_a?(Game_Enemy)
  210.           full_moving = false
  211.           center_move = false
  212.           rush_type = false
  213.         end
  214.         base_pose = pose_obtain(battler, MNK_POSE7, MNK_APOSE7, MNK_EPOSE7)
  215.         base_pose2 = pose_array_obtain(battler, MNK_POSES_WEAPONS, MNK_POSES_WEAPS_A, MNK_POSES_WEAPS_E, battler.weapon_id)
  216.         base_pose = base_pose2 if base_pose2 != nil        
  217.         if battler.current_action.basic == 2
  218.           # If escaping, disable all movement
  219.           full_moving = false
  220.           center_move = false
  221.           rush_type = false    
  222.           # Set the graphics
  223.           temp_pose = pose_obtain(battler, MNK_POSES_ESCAPE, MNK_POSES_ESCAPE_A, MNK_POSES_ESCAPE_E)
  224.           base_pose = temp_pose if temp_pose != nil
  225.         end
  226.       end
  227.     when 1  # Skill
  228.       @spriteset.battler(battler).skill_used = @skill_used
  229.       rush_type = MNK_STEP_SKILL
  230.       if MNK_MOVING_SKILL.include?(@skill_used) ; full_moving = true ; end
  231.       if MNK_MOVE2CENTER_SKILL.include?(@skill_used) ; center_move = true ; end        
  232.       base_pose = pose_obtain(battler, MNK_POSE9, MNK_APOSE9, MNK_EPOSE9)
  233.       base_pose2 = pose_array_obtain(battler, MNK_POSES_SKILLS, MNK_POSES_SKILLS_A, MNK_POSES_SKILLS_E, @skill_used)
  234.       base_pose = base_pose2 if base_pose2 != nil
  235.     when 2  # Item
  236.       @spriteset.battler(battler).item_used = @item_used
  237.       rush_type = MNK_STEP_ITEM
  238.       if MNK_MOVING_ITEM.include?(@item_used) or @item_scope == 1..2 ; full_moving = true ; end
  239.       if MNK_MOVE2CENTER_ITEM.include?(@item_used); center_move = true; end
  240.       base_pose = pose_obtain(battler, MNK_POSE8, MNK_APOSE8, MNK_EPOSE8)
  241.       base_pose2 = pose_array_obtain(battler, MNK_POSES_ITEMS, MNK_POSES_ITEMS_A, MNK_POSES_ITEMS_E, @item_used)
  242.       base_pose = base_pose2 if base_pose2 != nil
  243.     end
  244.  
  245.     # Only perform action if 'Do Nothing' flag is off, ie... doing something...
  246.     if dn_flag != true
  247.       # Control Movement and use current pose
  248.       @moved = {} unless @moved
  249.       return if @spriteset.battler(battler).moving
  250.       if not (@moved[battler] or battler.guarding?)
  251.         offset = offset_value(target, battler)
  252.         if rush_type        # Steps forward
  253.           @spriteset.battler(battler).setmove(battler.screen_x - offset, battler.screen_y + 1, battler.screen_z)
  254.         end
  255.         if full_moving      # Runs to target
  256.           @spriteset.battler(battler).setmove(target.screen_x + offset, target.screen_y - 1, target.screen_z + 10)
  257.         end
  258.         if center_move      # Runs to center
  259.           @spriteset.battler(battler).setmove(320+(offset/4), battler.screen_y-1, battler.screen_z)
  260.         end
  261.         @moved[battler] = true
  262.         return
  263.         @spriteset.battler(battler).pose = base_pose
  264.       elsif not battler.guarding?
  265.         @spriteset.battler(battler).pose = base_pose
  266.         @spriteset.battler(battler).setmove(battler.screen_x, battler.screen_y, battler.screen_z)
  267.       end
  268.      
  269.       # Finish Up Skill and Item Use
  270.       case battler.current_action.kind
  271.       when 1
  272.         # Flag system that skill was used
  273.         battler.casted = false
  274.         battler.casting = false
  275.         @spriteset.battler(battler).skill_used = 0
  276.       when 2
  277.         # Flag system that item was used
  278.         @spriteset.battler(battler).item_used = 0
  279.       end
  280.      
  281.       # Battle_Charge value for BattleCry script
  282.       $battle_charge = true
  283.     end
  284.  
  285.     # Battle Delay System
  286.     if MNK_AT_DELAY    
  287.       # Fomar's Action Cost Detection
  288.       if $game_system.mnk_det_acb_detect
  289.         for actor in $game_party.actors
  290.           actor.vitality = 1
  291.         end
  292.         for enemy in $game_troop.enemies
  293.           enemy.vitality = 1
  294.         end
  295.       end
  296.       # Trickster's AT Detection
  297.       if $game_system.mnk_det_abs_detect
  298.         for actor in $game_party.actors
  299.           actor.at_bonus = [1,0]
  300.         end
  301.         for enemy in $game_troop.enemies
  302.           enemy.at_bonus = [1,0]
  303.         end
  304.       end
  305.       # Cogwheel RTAB Detection
  306.       if $game_system.mnk_det_rtab_systm
  307.         @rtab_wait_flag = false
  308.       end
  309.     end
  310.     # Prevent 'removed battler' moved state
  311.     unless @moved == nil
  312.       @moved[battler] = false
  313.     end
  314.     # Start attack, do not move from spot
  315.     battler.attacking = true
  316.     # Perform the original call
  317.     @rtab ? mnk_update_phase4_step3(battler) : mnk_update_phase4_step3
  318.   end
  319.   #--------------------------------------------------------------------------
  320.   # * Offset Calculation
  321.   #--------------------------------------------------------------------------
  322.   def offset_value(target, battler = @active_battler)
  323.     offst = @spriteset.battler(battler).battler_offset
  324.     offst += MNK_OFFSET
  325.     # Oversized or special Battler offsets
  326.     if target.is_a?(Game_Enemy) && battler.is_a?(Game_Actor)
  327.       unless MNK_OFFSET_ACTOR == nil
  328.         offst += MNK_OFFSET_ACTOR[battler.id] if MNK_OFFSET_ACTOR.include?(battler.id)
  329.       end
  330.       unless MNK_OFFSET_ENEMY == nil
  331.         offst += MNK_OFFSET_ENEMY[target.id] if MNK_OFFSET_ENEMY.include?(target.id)
  332.       end
  333.     end
  334.     if target.is_a?(Game_Actor) && battler.is_a?(Game_Enemy)
  335.       unless MNK_OFFSET_ENEMY == nil
  336.         offst += MNK_OFFSET_ENEMY[battler.id] if MNK_OFFSET_ENEMY.include?(battler.id)
  337.       end
  338.       unless MNK_OFFSET_ACTOR == nil
  339.         offst += MNK_OFFSET_ACTOR[target.id] if MNK_OFFSET_ACTOR.include?(target.id)
  340.       end
  341.     end
  342.     # Offset calc dependant on sideview
  343.     if $game_system.sv_angle == 1
  344.       offset = (battler.is_a?(Game_Actor) ? -(offst) : offst)
  345.     else
  346.       offset = (battler.is_a?(Game_Actor) ? offst : -(offst))
  347.     end
  348.     return offset
  349.   end
  350.   #--------------------------------------------------------------------------
  351.   # * Hit Animation
  352.   #--------------------------------------------------------------------------
  353.   alias mnk_update_phase4_step4 update_phase4_step4
  354.   def update_phase4_step4(battler = @active_battler)
  355.     # Cycle through the targets
  356.     for target in (@rtab ? battler.target : @target_battlers)
  357.       damage = (@rtab ? target.damage[battler] : target.damage)
  358.       critical = (@rtab ? target.critical[battler] : target.critical)
  359.       if damage.is_a?(Numeric) and damage > 0
  360.         base_pose = pose_obtain(target, MNK_POSE2, MNK_APOSE2, MNK_EPOSE2)
  361.         weapon_used = battler.weapon_id
  362.         weapon_used = 0 if weapon_used == nil
  363.         base_pose2 = pose_array_obtain(target, MNK_STRUCK_WEAPS, MNK_STRUCK_WEAPS_A, MNK_STRUCK_WEAPS_E, weapon_used)
  364.         base_pose = base_pose2 if base_pose2 != nil
  365.         if battler.strike_skill != 0
  366.           if battler.strike_skill == target.struck_skill
  367.             base_pose2 = pose_array_obtain(target, MNK_STRUCK_SKILLS, MNK_STRUCK_SKILLS_A, MNK_STRUCK_SKILLS_E, target.struck_skill)
  368.             base_pose = base_pose2 if base_pose2 != nil
  369.           end
  370.         end
  371.         if battler.strike_item != 0
  372.           if battler.strike_item == target.struck_item
  373.             base_pose2 = pose_array_obtain(target, MNK_STRUCK_ITEMS, MNK_STRUCK_ITEMS_A, MNK_STRUCK_ITEMS_E, target.struck_item)
  374.             base_pose = base_pose2 if base_pose2 != nil
  375.           end
  376.         end
  377.         @spriteset.battler(target).pose = base_pose
  378.         if critical == true
  379.           temp_pose = pose_obtain(target, MNK_POSES_CRITICAL, MNK_POSES_CRIT_A, MNK_POSES_CRIT_E)
  380.           weapon_used = battler.weapon_id
  381.           weapon_used = 0 if weapon_used == nil
  382.           base_pose2 = pose_array_obtain(target, MNK_CRIT_WEAPS, MNK_CRIT_WEAPS_A, MNK_CRIT_WEAPS_E, weapon_used)
  383.           base_pose = base_pose2 if base_pose2 != nil
  384.           if @skill_used != 0
  385.             if @skill_used == target.struck_skill
  386.               base_pose2 = pose_array_obtain(target, MNK_CRIT_SKILLS, MNK_CRIT_SKILLS_A, MNK_CRIT_SKILLS_E, target.struck_skill)
  387.               base_pose = base_pose2 if base_pose2 != nil
  388.             end
  389.           end
  390.           if @item_used != 0
  391.             if @item_used == target.struck_item
  392.               base_pose2 = pose_array_obtain(target, MNK_CRIT_ITEMS, MNK_CRIT_ITEMS_A, MNK_CRIT_ITEMS_E, target.struck_item)
  393.               base_pose = base_pose2 if base_pose2 != nil
  394.             end
  395.           end
  396.           @spriteset.battler(target).pose = temp_pose if temp_pose != nil
  397.         end
  398.       end
  399.     end
  400.     # Reset/zero out the battler's skill & item
  401.     battler.strike_skill  = 0
  402.     battler.strike_item   = 0
  403.     # Perform the original call
  404.     @rtab ? mnk_update_phase4_step4(battler) : mnk_update_phase4_step4
  405.     # Finish attack n battle animation, free to move
  406.     battler.attacking = false
  407.   end
  408.  
  409.   #--------------------------------------------------------------------------
  410.   # * Victory Animation
  411.   #--------------------------------------------------------------------------
  412.   alias mnk_start_phase5 start_phase5
  413.   def start_phase5
  414.     for actor in $game_party.actors
  415.       return if @spriteset.battler(actor).moving
  416.     end
  417.     # See if an actor remains alive
  418.     for actor in $game_party.actors
  419.       unless actor.dead?
  420.         $game_system.victory = true
  421.       end
  422.     end
  423.     # See if an enemy remains alive
  424.     for enemy in $game_troop.enemies.reverse
  425.       unless enemy.dead?
  426.         $game_system.defeat = true
  427.       end
  428.     end    
  429.     # Perform the original call    
  430.     mnk_start_phase5
  431.   end
  432.   #--------------------------------------------------------------------------
  433.   # * Change Arrow Viewport
  434.   #--------------------------------------------------------------------------
  435.   alias mnk_start_enemy_select start_enemy_select
  436.   def start_enemy_select
  437.     # Perform the original call
  438.     mnk_start_enemy_select
  439.     # Arrow manipulation
  440.     @enemy_arrow.dispose
  441.     @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
  442.     @enemy_arrow.help_window = @help_window
  443.   end
  444.   #--------------------------------------------------------------------------
  445.   # * Obtain Pose (Scene Battle version)
  446.   #     battler     : battler performing attack
  447.   #     pose_base   : default pose to return
  448.   #     pose_actor  : list of poses for actors
  449.   #     pose_enemy  : list of poses for enemies
  450.   #--------------------------------------------------------------------------
  451.   def pose_obtain(battler, pose_base, pose_actor, pose_enemy)
  452.     # create Arrays
  453.     pos_a = {}
  454.     pos_e = {}
  455.     # fill created Arrays & Set pose
  456.     pos_a = pose_actor
  457.     pos_e = pose_enemy
  458.     pose_now = pose_base
  459.     # Obtain pose if not a standard pose
  460.     if battler.is_a?(Game_Actor)
  461.       pose_now = pos_a[battler.id] if pos_a[battler.id] != nil
  462.     else
  463.       pose_now = pos_e[battler.id] if pos_e[battler.id] != nil
  464.     end
  465.     # Return the final pose (minus 1 for niceties)
  466.     pose_now -= 1 if pose_now != nil
  467.     return pose_now
  468.   end
  469.  
  470.   #--------------------------------------------------------------------------
  471.   # * Obtain Pose from hashes (Scene Battle version)
  472.   #     battler     : battler performing attack
  473.   #     hash_base   : hash with default poses
  474.   #     hash_actor  : advanced list of poses for actors
  475.   #     hash_enemy  : advanced list of poses for enemies
  476.   #     condition   : value determining where to get the final pose
  477.   #--------------------------------------------------------------------------
  478.   def pose_array_obtain(battler, hash_base, hash_actor, hash_enemy, condition)
  479.     # create Arrays
  480.     # create Arrays
  481.     hash_b    = {}
  482.     hash_a    = {}
  483.     hash_e    = {}
  484.     pose_temp = {}
  485.     # fill created Arrays & Set pose
  486.     hash_b = hash_base
  487.     hash_a = hash_actor
  488.     hash_e = hash_enemy
  489.     # Setup the temp Array
  490.     if battler.is_a?(Game_Actor)
  491.       pose_temp = hash_a[battler.id] if hash_a.include?(battler.id)
  492.     else
  493.       pose_temp = hash_e[battler.id] if hash_e.include?(battler.id)
  494.     end
  495.     # Obtain the base pose based on condition (or nil)
  496.     pose_now = hash_b[condition] if hash_b.include?(condition)
  497.     # Obtain the optional actor/enemy pose based on condition (unless nil)
  498.     pose_now = pose_temp[condition] if pose_temp.include?(condition)
  499.     # Return the final pose (minus 1 for niceties)
  500.     pose_now -= 1 if pose_now != nil
  501.     return pose_now
  502.   end
  503. end
  504.  
Expand to see the code.


In line 21-23 in SCRIPT PART I write "True" so that you can use a character sprite ass battler (only 1 frame of teh character ofc)

//Hope I helped!
"Can't be simpler" is a funny line for a ~2200 line script that only does sideview battles...

@OT: As far as I can tell, you're just looking for a script that draws the character on the screen, right? Because in that case, ~100 lines should be perfectly sufficient to achieve that (and I recall one of the script collection threats having such a simple "plugin" listed).
Because someone just necroposted in another thread, I found this: viewtopic.php?f=11&t=66224&start=0

Should be exactly what you're looking for!

EDIT: NAh, I'm stupid... it's a VX script. However, as stated in the description, lambchop made a version for XP, so I figure look for that ^^"

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=70325