Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Speedy Gonzales v1.1, Make agility influence move speed!
XIV
post Nov 28 2010, 07:28 AM
Post #1


Level 2
Group Icon

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!

Demo
Speedy Gonzales Demo Download

Script
Script
CODE
# ------------------------------------------------------------------------------
#                             XIV's Speedy Gonzales
# ------------------------------------------------------------------------------
# Author: XIV
# Version: 1.1
# Date: 21.10.2010.
# ==============================================================================

# 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
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Nov 28 2010, 07:40 AM
Post #2


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




You are aware that just a value of 6 for the speed is already blazingly fast? I wonder if such a system wouldn't be more suited to pixel movement...


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
XIV
post Nov 28 2010, 11:06 AM
Post #3


Level 2
Group Icon

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.
Go to the top of the page
 
+Quote Post
   
Pytho The Darkne...
post Dec 15 2010, 08:53 AM
Post #4



Group Icon

Group: Member
Posts: 3
Type: Mapper
RM Skill: Skilled




Yeah i put my agility on max and a run over 500 tiles long map in joust 10 sec.
Go to the top of the page
 
+Quote Post
   
Sharisk
post Dec 16 2010, 03:01 AM
Post #5


Level 1
Group Icon

Group: Member
Posts: 5
Type: Mapper
RM Skill: Beginner




Wow man! Awesome script! Very nice movement speed. Now we RPG creators don't have to change the characters movement speed in game biggrin.gif
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 06:06 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker