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

[Scripting Question] Move PPs

  • 20
    Posts
    5
    Years
    • Seen May 1, 2020
    Does anyone know how to show the PPs of all the moves at the same time (all of the PPs appear on the screen) instead of only showing the PPs of the selected move.
     
  • 20
    Posts
    5
    Years
    • Seen May 1, 2020
    ok, ill try my best to explain it.
    By default when you are choosing a move to attack it shows the PPs of the move you are selecting.
    I want the PPs of the 4 moves to appear on the screen, not only the PPs from the move you're selecting.
    Hope that was clearer.
     
  • 178
    Posts
    10
    Years
    Just my two cents here: why you need the pp be grouped like that? Unless is something like every move using the same amount of pp: tackle and growl together having 75 shared PP, there's no reason to group them together like this.

    I don't see a reason to do it if it is just to make the player see the total PP he have left. The other 3 moves the player use are either 1 or 2 "clicks" from the first, it's not a huge amount of the time that the player wastes. I don't see myself having to check my PP that often when I play through a regular game either.
     
  • 20
    Posts
    5
    Years
    • Seen May 1, 2020
    Move PPs

    I ment this, you can see the PP of every attack without selecting them one by one.
     
  • 178
    Posts
    10
    Years
    Oh you mean this. Your best bet is to see how EBS works then (mind you, is not supported by the developer anymore).
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    In 'PokeBattle_Scene', inside 'class FightMenuButtons < BitmapSprite', search to 'def refresh(index,moves,megaButton,zButton,ultraButton)'.

    Then, where appears:
    Code:
          if moves[i].totalpp>0
            ppfraction=(4.0*moves[i].pp/moves[i].totalpp).ceil
            textpos.push([_INTL("PP: {1}/{2}",moves[i].pp,moves[i].totalpp),
               300,60+UPPERGAP,2,ppcolors[(4-ppfraction)*2],ppcolors[(4-ppfraction)*2+1]])
          end
    you will put this:
    Code:
          x2=[0,120,240,320][i] # change the positions
          y2=[13,48,48,13][i] # change the positions
    above this:
    Code:
          y+=UPPERGAP
          self.bitmap.blt(x,y,@buttonbitmap.bitmap,Rect.new(192,moves[i].type*46,192,46))

    Finally, you will replace that code:
    Code:
          if moves[i].totalpp>0
            ppfraction=(4.0*moves[i].pp/moves[i].totalpp).ceil
            textpos.push([_INTL("PP: {1}/{2}",moves[i].pp,moves[i].totalpp),
               300,60+UPPERGAP,2,ppcolors[(4-ppfraction)*2],ppcolors[(4-ppfraction)*2+1]])
          end

    To:
    Code:
          if moves[i].totalpp>0
            ppfraction=(4.0*moves[i].pp/moves[i].totalpp).ceil
            textpos.push([_INTL("PP: {1}/{2}",moves[i].pp,moves[i].totalpp),
               [COLOR="Red"]x2,y2[/COLOR],2,ppcolors[(4-ppfraction)*2],ppcolors[(4-ppfraction)*2+1]])
          end

    Now, you must to edit its positions.
    x= left side and right side
    y = upside and downside

    x>0 goes to the right side; x<0 goes to the left
    y>0 goes to the downside; y<0 goes to the upside
     
    Last edited:
  • 20
    Posts
    5
    Years
    • Seen May 1, 2020
    thx a lot! it worked, is there a way to make it so the PPs of every move are always visible? and not only when you select them.
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    Read the code than i sent to you and check that part:
    Code:
          y+=UPPERGAP
          self.bitmap.blt(x,y,@buttonbitmap.bitmap,Rect.new(192,moves[i].type*46,192,46))
    Exist two of them: one to unselected move and other one when the move was selected.
     
    Last edited:
    Back
    Top