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

Different pokemon heights in wild and trainer battles?

  • 66
    Posts
    11
    Years
    • Seen Oct 30, 2023
    I can't unterstand, why my trainer pokemon and wild pokemon has different highs, I just changed the BattlerEnemyY in PBS.

    Different pokemon heights in wild and trainer battles?
     

    Franzo

    Developing something...
  • 95
    Posts
    16
    Years
    It may be easier to change the battle position in the editor.
    Go to reposition sprites and do it that why.
     
  • 66
    Posts
    11
    Years
    • Seen Oct 30, 2023
    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.
     
  • 20
    Posts
    10
    Years
    • Seen Jun 19, 2015
    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
     
  • 66
    Posts
    11
    Years
    • Seen Oct 30, 2023
    It's a little bit different, but still not quite correctly.
    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:
  • 20
    Posts
    10
    Years
    • Seen Jun 19, 2015
    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