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

[Question] Hello everyone, How I will change the text color of the moves on battle?

Canal_do_Lontra

Oshawott uses Razor Shell
207
Posts
4
Years
  • Hello everyone, How I will change the text color of the moves on battle?
    Because I need that the name of the move on battle needs to be only black, pls, someone
    can help me?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Hello everyone, How I will change the text color of the moves on battle?
    Because I need that the name of the move on battle needs to be only black, pls, someone
    can help me?

    Look for this code in the class FightMenuDisplay, and comment the part that chooses the color depending on type:
    Code:
      def refreshButtonNames
        moves = (@battler) ? @battler.moves : []
        if !USE_GRAPHICS
          # Fill in command window
          commands = []
          moves.each { |m| commands.push((m && m.id>0) ? m.name : "-") }
          @cmdWindow.commands = commands
          return
        end
        # Draw move names onto overlay
        @overlay.bitmap.clear
        textPos = []
        moves.each_with_index do |m,i|
          button = @buttons[i]
          next if !@visibility["button_#{i}"]
          x = button.x-self.x+button.src_rect.width/2
          y = button.y-self.y+8
          moveNameBase = TEXT_BASE_COLOR
          if m.type>=0 # Comment this
            # NOTE: This takes a colour from a particular pixel in the button
            #       graphic and makes the move name's base colour that same colour.
            #       The pixel is at coordinates 10,34 in the button box. If you
            #       change the graphic, you may want to change/remove the below line
            #       of code to ensure the font is an appropriate colour.
            moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34) # Comment this
          end # Comment this
          textPos.push([m.name,x,y,2,moveNameBase,TEXT_SHADOW_COLOR])
        end
        pbDrawTextPositions(@overlay.bitmap,textPos)
      end
    This is the code from Gen 8 project, it might look different in v18.1, or v17.2.
     
    Last edited:

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I am not so good in scripting, but what's the line that change the color?
    Code:
          if m.type>=0 # Comment this
            # NOTE: This takes a colour from a particular pixel in the button
            #       graphic and makes the move name's base colour that same colour.
            #       The pixel is at coordinates 10,34 in the button box. If you
            #       change the graphic, you may want to change/remove the below line
            #       of code to ensure the font is an appropriate colour.
            moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34) # Comment this
          end # Comment this
    It's this part :)
     

    Canal_do_Lontra

    Oshawott uses Razor Shell
    207
    Posts
    4
    Years
  • Code:
          if m.type>=0 # Comment this
            # NOTE: This takes a colour from a particular pixel in the button
            #       graphic and makes the move name's base colour that same colour.
            #       The pixel is at coordinates 10,34 in the button box. If you
            #       change the graphic, you may want to change/remove the below line
            #       of code to ensure the font is an appropriate colour.
            moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34) # Comment this
          end # Comment this
    It's this part :)

    Thanks, I have to write black or I have to put a hex code?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I am trying to put hex code but it isn't working, What I have to do? You said that I need to comment, but what I have to comment?

    No hex code or whatever.
    Just find this part (EXACTLY this part):
    Code:
          if m.type>=0
            # NOTE: This takes a colour from a particular pixel in the button
            #       graphic and makes the move name's base colour that same colour.
            #       The pixel is at coordinates 10,34 in the button box. If you
            #       change the graphic, you may want to change/remove the below line
            #       of code to ensure the font is an appropriate colour.
            moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34)
          end

    And replace this part with:
    Code:
          #if m.type>=0
            # NOTE: This takes a colour from a particular pixel in the button
            #       graphic and makes the move name's base colour that same colour.
            #       The pixel is at coordinates 10,34 in the button box. If you
            #       change the graphic, you may want to change/remove the below line
            #       of code to ensure the font is an appropriate colour.
            #moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34) # Comment this
          #end
    Notice the new "#" before the "if", the "moveNameBase" and the "end".
     
    Back
    Top