Changing menu backgrounds and fonts
Attention!!! Beginners only!
OK. I'm not exactly sure where to post this because it's a script tutorial (in scripts or tutorials). Perhaps scripters like wora and originalwij might say this is stupid but I'm sure there are a lots of newbs who need something like this. It was my first scripting experience. I didn't even had Internet when I've done it. This is the simplest way to make backgrounds to menus and change fonts. Let's start!
ADDING BACKGROUND
First of all open your script editor and go to Scene_Menu (I've started from there). Find the "Start processing" line and just after the end insert this:
CODE
#--------------------------------------------------------------------------
# * Create Title Graphic
#--------------------------------------------------------------------------
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("THE NAME OF THE FILE")
end
#--------------------------------------------------------------------------
# * Dispose of Title Graphic
#--------------------------------------------------------------------------
def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
Change THE NAME OF THE FILE with the name of the file you want to use as background. It has to be in the graphics\system folder. I recommend it to be with the same size as the window (NOT FULL SCREEN!!!). I think the resolution was 544x416. Edit and add all you want.
Next you need to see the background so you have to hide the windows. Here's the way to do it:
1. Find the following: @command_window.something
NB: Don't add anything if there's something in front of the window name, because you'll get an error!!! Find some other line in different section.
2. Exactly under the same line type: @command_window.opacity = 0 (this will make the window transparent)
3. Do this with every window in that script. (they are status and gold if you work in Scene_Menu)
4. Repeat this procedure (incuding the one with the title graphic) with every scene script.
Here's a list with the windows that should be changed in every scene. The digits show the line under you should write. Note that when you add something on other line it changes the line order in that script:
- Scene_Title:
@command_window - 154 - Scene_Menu:
@gold_window - 22
@status_window - 23
@command_window - 78 - Scene_Item:
@help_window - 16
@item_window - 21 - Scene_Skill:
@help_window - 23
@status_window - 26
@skill_window - 30 - Scene_Equip:
@help_window - 28
@equip_window - 33
@status_window - 35 - Scene_Status:
@status_window - 22 - Scene_File:
@help_window - 25
savefile_window (Enter Window_SaveFile and under the def refresh in the refresh section add self.opacity = 0. Same should be done to change fonts in that scene (see the font changing section for details)) - Scene_End:
@command_window - 89 - Scene_Shop:
@help_window - 15
@gold_window - 17
@dummy_window - 19
@buy_window - 21
@sell_window - 26
@number_window - 31
@status_window - 35
@command_window - 86
CHANGING FONTS
Enter the window script. Window_Message for example (if you change it this will be the message displaying font in your game)
1. Find something like: self.something (Don't change if there is something written in front of self!!! Find some other line in different section)
2. On the next line type: self.contents.font.name = "NAME OF THE FONT" (You must have it in your Game\Fonts folder to work)
3. For the adjustments use:
self.contents.font.size = 24 (example)
self.contents.font.bold = true/false (Bold or not)
self.contents.font.italic = true/false (Italic or not)
self.contents.font.shadow = true/false (Shadowed or not)
