RPG Creator : créez votre MMORPG ou RPG sans aucune connaissance en programmation


Disponible le 4 Juin !




- Jouez à votre jeu sur tablettes tactiles, Smartphones et navigateurs Web
- Personnalisez vos menus
- Dessinez facilement et rapidement vos cartes
- Créez des actions pour le combat A-RPG


www.rpgcreator.net


Heures au format UTC + 1 heure [ Heure d’été ]


Règles du forum


Consultez la liste des Scripts : cliquez ici



Publier un nouveau sujet Répondre au sujet  [ 22 messages ]  Aller à la page 1, 2, 3  Suivant
Auteur Message
 Sujet du message: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:04 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

[]Animated Battlers ver 2.4

[]Intoduction :
Auteur :
DerVVulfman

Ce script n'est pas un system de combat (Custom Battle System) mais juste une modifiquation du deroulement des combats en les rendant animées comme dans RMXP donc c'est un Combat en vue de coté 2.5 pour RMVX.
Basé sur Minkoff's Animated Battlers.

[]Plan :

Credits
Les Scripts
Demo

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:06 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

[]Credits
Code: Tout sélectionner
#==============================================================================
# ** Animated Battlers VX
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 2.4
#    04-12-2008
#    RGSS2 / RPGMaker VX
#==============================================================================
#
#  INTRODUCTION:
#
#  This script is not a battlesystem but a graphic overlay system that can con-
#  vert a the default 'frontview' battlesystem into a Sideview battlesystem. It
#  has taken some time to convert "Minkoff's Animated Battlers - Enhanced" into
#  the RPGMaker VX format, still partially based on Minkoff's original work.
#
#  Again,  this system  changes the  'graphic'  overlay system  and is meant to
#  change the battlers  and battler's startup positions  for a sideview system.
#  It is not meant  to alter  anything else,  including combat values,  defense
#  levels, or any other graphics other than those related to the battlers them-
#  selves.
#
#==============================================================================
#
#  SCRIPT CALL:
#
#  There's only one script call you should be familiar with right now, and that
#  is the script call to flip the sides of the battlers around. By default, the
#  ACTOR battlers are on the right side of the screen while you  (the end user)
#  positions the ENEMY battlers on the left side of the screen.   But with this
#  script call,  it moves the battlers around  so the ENEMY battlers will be on
#  the right and the ACTOR battlers will be on the left.
#
#  The call is simple:  $game_system.abatvx_mirror = true
#
#  Using this statement in a script call allows you to make the battlers show
#  on their opposite sides.  That's all.
#
#==============================================================================
#
#  CREDITS & THANKS:
#   (RPGMaker VX)
#     First thanks  to eugene222 of Creation Asylum  and Cain La Croix  of RPG
#     RPG Revolution for noting a 'save' bug  related to the  Spriteset_Battle
#     section of code.   And thanks to Daray of RPG Revolution  for noting how
#     the battle animations only performed at battler 'start' positions rather
#     than their 'current' position (if performing a moving attack).
#  
#   (RPGMaker XP: Alphabetical by Name)
#     Angel_FX                    - Dead bodies on new battlefields
#     Boo Mansion                 - Flat Rate HP Feature
#     Clive                       - Before Battle 'Readying' pose
#     Creiz                       - Advance Hashes for Actors/Enemies
#     Hayuka                      - Loop/Freeze defeat poses
#     Jens009                     - Stationary Enemies by ID
#     JirbyTaylor                 - Individual 'Woozy' rates per battlers
#     Kaze950                     - Struck poses based on skills
#     Mimi-Chan                   - Critical Hit pose
#     Minkoff                     - The base code
#     Skyla Doragono (aka Atemu)  - Loop/Freeze Victory pose
#     SteveE22                    - Mixing Spritesheet Battler types
#     Twin-Matrix                 - Status Effect pose system
#     WithViolence                - Default/RTP Battlers
#  
#   Honerable mention for RMXP's betatesting and support:
#     Alistor * Arachus * BOOMY * bojox3m * diagotsu * JirbyTaylor * Juuhou
#     Mastermind5823 * Neonyo (aka UnrivaledNeo) * SephirothSpawn * Trickster
#     and Sleeping Leonhart
#  
#==============================================================================

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:07 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

[]Scripts
Configuration :
Code: Tout sélectionner
#==============================================================================
# ** Animated Battlers VX   ver. 2.4                               (05-11-2008)
#
#------------------------------------------------------------------------------
#  * (1) Configuration:  The Sprite Battler Class (initialize system)
#==============================================================================


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

  # * Animation Frames and Animation Speed
  #--------------------------------------------------------------------------   
  MNK_SPEED               = 4       # Framerate speed of the battlers
  MNK_RUSH_SPEED          = 1.5     # Melee/Skill/Item motion speed of the battlers
  MNK_POSES               = 11      # Maximum # of poses (stances) in the template
  MNK_FRAMES              = 4       # Maximum # of frames in each pose
  MNK_FRAMES_STANDARD     = 4       # Standard # of frames played in each pose.

  # Individual Spritesheet Control Center
  #--------------------------------------------------------------------------       
  MNK_POSES_ENEMY         = {6 => 7}  # ID and # of poses for each enemy
  MNK_FRAMES_ENEMY        = nil       # ID and # of frames for each enemy
  MNK_POSES_ACTOR         = {3 => 4}  # ID and # of poses for each actor
  MNK_FRAMES_ACTOR        = nil       # ID and # of frames for each actor. 

  # * Wooziness Rates
  #--------------------------------------------------------------------------
  MNK_LOW_HP_PERCENTAGE   = 0.25                    # Health% for WOOZY pose.
  MNK_LOW_HP_ACTOR        = {7 => 0.50, 8 => 0.75}  # Ind. health% for actors.
  MNK_LOW_HP_ENEMY        = {1 => 0.50}             # Ind. health% for enemies.
  MNK_LOW_HP_FLAT         = false                   # If true, flat rate hp
 
 
 
  #==========================================================================
  #   ****                   POSE CONTROL CENTER                     ****   #
  #==========================================================================
   
  # Editable Template (Some people wanted to change their template design)
  #-------------------------------------------------------------------------- 
  MNK_POSE1   = 1   # Ready
  MNK_POSE2   = 2   # Struck
  MNK_POSE3   = 3   # Woozy
  MNK_POSE4   = 4   # Block
  MNK_POSE5   = 5   # Charge
  MNK_POSE6   = 6   # Retreat
  MNK_POSE7   = 7   # Attack
  MNK_POSE8   = 8   # Item
  MNK_POSE9   = 9   # Skill
  MNK_POSE10  = 10  # Victory
  MNK_POSE11  = 11  # Defeat
 
  # Editable Template (for Custom Actor Spritesheets)
  #--------------------------------------------------------------------------
  MNK_APOSE1   =   {3 => 2}
  MNK_APOSE2   =   {3 => 2}   # Bennett is using a Charset graphic as a battler.
  MNK_APOSE3   =   {3 => 2}   # The battler was copied into the Battler folder.
  MNK_APOSE4   =   {3 => 2}   # This setup allows you to use Charactersets for
  MNK_APOSE5   =   {3 => 2}   # battlers battlers.
  MNK_APOSE6   =   {3 => 3}
  MNK_APOSE7   =   {3 => 2}
  MNK_APOSE8   =   {3 => 2}
  MNK_APOSE9   =   {3 => 2}
  MNK_APOSE10  =   {3 => 1}
  MNK_APOSE11  =   {3 => 4}
   
  # Editable Template (for Custom Enemy Spritesheets)
  #--------------------------------------------------------------------------
  MNK_EPOSE1   =   {6 => 2}
  MNK_EPOSE2   =   {6 => 4}   # I set up one of the enemies to use a Cybersam
  MNK_EPOSE3   =   {6 => 7}   # battler.
  MNK_EPOSE4   =   {6 => 3}  
  MNK_EPOSE5   =   {6 => 1}  
  MNK_EPOSE6   =   {6 => 4}
  MNK_EPOSE7   =   {6 => 5}
  MNK_EPOSE8   =   {6 => 6}
  MNK_EPOSE9   =   {6 => 6}
  MNK_EPOSE10  =   {6 => 3}
  MNK_EPOSE11  =   {6 => 7} 

 
 
  #==========================================================================
  #   ****               EXPANDED POSE CONTROL CENTER                ****   #
  #==========================================================================

  # Looping Poses
  #--------------------------------------------------------------------------
  # These arrays merely hold the ID  of actors or enemies whose poses loop at
  # the end of combat.  Enemies have no 'winning' animation pose.
  MNK_LOOPS_WINNING_ACTOR   = [3]     # Actor IDs if their victory pose loops
  MNK_LOOPS_WINNING_ENEMY   = []      # Enemy IDs if their victory pose loops
  MNK_LOOPS_DEFEATED_ACTOR  = []      # Actor IDs if their defeat pose loops
  MNK_LOOPS_DEFEATED_ENEMY  = []      # Enemy IDs if their defeat pose loops
   
  # Non-Default Poses (can expand beyond the default 11 poses here)
  # (New system mimics the revised Template system.  Can use 'custom' sheets)
  #--------------------------------------------------------------------------
  # The first value in each set indicates the index number  in a spritesheet.
  # This value is  overrided by a value  in one of the other two accompanying
  # arrays... one for actor battlerss, the other for enemy battlers.
  #
  # To define a pose linked to a specific battler, the syntax is...
  # '' hash array '' = { battler.id => pose# }
  # Where Aluxes and the Ghost (RTP)  would be  the 1st battlers (per array),
  # and the pose# would be the pose in your spritesheet.
  #
  # Combinations in the  hash arrays  are possible,  so if the MNK_POSES_DYING_E
  # array has {1 => 5, 9 => 2},  then the GHOST (enemy #1) would be using the
  # 6th pose (index 5) and the 9th enemy battler would be using the 3rd pose.
  #--------------------------------------------------------------------------
  MNK_POSES_SETUP       = 7          # Choose animation pose for 'preparation'
  MNK_POSES_SETUP_A     = {2 => 4}
  MNK_POSES_SETUP_E     = {1 => 4}   
  MNK_POSES_CASTPREP    = 4          # Set 'casting' pose for skill preparation
  MNK_POSES_CASTPREP_A  = {}         
  MNK_POSES_CASTPREP_E  = {9 => 3}   
  MNK_POSES_DYING       = 7          # Choose animation pose for dying throws.
  MNK_POSES_DYING_A     = {}         
  MNK_POSES_DYING_E     = {9 => 5}   
  MNK_POSES_ESCAPE      = 2          # Set 'coward' pose for fleeing monsters)   
  MNK_POSES_ESCAPE_A    = {}        
  MNK_POSES_ESCAPE_E    = {9 => 5}  
  MNK_POSES_CRITICAL    = nil        # Set pose for BIG hits
  MNK_POSES_CRIT_A      = {}
  MNK_POSES_CRIT_E      = {9 =>5}
  MNK_POSES_WINNING     = nil        # Set winning (Victory Dance before pose)
  MNK_POSES_WINNING_A   = {3 => 9}
  MNK_POSES_WINNING_E   = {} 
 
  # Non-Default Pose Hashes (poses dependant on .id values)
  # (New system mimics the revised Template system.)
  #--------------------------------------------------------------------------
  # The first hash in each set  indicates the id number (be it skill, item or
  # otherwise, and the pose it brings up.   These mimic the 2nd array type in
  # the above Non-Default poses.   As such, a hash value of {1 => 10) for the
  # MNK_POSES_WEAPONS hash would make  the 'Bronze Sword' use the 10th index (or
  # 11th spritesheet) pose... aka the 'Defeat' pose.
  #
  # To define an advanced pose linked to a specific battler, the syntax is...
  #  = { battler.id => { item/skill.id => pose#  } }
  # ...so this gets  more complicated.   But this does allow  each battler to
  # have his or her own unique pose, regardless of spritesheet type.
  #--------------------------------------------------------------------------
  MNK_POSES_CASTED     = {61 => 6}  # Set a specific skill to use a pose
  MNK_POSES_CASTED_A   = {}        
  MNK_POSES_CASTED_E   = {}
  MNK_POSES_STATUS     = {7 => 3}   # Set status values to poses here
  MNK_POSES_STAT_A     = {} 
  MNK_POSES_STAT_E     = {}
  MNK_POSES_SKILLS     = {33 => 4}  # Default: #57(Cross Cut) does 'Attack'
  MNK_POSES_SKILLS_A   = {} 
  MNK_POSES_SKILLS_E   = {}
  MNK_POSES_ITEMS      = {13 => 4}  # Default: #13(Sharp Stone) does 'Block'
  MNK_POSES_ITEMS_A    = {}        
  MNK_POSES_ITEMS_E    = {}        
  MNK_POSES_WEAPONS    = {}         # Didn't set any weapons to any poses
  MNK_POSES_WEAPS_A    = {}
  MNK_POSES_WEAPS_E    = {}         # Non-functional (Enemies don't use 'em.)
 
  # Non-Default Pose Hashes (Hits & Critical Hits)
  # (Just like above, but pertains to specific hits and critical hits)
  #--------------------------------------------------------------------------
  MNK_STRUCK_WEAPS     = {}         # Set a specific 'Struck' to a weapon attack
  MNK_STRUCK_WEAPS_A   = {}        
  MNK_STRUCK_WEAPS_E   = {6 => {4 => 3}}        
  MNK_STRUCK_SKILLS    = {}         # Set a specific 'Struck' to a skill
  MNK_STRUCK_SKILLS_A  = {3 => {33 => 4 }, 5 => {7 => 7}}
  MNK_STRUCK_SKILLS_E  = {}
  MNK_STRUCK_ITEMS     = {}         # Set a specific 'Struck' to an item attack
  MNK_STRUCK_ITEMS_A   = {}
  MNK_STRUCK_ITEMS_E   = {}
  MNK_CRIT_WEAPS       = {}         # Set a specific 'Critical Hit' to a weapon
  MNK_CRIT_WEAPS_A     = {}
  MNK_CRIT_WEAPS_E     = {}      
  MNK_CRIT_SKILLS      = {}         # Set a specific 'Critical Hit' to a skill
  MNK_CRIT_SKILLS_A    = {}
  MNK_CRIT_SKILLS_E    = {}
  MNK_CRIT_ITEMS       = {}         # Set a specific 'Critical Hit' to an item
  MNK_CRIT_ITEMS_A     = {}
  MNK_CRIT_ITEMS_E     = {} 


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

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

  # Advanced Individual Pose/Frame Hashes   # Advanced Individual Poses  uses
                                            # hashes within hashes. As a demo
  MNK_POSES_FR_ACTOR = {}                   # you can see that enemy #1 has 2
  MNK_POSES_FR_ENEMY = {}                   # sets of controls:  index 0 (for
                                            # a ready pose is set to 1 frame,
  # while index 3 (block) is set to 'two' frames.   Likewise, for the actor's
  # hash, Actor #7 (Gloria) has only 1 control hash.   It sets index pose '0'
  # (the ready pose again) to use four frames of animation (even though I had
  # set the ready pose to just use '2' with the MNK_FRAMES_PER_POSE hash earlier.
 
 
 
  #==========================================================================
  #   ****                   MOVEMENT CONTROL CENTER                 ****   #
  #==========================================================================
     
  # * Offset / Battler Overlap System
  #--------------------------------------------------------------------------   
  MNK_OFFSET            = 0       # How much additional space between battlers
  MNK_OFFSET_ACTOR      = {1 => -50}
  MNK_OFFSET_ENEMY      = nil
 
  # * Forward Step System (Final Fantasy-Style)
  #--------------------------------------------------------------------------   
  MNK_STEP_ATTACK       = false   # If true, battler steps forward to attack
  MNK_STEP_SKILL        = true    # If true, battler steps forward to use skill
  MNK_STEP_ITEM         = true    # If true, battler steps forward to use item
 
  # * Movement Arrays (Arrays for skill/weapon/item IDs that affect movement)
  #--------------------------------------------------------------------------   
  MNK_MOVING_ITEM       = [1]     # Examples are items that need to be applied.
  MNK_MOVING_SKILL      = [61]    # Examples are martial-arts and sneak attacks
  MNK_MOVE2CENTER_ATK   = []      # Moves battler to center based on weapon id!
  MNK_MOVE2CENTER_ITEM  = [5]     # Moves battler to center for a big item atk!
  MNK_MOVE2CENTER_SKILL = [33]     # Moves battler to center for a big skill atk!
  #
  # * Remember, do not supply Skill or Item ID#'s that have 'None' scopes into
  #   either the MNK_MOVING_ITEM or MNK_MOVING_SKILL hashes.  These skills &
  #   item attacks have no target and would cause an error when trying to find
  #   an enemy to move towards.
 
 
 
  #==========================================================================
  #   ****                STATIONARY CONTROL CENTER                  ****   #
  #==========================================================================
 
  # * Stationary Battlers (simple True/False settings)
  #--------------------------------------------------------------------------   
  MNK_STATIONARY_ENEMIES = false    # If the enemies don't move while attacking
  MNK_STATIONARY_ACTORS  = false    # If the actors don't move while attacking
 
  # * Arrays filled with skill/weapon/item IDs that halt movement
  #--------------------------------------------------------------------------   
  MNK_STATIONARY_ENEMY_IDS  = []            # Individual enemies that don't move
  MNK_STATIONARY_WEAPONS    = [4,11,17,24]  # Weapons that prevent movement
  MNK_STATIONARY_SKILLS     = []            # Skills that prevent movement
  MNK_STATIONARY_ITEMS      = []            # Items that prevent movement

 
 
  #==========================================================================
  #   ****               TRANSPARENCY CONTROL CENTER                 ****   #
  #==========================================================================
  MNK_TRANSLUCENCY      = 127      # Degree of transparency
  MNK_TRANSLUCENT_ACTOR = []       # ID of actor at translucency settings
  MNK_TRANSLUCENT_ENEMY = [1, 9]   # ID of enemy at translucency settings
  MNK_PHASING           = true     # If battlers fade in/out while charging
  MNK_PHASING_ACTOR     = [1, 2]   # IDs of actors that fade in/out if charging
  MNK_PHASING_ENEMY     = [9]      # IDs of enemies that fade in/out if charging
 
 
 
  #==========================================================================
  #   ****                CUSTOM FEATURE CENTER                      ****   #
  #==========================================================================
  MNK_PHASING           = true     # Battlers phase in & out when moving
  MNK_MIRROR_ENEMIES    = true     # Enemy battlers use reversed image
  MNK_CALC_SPEED        = true     # System calculates a mean/average speed

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:08 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

Sprite System part 1
Code: Tout sélectionner
#==============================================================================
# ** Animated Battlers VX   ver. 2.4                               (05-11-2008)
#
#------------------------------------------------------------------------------
#  * (2) Sprite System:  The Sprite Battler Class
#==============================================================================

#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display battlers. It observes a instance of the
# Game_Battler class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < Sprite_Base
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :battler_offset         # Degree of action forcing 
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias abatvx_initialize initialize
  alias abatvx_update update
  alias abatvx_update_effect update_effect
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize(viewport, battler = nil)
    # --Initialize poses
    @frame, @pose, @last_time, @last_move_time  = 0, 0, 0, 0
    # --Initialize Battler placement and pose types
    @battler_offset, @abatvx_skill_used, @abatvx_item_used    = 0, 0, 0
    # --Initialize Boolean values
    @s_pose, @winning, @dying, = false, true, true
    $game_system.abatvx_victory, $game_system.abatvx_defeat   = false, false
    # Perform the original call
      abatvx_initialize(viewport, battler)
    # Reacess the viewport
      viewport.z = 99
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    # Only update for battler functions
    return unless @battler
    # Reset battler if battler graphic changed   
    if @battler.battler_name != @battler_name
      @started = false
    end   
    # Perform the original call
    abatvx_update
    # Set Translucency 
    if @battler.is_a?(Game_Enemy)
      battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
    else
      battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
    end
    # Start Routine
    unless @started
      # Set the pose based on battler's state
      @pose = state     
      # Configure Enemy Spritesheet
      if @battler.is_a?(Game_Enemy)
        # Use spritesheet unless specified
        unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(sprite_id)
          @width  = @width  / cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES)
          @height = @height / cell_divider(MNK_POSES_ENEMY,   MNK_POSES)         
        end
      # Or Configure Actor Spritesheet
      else 
        # Use spritesheet unless specified
        unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(sprite_id)
          @width  = @width  / cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES)
          @height = @height / cell_divider(MNK_POSES_ACTOR,   MNK_POSES)         
        end
      end     
      # Distance the battlers
      @battler_offset = @width * 0.75
      @display_x = @battler.screen_x
      @display_y = @battler.screen_y
      @display_z = @battler.screen_z
      @destination_x = @display_x
      @destination_y = @display_y
      @destination_z = @display_z
      @battler.abatvx_bypass_x = @display_x
      @battler.abatvx_bypass_y = @display_y     
      # Hide if dead
      self.visible = false if @battler.dead?
    end
    # Again, ensure a pose is set
    @pose = state if @pose == nil
    # Obtain animation cell/frame from Enemy
    if @battler.is_a?(Game_Enemy)
      # Use spritesheet cell unless specified
      unless DEFAULT_ENEMY or DEFAULT_ENEMY_ID.include?(sprite_id)
        cell_obtain
        self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
      else
        self.src_rect.set(0, 0, @width, @height)
      end
    # Or get it from an actor 
    else
      # Use spritesheet cell unless specified
      unless DEFAULT_ACTOR or DEFAULT_ACTOR_ID.include?(sprite_id)
        cell_obtain
        self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
      else
        self.src_rect.set(0, 0, @width, @height)
      end
    end
   
    # Mirror the sprites depending on surprise/ambush
    if @battler.is_a?(Game_Actor)
      mirror_pose_surprised
    else
      if MNK_MIRROR_ENEMIES
        mirror_pose_ambushed(true)
      else
        mirror_pose_ambushed(false)
      end
    end
   
    # Setup Frames per Pose
    poseframe = MNK_FRAMES_STANDARD
    if @battler.is_a?(Game_Actor)
      poseframe = cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ACTOR,  MNK_FRAMES_STANDARD) != nil
    else
      poseframe = cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) if cell_divider(MNK_FRAMES_ENEMY,  MNK_FRAMES_STANDARD) != nil
    end
    pose_chk = 0
    pose_chk = @pose + 1 if @pose != nil
    poseframe = MNK_FRAMES_PER_POSE[pose_chk] if MNK_FRAMES_PER_POSE.include?(pose_chk)
    # Set Advanced Poses for Actors
    if @battler.is_a?(Game_Actor)
      pose_temp = []
      pose_temp = MNK_POSES_FR_ACTOR[sprite_id] if MNK_POSES_FR_ACTOR.include?(sprite_id)
      poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
    end   
    # Set Advanced Poses for Enemies
    if @battler.is_a?(Game_Enemy)
      pose_temp = []
      pose_temp = MNK_POSES_FR_ENEMY[sprite_id] if MNK_POSES_FR_ENEMY.include?(sprite_id)
      poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
    end
    # Position Sprite
    self.x = @display_x
    self.y = @display_y
    self.z = @display_z
    @battler.abatvx_bypass_x = @display_x
    @battler.abatvx_bypass_y = @display_y   
    self.ox = @width / 2
    self.oy = @height
   
    # Make visible if returned to life
    unless @battler.dead?
      self.visible = true
      @freeze = false unless $game_system.abatvx_victory
    end
   
    # Setup Animation
    time = Graphics.frame_count / (Graphics.frame_rate / MNK_SPEED)
    if @last_time < time
      @frame = (@frame + 1) % poseframe
      if @frame == 0 or @reload
        if @freeze
          @frame = MNK_FRAMES - 1
          return
        end
        @pose = state
      end
    end
    @last_time = time
    # Perform Setup routine if alive   
    unless @battler.dead?
      if @s_pose == false
        tmp_pose = pose_obtain(MNK_POSES_SETUP, MNK_POSES_SETUP_A, MNK_POSES_SETUP_E)
        if tmp_pose != nil
          @pose = tmp_pose
          @s_pose = true           
        end
      end   
    # Else set dying states
    else
      if @dying == true
        @pose = state
        @dying = false
      end
    end
    # If Victory pose (Who's your daddy?)
    if @battler.is_a?(Game_Actor) && $game_system.abatvx_victory == true && @winning == true
      @pose = state
      @winning = false
    elsif @battler.is_a?(Game_Enemy) && $game_system.abatvx_defeat == true && @winning == true
      @pose = state
      @winning = false
    end
    # Move the sprite
    move if moving
   
    # Finish Up
    @started = true
  end
  #--------------------------------------------------------------------------
  # * Update Effect
  #--------------------------------------------------------------------------
  def update_effect
    @collapsed = false
    @collapsed = true if @effect_duration > 0 && @effect_type == COLLAPSE
    # Perform the original call
    abatvx_update_effect
  end
  #--------------------------------------------------------------------------
  # * Current State
  #--------------------------------------------------------------------------
  def state
    # Set Translucency if not dead
    unless @battler.dead?
      if @battler.is_a?(Game_Actor)
        battler_translucency(@battler, MNK_TRANSLUCENT_ACTOR)
      else
        battler_translucency(@battler, MNK_TRANSLUCENT_ENEMY)
      end
    end
    # Set sprite to 'Ready' pose
    state = pose_obtain(MNK_POSE1, MNK_APOSE1, MNK_EPOSE1)
    # Set sprite to 'Woozy' pose
    state = state_woozy     if state_woozy != nil
    # Set sprite to 'Status Ailment' pose
    state = state_status     if state_status != nil   
    # Set sprite to 'Dead' pose
    state = state_dead      if state_dead != nil
    # Set sprite to 'Block' pose
    state = pose_obtain(MNK_POSE4, MNK_APOSE4, MNK_EPOSE4) if @battler.guarding?
   
    if @battler.is_a?(Game_Actor)
    # Casting State
    if @battler.abatvx_delay_casted
      state = casting_pose if $game_system.abatvx_delay and @battler.sd_casting
    end
    end
   
    # Victory States
    if @battler.is_a?(Game_Actor) && $game_system.abatvx_victory
      if @winning == true
        state = winning_pose unless @battler.dead? && winning_pose == nil
      else
        state = victory_pose unless @battler.dead?
      end
    end
    # Defeat States
    if @battler.is_a?(Game_Enemy) && $game_system.abatvx_defeat
      if @winning == true
        state = winning_pose unless @battler.dead? && winning_pose == nil
      else
        state = victory_pose unless @battler.dead?
      end
    end   
    # If Battler Dead
    if @battler.dead?
      # Fix Opacity
      if @battler.is_a?(Game_Enemy) && MNK_TRANSLUCENT_ENEMY.include?(sprite_id)
        set_translucency(@battler, MNK_TRANSLUCENCY)
      elsif @battler.is_a?(Game_Actor) && MNK_TRANSLUCENT_ACTOR.include?(sprite_id)
        set_translucency(@battler, MNK_TRANSLUCENCY)
      else
        set_translucency(@battler, 255)
      end
    end
    # Moving state
    state = sprite_move if sprite_move != nil
    # Return State
    return state
  end
 

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:10 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

Part 2
Code: Tout sélectionner
#--------------------------------------------------------------------------
  # * Move
  #--------------------------------------------------------------------------
  def move
    time = Graphics.frame_count / (Graphics.frame_rate.to_f / (MNK_SPEED * 5))
    if @last_move_time < time
      # Pause for Animation
      return if @pose != state
      # The standard 'full' opacity
      opa = 255
      if @battler.is_a?(Game_Enemy) and MNK_TRANSLUCENT_ENEMY.include?(sprite_id)
        opa = MNK_TRANSLUCENCY
      end
      if @battler.is_a?(Game_Actor) and MNK_TRANSLUCENT_ACTOR.include?(sprite_id)
        opa = MNK_TRANSLUCENCY
      end     
      unless @battler.dead?
        # Phasing
        self.opacity = phasing(opa)   if MNK_PHASING
        if @battler.is_a?(Game_Actor)
          self.opacity = phasing(opa) if MNK_PHASING_ACTOR.include?(sprite_id)
        else     
          self.opacity = phasing(opa) if MNK_PHASING_ENEMY.include?(sprite_id)
        end     
      end
      # Calculate Difference
      difference_x = (@display_x - @destination_x).abs
      difference_y = (@display_y - @destination_y).abs
      difference_z = (@display_z - @destination_z).abs
      # Done? Reset, Stop
      if [difference_x, difference_y].max.between?(0, 8)
        @display_x = @destination_x
        @display_y = @destination_y
        @display_z = @destination_z
        @battler.abatvx_bypass_x = @display_x
        @battler.abatvx_bypass_y = @display_y
        @pose = state
        return
      end
      # Calculate Movement Increments
      increment_x = increment_y = 1
      if difference_x < difference_y
        increment_x = 1.0 / (difference_y.to_f / difference_x)
      elsif difference_y < difference_x
        increment_y = 1.0 / (difference_x.to_f / difference_y)
      end
      increment_z = increment_y
      # Calculate Movement Speed
      if MNK_CALC_SPEED
        total = 0; $game_party.members.each{ |actor| total += actor.agi }
        speed = @battler.agi.to_f / (total / $game_party.members.size)
        increment_x *= speed
        increment_y *= speed
        increment_z *= speed
      end
      # Multiply and Move
      multiplier_x = MNK_RUSH_SPEED * (@destination_x - @display_x > 0 ? 8 : -8)
      multiplier_y = MNK_RUSH_SPEED * (@destination_y - @display_y > 0 ? 8 : -8)
      multiplier_z = MNK_RUSH_SPEED * (@destination_z - @display_z > 0 ? 8 : -8)
      @display_x += (increment_x * multiplier_x).to_i
      @display_y += (increment_y * multiplier_y).to_i
      @display_z += (increment_z * multiplier_z).to_i
      @battler.abatvx_bypass_x = @display_x
      @battler.abatvx_bypass_y = @display_y
     
    end
    @last_move_time = time
  end
  #--------------------------------------------------------------------------
  # * Set Movement
  #--------------------------------------------------------------------------
  def setmove(destination_x, destination_y, destination_z)
    # Disallow movement of stationary battlers
    unless (@battler.is_a?(Game_Enemy) and MNK_STATIONARY_ENEMIES) or
           (@battler.is_a?(Game_Actor) and MNK_STATIONARY_ACTORS)
      # Disallow movement of stationary skills   
      unless MNK_STATIONARY_SKILLS.include?(@battler.abatvx_skill_used) or
             MNK_STATIONARY_ITEMS.include?(@battler.abatvx_item_used)         
        # Disallow movement of stationary weapons (actors only)
        unless (@battler.is_a?(Game_Actor) &&
                MNK_STATIONARY_WEAPONS.include?(@battler.weapon_id))
          # Disallow movement of individual stationary enemies
          unless (@battler.is_a?(Game_Enemy) &&
                  MNK_STATIONARY_ENEMY_IDS.include?(@battler.enemy_id))
            # Set the origin and destination points
            @original_x = @display_x
            @original_y = @display_y
            @original_z = @display_z
            @destination_x = destination_x
            @destination_y = destination_y
            @destination_z = destination_z
          end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Movement Check
  #--------------------------------------------------------------------------
  def moving
    if (@display_x != @destination_x and @display_y != @destination_y)
      return (@display_x > @destination_x ? 0 : 1)
    end
  end
  #--------------------------------------------------------------------------
  # * Mirror Actors
  #--------------------------------------------------------------------------
  def mirror_pose_surprised
    if $game_system.abatvx_mirror == true
      if $game_troop.surprise == true
        self.mirror = false
      else
        self.mirror = true
      end
    else
      if $game_troop.surprise == true
        self.mirror = true
      else
        self.mirror = false
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Mirror Enemy
  #--------------------------------------------------------------------------
  def mirror_pose_ambushed(mir)
    if $game_system.abatvx_mirror == true
      if mir != true
        if $game_troop.preemptive == true
          self.mirror = false
        else
          self.mirror = true
        end
      else
        if $game_troop.preemptive == true
          self.mirror = true
        else
          self.mirror = false
        end
      end
    else
      if mir != true
        if $game_troop.preemptive == true
          self.mirror = true
        else
          self.mirror = false
        end
      else
        if $game_troop.preemptive == true
          self.mirror = false
        else
          self.mirror = true
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * State:  Dying/Dead/Collapse
  #-------------------------------------------------------------------------- 
  def state_dead
    # Reset state return
    state_return = nil
      if @battler.dead?
      # If using default battlers or default collapse
      if (DEFAULT_COLLAPSE_ACTOR and @battler.is_a?(Game_Actor)) or
         (DEFAULT_COLLAPSE_ENEMY and @battler.is_a?(Game_Enemy)) or
         (DEFAULT_ACTOR and @battler.is_a?(Game_Actor)) or
         (DEFAULT_ENEMY and @battler.is_a?(Game_Enemy)) or
         (DEFAULT_ENEMY_ID.include?(sprite_id) and @battler.is_a?(Game_Enemy)) or
         (DEFAULT_ACTOR_ID.include?(sprite_id) and @battler.is_a?(Game_Actor))
        # Do absolutely nothing :)
      else   
        if @dying == true
          tmp_pose = pose_obtain(MNK_POSES_DYING, MNK_POSES_DYING_A, MNK_POSES_DYING_E)
          state_return = tmp_pose if tmp_pose != nil
        else 
          state_return = dying_pose
        end
      end
    end
    return state_return
  end
  #--------------------------------------------------------------------------
  # * State:  Defeat
  #--------------------------------------------------------------------------
  def dying_pose
    state_return = nil
    state_return = pose_obtain(MNK_POSE11, MNK_APOSE11, MNK_EPOSE11)
    if @battler.is_a?(Game_Actor)
      @freeze = true unless MNK_LOOPS_DEFEATED_ACTOR.include?(sprite_id)
    else
      @freeze = true unless MNK_LOOPS_DEFEATED_ENEMY.include?(sprite_id)
    end
    return state_return
  end  
  #--------------------------------------------------------------------------
  # * State:  Movement
  #--------------------------------------------------------------------------
  def sprite_move
    state_return = nil
    # Moving State
    if moving
      if $game_system.abatvx_mirror
        if @battler.is_a?(Game_Actor)
          # Set sprite to 'Charge' pose
          state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
          # Set sprite to 'Retreat' pose
          state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
        else
          # Set sprite to 'Charge' pose
          state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
          # Set sprite to 'Retreat' pose
          state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
        end       
      else
        if @battler.is_a?(Game_Actor)
          # Set sprite to 'Charge' pose
          state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(0)
          # Set sprite to 'Retreat' pose
          state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(1)
        else
          # Set sprite to 'Charge' pose
          state_return = pose_obtain(MNK_POSE5, MNK_APOSE5, MNK_EPOSE5) if moving.eql?(1)
          # Set sprite to 'Retreat' pose
          state_return = pose_obtain(MNK_POSE6, MNK_APOSE6, MNK_EPOSE6) if moving.eql?(0)
        end
      end
     
    end   
    return state_return
  end
 

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:10 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

Part 3
Code: Tout sélectionner
#--------------------------------------------------------------------------
  # * State:  Status Ailments
  #--------------------------------------------------------------------------   
  def state_status
    state_return = nil
    # Battler Status-Effect
    for i in @battler.states
      temp_pose   = pose_array_obtain(MNK_POSES_STATUS, MNK_POSES_STAT_A, MNK_POSES_STAT_E, i.id)
      state_return  = temp_pose if temp_pose != nil
    end
    return state_return 
  end 
  #--------------------------------------------------------------------------
  # * State:  Winning
  #--------------------------------------------------------------------------
  def winning_pose
    state_return = nil
    temp_pose = pose_obtain(MNK_POSES_WINNING, MNK_POSES_WINNING_A, MNK_POSES_WINNING_E)
    state_return = temp_pose if temp_pose != nil
    return state_return
  end
  #--------------------------------------------------------------------------
  # * State:  Woozy
  #-------------------------------------------------------------------------- 
  def state_woozy
    # Reset state return   
    state_return = nil
    temp_pose = MNK_LOW_HP_PERCENTAGE
    if @battler.is_a?(Game_Actor)
      temp_pose = MNK_LOW_HP_ACTOR[sprite_id] if MNK_LOW_HP_ACTOR[sprite_id] != nil
    else
      temp_pose = MNK_LOW_HP_ENEMY[sprite_id] if MNK_LOW_HP_ENEMY[sprite_id] != nil
    end
    # Set to Flat Rate, or to percentage of health
    if MNK_LOW_HP_FLAT
      state_return = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3) if @battler.hp < temp_pose
    else
      state_return = pose_obtain(MNK_POSE3, MNK_APOSE3, MNK_EPOSE3)  if @battler.hp < @battler.maxhp * temp_pose
    end
    return state_return
  end
  #--------------------------------------------------------------------------
  # * State:  Victory
  #--------------------------------------------------------------------------
  def victory_pose
    state_return = nil
    state_return = pose_obtain(MNK_POSE10, MNK_APOSE10, MNK_EPOSE10)
    if @battler.is_a?(Game_Actor)
      @freeze = true unless MNK_LOOPS_WINNING_ACTOR.include?(sprite_id)
    else
      @freeze = true unless MNK_LOOPS_WINNING_ENEMY.include?(sprite_id)
    end
    return state_return
  end
  #--------------------------------------------------------------------------
  # * State:  Casting
  #--------------------------------------------------------------------------
  def casting_pose
    state_return = nil
    tmp_pose = pose_obtain(MNK_POSES_CASTPREP, MNK_POSES_CASTPREP_A, MNK_POSES_CASTPREP_E)
    tmp_pose2 = pose_array_obtain(MNK_POSES_CASTED, MNK_POSES_CASTED_A, MNK_POSES_CASTED_E, @abatvx_skill_delayed)
    tmp_pose = tmp_pose2 if tmp_pose2 != nil
    state_return = tmp_pose if tmp_pose != nil
    return state_return
  end
  #--------------------------------------------------------------------------
  # * Phasing / Vanishing
  #--------------------------------------------------------------------------
  def phasing(opa)
    d1 = (@display_x - @original_x).abs
    d2 = (@display_y - @original_y).abs
    d3 = (@display_x - @destination_x).abs
    d4 = (@display_y - @destination_y).abs
    return [opa - ([d1 + d2, d3 + d4].min * 1.75).to_i, 0].max
  end 
  #--------------------------------------------------------------------------
  # * Battler Translucency
  #     battler            : actor or enemy battler
  #     battler_trans      : translucency array for battler
  #--------------------------------------------------------------------------
  def battler_translucency(battler, battler_trans)
    # Transparency Check
    tcheck = {}
    tcheck = battler_trans
    set_translucency(battler, MNK_TRANSLUCENCY) if tcheck.include?(sprite_id)
  end
  #--------------------------------------------------------------------------
  # * Set Translucency
  #     battler            : actor or enemy battler
  #     trans_level        : translucency level
  #--------------------------------------------------------------------------
  def set_translucency(battler, trans_level)
    # Check for default RTP battler type
    default_flag = false
    if (DEFAULT_COLLAPSE_ACTOR and battler.is_a?(Game_Actor)) or
         (DEFAULT_COLLAPSE_ENEMY and battler.is_a?(Game_Enemy)) or
         (DEFAULT_ACTOR and battler.is_a?(Game_Actor)) or
         (DEFAULT_ENEMY and @battler.is_a?(Game_Enemy)) or
         (DEFAULT_ENEMY_ID.include?(sprite_id) and battler.is_a?(Game_Enemy)) or
         (DEFAULT_ACTOR_ID.include?(sprite_id) and battler.is_a?(Game_Actor))
      default_flag = true
    end
    # Perform translucency check
    if battler.hidden
      self.opacity = 0
    elsif battler.dead? && default_flag == true
      self.opacity = 0 if @collapsed == false
    else
      self.opacity  = trans_level
    end
  end
  #--------------------------------------------------------------------------
  # * Set Pose
  #--------------------------------------------------------------------------
  def pose=(pose)
    @pose = pose
    @frame = 0
  end
  #--------------------------------------------------------------------------
  # * Freeze
  #--------------------------------------------------------------------------
  def freeze
    @freeze = true
  end
  #--------------------------------------------------------------------------
  # * Obtain Current Sprite ID
  #--------------------------------------------------------------------------
  def sprite_id
    # Set id
    id_value = @battler.id
    id_value = @battler.enemy_id if @battler.is_a?(Game_Enemy)
    return id_value
  end
  #--------------------------------------------------------------------------
  # * Cell Divider
  #     divider_check      : array to divide cells by custom actor or enemy
  #     divider_standard   : standard number to divide by
  #--------------------------------------------------------------------------
  def cell_divider(divider_check, divider_standard)
    # Divider Check
    dcheck = {}
    divided_cell = divider_standard
    dcheck = divider_check
    if dcheck != nil
      if dcheck.include?(sprite_id)
        divided_cell = dcheck[sprite_id] if dcheck[sprite_id] != nil
      end
    end
    return divided_cell       
  end
  #--------------------------------------------------------------------------
  # * Obtain Individual Cell
  #--------------------------------------------------------------------------
  def cell_obtain
    # Only permit for valid poses & frames
    if @pose != nil
      if @frame != nil
        self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Obtain Pose
  #     pose_base   : default pose to return
  #     pose_actor  : list of poses for actors
  #     pose_enemy  : list of poses for enemies
  #--------------------------------------------------------------------------
  def pose_obtain(pose_base, pose_actor, pose_enemy)
    # create Arrays
    pos_a = {}
    pos_e = {}
    # fill created Arrays & Set pose
    pos_a = pose_actor
    pos_e = pose_enemy
    pose_now = pose_base
    # Obtain pose if not a standard pose
    if @battler.is_a?(Game_Actor)
      pose_now = pos_a[sprite_id] if pos_a[sprite_id] != nil
    else
      pose_now = pos_e[sprite_id] if pos_e[sprite_id] != nil
    end
    # Return the final pose (minus 1 for neceties)
    pose_now -= 1 if pose_now != nil
    return pose_now
  end 
  #--------------------------------------------------------------------------
  # * Obtain Pose from hashes
  #     hash_base   : hash with default poses
  #     hash_actor  : advanced list of poses for actors
  #     hash_enemy  : advanced list of poses for enemies
  #     condition   : value determining where to get the final pose
  #--------------------------------------------------------------------------
  def pose_array_obtain(hash_base, hash_actor, hash_enemy, condition)
    # create Arrays
    hash_b    = {}
    hash_a    = {}
    hash_e    = {}
    pose_temp = {}
    # fill created Arrays & Set pose
    hash_b = hash_base
    hash_a = hash_actor
    hash_e = hash_enemy
    # Setup the temp Array
    if @battler.is_a?(Game_Actor)
      pose_temp = hash_a[sprite_id] if hash_a.include?(sprite_id)
    else
      pose_temp = hash_e[sprite_id] if hash_e.include?(sprite_id)
    end
    # Obtain the base pose based on condition (or nil)
    pose_now = hash_b[condition] if hash_b.include?(condition)
    # Obtain the optional actor/enemy pose based on condition (unless nil)
    pose_now = pose_temp[condition] if pose_temp.include?(condition)
    # Return the final pose (minus 1 for neceties)
    pose_now -= 1 if pose_now != nil
    return pose_now
  end
end

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:11 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

Miscellaneous

Code: Tout sélectionner
#==============================================================================
# ** Animated Battlers VX   ver. 2.4                               (05-11-2008)
#
#------------------------------------------------------------------------------
#  * (4) Miscellaneous:  Formations, Viewport and various Save/Load routines.
#==============================================================================

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :abatvx_victory           # Victory Pose Boolean
  attr_accessor :abatvx_defeat            # Defeat Pose Boolean 
  attr_accessor :abatvx_delay             # Skill Delay Detection
  attr_accessor :abatvx_mirror            # Mirror Effect
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias abatvx_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    abatvx_initialize
    @abatvx_mirror = false
  end
end



#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :abatvx_sprite            # Sprite used by battler
  attr_accessor :abatvx_skill_used        # Skill used by battler
  attr_accessor :abatvx_item_used         # Item used by battler
  attr_accessor :abatvx_delay_casted      # If a delayed skill is casted
  attr_accessor :abatvx_skill_delayed     # ID of a delayed skill used
  attr_accessor :abatvx_form_bypass       # If the screen_x/y is bypassed
  attr_accessor :abatvx_bypass_x          # Cur. battler x-coords for animation
  attr_accessor :abatvx_bypass_y          # Cur. battler y-coords for animation
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias abatvx_init initialize
  def initialize
    # Perform the original call
    abatvx_init
    @abatvx_skill_delayed = 0
    @casted               = false
    @abatvx_form_bypass   = false
    @abatvx_bypass_x      = 0
    @abatvx_bypass_y      = 0
    # DBS Spell Delay Detection
    if @sd_casting != nil
      $game_system.abatvx_delay = true
    end
  end
end



#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Actor X Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    return self.abatvx_bypass_x if self.abatvx_form_bypass == true
    if self.index != nil
     
      if $game_system.abatvx_mirror
        return (self.index * -45) + 180       
      else
        return (self.index * 45) + 350
      end
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Actor Y Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return self.abatvx_bypass_y if self.abatvx_form_bypass == true   
    return 0 if self.index == nil
    return self.index * 35 + 200
  end
  #--------------------------------------------------------------------------
  # * Actor Z Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    return screen_y
  end
  #--------------------------------------------------------------------------
  # * Perform Collapse
  #--------------------------------------------------------------------------
  def perform_collapse
    if $game_temp.in_battle and dead?
      @collapse = true if DEFAULT_ACTOR
      @collapse = true if DEFAULT_COLLAPSE_ACTOR
      @collapse = true if DEFAULT_ACTOR_ID.include?(@actor_id)
      Sound.play_actor_collapse
    end
  end 
end



#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#  This class handles enemy characters. It's used within the Game_Troop class
# ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Perform Collapse
  #--------------------------------------------------------------------------
  def perform_collapse
    if $game_temp.in_battle and dead?
      @collapse = true if DEFAULT_ENEMY
      @collapse = true if DEFAULT_COLLAPSE_ENEMY
      @collapse = true if DEFAULT_ENEMY_ID.include?(@enemy_id)
      Sound.play_actor_collapse
    end
  end
  #--------------------------------------------------------------------------
  # * Actor X Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    return self.abatvx_bypass_x if self.abatvx_form_bypass == true
    return 0 if self.index == nil
    if $game_system.abatvx_mirror
      return 544 - $game_troop.troop.members[self.index].x
    else
      return $game_troop.troop.members[self.index].x
    end
  end 
  #--------------------------------------------------------------------------
  # * Actor Y Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return self.abatvx_bypass_y if self.abatvx_form_bypass == true
    return 0 if self.index == nil
    return $game_troop.troop.members[self.index].y
  end   
  #--------------------------------------------------------------------------
  # * Actor Z Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    return screen_y
  end 
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias abatvx_initialize initialize
  alias abatvx_update update
  alias abatvx_dispose_actors dispose_actors
  #--------------------------------------------------------------------------
  # * Change Enemy Viewport, Set Enemy Sprite
  #--------------------------------------------------------------------------
  def initialize
    abatvx_initialize
    @enemy_sprites = []
    for enemy in $game_troop.members.reverse
      enemy.abatvx_sprite = Sprite_Battler.new(@viewport2, enemy)
      @enemy_sprites.push(enemy.abatvx_sprite)
    end
  end
  #--------------------------------------------------------------------------
  # * Set Actor Sprite
  #--------------------------------------------------------------------------
  def update
    abatvx_update
    for sprite in @actor_sprites
      if sprite.battler
        sprite.battler.abatvx_sprite = sprite
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose of Actor Sprite
  #--------------------------------------------------------------------------
  def dispose_actors
    for sprite in @actor_sprites
      if sprite.battler
        sprite.battler.abatvx_sprite = nil
      end
    end
    abatvx_dispose_actors
  end
end

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 17 Juil 2008, 17:13 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

[]Demo
[url=http://hometown.aol.com/Der%20VVulfman/Files/RPGMaker/VX/Demo/AnimBatVX.zip" target="_blank"]http://hometown.aol.com/Der%20VVulfman/Files/RPGMaker/VX/Demo/AnimBatVX.zip[/a]

Bon pour les expliquations , c'est comme dans le script de RPXM
Pour plus , conactez par MP
Merci
EDITE : Nessecite :
[a href="http://forum.rpgcreative.net/f28-rmvx-actor-battler-graphics-ver-10-t16112.html]
Actor Battler Graphics[/url]

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 18 Juil 2008, 00:08 
Membre royal(e)
Avatar de l’utilisateur

Inscrit le: 05 Avr 2008, 00:00
Messages: 643
Niveau RPG Maker: Bon
Logiciel(s) préféré(s): RMXP
Point(s) Fort(s): Ruby, Scénario
Sexe: Masculin
Points d'aide: 8/60

Créations :

Voir ses créations

@ nintendboss :

As tu instaler le script "Actor Battlers Graphics" que j'ai dit qu'il est nessécaire pour qu'il marche ? parceque chez moi le script marche trés bien. Si tu n'est pas capable de mettre les scripts
alors telecharge la démo.
ET JE TIEN A T'INFORMER QUE LE SCRIPT EST POUR RPGMAKER VX

@ Moonset :
Voila qui connais le travaille!

A tous :
Il faut lire tout le topic avant de mettre les scripts et de poster "il ne marche pas" ; car avant de le poster je l'ai bien tésté.
Merci !
Encore une chose :
Les battlers vont dans le dossier Battlers OK ?

_________________
"Embrace your dreams, and, whatever happends, protect your honor, AS SOLDIER ! Come and get it !" -Zack Fair -FF7 Crisis Core


Haut
 Profil  
 
 Sujet du message: Re: [RMVX] Combat en vue de coté 2.5 pour RPG maker VX
MessagePublié: 18 Juil 2008, 00:41 
Villageois (Nv 2)

Inscrit le: 31 Mar 2008, 01:00
Messages: 28
Points d'aide: 0/60

Créations :

Voir ses créations

ca me fait des errors au dernières lignes de deux scripts!


Haut
 Profil  
 
Afficher les messages depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 22 messages ]  Aller à la page 1, 2, 3  Suivant

Heures au format UTC + 1 heure [ Heure d’été ]


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
RPG Creative Forum version 5 ; Tous droits réservés
phpBB Group (Traduit par Xaphos)
Optimisé pour une résolution 1024*728