Seen 17 Hours Ago
Posted 1 Day Ago
227 posts
4 Years
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:


# pbMount(Tauros)
module Tauros
MoveSheet = ["Pokeride/boy_tauros","Pokeride/girl_tauros"]
MoveSpeed = 5.0
ActionSheet = ["Pokeride/boy_tauros_charge","Pokeride/girl_tauros_charge"]
ActionSpeed = 5.6
RockSmash = true
end
# pbMount(Charizard)
module Charizard
MoveSheet = ["boy_charizard","girl_charizard"]
MoveSpeed = 2
ActionSheet = ["boy_charizard","girl_charizard"]
ActionSpeed = 2
end


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

Seen 21 Minutes Ago
Posted 26 Minutes Ago
774 posts
1 Years
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:


# pbMount(Tauros)
module Tauros
MoveSheet = ["Pokeride/boy_tauros","Pokeride/girl_tauros"]
MoveSpeed = 5.0
ActionSheet = ["Pokeride/boy_tauros_charge","Pokeride/girl_tauros_charge"]
ActionSpeed = 5.6
RockSmash = true
end
# pbMount(Charizard)
module Charizard
MoveSheet = ["boy_charizard","girl_charizard"]
MoveSpeed = 2
ActionSheet = ["boy_charizard","girl_charizard"]
ActionSpeed = 2
end


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?
Seen 17 Hours Ago
Posted 1 Day Ago
227 posts
4 Years
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

Seen 3 Hours Ago
Posted 3 Days Ago
44 posts
23 Days
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

Seen 3 Hours Ago
Posted 3 Days Ago
44 posts
23 Days
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:

  def update_stepping
  if ALWAYS_ANIMATE
    $PokemonTemp.dependentEvents.update_stepping
    if PBTerrain.isIce?(pbGetTerrainTag)
      followingMoveRoute([PBMoveRoute::StepAnimeOff])
      return
    end

    events = $PokemonGlobal.dependentEvents
    for i in 0...events.length
      @realEvents[i].move_speed = $game_player.move_speed
    end
    followingMoveRoute([PBMoveRoute::StepAnimeOn])
  end


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

Seen 21 Minutes Ago
Posted 26 Minutes Ago
774 posts
1 Years
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:
class Game_Character
  attr_accessor :step_anime
end
This makes the step_anime toggle accessible from outside the class.
Then, in the function
def pbMount(_module)
below the line:
  $game_player.setDefaultCharName(sheet,$game_player.fullPattern)
paste this:
  $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:
  $game_player.step_anime = true if _module.respond_to?("IdleAnimation") && _module.IdleAnimation
Also, in your Charizard mounting module, add this:
  IdleAnimation = true
Also, in the function:
def pbDismount
below the line:
  $game_player.setDefaultCharName(nil,$game_player.fullPattern)
paste this:
  $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

Seen 3 Hours Ago
Posted 3 Days Ago
44 posts
23 Days
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

Seen 21 Minutes Ago
Posted 26 Minutes Ago
774 posts
1 Years
I have an interesting attempt. In the file Game_Player, I rewrote the following function:
  def move_generic(dir, turn_enabled = true)
    # To block player movement when L is pressed
    # return false if Input.press?(Input::L) && [email protected]_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.
Seen 17 Hours Ago
Posted 1 Day Ago
227 posts
4 Years
I have an interesting attempt. In the file Game_Player, I rewrote the following function:
  def move_generic(dir, turn_enabled = true)
    # To block player movement when L is pressed
    # return false if Input.press?(Input::L) && [email protected]_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?
Seen 6 Hours Ago
Posted 2 Days Ago
8 posts
15 Days
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