• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] PokeRide Support Number TWO <3

232
Posts
7
Years
    • Seen Apr 24, 2024
    I'm working on the PokeRide script. I would like a support ...

    We have two mounts with different Pokémon as in the example:

    Spoiler:


    I don't want to modify Tauros, it's perfect.
    But, I wish the Charizard had animated on the mount. Because it flies, right? I would like it to have fixed animation because of its wings that flap in the air. What code should I implement?

    Thanks!
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I'm working on the PokeRide script. I would like a support ...

    We have two mounts with different Pokémon as in the example:

    Spoiler:


    I don't want to modify Tauros, it's perfect.
    But, I wish the Charizard had animated on the mount. Because it flies, right? I would like it to have fixed animation because of its wings that flap in the air. What code should I implement?

    Thanks!

    It depends... Do you have an animation sheet for Charizard?
    You basically want an idle animation for Charizard?
     
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    It depends... Do you have an animation sheet for Charizard?
    You basically want an idle animation for Charizard?

    I have my character's graphic mounted on the charizard, I use the pokeride script to assemble it, but I want it to be animated, so the graphic would change from second to second, just like the Pokémon that follows Golisopod. Sorry for the English, translator ...
     

    JulyArt

    New Developer
    70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    an idle code for trainer even without mount would be incredible. it's on my to do list since I feel like that'd add a lot of emergence to the game. (but wayyy down there on the list)

    especially if other npc are idleable too. would be so fun

    there needs to be sprite sheet ofc. but, dang, imagine all the dancing NPC lol
     

    JulyArt

    New Developer
    70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    So 'Pokemon Follow' does have a pretty 'awesome' idle. I'm unsure how to fully incorporate into trainer idle/mount idle, however it shouldn't be 'too difficult'. at my level though, I think it'd take some time, so I'm gonna slightly hope community does it for us before I try haha. I'll update this post once I do start trying. Usually, I just try to read and see what's going on with the interaction.

    It took me 2 hrs yesterday just to implement a simple 'select random cry from this species array if specie = x', so I feel like it'd take me several hours to get this working too.

    For anyone whom would like to try, these are the codes to be looking at, in order to replicate its effect onto trainer idle/mount idle. It seems that 'Pokemon Follow' has a dedicated list of 'always animate' if the Pokemon is flying. (good one dev. of PKMN Follow)

    Spoiler:

    I'd probably finish 'trainer idle' first, as mount idle right afterward shouldn't take 'that much longer' unless something I'm missing. Planning to do a 'very basic' format similar to Pokemon Follow
    In my own project though, I'd love to see intricacy. e.g. if no input within last 5 seconds, then start idle. randomize idle. can be based on happiness value. etc. the limitation is unreal.
    When NPC can idle as well, that's the grand holy star. That would add so much life to a game.
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I have my character's graphic mounted on the charizard, I use the pokeride script to assemble it, but I want it to be animated, so the graphic would change from second to second, just like the Pokémon that follows Golisopod. Sorry for the English, translator ...

    Ok, found it.
    The idea is that Events in RPG Maker already have an option in their page to have a idle animation, it's the check box "Stop Animation" (which is in fact a "stepping" animation, so exactly what you want) at the left bottom of the event window. The problem is that this option is hidden and cannot be accessed in code, unless in the class itself.

    So. Paste this somewhere in the PokeRider script:
    Code:
    class Game_Character
      attr_accessor :step_anime
    end
    This makes the step_anime toggle accessible from outside the class.
    Then, in the function
    Code:
    def pbMount(_module)
    below the line:
    Code:
      $game_player.setDefaultCharName(sheet,$game_player.fullPattern)
    paste this:
    Code:
      $game_player.step_anime = true
    Maybe if you only want Charizard to have this idle animation, you will need some specific scripting, write this instead:
    Code:
      $game_player.step_anime = true if _module.respond_to?("IdleAnimation") && _module.IdleAnimation
    Also, in your Charizard mounting module, add this:
    Code:
      IdleAnimation = true
    Also, in the function:
    Code:
    def pbDismount
    below the line:
    Code:
      $game_player.setDefaultCharName(nil,$game_player.fullPattern)
    paste this:
    Code:
      $game_player.step_anime = false
    This will trigger an idle animation only when you mount something, and disable the animation when you dismount.


    an idle code for trainer even without mount would be incredible. it's on my to do list since I feel like that'd add a lot of emergence to the game. (but wayyy down there on the list)

    especially if other npc are idleable too. would be so fun

    there needs to be sprite sheet ofc. but, dang, imagine all the dancing NPC lol

    To be honest, I wanted to see if you were going to find this ^^"
    However, the solution I give above make the script look like it's walking in place, so I am not sure if that's what you want ^^"
     

    JulyArt

    New Developer
    70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    that's beautiful.

    you've saved us all a lot of time yo, and I thank-you.

    this is one of those situation in which familiarity with RPGmaker and essentials is very useful, as longtime user knows how the element/object interact with one another.

    However, the solution I give above make the script look like it's walking in place, so I am not sure if that's what you want ^^"

    so currently, I plan to do something like. >activate idle animation e.g. now the sprite is walking in place. however, if I code before that 'change sprite sheet to idle' noice. then ofc revert when condition for idle turns.
    which in theory should work.

    now I shall ask a question that's doesn't seem to relate, it does though haha in terms of placement of conditioning for trainer idle.

    Let's say I'd like to do a 'dash'. e.g. if player press L input, instead of moving player 1 square in direction or face direction, move 3 squares in facing direction instead. (1 by 1, e.g. move forward 1x 3times, as that'd be simpler to not cause issue)

    Which script would it be to place the check 'If player press L input in the overworld, dash them 3 square'. Like I'm unsure where to put the 'check'.
    This location is likely where the 'idle check' will go too, e.g. if no input within last 5 seconds or something of that mannerism, execute idle.

    edit.1. apologies original poster for slightly steering off topic. it kind of relates. huhu forgive me.
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I have an interesting attempt. In the file Game_Player, I rewrote the following function:
    Code:
      def move_generic(dir, turn_enabled = true)
        # To block player movement when L is pressed
        # return false if Input.press?(Input::L) && !@move_route_forcing
        l_pressed = Input.press?(Input::L)
        turn_generic(dir, true) if turn_enabled
        if !$PokemonTemp.encounterTriggered
          x_offset = (dir == 4) ? -1 : (dir == 6) ? 1 : 0
          y_offset = (dir == 8) ? -1 : (dir == 2) ? 1 : 0
          if passable?(@x, @y, dir)
            return if pbLedge(x_offset, y_offset)
            return if pbEndSurf(x_offset, y_offset)
            turn_generic(dir, true)
            if l_pressed
              # Check three tiles forward.
              fixed_offset = 1
              for i in 1..3
                fixed_offset = i if passable?(@x + (i-1) * x_offset, @y + (i-1) * y_offset, dir)
              end 
              moveto(@x + fixed_offset * x_offset, @y + fixed_offset * y_offset)
            elsif !$PokemonTemp.encounterTriggered
              @x += x_offset
              @y += y_offset
              $PokemonTemp.dependentEvents.pbMoveDependentEvents
              increase_steps
            end
          else
            if !check_event_trigger_touch(@x + x_offset, @y + y_offset)
              bump_into_object
            end
          end
        end
        $PokemonTemp.encounterTriggered = false
      end
    The problem is that I often lose control and dash twice or more, or sometimes I don't dash at all. I think this is because the L input isn't taken into account at the right time. Not sure why though ^^"

    edit.1. apologies original poster for slightly steering off topic. it kind of relates. huhu forgive me.

    Maybe make another topic ^^" I will post again this response there.
     
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    I have an interesting attempt. In the file Game_Player, I rewrote the following function:
    Code:
      def move_generic(dir, turn_enabled = true)
        # To block player movement when L is pressed
        # return false if Input.press?(Input::L) && !@move_route_forcing
        l_pressed = Input.press?(Input::L)
        turn_generic(dir, true) if turn_enabled
        if !$PokemonTemp.encounterTriggered
          x_offset = (dir == 4) ? -1 : (dir == 6) ? 1 : 0
          y_offset = (dir == 8) ? -1 : (dir == 2) ? 1 : 0
          if passable?(@x, @y, dir)
            return if pbLedge(x_offset, y_offset)
            return if pbEndSurf(x_offset, y_offset)
            turn_generic(dir, true)
            if l_pressed
              # Check three tiles forward.
              fixed_offset = 1
              for i in 1..3
                fixed_offset = i if passable?(@x + (i-1) * x_offset, @y + (i-1) * y_offset, dir)
              end 
              moveto(@x + fixed_offset * x_offset, @y + fixed_offset * y_offset)
            elsif !$PokemonTemp.encounterTriggered
              @x += x_offset
              @y += y_offset
              $PokemonTemp.dependentEvents.pbMoveDependentEvents
              increase_steps
            end
          else
            if !check_event_trigger_touch(@x + x_offset, @y + y_offset)
              bump_into_object
            end
          end
        end
        $PokemonTemp.encounterTriggered = false
      end
    The problem is that I often lose control and dash twice or more, or sometimes I don't dash at all. I think this is because the L input isn't taken into account at the right time. Not sure why though ^^"



    Maybe make another topic ^^" I will post again this response there.

    Hey StCooler, it worked perfectly! Here!
    Thank you for the support.
    I now believe that the Riding system is much more advanced after that!
    But I came across one more problem. Unfortunately, laughter ...

    https://imgur.com/8jtli8h

    When I ride my Charizard, for example ... the flight covers many areas and this visual bug happens in the image with priorities, how to make it overlap everything as if it were a flight, could I make another module for this?
     
    107
    Posts
    3
    Years
    • Seen Apr 27, 2023
    Hey StCooler, it worked perfectly! Here!
    Thank you for the support.
    I now believe that the Riding system is much more advanced after that!
    But I came across one more problem. Unfortunately, laughter ...

    https://imgur.com/8jtli8h

    When I ride my Charizard, for example ... the flight covers many areas and this visual bug happens in the image with priorities, how to make it overlap everything as if it were a flight, could I make another module for this?

    I want it
     
    Back
    Top