• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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?

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:
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 :)
 
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?
 
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