Good Morning / Day / Afternoon / Evening everyone.
I have a request for a certain kind of snippet
Let's say I want players and to move on value 3 in world map, and on value 4 in town and dungeon maps.
There is already this script, but there doesn't seem a way to specify a specific map where this can be applied on, let's say with a notetag on the map id or somethng
Is there a way to achieve this? To make it so
1. Being able to assign different movement speeds for player, npcs and vehicles, for specific maps.
I have a request for a certain kind of snippet
Let's say I want players and to move on value 3 in world map, and on value 4 in town and dungeon maps.
There is already this script, but there doesn't seem a way to specify a specific map where this can be applied on, let's say with a notetag on the map id or somethng
Ruby:
#-------------------------------------------------------------------
# Custom Movement Speed
# A simple script made by Ellye.
# This is a free and unencumbered script, provided "as is", no warranties.
#-------------------------------------------------------------------
#-------------------------------------------------------------------
# * Options:
#-------------------------------------------------------------------
# Base speed for every moving character. Default RPG Maker value is 4.
$base_character_speed = 4
# Player movement speed. Default RPG Maker value is 4.
$player_speed = 2
# Player dashing speed bonus. Default RPG Maker value is 1.
# You can also set a negative value, so that you'd have a
# "Walk / Sneaky Button" instead of a "Dash Button".
$dash_speed = 3
# Vehicules movement speed. Default RPG Maker values are 5, 6 and 7.
$boat_speed = 5
$ship_speed = 6
$airship_speed = 5
#-------------------------------------------------------------------
#-------------------------------------------------------------------
#-------------------------------------------------------------------
class Game_CharacterBase
#Add custom movement speed to characters Init
alias :old_init_public_members :init_public_members
def init_public_members
old_init_public_members
@move_speed = $base_character_speed
end
#Add custom dash bonus speed
alias :old_real_move_speed :real_move_speed
def real_move_speed
old_real_move_speed
return @move_speed + (dash? ? $dash_speed : 0)
end
end
class Game_Player
#Adds an accessor to move_speed, so that it can be manipulated by
#Scripts in Events and Common Events more easily (always remember
#to check for vehicles if you do that.)
attr_accessor :move_speed
#Add custom movement speed to player Init
alias :old_initialize :initialize
def initialize
old_initialize
@move_speed = $player_speed
end
#The default get_off_vehicle method sets the player speed to 4...
alias :old_get_off_vehicule :get_off_vehicle
def get_off_vehicle
old_get_off_vehicule
if vehicle.land_ok?(@x, @y, @direction)
@move_speed = $player_speed
end
end
end
class Game_Vehicle
#Set custom Vehicle speeds
alias :old_init_move_speed :init_move_speed
def init_move_speed
old_init_move_speed
@move_speed = $boat_speed if @type == :boat
@move_speed = $ship_speed if @type == :ship
@move_speed = $airship_speed if @type == :airship
end
end
Is there a way to achieve this? To make it so
1. Being able to assign different movement speeds for player, npcs and vehicles, for specific maps.