The PokéCommunity Forums Fan Games Game Development Scripts, Tutorials & Tools
Essentials Script Make the player's surfing charset depend on the Pokémon that used Surf

Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #1    
Old September 1st, 2015 (9:06 AM). Edited September 7th, 2015 by Zeak6464.
Zeak6464's Avatar
Zeak6464 Zeak6464 is offline
Zeak #3205 - Discord
     
    Join Date: Mar 2013
    Location: USA
    Age: 25
    Gender: Male
    Nature: Calm
    Posts: 557
    Thanks to Rot8er_ConeX
    Original Concept : http://www.pokecommunity.com/showthread.php?t=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
          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
    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
    __________________
    Green Remix is Done !
    Thank you for the many years !
    Reply With Quote
      #2    
    Old September 12th, 2018 (7:43 AM).
    WolfPP's Avatar
    WolfPP WolfPP is offline
       
      Join Date: Aug 2018
      Location: Brazil
      Gender: Male
      Nature: Jolly
      Posts: 143
      Sorry about the ress but i want to put in my game.

      So, im usin v17.2 and i did everything (search to 'def Kernel.pbUpdateVehicle' and i found in Game_Player section script) but when i surf nothing happens (normal surf).

      The image:

      https://www.deviantart.com/jynxedones/art/Brendan-Gyarados-Swim-Sprite-553572420

      ty ty!
      Reply With Quote
        #3    
      Old September 12th, 2018 (8:17 AM).
      bo4p5687 bo4p5687 is offline
         
        Join Date: May 2018
        Location: Việt Nam (Vietnam)
        Gender: Male
        Nature: Relaxed
        Posts: 75
        Quote:
        Originally Posted by WolfPP View Post
        Sorry about the ress but i want to put in my game.

        So, im usin v17.2 and i did everything (search to 'def Kernel.pbUpdateVehicle' and i found in Game_Player section script) but when i surf nothing happens (normal surf).

        The image:

        https://www.deviantart.com/jynxedones/art/Brendan-Gyarados-Swim-Sprite-553572420

        ty ty!
        Did you put the image in folder Graphics\Characters ? And did the name is boy_surfGyara (boy) or girl_surfGyara (girl) ?
        Reply With Quote
          #4    
        Old September 12th, 2018 (8:47 AM). Edited September 12th, 2018 by WolfPP.
        WolfPP's Avatar
        WolfPP WolfPP is offline
           
          Join Date: Aug 2018
          Location: Brazil
          Gender: Male
          Nature: Jolly
          Posts: 143
          https://imgur.com/a/VgoRqA1

          Please can you check?

          PS: And yes, i have the pokemon in my party lol
          Reply With Quote
            #5    
          Old September 12th, 2018 (9:22 PM).
          bo4p5687 bo4p5687 is offline
             
            Join Date: May 2018
            Location: Việt Nam (Vietnam)
            Gender: Male
            Nature: Relaxed
            Posts: 75
            Quote:
            Originally Posted by WolfPP View Post
            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
            Reply With Quote
              #6    
            Old September 13th, 2018 (4:49 AM).
            WolfPP's Avatar
            WolfPP WolfPP is offline
               
              Join Date: Aug 2018
              Location: Brazil
              Gender: Male
              Nature: Jolly
              Posts: 143
              Quote:
              Originally Posted by bo4p5687 View Post
              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'.
              Reply With Quote
                #7    
              Old September 13th, 2018 (5:56 AM).
              bo4p5687 bo4p5687 is offline
                 
                Join Date: May 2018
                Location: Việt Nam (Vietnam)
                Gender: Male
                Nature: Relaxed
                Posts: 75
                Quote:
                Originally Posted by WolfPP View Post
                i did...

                Above 'Main' and below 'Game_Player'.
                Ok! And you can show me what code did you add in "def Kernel.pbUpdateVehicle"?
                Reply With Quote
                  #8    
                Old September 13th, 2018 (6:47 AM).
                WolfPP's Avatar
                WolfPP WolfPP is offline
                   
                  Join Date: Aug 2018
                  Location: Brazil
                  Gender: Male
                  Nature: Jolly
                  Posts: 143
                  Quote:
                  Originally Posted by bo4p5687 View Post
                  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
                  Reply With Quote
                    #9    
                  Old September 13th, 2018 (7:32 AM).
                  bo4p5687 bo4p5687 is offline
                     
                    Join Date: May 2018
                    Location: Việt Nam (Vietnam)
                    Gender: Male
                    Nature: Relaxed
                    Posts: 75
                    Quote:
                    Originally Posted by WolfPP View Post
                    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.
                    Reply With Quote
                      #10    
                    Old September 13th, 2018 (8:18 AM). Edited September 13th, 2018 by WolfPP.
                    WolfPP's Avatar
                    WolfPP WolfPP is offline
                       
                      Join Date: Aug 2018
                      Location: Brazil
                      Gender: Male
                      Nature: Jolly
                      Posts: 143
                      Quote:
                      Originally Posted by bo4p5687 View Post
                      So strange! In your party, did you have Gyarados ? If you did, I don't know why your image don't show.

                      Quote:
                      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?
                      Reply With Quote
                        #11    
                      Old September 13th, 2018 (8:40 AM).
                      bo4p5687 bo4p5687 is offline
                         
                        Join Date: May 2018
                        Location: Việt Nam (Vietnam)
                        Gender: Male
                        Nature: Relaxed
                        Posts: 75
                        Quote:
                        Originally Posted by WolfPP View Post
                        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
                        Reply With Quote
                          #12    
                        Old September 13th, 2018 (8:46 AM).
                        WolfPP's Avatar
                        WolfPP WolfPP is offline
                           
                          Join Date: Aug 2018
                          Location: Brazil
                          Gender: Male
                          Nature: Jolly
                          Posts: 143
                          Quote:
                          Originally Posted by bo4p5687 View Post
                          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
                          Reply With Quote
                            #13    
                          Old September 13th, 2018 (9:26 AM).
                          bo4p5687 bo4p5687 is offline
                             
                            Join Date: May 2018
                            Location: Việt Nam (Vietnam)
                            Gender: Male
                            Nature: Relaxed
                            Posts: 75
                            Quote:
                            Originally Posted by WolfPP View Post
                            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.
                            Reply With Quote
                            Reply

                            Quick Reply

                            Join the conversation!

                            Create an account to post a reply in this thread, participate in other discussions, and more!

                            Create a PokéCommunity Account
                            Thread Tools

                            Posting Rules
                            You may not post new threads
                            You may not post replies
                            You may not post attachments
                            You may not edit your posts

                            BB code is On
                            Smilies are On
                            [IMG] code is On
                            HTML code is Off

                            Forum Jump


                            All times are GMT -8. The time now is 11:07 PM.