[RMX-OS] Nickname of the character

Started by Salem, September 24, 2011, 09:53:24 pm

Previous topic - Next topic

Salem

So, I found a line which is responsible for color nickname on the figure. I can not program in ruby, and I want to add the option to change the font type and size only in the code. If anyone can help me, I'll be very grateful. This is line of the code:

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Other constants
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
COLORS = {}
COLORS['self']         = Color.new(0, 255, 0)
COLORS[GROUP_ADMIN]    = Color.new(64, 192, 255)
COLORS[GROUP_2NDADMIN] = Color.new(128, 192, 255)
COLORS[GROUP_MOD]      = Color.new(255, 255, 0)
COLORS[GROUP_PLAYER]   = Color.new(255, 255, 255)
   

end


Regards, Salem


ForeverZer0

The lines of code you posted have nothing to do with changing the font. You need to find the class for the window you want to change, and add a "self.contents.font.name = "FONT_NAME" after the the contents is defined, which will likely be in the initialize or refresh method. The FONT_NAME value obviously needs to be replaced with the actual name of the font.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Salem