• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Surf specific sprites

benictron

Rookie
Member
Joined
Jan 30, 2025
Posts
3
i want to see the pokemon that is surfing, like if i surf with gyarados i want, instead of the default fish/whale i want to see the gyarados sprite, it is possible??
 

MakerBlack

Trainer
Member
Joined
Nov 23, 2020
Posts
97
i want to see the pokemon that is surfing, like if i surf with gyarados i want, instead of the default fish/whale i want to see the gyarados sprite, it is possible??
Yes, it is completely possible and simple. This script:

Ruby:
Expand Collapse Copy
def pbGetPlayerCharset(charset, trainer = nil, force = false)
  trainer = $player if !trainer
  outfit = (trainer) ? trainer.outfit : 0
  return nil if !force && $game_player&.charsetData &&
                $game_player.charsetData[0] == trainer.character_ID &&
                $game_player.charsetData[1] == charset &&
                $game_player.charsetData[2] == outfit
  $game_player.charsetData = [trainer.character_ID, charset, outfit] if $game_player
  ret = charset
  if pbResolveBitmap("Graphics/Characters/" + ret + "_" + outfit.to_s)
    ret = ret + "_" + outfit.to_s
  end
  #---- Mount Sprite ----#
  ret = getSurfSprite   if $PokemonGlobal&.surfing
  return ret
end

Now you just need to define which sprites the game will initially recognize in a new getSurfSprite method
 

benictron

Rookie
Member
Joined
Jan 30, 2025
Posts
3
Yes, it is completely possible and simple. This script:

Ruby:
Expand Collapse Copy
def pbGetPlayerCharset(charset, trainer = nil, force = false)
  trainer = $player if !trainer
  outfit = (trainer) ? trainer.outfit : 0
  return nil if !force && $game_player&.charsetData &&
                $game_player.charsetData[0] == trainer.character_ID &&
                $game_player.charsetData[1] == charset &&
                $game_player.charsetData[2] == outfit
  $game_player.charsetData = [trainer.character_ID, charset, outfit] if $game_player
  ret = charset
  if pbResolveBitmap("Graphics/Characters/" + ret + "_" + outfit.to_s)
    ret = ret + "_" + outfit.to_s
  end
  #---- Mount Sprite ----#
  ret = getSurfSprite   if $PokemonGlobal&.surfing
  return ret
end

Now you just need to define which sprites the game will initially recognize in a new getSurfSprite method
thank you but i have two questions
1)Where i put this script
2)What i have to do (In easy terms) with getSurfSprite
 
Last edited:

MakerBlack

Trainer
Member
Joined
Nov 23, 2020
Posts
97
thank you but i have two questions
1)Where i put this script
2)What i have to do (In easy terms) with getSurfSprite
Hello again! def pbGetPlayerCharset is a method that exists in your default Pokémon Essentials, so you should just add this line to it:
Ruby:
Expand Collapse Copy
ret = getSurfSprite if $PokemonGlobal&.surfing
Now to define getSurfSprite you must create a method above Main.

Ruby:
Expand Collapse Copy
def getSurfSprite
  finder = $player.get_pokemon_with_compatible_move(:SURF)
  return if !finder 
  surf   = finder.species
  player_id   = $player.character_ID
  path        = "Graphics/Characters/Surf/"
  ret = "boy_surf"  if $player.character_ID == 1 
  ret = "girl_surf" if $player.character_ID == 2 
  ret = "#{player_id}_#{surf}" if pbResolveBitmap(path + "#{player_id}_#{surf}")
  ret = "Surf/" + ret 
  return ret 
end

Here you should create a folder called Surf inside Characters and put your character's ID, 1 for male and 2 for female (default essentials) and the target species.
For example:
1_GYARADOS.png
2_GYRADOS.png
These would be the names of the files in the folder. With this, when you surf with a Gyarados and the game recognizes that there is a sprite for it, it will run it.
Also drop the boy_surf and girl_surf files into Surf to centralize your surf graphs there.
 

benictron

Rookie
Member
Joined
Jan 30, 2025
Posts
3
I put this:

#===============================================================================
#
#===============================================================================
def pbGetPlayerCharset(charset, trainer = nil, force = false)
trainer = $player if !trainer
outfit = (trainer) ? trainer.outfit : 0
return nil if !force && $game_player&.charsetData &&
$game_player.charsetData[0] == trainer.character_ID &&
$game_player.charsetData[1] == charset &&
$game_player.charsetData[2] == outfit
[imath]game_player.charsetData = [trainer.character_ID, charset, outfit] if[/imath]game_player
ret = charset
if pbResolveBitmap("Graphics/Characters/" + ret + "_" + outfit.to_s)
ret = ret + "_" + outfit.to_s
end
ret = getSurfSprite if $PokemonGlobal&.surfing
return ret
end

def getSurfSprite
finder = $player_get.pokemon.with.compatible.move(:SURF)
return if !finder
surf = finder.species
player_id = $player.character_ID
path = "Graphics/Characters/Surf/"
ret = "boy_surf" if $player.character_ID == 1
ret = "girl_surf" if $player.character_ID == 2
ret = "#{player_id}#{surf}" if pbResolveBitmap(path + "#{player_id}#{surf}")
ret = "Surf/" + ret
return ret
end

And gives me this error:

Exception `NoMethodError' at Section046:575 - undefined method `get_pokemon_with_compatible_move' for #<Player Pokémon Trainer Beni @party=[:PIKACHU, :PIDGEOTTO, :KADABRA, :GYARADOS, :DIGLETT, :CHANSEY]>
 
Last edited:
Back
Top