Slow down stepping animation?

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
For what I want to use stepping animations for, the default speed is far too quick, even if I have set the speed to one. Is there a way to have it much, much slower than the default? Game_CharacterBase doesn't seem to be the place where the speed is set, and I don't know where else to look.

Thanks.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Try changing the frequency rather than the speed. Speed refers to speed of movement (between tiles) but frequency is the speed of the animation.

However, to change the speed via script, try

object.move_speed = x
object.move_frequency = x

where x is the number and object is $game_player or a follower or an event object.

You would also have to add this little script snippet:

Code:
class Game_CharacterBase
  attr_accessor :move_speed
  attr_accessor :move_frequency
end

OR, instead of all of that, you could use a script in a move route, where you select the player or event, and just make it say @move_speed = x or @move_frequency = x - that way you won't need the script snippet, and you won't need to set a variable to a player or event object. So that's probably the easier way.
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz I already had the frequency down to one, and it's still too fast. What I'm trying to do is have smoke very gently billowing, and even on the lowest settings it still looks like it's dancing a jig.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
How about changing the multiplier. Insert this script
Code:
class Game_CharacterBase
  attr_writer :step_walk_multi
  def step_walk_multi
    return @step_walk_multi ||= 1.5
  end
 
  attr_writer :step_stop_multi
  def step_stop_multi
    return @step_stop_multi ||= 1.0
  end
 
  def update_anime_count
    if moving? && @walk_anime
      @anime_count += step_walk_multi
    elsif @step_anime || @pattern != @original_pattern
      @anime_count += step_stop_multi
    end
  end
end
Technical stuff ahead:
The stepping animation in VXA is calculated by this formula
Code:
@anime_count > 18 - real_move_speed * 2
  • anime_count is updated per frame
  • When the character is stopping, the variable "anime_count" is updated by 1 per frame (if stepping animation is checked).
  • When the character is moving, the variable "anime_count" updated by 1.5 per frame, which is 50% faster. You noticed that stepping animation is much faster when the character is moving.
  • real_move_speed is, well the movement speed. Normal move speed, and +1 if it's dashing (event don't dash, so it's player only).
  • If the moving speed is equal as 4, then the formula becomes "anime_count > 18 - 4 * 2" OR "anime_count > 10" which mean, the sprite frame will be changed after 11 frames passed when not moving.
  • When the sprite is moving, it becomes a little bit complicated. Per frame, it updated by 1.5 value which means if the movement speed is equal as 4, then after 7 frames pass, the "anime_count" variable becomes 10.5. Which mean, the sprite change the frame after 7 frames passed.
So what my script does?
It changes the 1 and 1.5 multipliers.
By using a script call
Code:
object.step_walk_multi = 2.5
object.step_stop_multi = 2.5
You can change those multiplier. Object is the object that is already explained by Shaz above.
This setting is not saved, means if you move to another map and back, the variable multiplier will reset

Disclaimer:
As always, I haven't tested it.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen I installed the snippet and activated this script call for event id 6
Code:
$game_map.events[6].step_walk_multi = 2.5
There was no discernable difference in the speed of the animation.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
@Kes you're setting it for walking stepping animation, not stepping animation when it's not moving.
Additionally, as always, see if it's working in a fresh project.
And try an extreme value like `10.0` or `0.1`
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen Crossed wires here - this is not for walking stepping animation, but precisely for stepping animation when not moving. As I mentioned in one of my posts, it's actually for slowly billowing smoke.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
@Kes Then you should use this instead
Code:
object.step_stop_multi = 0.1
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen That does the trick.
Thank you very much. No more demented smoke.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top