じ☆ve冰风 发表于 2026-8-2 14:43:27

Player Movement Speed

Although there are other scripts and ways to increase the player 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).

                Ruby:       
=begin
===============================================================================
Dash and Walking speed plus (by Zero_G)
Version: RGSS3
===============================================================================
== 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


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

== Credits ==
-CACAO, for the followers part

== Usage ==
Just add the plugin.

== Changelog ==
v2.0
- Character will move at normal speed in events
- Follower character fix
-------------------------------------------------------------------------------
=end
module ZERO
    MOVE_SPEED = 5
end


class Game_Player < Game_Character
@@duringEvent = 0

# Determine if walking during event
def process_move_command(command)
   @@duringEvent = 1
    super
   end

   # Determine if walking via inputs
   def normal_walk?
    if @vehicle_type == :walk && !@move_route_forcing
      @@duringEvent = 0
      return true
    else
      return false
    end
end

# Cange character speed
def real_move_speed
    return @move_speed + (dash? ? 1 : 0) if @@duringEvent == 1
    return ZERO::MOVE_SPEED + (dash? ? 1 : 0)
end

end

# Handle followers
class Game_Follower
# Cancel Distance traveled by frame
def distance_per_frame
    @preceding_character.distance_per_frame
end
end




本贴来自国际rpgmaker官方论坛作者:Zero_G处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/player-movement-speed.127064/
页: [1]
查看完整版本: Player Movement Speed