Walking Dash Speed Plus

Zero_G

Villager
Member
Joined
Mar 28, 2020
Messages
28
Reaction score
18
First Language
English
Primarily Uses
RMVXA
Porting my VXACE script.

Although there are other scripts and ways to increase the character speed, all available methods would break the in game event movement speed. So I ended up making a new script that lets you change the global speed of the main character while respecting the speed changes in events (if no speed is declared during event, character will move at engine default, speed 4).

JavaScript:
//=============================================================================
// Walking_Dash_Speed_Plus.js
//=============================================================================
/*:
* @Walking_Dash_Speed_Plus
* @plugindesc Faster walking and dash speed
* @version 1.2
* @author Zero_G
* @filename Walking_Dash_Speed_Plus.js
* @help
-------------------------------------------------------------------------------
== Description ==
This plugin changes the main character default walking (and dash) speed, by
default it increases it by one level.

-Walking speed during events is respected.
-Followers will also change speed.

+ Speed Settings:
Slow: 3
Normal: 4
Fast: 5

Can use decimals, for example 4.5

+ Dash Settings:
Dash normally adds one level of speed to current walking speed, for example:
if walking speed is 4, a dash of 1, will make dashing speed 5.
Dash default is 1.

== Terms of Use ==
- Free for use in non-commercial projects with credits
- Free for use in commercial projects
- Please provide credits to Zero_G

== Usage ==
Just add the plugin.

== Changelog ==
1.1
- Fix movement speed always set to 5
- Fix movement speed variable read wrongly
1.2
- Add option to change dash speed
-------------------------------------------------------------------------------
@param Walking Speed
@desc Set walking speed
@default 5

@param Dash Speed
@desc Set how much dash adds to regular speed
@default 1
-------------------------------------------------------------------------------

*/

var Imported = Imported || {} ;
var ZERO = ZERO || {};
Imported.ZERO_WalkingSpeed = 1;
ZERO.WalkingSpeed = ZERO.WalkingSpeed || {};

(function($) {
    $.params = PluginManager.parameters("Walking_Dash_Speed_Plus");
    $.speed = Number($.params["Walking Speed"].trim());
    $.dash = Number($.params["Dash Speed"].trim());
    var duringEvent = false;

    // Determine if walking during event
    var ZERO_processMoveCommand = Game_Character.prototype.processMoveCommand;
    Game_Character.prototype.processMoveCommand = function(command) {
        duringEvent = true;
        ZERO_processMoveCommand.call(this, command);
    }

    // Determine if walking via inputs
    Game_Player.prototype.isNormal = function() {
        if (this._vehicleType === 'walk' && !this.isMoveRouteForcing()){
            duringEvent = false;
            return true;
        }else{
            return false;
        }
    };

    // Change character speed (3 slow, 4 normal, 5 fast)
    Game_Player.prototype.realMoveSpeed = function() {
        if (duringEvent) return this._moveSpeed + (this.isDashing() ? 1 : 0); // Use default speed during events
        else return $.speed + (this.isDashing() ? $.dash : 0);
    };
})(ZERO.WalkingSpeed);
 
Last edited:

Zero_G

Villager
Member
Joined
Mar 28, 2020
Messages
28
Reaction score
18
First Language
English
Primarily Uses
RMVXA
Fixed movement speed was always set to 5
Fixed movement speed was read wrongly
 

CMS

Villager
Member
Joined
Nov 28, 2014
Messages
14
Reaction score
3
First Language
Dutch
Primarily Uses
I've been looking for a speed plugin that can handle decimals, so this is great. It's seems to be working just fine!
If I could be so bold as to make a possible feature suggestion:
maybe make it possible for the user to set the increase in speed when the player is dashing.
 

Zero_G

Villager
Member
Joined
Mar 28, 2020
Messages
28
Reaction score
18
First Language
English
Primarily Uses
RMVXA
I've been looking for a speed plugin that can handle decimals, so this is great. It's seems to be working just fine!
If I could be so bold as to make a possible feature suggestion:
maybe make it possible for the user to set the increase in speed when the player is dashing.
Done, it was a quick fix. Couldn't test it, but it should work. (Remember to delete the plugin from the config and then apply it again, as it has a new parameter)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I think in the pursuit of making the game look and sound custom, we never really start making a game. Finish the game first using all necessary plugins (with placeholder assets), then replace it with the real ones.

I haven't finished a game, but I try this method. Progress seems to be faster. :D
Every now and then I think about all the things I need in my project, and get overwhelmed. Just focus on your tilesets, me. You can't build your maps without 'em!
If a picture speaks 1000 words, how many pictures does a video speak??
I don't really get the "Pass Interference" Flag in (American) Football. Aren't you SUPPOSED to interfere with passes in Defense?? What exactly is the threshold that warrants a Flag?
TS Zeta.. blow your ass east... I cant take a round 3.

Forum statistics

Threads
104,431
Messages
1,006,311
Members
135,955
Latest member
Zhainong
Top