Group: Member
Posts: 20
Type: Developer
RM Skill: Skilled
Speedy Gonzales v1.1
by XIV
Introduction A snippet which enables the player to use agility to modify the leading actor's map move speed by dividing it with a constant.
Features - use the leading actor's agility to influence his map move speed - set maximum and minimum possible speed - set up the wanted speed increment
How to use 1. Paste the script above main in your project. 2. Set up the customization options. 3. Use and enjoy!
# Version History # (1.1) - the script doesn't cause an error when there is 0 party members anymore
# Function: # Creates a speed value based on the leading actor's agility by dividing it with # a constant which can be set up below.
# Instructions: # 1. Paste above Main. # 2. Customize the script to your liking using the customization section below. # 3. Use and enjoy!
# Tips & tricks: # - increase the "AGI_DIV" constant while leaving the "MIN_SPD" at 4 to create # a more finer speed increment
# ------------------------------------------------------------------------------ # *Customization # ------------------------------------------------------------------------------ module XIV module AgiSpd # Switch which, when ON, sets the player speed to 4 (game's default speed). SPD_OFF = 1 # Minimum speed. Default is 4. MIN_SPD = 4 # Maximum speed. MAX_SPD = 999 # A number by which the leading actor's agility will be divided to get the # final speed result. Meaning: how much agility is needed to increase the speed # by 1. AGI_DIV = 5.75 # ------------------------------------------------------------------------------ # *End Customization # ------------------------------------------------------------------------------ end end
class Game_Player < Game_Character alias xiv_3617_update update unless $@ def update xiv_3617_update if $game_switches[XIV::AgiSpd::SPD_OFF] == false and $game_party.members.size > 0 agi = $game_party.members[0].agi move_spd = agi/XIV::AgiSpd::AGI_DIV else move_spd = 4 end
if move_spd > XIV::AgiSpd::MAX_SPD == true move_spd = XIV::AgiSpd::MAX_SPD elsif move_spd < XIV::AgiSpd::MIN_SPD == true move_spd = XIV::AgiSpd::MIN_SPD end
@move_speed = move_spd end end
FAQ None as of yet.
Credit - me (XIV) if you need to
Notes This script aliases the update method of Game_Player class so it should be compatible with all other scripts out there.
This post has been edited by XIV: Nov 28 2010, 07:29 AM
Group: Member
Posts: 20
Type: Developer
RM Skill: Skilled
Yep I'm aware of that...that's why the increment of the speed can be regulated with the agility division constant, plus the speed value can be a float number. I see your point, but with a bit of calculating this script could be useful to those who want to have a feature like this in their games.