The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: blazinhandle on January 19, 2007, 08:02:19 AM

Title: A sweet animated script
Post by: blazinhandle on January 19, 2007, 08:02:19 AM
Here's an awesome Animated CBS by Minkoff:

[code]#------------------------------------------------------------------------------#  Animated Battlers by Minkoff#  Enhancements by DerVVulfman        #  Low percentage and Status Poses #     Concept & Base coding by Twin Matrix#  Hero & Enemy z.depth concept by Min-Chan and Caldaron ( totally redone :) )#  Collapse stack-error found by JirbyTaylor(fixed) / Code by SephirothSpawn#============================================================================== ##  INTRODUCTION:##  This script is not a battlesystem but a graphic overlay system that can con-#  vert a frontview 'Strategy'  battlesystem into a Sideview battlesystem.   It#  has gone through a number of changes over the months that I have put my spin#  on the system, originally coded by Minkoff himself.##  As of now, this system works  with the default battlesystem, the RTAB system#  by Cogwheel, ParaDog's ATB, XRXS's system,  and a number of systems designed#  by Trickster.##  Again,  this system  changes the  'graphic'  overlay system  and is meant to #  change the battlers  and battler's startup positions  for a sideview system.#  It is not meant  to alter  anything else,  including combat values,  defense#  levels, or any other graphics other than those related to the battlers them-#  selves.##  #============================================================================== ##   ADDITIONAL CALLS AVAILABLE PRIOR TO COMBAT:##------------------------------------------------------------------------------#  SIDEVIEW MIRROR:     This value switches  the positions  of both enemies and#                       heroes to opposite ends of the screen.##   Script : $sideview_mirror = [number]#   number : a value indicating whether the hero & enemy positions are switched#            0 = Default:  Enemies on the left, Heroes on the right#            1 = Switched: Heroes on the left, Enemies on the right##------------------------------------------------------------------------------#  BATTLER FORMATIONS:  This value changes the way your heroes line up when the#                       battle starts.##   Script : $formation_style = [number]#   number : a value indicating the type of formation your heroes will use#            0 = Diagonal (Default)    4 = Column Pattern 1#            1 = Diagonal Pattern 2    5 = Column Pattern 2#            2 = Slanted Pattern 1     6 = Wave Formation 1#            3 = Slanted Pattern 2     7 = Wave Formation 2 ##            8 = Randomized (system will choose from 0 to 7)##------------------------------------------------------------------------------ #  FORMATION OPTIONS:   These values  may expand your system  to go beyond the#                       default four player system.##   Script : $formation_max_member = [number]#   number : A value indicating the maximum number of members in your party.#             (default = 4)#             #   Script : $formation_max_height = [number]#   number : A value indicating (in pixels) the top height of your party shown#            in the Battle Screen.  The higher the number, the lower the party#            on the screen. (default = 220)##   Script : $formation_max_width  = [number]#   number : The left/right width of the party's formation.  (default = 128)##   Script : $battlestatus_height = [number]#   number : The actual height of your battlestatus window. (default = 160)##  NOTE: The combined $formation_max_height and $battlestatus_height determines#        the vertical distance between battlers in their formation.##============================================================================== # Things added since original version by Minkoff:#   Can reverse the battler positions#   Editable spritesheet layout in script#   Able to define total/max frames per pose#   Can define individual # of frames per each pose#   Can use 'red-out' RTP death or 'battler death' pose#   Can show battler falling before death.#   'Casting' pose now available for RTAB/Skill Timing users#   Can show battler celebrating before victory pose#   Can tag battlers who's victory pose loops indefinitely#   Can show actor battlers get ready before battle starts.#   Separate poses for 'skills', 'items' or 'weapons' based on their id#   Can allow the battlers to step forward before using items & skills (FFVII+)#   Attacking battlers rush towards their targets while item & skill users don't#   Certain weapons can force the battler NOT to move#   Certain items & skills can force battlers to 'rush' the enemy#   Certain skills or items can force movement to the center of the screen#   Stationary enemies. In case enemies do NOT move when they attack.#   Adjustable 'low health' checker. Set your low health to 25%... 30%... 10%...#   Poses now available for status ailments#   Dead revert to 'victory' pose bug fixed.#   Default battlers now available for actors and/or enemies#   Default battlers now usable by ID number (had to rewrite red-out for that)#   Escaping Enemies bug found by SteveE22.  Fixed just as fast.#   Hero Formations (total of 8 hardwired -& 1 random- ... add at your own risk)#   Z-Depth for attack overlapping purposes#   Corrected attack overlap offset routine.  Overlap now based on battler size#   Certain skills and items can now prevent movement#   Can allow battlers to take step forward before performing 'attack' pose.(FF)#   Certain weapons can move battlers to center screen instead of a full move.#   Escaping Enemies can now have a pose before disappearing (was a rush pose)#   Redesigned Scene_Battle's movement routine#   Added pose for Critical Hits#   Added the enemy's hash for frame number based on poses#   Added the actor's hash for frame number based on poses#   Re-Tooled the formations to go beyond the default four party system#   Minor value added for compatability with Delissa's Battle Cry script#   Default Collapse Stack-Error fixed(code by SephirothSpawn) found JirbyTaylor#   Removed dependancy on $game_system for the Sideview Mirror system#   Fixed the 'Blocking during Victory State' bug discovered by Kaze950#   Battler tones now adapt to the background tones, requested by doom900#   Fixed changing battler/battler system.  Include fade-in switch req by Neonyo#   Set individual Actors/Enemies that phase on an attack#   Translucent battlers... a personal desire for ghosts you can see through!#   Adjustable opacity for translucent battlers... can't forget that.#   Includes an Adaptation Switch for use with RTAB's Connected Attacking script#   #   45 counted.#==============================================================================# ** Sprite_Battler#------------------------------------------------------------------------------#  This sprite is used to display the battler.It observes the Game_Character#  class and automatically changes sprite conditions.#==============================================================================class Sprite_Battler < RPG::Sprite    attr_accessor :battler_offset         # Degree of action forcing    attr_accessor :skill_used             # Degree of action forcing    attr_accessor :item_used              # Degree of action forcing      #--------------------------------------------------------------------------  # * Initialize  #--------------------------------------------------------------------------  alias cbs_initialize initialize   def initialize(viewport, battler = nil)    # * Configuration System *        # * Default Battler Style Switches    #--------------------------------------------------------------------------            $default_enemy = false              # If true, these switches allows the use    $default_actor = false              # of default battlers for actors/enemies    $default_enemy_id = [6]             # Ids of enemies using default battlers    $default_actor_id = []              # Ids of actors using default battlers    @default_collapse_actor   = false   # If true, restores the old 'red fade'    @default_collapse_enemy   = true    #   collapse effect (using spritesheets)            # * Animation Frames and Animation Speed    #--------------------------------------------------------------------------        @speed              = 4      # Framerate speed of the battlers    @poses              = 11     # Maximum # of poses (stances) in the template    @frames             = 4      # Maximum # of frames in each pose    @frames_standard    = 4      # Standard # of frames played in each pose.    @low_hp_percentage  = 0.25   # Determines health% of battler for WOOZY pose.        # * Poses Control     #--------------------------------------------------------------------------            # Editable Template (Some people wanted to change their template design)    $p1   =   0   # Sets the 'Ready Pose'  ($p1) to be pose  #1 in your template    $p2   =   1   # Sets the 'Struck Pose' ($p2) to be pose  #2 in your template    $p3   =   2   # Sets the 'Woozy Pose'  ($p3) to be pose  #3 in your template    $p4   =   3   # Sets the 'Block Pose'  ($p4) to be pose  #4 in your template    $p5   =   4   # Sets the 'Charge Pose' ($p5) to be pose  #5 in your template    $p6   =   5   # Sets the 'Retreat Pose'($p6) to be pose  #6 in your template    $p7   =   6   # Sets the 'Attack Pose' ($p7) to be pose  #7 in your template    $p8   =   7   # Sets the 'Item Pose'   ($p8) to be pose  #8 in your template    $p9   =   8   # Sets the 'Skill Pose'  ($p9) to be pose  #9 in your template    $p10  =   9   # Sets the 'Victory Pose'($p10)to be pose #10 in your template    $p11  =  10   # Sets the 'Defeat Pose' ($p11)to be pose #11 in your template    # Non-Default Poses (can expand beyond the default 11 poses here)    @poses_setup         = nil         # Choose animation pose for 'preparation'    @poses_casting       = nil         # Set casting pose to 'Block' for example    $poses_escaping      = nil         # Set 'coward' pose for fleeing monsters)        $poses_critical      = nil         # Set 'critical' hit pose for BIG hits.    @poses_dying         = nil         # Choose animation pose for dying throws.    @poses_winning       = nil         # Set winning dance to 'block' for examp.    @poses_winning_loops = [7]         # Set victory non-freezing actor as #7    # Non-Default Pose Hashes (poses dependant on .id values)    @poses_status  = {3 => 2, 4 => 3}  # Default: #3(Venom)&#4(Dazzle) is 'Woozy'    $poses_skills  = {57 => 6}         # Default: #57(Cross Cut) does 'Attack'    $poses_items   = {13 => 3}         # Default: #13(Sharp Stone) does 'Block'    $poses_weapons = {}                # Didn't set any weapons to any poses        # * Frames Control     #--------------------------------------------------------------------------        @frames_per_pose    = {0 => 2}            # Set #of frames to pose(by index)    # Advanced Individual Pose/Frame Hashes   # Advanced Individual Poses  uses                                              # hashes within hashes. As a demo     $poses_actor = {7 => {0 => 4}}            # you can see that enemy #1 has 2    $poses_enemy = {1 => {0 => 2, 3 => 2}}    # 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 @frames_per_pose hash earlier.            # Individual Battler Settings    @mirror_enemies     = true     # Enemy battlers use reversed image    @stationary_enemies = false    # If the enemies don't move while attacking    @stationary_actors  = false    # If the actors don't move while attacking    @calculate_speed    = false    # System calculates a mean/average speed        # Transparency Settings    @translucency       = 127      # Degree of transparency    @translucent_actor  = [1]      # ID of actor at translucency settings    @translucent_enemy  = [1]      # ID of enemy at translucency settings    @phasing            = false    # If battlers fade in/out while charging    @phasing_actor      = [1, 2]   # IDs of actors that fade in/out if charging    @phasing_enemy      =
Title: Re: A sweet animated script
Post by: Irock on January 19, 2007, 08:04:27 AM
Please place it in code.



What is code?

This is code.

It can be broken if it isn't.
Title: Re: A sweet animated script
Post by: blazinhandle on January 19, 2007, 05:56:31 PM
Sorry about that, here's a link to it:

http://www.dubealex.com/asylum/index.php?showtopic=11827&st=0

I know its Creation Asylum (meeeeh) but it is a nice and useful script! Here's what I've done with it so far....

I just spent the last couple of hours editing some sprites with Idraw (is there a more useful program than this? sheesh) and here's what one character looks like:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi33.photobucket.com%2Falbums%2Fd77%2FBlazinhandle%2FS1.jpg&hash=36076dba5c307143840e9f3c1e7abae9328ee9cc)

Do you think it looks too small? I mean compared to the ones around it, it is tiny. Is there a way you can zoom or make it look bigger?

I want to make it so that each skill is an animation so I that there's more detail and zing. Lol here's what I'm working with:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi33.photobucket.com%2Falbums%2Fd77%2FBlazinhandle%2Fakili.png&hash=48a1ddef34bbf7ad11d54bd25696c211aeffc993)

And I'm pretty much trying to create something like this:

http://www.youtube.com/watch?v=ux8faA4kbD4 (http://www.youtube.com/watch?v=ux8faA4kbD4)


Any suggestions or criticisms? I'm horrible with spriting so some thoughts or even help would be nice.