• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Different pokemon heights in wild and trainer battles?

  • 67
    Posts
    12
    Years
    • Seen Aug 22, 2024
    I can't unterstand, why my trainer pokemon and wild pokemon has different highs, I just changed the BattlerEnemyY in PBS.

    [PokeCommunity.com] Different pokemon heights in wild and trainer battles?
     
    It may be easier to change the battle position in the editor.
    Go to reposition sprites and do it that why.
     
    But the editor just writes into the PBS-file, right? BattlerEnemyY will be the same and wild and trainer pokemon would be still different, I think.
     
    I agree you should find a height that would be neutral to both.
     
    Are you getting this problem for all pokemon or just sentret? If it is just for one pokemon then you can just change the BattlerEnemyY for that one specific pokemon. Otherwise, I would try to get the height for the wild pokemon sorted out first with the editor and then try going into the script editor under PokeBattle_Scene (or PokeBattle_Actual_Scene) and find this section

    Code:
    # Shows the enemy trainer(s)'s Pokémon being thrown out.  It appears at coords
    # (@spritex,@spritey), and moves in y to @endspritey where it stays for the rest
    # of the battle, i.e. the latter is the more important value.
    # Doesn't show the ball itself being thrown.
    class PokeballSendOutAnimation
      SPRITESTEPS=10
      STARTZOOM=0.125
    
      def initialize(sprite,spritehash,pkmn,doublebattle,illusionpoke)
        @disposed=false
        @ballused=pkmn.pokemon ? pkmn.pokemon.ballused : 0
        @PokemonBattlerSprite=sprite
        @PokemonBattlerSprite.visible=false
        @PokemonBattlerSprite.tone=Tone.new(248,248,248,248)
        @PokemonBattlerSprite.y=0
        @pokeballsprite=IconSprite.new(0,0,sprite.viewport)
        @pokeballsprite.setBitmap(sprintf("Graphics/Pictures/ball%02d",@ballused))
        if doublebattle
          @spritex=PokeBattle_SceneConstants::FOEBATTLERD1_X if pkmn.index==1
          @spritex=PokeBattle_SceneConstants::FOEBATTLERD2_X if pkmn.index==3
        else
          @spritex=PokeBattle_SceneConstants::FOEBATTLER_X
        end
        @spritey=0
        if doublebattle
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR] if pkmn.index==1
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR] if pkmn.index==3
        else
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR]
        end
        @illusionpoke = illusionpoke #ILLUSION
        if illusionpoke != nil #ILLUSION
          @spritey+=adjustBattleSpriteY(sprite,illusionpoke.species,pkmn.index,nil,true,illusionpoke.formOffsetY)
        else
          @spritey+=adjustBattleSpriteY(sprite,pkmn.species,pkmn.index,nil,true,pkmn.formOffsetY)
        end #ILLUSION
        @endspritey=[COLOR=Red]PokeBattle_SceneConstants::FOEBATTLER_Y[/COLOR]
        @spritehash=spritehash
        @pokeballsprite.x=@[email protected]/2
        @pokeballsprite.y=PokeBattle_SceneConstants::[email protected]/2
        @[email protected]+1
        @pkmn=pkmn
        @shadowX=@spritex
        if doublebattle
          @shadowY=PokeBattle_SceneConstants::FOEBASED1_Y if pkmn.index==1
          @shadowY=PokeBattle_SceneConstants::FOEBASED2_Y if pkmn.index==3
        else
          @shadowY=PokeBattle_SceneConstants::FOEBASEY 
        end
        if @spritehash["shadow#{@pkmn.index}"] && @spritehash["shadow#{@pkmn.index}"].bitmap!=nil
          @shadowX-=@spritehash["shadow#{@pkmn.index}"].bitmap.width/2
          @shadowY-=@spritehash["shadow#{@pkmn.index}"].bitmap.height/2
        end
        if illusionpoke != nil #ILLUSION
          @shadowVisible=showShadow?(illusionpoke.species)
        else
          @shadowVisible=showShadow?(pkmn.species)
        end #ILLUSION
        @stepspritey=(@spritey-@endspritey)
        @zoomstep=(1.0-STARTZOOM)/SPRITESTEPS
        @animdone=false
        @frame=0
      end
    I made some edits on my end, so you may have some other variables at the part I highlighted in red. I'm guessing the image you showed on the left is the trainer battle, and since the sprite is too low you will want to shift the y-value by like -150 or so. It would look something like this (but you can fiddle around with the values in blue)

    Code:
    # Shows the enemy trainer(s)'s Pokémon being thrown out.  It appears at coords
    # (@spritex,@spritey), and moves in y to @endspritey where it stays for the rest
    # of the battle, i.e. the latter is the more important value.
    # Doesn't show the ball itself being thrown.
    class PokeballSendOutAnimation
      SPRITESTEPS=10
      STARTZOOM=0.125
    
      def initialize(sprite,spritehash,pkmn,doublebattle,illusionpoke)
        @disposed=false
        @ballused=pkmn.pokemon ? pkmn.pokemon.ballused : 0
        @PokemonBattlerSprite=sprite
        @PokemonBattlerSprite.visible=false
        @PokemonBattlerSprite.tone=Tone.new(248,248,248,248)
        @PokemonBattlerSprite.y=0
        @pokeballsprite=IconSprite.new(0,0,sprite.viewport)
        @pokeballsprite.setBitmap(sprintf("Graphics/Pictures/ball%02d",@ballused))
        if doublebattle
          @spritex=PokeBattle_SceneConstants::FOEBATTLERD1_X if pkmn.index==1
          @spritex=PokeBattle_SceneConstants::FOEBATTLERD2_X if pkmn.index==3
        else
          @spritex=PokeBattle_SceneConstants::FOEBATTLER_X
        end
        @spritey=0
        if doublebattle
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR] if pkmn.index==1
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR] if pkmn.index==3
        else
          @spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR]
        end
        @illusionpoke = illusionpoke #ILLUSION
        if illusionpoke != nil #ILLUSION
          @spritey+=adjustBattleSpriteY(sprite,illusionpoke.species,pkmn.index,nil,true,illusionpoke.formOffsetY)
        else
          @spritey+=adjustBattleSpriteY(sprite,pkmn.species,pkmn.index,nil,true,pkmn.formOffsetY)
        end #ILLUSION
        @endspritey=[COLOR=Red]PokeBattle_SceneConstants::FOEBATTLER_Y[/COLOR][COLOR=Blue]-150[/COLOR]
        @spritehash=spritehash
        @pokeballsprite.x=@[email protected]/2
        @pokeballsprite.y=PokeBattle_SceneConstants::[email protected]/2
        @[email protected]+1
        @pkmn=pkmn
        @shadowX=@spritex
        if doublebattle
          @shadowY=PokeBattle_SceneConstants::FOEBASED1_Y if pkmn.index==1
          @shadowY=PokeBattle_SceneConstants::FOEBASED2_Y if pkmn.index==3
        else
          @shadowY=PokeBattle_SceneConstants::FOEBASEY 
        end
        if @spritehash["shadow#{@pkmn.index}"] && @spritehash["shadow#{@pkmn.index}"].bitmap!=nil
          @shadowX-=@spritehash["shadow#{@pkmn.index}"].bitmap.width/2
          @shadowY-=@spritehash["shadow#{@pkmn.index}"].bitmap.height/2
        end
        if illusionpoke != nil #ILLUSION
          @shadowVisible=showShadow?(illusionpoke.species)
        else
          @shadowVisible=showShadow?(pkmn.species)
        end #ILLUSION
        @stepspritey=(@spritey-@endspritey)
        @zoomstep=(1.0-STARTZOOM)/SPRITESTEPS
        @animdone=false
        @frame=0
      end
     
    It's a little bit different, but still not quite correctly.
    [PokeCommunity.com] Different pokemon heights in wild and trainer battles?

    l: trainer r: wild


    Edit: After I changed -150 to -90 the different is extremly small. It should work that way, thanks.
     
    Last edited:
    Ok just be aware that this may only be a temporary fix until you figure out what messed up the sprites' position in the first place, You might also want to check to make sure that the pokeball animations (when catching a pokemon and when the enemy comes out of the pokeball) look ok too.

    By the way, I noticed that the bases (that grassy circle beneath the battler sprite) seemed to have disappeared completely during your trainer battle. You might want to continue looking through PokeBattle_Scene for the section that shows bases to see if you can bring them back. My guess is that their y value also got messed up somehow.
     
    Back
    Top