Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Salem on September 24, 2011, 09:53:24 pm

Title: [RMX-OS] Nickname of the character
Post by: Salem on September 24, 2011, 09:53:24 pm
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
Title: Re: [RMX-OS] Nickname of the character
Post by: Salem on September 27, 2011, 05:19:37 pm
Refresh...
Title: Re: [RMX-OS] Nickname of the character
Post by: ForeverZer0 on September 27, 2011, 05:31:34 pm
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.
Title: Re: [RMX-OS] Nickname of the character
Post by: Salem on September 30, 2011, 06:34:40 pm
Thank you very much !