• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Other Question] How can I change my Pokémon’s name text color?

  • 19
    Posts
    4
    Years
    • Seen Apr 25, 2023
    So I made my own UI but I don't know how to change the name and gender symbols of the Pokemon. I figured out how to change the bottom box text color and Lv but can't figure out the rest[PokeCommunity.com] How can I change my Pokémon’s name text color?
     
    In the file PokeBattle_SceneElements, in the class:
    Code:
    class PokemonDataBox < SpriteWrapper
    check the code of the function:
    Code:
      def refresh
    The lines you want to changes are these:
    Code:
          nameWidth = self.bitmap.text_size(@battler.name).width
          nameOffset = 0
          nameOffset = nameWidth-116 if nameWidth>116
          textPos.push([@battler.name,@spriteBaseX+8-nameOffset,6,false,NAME_BASE_COLOR,NAME_SHADOW_COLOR])
          # Draw Pokémon's gender symbol
          case @battler.displayGender
          when 0   # Male
            textPos.push([_INTL("♂"),@spriteBaseX+126,6,false,MALE_BASE_COLOR,MALE_SHADOW_COLOR])
          when 1   # Female
            textPos.push([_INTL("♀"),@spriteBaseX+126,6,false,FEMALE_BASE_COLOR,FEMALE_SHADOW_COLOR])
          end
          pbDrawTextPositions(self.bitmap,textPos)
     
    I've been there but I can't seen anything to change colours. Before I made the thread I tested if the numbers in the male gender code was colour but it was it's position.
     
    I've been there but I can't seen anything to change colours. Before I made the thread I tested if the numbers in the male gender code was colour but it was it's position.

    The constant names are NAME_BASE_COLOR / MALE_BASE_COLOR / FEMALE_BASE_COLOR and they are instantiated at the start of the class:
    Code:
      NAME_BASE_COLOR         = Color.new(72,72,72)
      NAME_SHADOW_COLOR       = Color.new(184,184,184)
      MALE_BASE_COLOR         = Color.new(48,96,216)
      MALE_SHADOW_COLOR       = NAME_SHADOW_COLOR
      FEMALE_BASE_COLOR       = Color.new(248,88,40)
      FEMALE_SHADOW_COLOR     = NAME_SHADOW_COLOR
     
    Last edited:
    Back
    Top