• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Scripting Question] PScreen_Party - Fonts

B+

  • 32
    Posts
    4
    Years
    • Seen Feb 18, 2025
    Is there a way to have a Pokemon's name be of a different font than its HP numbers?

    Right now, I am able to have the font of a Pokemon's level be different from any other font on the party screen, however, it seems like I cannot have a different font for its name and hp numbers separately.

    For example, I have the hp numbers set to pbSetSmallFont, but this overrides the pbSetSystemFont code found on line 358. I guess the if !text found on line 363 also plays a role in this, but I am not sure.

    Any help is appreciated!
     
    Is there a way to have a Pokemon's name be of a different font than its HP numbers?

    Right now, I am able to have the font of a Pokemon's level be different from any other font on the party screen, however, it seems like I cannot have a different font for its name and hp numbers separately.

    For example, I have the hp numbers set to pbSetSmallFont, but this overrides the pbSetSystemFont code found on line 358. I guess the if !text found on line 363 also plays a role in this, but I am not sure.

    Any help is appreciated!

    Do you want a different font or font size?
     
    Do you want a different font or font size?

    Different font.

    I'd want the Pokemon's name be set to System Font, but the HP numbers to be set to Small Font. I can set the HP numbers to Small Font, but for some reason that also sets the Pokemon's name to Small Font.
     
    Different font.

    I'd want the Pokemon's name be set to System Font, but the HP numbers to be set to Small Font. I can set the HP numbers to Small Font, but for some reason that also sets the Pokemon's name to Small Font.

    Okay, so after a quick test, something like the following seems to work.
    I changed this line:
    Code:
    textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor])
    To this:
    Code:
    pbSetSmallFont(@overlaysprite.bitmap)
    pbDrawTextPositions(@overlaysprite.bitmap,[
      [sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor]
    ])
    pbSetSystemFont(@overlaysprite.bitmap)
    This is not pretty, since the font is changed and then almost immediately reverted, but it works, so that's something.
    Hopefully it works for you (or someone comes along with a nicer solution).
     
    Okay, so after a quick test, something like the following seems to work.
    I changed this line:
    Code:
    textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor])
    To this:
    Code:
    pbSetSmallFont(@overlaysprite.bitmap)
    pbDrawTextPositions(@overlaysprite.bitmap,[
      [sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor]
    ])
    pbSetSystemFont(@overlaysprite.bitmap)
    This is not pretty, since the font is changed and then almost immediately reverted, but it works, so that's something.
    Hopefully it works for you (or someone comes along with a nicer solution).

    This works, thanks. I've been at this for a couple days and couldn't figure it out. I haven't ran into any font revert with this so far.
     
    Back
    Top