• 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.

Mach and Acro Bike script (v.18.1)

295
Posts
6
Years
    • Seen Aug 15, 2022
    I update this script, the original post Here
    This is Video

    How to use
    Find script in this link -> Link
    Choose version read readme to use

    Credit
    Rei (original)
    bo4p5687 (update)
     
    Last edited:
    11
    Posts
    4
    Years
  • This is a very good script, and in my case extremely useful since my fangame takes place in the Hoenn region.

    The only thing I'd like to note is that when you're jumping with the Acro Bike, your characters turns the direction you're jumping to, while in R/S/E, the character actually keeps facing the direction he was facing before jumping. That's cleary not important and just a graphical detail that isn't even disturbing, but I wanted to report that to you anyway.

    Putting that aside, this script is very cool, and I'm glad you decided to update it to v18.
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    This is a very good script, and in my case extremely useful since my fangame takes place in the Hoenn region.

    The only thing I'd like to note is that when you're jumping with the Acro Bike, your characters turns the direction you're jumping to, while in R/S/E, the character actually keeps facing the direction he was facing before jumping. That's cleary not important and just a graphical detail that isn't even disturbing, but I wanted to report that to you anyway.

    You can do it, in my script, find module PBTerrain
    change into
    Code:
    module PBTerrain
      ACROBIKEUpDown = 18
      ACROBIKELeftRight = 19
      ACROBIKEHOP = 20
      MACHBIKE = 21
      
      def self.isAcroBike?(tag)
        return tag==PBTerrain::ACROBIKEUpDown ||
               tag==PBTerrain::ACROBIKELeftRight
      end
      
      def self.isUDAcroBike?(tag)
        return tag==PBTerrain::ACROBIKEUpDown
      end
      
      def self.isLRAcroBike?(tag)
        return tag==PBTerrain::ACROBIKELeftRight
      end
      
      def self.isAcroBikeHop?(tag)
        return tag==PBTerrain::ACROBIKEHOP
      end
      
      def self.isMachBike?(tag)
        return tag==PBTerrain::MACHBIKE
      end
    end

    Remember: Use 18 for the rails where player just goes up / down and 19 for the rails where player just goes left / right
    18 and 19 is number of terrain tag.

    Then, find class Game_Character
    add above def jump_v17(x_plus, y_plus)

    Code:
      def jump(x_plus, y_plus)
        tag = $game_map.terrain_tag($game_player.x,$game_player.y)
        if !PBTerrain.isAcroBike?(tag)
          if x_plus != 0 or y_plus != 0
            if x_plus.abs > y_plus.abs
              (x_plus < 0) ? turn_left : turn_right
            else
              (y_plus < 0) ? turn_up : turn_down
            end
          end
        end
        new_x = @x + x_plus
        new_y = @y + y_plus
        if (x_plus == 0 and y_plus == 0) || passable?(new_x, new_y, 0)
          @x = new_x
          @y = new_y
          real_distance = Math::sqrt(x_plus * x_plus + y_plus * y_plus)
          distance = [1, real_distance].max
          @jump_peak = distance * Game_Map::TILE_HEIGHT * 3 / 8   # 3/4 of tile for ledge jumping
          @jump_distance = [x_plus.abs * Game_Map::REAL_RES_X, y_plus.abs * Game_Map::REAL_RES_Y].max
          @jump_distance_left = 1   # Just needs to be non-zero
          if real_distance > 0   # Jumping to somewhere else
            @jump_count = 0
          else   # Jumping on the spot
            @jump_count = Game_Map::REAL_RES_X / jump_speed_real   # Number of frames to jump one tile
          end
          @stop_count = 0
          if self.is_a?(Game_Player)
            $PokemonTemp.dependentEvents.pbMoveDependentEvents
          end
          triggerLeaveTile
        end
      end

    And below class Game_Character
    add
    Code:
    class Game_Player
      alias old_up_command_new update_command_new
      def update_command_new
        dir = Input.dir4
        unless pbMapInterpreterRunning? || $game_temp.message_window_showing ||
               $PokemonTemp.miniupdate || $game_temp.in_menu
          tag = $game_map.terrain_tag($game_player.x,$game_player.y)
          if PBTerrain.isUDAcroBike?(tag)
            return if dir == 4 || dir == 6
          elsif PBTerrain.isLRAcroBike?(tag)
            return if dir == 2 || dir == 8
          end
        end
        old_up_command_new
      end
    end

    Now, it will work like you said.
     
    Last edited:
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    Update:
    - Fix image when you press Up, Down, Left, Right with Jump immediately.
     
    1
    Posts
    3
    Years
    • Seen Apr 6, 2024
    I know this pretty old now but do you know how to make it so the rails can be walked under like PbBridge... I've been fumbling with the code for a few hours now and cant seem to make it work.
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    * Update *
    25/6/2022:
    - Compatible version 20
    - Player can has other outfit when using mach bike or acro bike.
    - Acro bike rails can set like bridge.
     
    Back
    Top