#=============================================================================== # # Yanfly Engine RD - Variable Controlled Dashing # Last Date Updated: 2009.05.11 # Level: Easy # # I honestly disliked the game's default dash speed. Being twice the walk speed # is a bit much in games with small maps. The moving background can also become # a bit epileptic depending on how the map is done. Well, now you can tone down # your game's dash speed to decimal values and slow down (or speed up) dashing. # All of this can be done with a single variable! # #=============================================================================== # Updates: # ---------------------------------------------------------------------------- # o 2009.05.11 - Added Variable control. # o 2009.04.28 - Started script and finished. #=============================================================================== # Instructions #=============================================================================== # # By default, the variables are as follows: # # DASH_VARIABLE = 69 = This variable adjusts the speed at which dashing is # multiplied by. 200 is the default speed. 150 is this # script's default speed. If this value equals zero or # below, it'll take the script's default multiplier. # #=============================================================================== $imported = {} if $imported == nil $imported["VariableControlledDashing"] = true module YE module EVENT module VARIABLE # This sets the variable used to determine dashing speed. DASH_VARIABLE = 69 # This sets the dash speed multiplier if the variable equals zero. The # default run speed is 200. DEFAULT_DASH_MULTIPLIER = 150 end end end #=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #=============================================================================== #=============================================================================== # Game Player #=============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # update move #-------------------------------------------------------------------------- def update_move distance = 2 ** @move_speed if dash? if $game_variables[YE::EVENT::VARIABLE::DASH_VARIABLE] <= 0 distance *= YE::EVENT::VARIABLE::DEFAULT_DASH_MULTIPLIER else distance *= $game_variables[YE::EVENT::VARIABLE::DASH_VARIABLE] end distance /= 100 end distance = Integer(distance) @real_x = [@real_x - distance, @x * 256].max if @x * 256 < @real_x @real_x = [@real_x + distance, @x * 256].min if @x * 256 > @real_x @real_y = [@real_y - distance, @y * 256].max if @y * 256 < @real_y @real_y = [@real_y + distance, @y * 256].min if @y * 256 > @real_y update_bush_depth unless moving? if @walk_anime @anime_count += 1.5 elsif @step_anime @anime_count += 1 end end end #=============================================================================== # Scene Title #=============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # alias create game objects #-------------------------------------------------------------------------- alias create_game_objects_vcdash create_game_objects unless $@ def create_game_objects create_game_objects_vcdash multiplier = YE::EVENT::VARIABLE::DEFAULT_DASH_MULTIPLIER $game_switches[YE::EVENT::VARIABLE::DASH_VARIABLE] = multiplier end end # Scene_Title #=============================================================================== # # END OF FILE # #===============================================================================