Sub Menu
Authors: Monkeydashunderscore
Version: 1.0
Type: Menu
Key Term: Custom Menu System
IntroductionCreates a SubMenu to tidy up your main one if you are using a lot of scripts and add ons.
Features
ScreenshotsN/A Looks just like a regular menu. I'm sure you can edit it to make it snazzy though.
DemoNone Required
Script
#==================================
#
#Monkeydashunderscore's SubMenu
#
#If you have a lot of add ons and your main menu is getting crowded, then this
#is what you need.
#
#This is currently set up to work with
#
#Quest log and Achievements by game_guy
#Passive Augments by Xelias
#Books by Forever Zero
#
#So if you have those installed then you are nearly done.
#=================
#Config instructions below.
#
#FIRST go to Scene_Menu (THIS SECTION TAKEN FROM BLIZZARDS TRICKS)
#
# Find where it says:
#
# s1 = $data_system.words.item
# s2 = $data_system.words.skill
# s3 = $data_system.words.equip
# s4 = "Status"
# s5 = "Save"
# s6 = "End Game"
# @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
#
# EDIT this so it looks like this:
#
# s1 = $data_system.words.item
# s2 = $data_system.words.skill
# s3 = $data_system.words.equip
# s4 = "Status"
# s5 = "NEW_OPTION"
# s6 = "Save"
# s7 = "End Game"
# @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
#
# See the added option and the 's7' in the brackets at the end.
# Change NEW_OPTION to the name of what you want your Submenu to be for
# example "Info".
#
# Now find:
#
# when 4 # save
# if $game_system.save_disabled
# $game_system.se_play($data_system.buzzer_se)
# return
# end
# $game_system.se_play($data_system.decision_se)
# $scene = Scene_Save.new
# when 5 # end game
# $game_system.se_play($data_system.decision_se)
# $scene = Scene_End.new
# end
#
# CHANGE it to:
#
# when 4 # SubMenu
# $game_system.se_play($data_system.decision_se)
# $scene = Scene_SubMenu.new
# when 5 # save
# if $game_system.save_disabled
# $game_system.se_play($data_system.buzzer_se)
# return
# end
# $game_system.se_play($data_system.decision_se)
# $scene = Scene_Save.new
# when 6 # end game
# $game_system.se_play($data_system.decision_se)
# $scene = Scene_End.new
# end
#
# THIS ADDS THE SUBMENU TO THE MAIN MENU
#===================
# USING THE SAME PRINCIPLE EDIT THIS SUBMENU SCRIPT TO ADD ANY OTHER SCRIPTS
#
# IN YOUR OTHER SCRIPTS FIND A LINE THAT IS SOMETHING LIKE
#
# $scene = Scene_Menu.new
#
# OR
#
# $scene = Scene_Map.new
#
# CHANGE IT TO
#
# $scene = Scene_SubMenu.new
#
# THEN FIND THE CLASS NAME OF THE OTHER SCRIPT SO YOU KNOW WHAT TO ADD TO THIS.
#
#===================================
class Scene_SubMenu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
s1 = "Quests"
s2 = "Notes"
s3 = "Perks"
s4 = "Achievements"
@command_window = Window_Command.new(160, [s1, s2, s3, s4])
@command_window.index = @menu_index
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@status_window.dispose
end
def update
@command_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Quest.new
when 1
$game_system.se_play($data_system.decision_se)
$scene = Scene_Book.new
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Passive.new
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Achievements.new
end
return
end
end
def update_status
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
end
end
InstructionsIn the Script
CompatibilityShould work with anything. Though if you have a script that affects your Main Menu, you may need to edit that instead of Scene_Menu
Credits and Thanks
- Monkeydashunderscore
- Blizzard
You should put the script in code tags rather than quotes. It would look much better in my opinion. Anyway, decent script. I guess it could be helpful if you need a second menu.
Key Term "Menu" does not exist.
Sorry. Wasnt sure what that was.
Now you removed the Key Term completely. :/ Please take a better look at the template (http://forum.chaos-project.com/index.php/topic,17.0.html).
EDIT: Now you messed up the header big time. I guess you just don't want your script to go into the database.
If that's not right, then I don't know what is.
I hate to disrupt your learning curve and stuff but this really should go in the database. The problem is that you fucked up the size for the key term. Also, I believe that the version number should be 1.0
But the Key Term has no special size in the template :???:
Quote from: monkeydash on January 22, 2011, 04:24:39 pm
But the Key Term has no special size in the template :???:
It will be normal sized since the large font size is escaped before it: [/size]
Now it's correct. "Key Term" has to be written exactly like that. Not "KEY TERM", not "Key term", not "key term" but "Key Term".
Yes, it has no special size, but the capitalization of the letters matter.
It's ok to have anything as version, it doesn't even have to be a number (there is a script with "unknown" as version in the database if I remember right). Only the space after the colon is important as well.
Duuuude...when I eventually start scripting, that is gonna be my biggest problem...>.<
QuoteNow you messed up the header big time.
This seems like an exaggeration considering all that was wrong was that there was a 't' instead of a 'T'.
Had me panicking.
Actually I wrote that when I saw that you wrote it all in caps and had 2 key terms or something like that.
Did I? Oh well. Its sorted now