Constant Movement Speed?

I want to make a game where rather than having two movement speeds, walking by default and running by holding down a button, the actor runs at a constant speed faster than the normal walk, good for traversing the world without needing one of your fingers on another key. Similar to Undertale; Frisk walks at a speed suited to the world around them. (I think Mad Father does this too?? But I haven't actually played that one.) I tried looking this up, but I found varied instructions and no solid script. I figured it would be better to double-check on the forums.
And what about when you're in a vehicle? Vehicles go at a faster speed by default.
And what about when you're in a vehicle? Vehicles go at a faster speed by default.

The game wouldn't have vehicles. But, assuming that there were, then they would move at or a bit faster than the standard shift/run speed.
Well, the player moves at speed 4 by default, as does the boat. The ship moves at speed 5 and the airship at speed 6. So if you want the player to move at a faster speed than the default, that means 5, and vehicles would use 6.

This in a new file (any name) should do what you're after:

Code:
var _Game_Player_initMembers = Game_Player.prototype.initMembers;
Game_Player.prototype.initMembers = function() {
  _Game_Player_initMembers.call(this);
  this._moveSpeed = 5;
};

Game_Player.prototype.isDashing = function() {
  return false;
};

var _Game_Player_getOffVehicle = Game_Player.prototype.getOffVehicle;
Game_Player.prototype.getOffVehicle = function () {
  _Game_Player_getOffVehicle.call(this);
  if (!this.isInVehicle()) {
    this.setMoveSpeed(5);
  }
};

Game_Vehicle.prototype.initMoveSpeed = function() {
  this.setMoveSpeed(6);
};
I got an error booting up the game with the script:

Script 'Movement Speed' line 12: SyntaxError Occurred.

unexpected ')'
Game_Player.prototype.getOffVehicle = function () {​
I don't see anything wrong with that. Do you have other plugins that modify vehicle behaviour? Have you made any changes to the script (even accidentally)?
It's because you used JavaScript in the VX Ace script editor.
Nope, no other scripts like that, unless it's conflicting with the default...

Not sure what that means, I'm relatively new to this. I thought VX Ace didn't have Javascript?
It doesn't, but that script looks like it might be JavaScript, not Ruby. Maybe Shaz mistook which forum this was in. So...

@Shaz would you please confirm if the script in post 4 is Ruby?
Sorry - I did think this was the MV forum 🙁

Try this instead, in a new script slot:

Code:
class Game_Player < Game_Character
  def init_public_members
    super
    @move_speed = 5
  end

  def dash?
    return false
  end

  alias shaz_get_off_vehicle get_off_vehicle
  def get_off_vehicle
    shaz_get_off_vehicle
    @move_speed = 5 if @vehicle_type == :walk
  end
end

class Game_Vehicle < Game_Character
  def init_move_speed
    @move_speed = 6
  end
end
Ah, thank you! This works perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/constant-movement-speed.74797/