• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

Make the player's surfing charset depend on the Pokémon that used Surf

Zeak6464

Zeak #3205 - Discord
  • 1,101
    Posts
    11
    Years
    Thanks to Rot8er_ConeX
    Original Concept : https://www.pokecommunity.com/threads/354015

    This script allows the player to become the pokemon sprite if pokemon used the move or is in party

    -----------------------------------------------------
    you want to go in the scripts to PField_Field, around line 1601 you'll find the following code:

    Code:
    def Kernel.pbUpdateVehicle
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if meta
        if $PokemonGlobal.diving
          $game_player.character_name=pbGetPlayerCharset(meta,5) # Diving graphic
        elsif $PokemonGlobal.surfing
          [COLOR="red"]if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else[/COLOR]
            $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          [COLOR="Red"]end[/COLOR]
        elsif $PokemonGlobal.bicycle
          $game_player.character_name=pbGetPlayerCharset(meta,2) # Bicycle graphic
        else
          $game_player.character_name=pbGetPlayerCharset(meta,1) # Regular graphic
        end
      end
    end
    Add the stuff in red.

    Then you need to add this somewhere above Main
    Code:
    module Settings
      GyaraSurfFileName = [
        "boy_surfGyara", # Player A
        "girl_surfGyara", # Player B
        "", # Player C
        "", # Player D
        "", # Player E
        "", # Player F
      ]
    end

    You can change the file names. But whatever you do name them to, you need an image of the same name in Graphics/Characters/

    This can also be used for HM-Surf & Bike
     
    Last edited:
    https://imgur.com/a/VgoRqA1

    Please can you check?

    PS: And yes, i have the pokemon in my party lol

    And did you add this code ?
    Code:
    module Settings
      GyaraSurfFileName = [
        "boy_surfGyara", # Player A
        "girl_surfGyara", # Player B
        "", # Player C
        "", # Player D
        "", # Player E
        "", # Player F
      ]
    end

    if you didn't, add this somewhere
     
    And did you add this code ?
    Code:
    module Settings
      GyaraSurfFileName = [
        "boy_surfGyara", # Player A
        "girl_surfGyara", # Player B
        "", # Player C
        "", # Player D
        "", # Player E
        "", # Player F
      ]
    end

    if you didn't, add this somewhere

    i did...

    Above 'Main' and below 'Game_Player'.
     
    Ok! And you can show me what code did you add in "def Kernel.pbUpdateVehicle"?

    Sure! Really Thanks to help me <3 in Game_Player script

    Code:
    def Kernel.pbUpdateVehicle
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if meta
        if $PokemonGlobal.diving
          $game_player.character_name=pbGetPlayerCharset(meta,5) # Diving graphic
        elsif $PokemonGlobal.surfing
          if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else
          $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          end
        elsif $PokemonGlobal.bicycle
          $game_player.character_name=pbGetPlayerCharset(meta,2) # Bicycle graphic
        else
          $game_player.character_name=pbGetPlayerCharset(meta,1) # Regular graphic
        end
      end
    end
     
    Sure! Really Thanks to help me <3 in Game_Player script

    Code:
    def Kernel.pbUpdateVehicle
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if meta
        if $PokemonGlobal.diving
          $game_player.character_name=pbGetPlayerCharset(meta,5) # Diving graphic
        elsif $PokemonGlobal.surfing
          if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else
          $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          end
        elsif $PokemonGlobal.bicycle
          $game_player.character_name=pbGetPlayerCharset(meta,2) # Bicycle graphic
        else
          $game_player.character_name=pbGetPlayerCharset(meta,1) # Regular graphic
        end
      end
    end

    So strange! In your party, did you have Gyarados ? If you did, I don't know why your image don't show.
     
    So strange! In your party, did you have Gyarados ? If you did, I don't know why your image don't show.


    https://imgur.com/a/VgoRqA1

    Please can you check?

    PS: And yes, i have the pokemon in my party lol

    I try to put him my first pokemon. Nothin happens too...

    My feels for me :/

    EDIT:

    LOL i put Rock Climb Overworld in my game:

    https://www.pokecommunity.com/showthread.php?t=413241

    That is it? And how can "fix" that o.o


    EDIT2:
    REALLY FOK YEARH

    Code:
    def Kernel.pbUpdateVehicle
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if meta
        if $PokemonGlobal.diving
          $game_player.character_name=pbGetPlayerCharset(meta,5) # Diving graphic
        elsif $PokemonGlobal.surfing
          if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else
          $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          end
        elsif $PokemonGlobal.rockclimbing
          $game_player.character_name=pbGetPlayerCharset(meta,3) # Rock Climb graphic
        elsif $PokemonGlobal.bicycle
          $game_player.character_name=pbGetPlayerCharset(meta,2) # Bicycle graphic
        else
          $game_player.character_name=pbGetPlayerCharset(meta,1) # Regular graphic
        end
      end
    end

    I have my Gyarados,

    ty ty!

    https://imgur.com/a/un2Jn4L

    But have a whale down -.- How can i remove?
     
    Last edited:
    I try to put him my first pokemon. Nothin happens too...

    My feels for me :/

    EDIT:

    LOL i put Rock Climb Overworld in my game:

    https://www.pokecommunity.com/showthread.php?t=413241

    That is it? And how can "fix" that o.o

    Find def Kernel.pbUpdateVehicle
    and change
    Code:
    elsif $PokemonGlobal.surfing
     $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
    into
    Code:
    elsif $PokemonGlobal.surfing
          if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else
            $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          end
     
    Find def Kernel.pbUpdateVehicle
    and change
    Code:
    elsif $PokemonGlobal.surfing
     $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
    into
    Code:
    elsif $PokemonGlobal.surfing
          if pbHasSpecies?(:GYARADOS)
            trainer=$Trainer if !trainer
            outfit=trainer ? trainer.outfit : 0
            if outfit==0
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]
            else
              $game_player.character_name=Settings::GyaraSurfFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
            end
          else
            $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
          end

    ty ty!

    So how can i remove this whale (normal surf)? And how can put refresh to followin pokemon (by mj74) when i surf with Gyarados, i mean, my pikachu until follow me into the water lol
     
    ty ty!

    So how can i remove this whale (normal surf)? And how can put refresh to followin pokemon (by mj74) when i surf with Gyarados, i mean, my pikachu until follow me into the water lol

    You can try find the method in "class Sprite_SurfBase"
    And rewrite this for the case "in your party, there are Gyarados".
    Moreover, about the following script, find $PokemonGlobal.surfing and change the condition for yourself.
     
    Guess so.

    I just tested it and it worked on v18 with no problems! But I realized that when returning to the Earth's surface, the character's graphic does not return to trchar000_ ?, he remains in the pokemon he is sailing in, until I press the run key to return to his graphic. How does it work?
     
    Back
    Top