MZ How to increase default moving speed incrementally?

Hello guys.

I would like to increase default moving and dashing speed incrementally, by about 25%. I just feel moving slightly faster would work better for my game. Is a plugin needed for this? Or script call?

Also, if it effects anything, I also have Altlimit's pixel movement plugin. Here is the link to the pixel plugin if it can be done in the plugin:
Pixel plugin

Thanks guys any help is appreciated!
You can do this with events already. Simply use the "Set Movement Route..." command and choose the "Change Speed..." option. That's it.

Using events you can set your speed from 1 to 6 (each step is twice as fast as the previous one). The default speed is 4 for the player and 3 for events. The dash speed is always the current speed + 1 (so by default it's 5).

If you need more control over your speed, you're looking for the following function:
Code:
Game_CharacterBase.prototype.setMoveSpeed(moveSpeed)

This allows you to freely set your speed, including negative speeds (-1 is half as fast as 0) and fractional (e.g. speed 1.5).

To set the player's speed, you can do:
Code:
$gamePlayer.setMoveSpeed(10)

... which will make the player 64 times as fast as normal (that's probably not playable anymore).

If you want to set any other event's speed, I recommend using the "Set Movement Route..." event command and choosing the "Script" option. That way, you can use "this" instead of "$gamePlayer".

So for example:
Code:
this.setMoveSpeed(-1)

... which will make the selected event 16 times slower than normal.
In addition, to write a script that makes them accelerate when moving, you'd need to check for movement with the isMoving() function of Game_CharacterBase.

You could probably do a common event for this, but a script will definitely do it.
Code:
$gamePlayer.setMoveSpeed(10)

Hey Nolonar. That code does in fact work. Thanks for that.
Though I am getting an issue with the Altlimit pixel plugin. When I changed the speed to 4.5, it makes my walk down speed faster than when I move up. Any guesses why that might be? Thanks for the code though.
When I changed the speed to 4.5, it makes my walk down speed faster than when I move up. Any guesses why that might be? Thanks for the code though.
I was looking at the code and I can't find a reason why that would be. The plugin doesn't seem to be changing the behavior of the moveSpeed variable.

The moveSpeed variable only influences how many tiles the character will be moving per frame, and the exact formula is:
Code:
2 ^ moveSpeed / 256

So with speeds 4 and 4.5 you'll be moving at following speeds (dashing is always twice as fast):
  • 0.0625 tiles per frame -> ~0.0884 tiles per frame
  • 3 pixels per frame -> ~4.2426 pixels per frame (assuming 48x48 pixel tiles)
  • 180 pixels per second -> ~254.5584 pixels per second (assuming 60 FPS)
  • 3.75 tiles per second -> ~5.3033 tiles per second
There's nothing in that formula (or the plugin, as far as I can see), that would cause your downward speed to be faster than your upward speed.

I also tried using the plugin in my MV and MZ projects, but only got crashes, so I can't help that much. Sorry.
Okay. Well atleast you tried looking for me so that was a big help. I couldn’t figure it out either. I can still use that code to raise the speed though. I guess I might have to use a different pixel plugin. Galvs mv one still works in Mz. Thanks though.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-increase-default-moving-speed-incrementally.127013/