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

How would i make an item like Ice Boots that let me walk on ice without sliding for post game stuff?

1,682
Posts
8
Years
    • Seen yesterday
    After a bit of looking around you'll want to edit this proc here in PField_Field, line 336.
    Code:
    Events.onStepTakenFieldMovement+=proc {|sender,e|
      event = e[0] # Get the event affected by field movement
      if $scene.is_a?(Scene_Map)
        currentTag = pbGetTerrainTag(event)
        if PBTerrain.isJustGrass?(pbGetTerrainTag(event,true))  # Won't show if under bridge
          $scene.spriteset.addUserAnimation(GRASS_ANIMATION_ID,event.x,event.y,true,1)
        elsif event==$game_player
          if currentTag==PBTerrain::WaterfallCrest
            # Descend waterfall, but only if this event is the player
            Kernel.pbDescendWaterfall(event)
          elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding
            Kernel.pbSlideOnIce(event)
          end
        end
      end
    }

    The big bit you care about is the line here
    Code:
    elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding
    This checks if the player is standing on Ice and is NOT currently sliding. Adding another condition to the elsif like && !$PokemonBag.pbHasItem?(:ICEBOOTS) (which would make the full condition: the player is on ice, NOT sliding, and doesn't have the item Ice boots)

    Kernel.pbSlideOnIce does the actual sliding, It's only called once (right here), and it's for the best not to touch the method itself.

    There might be other changes necessary because the way the player walks is so stiff and quite funny to watch, but this will fix the sliding itself.
    My condition:
    Code:
    elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding && !$PokemonBag.pbHasItem?(:REPEL)

    Looking a little farther. You probably need to edit this bit here in Game_Player_Visuals, line 59.
    Code:
      def update
        if PBTerrain.isIce?(pbGetTerrainTag)
          @move_speed = ($RPGVX) ? 6.5 : 4.8 # Sliding on ice)
    Making basically the same change here does the trick. We just need to add the same "doesn't have Ice boots" check.
    We still can't run on Ice though. That would require editing either def pbCanRun? or def PBTerrain.onlyWalk?
    I recommend changing the latter.
    Code:
      def PBTerrain.onlyWalk?(tag)
        return tag==PBTerrain::TallGrass ||
               (tag==PBTerrain::Ice && !$PokemonBag.pbHasItem?(:REPEL))
      end

    Huh, really got carried away with this one.
     
    4
    Posts
    7
    Years
    • Seen Jul 11, 2019
    Thanks alot!
    I was hoping to find a way to make the item be able to be turned on and off though
     
    1,682
    Posts
    8
    Years
    • Seen yesterday
    in that case, you should look at how the expall item works in Item effects, where it switches itself to an otherwise identical exp all off item.

    I can't remember their exact symbol names but you can't miss it if you look for the OFF.

    Edit: Back on my computer to check it.
    Code:
    ItemHandlers::UseInField.add(:EXPALL,proc{|item|
       $PokemonBag.pbChangeItem(:EXPALL,:EXPALLOFF)
       Kernel.pbMessage(_INTL("The Exp Share was turned off."))
       next 1
    })
    
    ItemHandlers::UseInField.add(:EXPALLOFF,proc{|item|
       $PokemonBag.pbChangeItem(:EXPALLOFF,:EXPALL)
       Kernel.pbMessage(_INTL("The Exp Share was turned on."))
       next 1
    })
    You basically do the same thing for your Ice boots.
     
    Last edited:
    Back
    Top