View unanswered posts | View active topics It is currently Fri Sep 03, 2010 8:57 am

Forum rules


1. You shall not post anything against the global rules of this forum nor against the law of the country you or anyone lives in(that includes Child Porn and things like that).
2. You shall not flame, spam, be 1337 HAXX0rZ or just act like an obnoxious little brat.
3. You shall not act smart(unless you are)
4. You shall not give useless comments, only constructive critisism is allowed here.
5. You shall not upload resources, tutorials or games related to RPG Maker in this section that are not yours without permission and credits.
6. You shall not look at fellow members, mods, admins or Ryon in disrespect. Only look in awe.
7. You shall not post here without proper knowledge of the English language. Double-Check your posts for grammatical errors. Correct grammar and spelling makes it easier to read and understand for everyone.
8. Mindless and/or one-word posts made by post-count hunters will be deleted.
9. You shall not abuse the smileys to an unuasual extent. Only abuse them in small amounts.
10. You shall not advertise your Resources, Games, Tutorials or Topics continually everywhere. This can be labelled as spam and will not be tolerated.
11. If your topic contains any material not suited for minors, add a [NSFW] tag in your topic title.
12. Use the following tags when posting topics:
[TUTORIAL], [QUESTION], [CHIPSET], [CHARSET], [WINDOW SKIN], [GRAPHIC], [RECOURCE], [SCRIPT], [FULL GAME], [FULL GAME WIP], [OTHER]
Tags speak for themselves.
13. When posting a resource, include at least one screenshot. When posting a Full Game, include at least two screenshots. Please refrain from making Full Game WIP topics without being able to show at least two screenshots. Tutorials are nicer with pictures.
14. You shall not correct the grammar in this post. My English is better than yours! If I would be correcting all your mistakes, I'd be busy for a long while.
15. CAPZ LOCK IZ CRUIZE CONTROL FOR COOWL! It's also a one-way ticket to ban land.



Reply to topic  [ 1 post ] 
 [TUTORIAL] Adding a "Load" button to your menu 
Author Message
Level 1
Level 1
User avatar

Joined: Sat Aug 22, 2009 6:53 am
Posts: 142
Location: Arnhem
Post [TUTORIAL] Adding a "Load" button to your menu
RPG Maker Tutorial

Topic: Adding a Load button to the in-game menu
Creator: Melchior M. Philips
Version: VX/XP
RGSS(Scripting): Yes
Difficuty: Beginner

This tutorial will tell you step-by-step how to add the abilty to load a game whilst in one.
Regularly, making a new Menu item would take up alot of time and effort coding the menu boundaries and actual contents.
But fear not, for a Load button There's a Lazy Man's way.

NOTE: For in-depth info of what you're doing, click the spoilers.

Open the Script editor, and locate "Scene_Menu".
scroll down to where it says
Quote:
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------


Underneath the line "s5 = Vocab::save" add the line "s7 = "Load" ".

Afterwards, change " @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])"
to " @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s7, s6])"

This will add another menu item(s7(load)) underneath s5(the save option). "Load" is the tile of the item which will be displayed.
Vocab::save indicates that it looks for the string "save" which is defined in the "Vocab" section of the script editor.
Window_Command.new(blablabla) contains the menu item order, so if you wish to change that, changes can be made there.


Scroll down further in Scene_Menu untill you find
Quote:
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------


Change
Quote:
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new

to
Quote:
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 #Load
$scene = Scene_File.new(false, false, false)
when 6 # End Game
$scene = Scene_End.new

or when using XP:
Quote:
when 5 #Load
$scene = Scene_Load.new

This will tell the script that when the 5th menu item(Load) is selected, it will display a new File Scene, which already exsists for your convinience. False, False, False is used to indicate the strings defined in File_Scene(the first checks if it's saving, the second if it's from the main menu, the third if it's triggered by an event).


aaaaaaand you're done. it's THAT easy.

Known Bugs:
- When using XP and putting "Scene_Load.new", when in the load menu and you press b(back/cancel), you will be at the main menu.


I hope you found it useful to put a Load button in your menu.

Cheers,
Melchior M. "File Slot" Philips

_________________
Lord Melchior's Cult (Leader)
Click the sig for my website
Image


Tue Aug 25, 2009 12:42 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.