RGSS3 - Custom idle animation speed

● ARCHIVED · READ-ONLY
Started by tvghost 5 posts View original ↗
  1. (For Galv’s Character Animations V.2.1 https://galvs-scripts.com/galvs-character-animations/ )
    How would someone set up a custom speed for the idle animation? (In my case, a slower animation speed).
    Currently, the idle animation plays at whatever speed is set for the player's movement, which looks a bit awkward. This would be used with a regular 3-frame character sprite.
  2. you should modify Game_CharacterBase::update_animation, which is not in the script.
    maybe in a requirement?
    Spoiler
    Code:
    class Game_CharacterBase
      CHR_FPS = 8
      def init_private_members
        @original_direction = 2
        @original_pattern = 0
        @anime_count = 0
        @stop_count = 0
        @jump_count = 0
        @jump_peak = 0
        @locked = false
        @prelock_direction = 0
        @move_succeed = true
      end
     
      def update_animation
        update_anime_count
        if @anime_count > CHR_FPS - real_move_speed #* 2
          update_anime_pattern
          @anime_count = 0
        end
      end
     
      def update_anime_count
        if moving? && @walk_anime
          @anime_count += 1.5
        elsif @step_anime || @pattern != @original_pattern
          @anime_count += 1
        end
      end
     
      def reset_pattern
        @pattern = 1
      end
     
      def update_anime_pattern
        if !@step_anime && @stop_count > 0
          @pattern = @original_pattern
        else
          @pattern += 1
        end
      end
    end
    my mod, for a custom work.... not sure if it would suit you, but that's what you have to fix.
  3. gstv87 said:
    you should modify Game_CharacterBase::update_animation, which is not in the script.
    maybe in a requirement?
    Spoiler
    Code:
    class Game_CharacterBase
      CHR_FPS = 8
      def init_private_members
        @original_direction = 2
        @original_pattern = 0
        @anime_count = 0
        @stop_count = 0
        @jump_count = 0
        @jump_peak = 0
        @locked = false
        @prelock_direction = 0
        @move_succeed = true
      end
     
      def update_animation
        update_anime_count
        if @anime_count > CHR_FPS - real_move_speed #* 2
          update_anime_pattern
          @anime_count = 0
        end
      end
     
      def update_anime_count
        if moving? && @walk_anime
          @anime_count += 1.5
        elsif @step_anime || @pattern != @original_pattern
          @anime_count += 1
        end
      end
     
      def reset_pattern
        @pattern = 1
      end
     
      def update_anime_pattern
        if !@step_anime && @stop_count > 0
          @pattern = @original_pattern
        else
          @pattern += 1
        end
      end
    end
    my mod, for a custom work.... not sure if it would suit you, but that's what you have to fix.

    Did some adjustments and it works great. Thank you!