Chaos Project

RPG Maker => Event Systems => Event System Database => Topic started by: Zexion on April 07, 2013, 02:32:31 pm

Title: Evented Title Screen: Zexion's Way :)
Post by: Zexion on April 07, 2013, 02:32:31 pm
Evented Title Screen
Version: 1.0
Type: TitleScreen System



Introduction

Ever since I started using RPGmakerXP, it has been a struggle of mine to make beautiful title menus. I tried many scripts like animated menus, custom picture scripts, different layout, and none seemed to be good to me. Surely I couldn't be the only one?



Features




Screenshots

Spoiler: ShowHide
(http://imageshack.us/a/img541/5453/eventedtitle.png)(http://imageshack.us/a/img189/5074/khexample.png)



Demo

Below I've included a demo for a simple example. This shows how to do one splash screen, and simple standard "New Game, Load, Exit" functions.
I've also included a complex example. My KH style intros. I've included it to show how you can do any type of menu with proper events and music execution.

Tutorial Demo (https://dl.dropbox.com/u/59018752/Evented%20Title%20Screen.exe)
Complex Demo - KH Edition (https://dl.dropbox.com/u/59018752/Complex%20Title%20-%20KH%20Edition.exe)


Instructions

Depending on what you want to do, you will need a different amount of variables and switches. I always reserve the ENTIRE first page of switches to the Title Screen. Incase I want to get complex later on down the road. Same goes for the variables. Though alot go un-used, it would still be better to keep them all reserved and together rather than need one later and have to place it on Variable: 509 or something.

NOTE: I highly recommend downloading the demo to look at while you read.

Step One - Skipping the Boring Title Screen:
The most important part of this tutorial, is the title skip script. Without it, this type of title screen is just simply impossible.

Here is the one I use:
Spoiler: ShowHide
 #==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
# Make command window
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
command_new_game
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
# Play decision SE
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end


Some scripts may not be compatible with this version. If you have compatibility issues, please don't be afraid to use google. A simple search for "Title Skip RMXP" should suffice. Alternatively, there is another skip script by Pk8, that is usually compatible where this is not. "Pk8 Title Skip Rmxp"

Step Two - Setting up your database:

This part will make sure that your actor doesn't appear on the map while the title is going. I highly suggest doing this even if you want the actor on the screen.

Simply go to the last tab in the editor and delete the entire starting party. (They will be re-added later)
NOTE: I have realized that some custom movement scripts, battle systems, and add-ons can cause errors if no members are in the party. In this case simply create a "blank" actor.

Spoiler: ShowHide
(http://imageshack.us/a/img109/7265/noactor.png)

Spoiler: ShowHide
(http://imageshack.us/a/img834/9968/blankactor.png)

Spoiler: ShowHide
(http://imageshack.us/a/img841/1139/initialparty.png)



Step 3 - Setting up the Events:
First things first. If you have a screen resolution script, you are going to have to place the start character event directly in the center. Otherwise simply make the first map an empty map with the default center position as the start position.

Next make sure the map is blank with NO tiles anywhere.
(Unless you are using a map as a bg)

Create a New Event anywhere, but I like to keep them all in one corner. Name it something like "Splashes" or "Logos" etc. This will be the first part of the title, and be the first event to run.
In this event you can start any BGM or display and images or sound effects that you want to show BEFORE the menu.

First, though, Create your first switch and name it Splashes.
Turn it on at the start of the event, this will let the other events later, know that the splashes are being shown.
DISABLE MENU ACCESS
or people will be able to open the menu during your title screen.

Next do any fade in/out of your logos and what not. For the example I simply used a nintendo logo, and faded it in black. Followed by a hudson logo.

Here is what the event page looks like.
Spoiler: ShowHide
(http://img42.imageshack.us/img42/2677/firstpage.png)


Now, if you want, you can start it up and notice that it will loop infinately.
This is where we will now fix that.

At the end of your page turn off the "Splashes" Switch and Create and Turn on a new Switch "Main - Title"
This is where it get's fun. If you want a few animations played before the actual titles appear, you are going to have to figure it out. (The kingdom hearts demo should be a good example.)

Otherwise, create a new event page on the same event, and check the box to make sure The "Main - Title" Switch is required to be on.
On this page we will simply display the background, and logo of the game. After that we will activate another switch which will be used to operate both graphics controls and menu selection.
Page 2:
Spoiler: ShowHide
(http://imageshack.us/a/img42/2677/firstpage.png)


Next create the last page. On this page we will use conditional branches and our first variable, which I named "selection". This will display the proper graphics depending on what is currently selected. 1 is new game 2 is load and 3 is quit.
Page3:
Spoiler: ShowHide
(http://img17.imageshack.us/img17/8456/page3u.png)


Next are the controls. This is where it gets really complicated... Instead of explaining I want you to take a look at the demo, or the pictures below and analyze what they do. The controls basically check which buttons are being pressed and handle if the player press, for example, Up when they are on the highest choice. A variable is also changed to properly keep track of which choice is currently selected. You can name this variable "Selection"
Spoiler: ShowHide
(http://imageshack.us/a/img163/6790/page1con.png)

Spoiler: ShowHide
(http://imageshack.us/a/img15/5923/page1con2.png)

Spoiler: ShowHide
(http://imageshack.us/a/img707/6184/page1con3.png)

Spoiler: ShowHide
(http://imageshack.us/a/img853/2818/page1con4.png)


As you should see in the pictures, there is also controls for when the player presses enter. Now, the setup is all in the pictures and the demo, but incase you want to know. There are also more informative comments in the demo :)

Also, when you fade into a new game, you MUST use a picture because screen tone will cause glitches. I don't know why, but it does... if it works for you, then great! Most of the time though, the combos you must use to get it done prevent it from working.
Also: ENABLE MENU ACCESS
When you feel it is appropriate to do so of course

That's all!
This might seem a bit complicated, and I'll admit it took me a while to understand, but once you get it; you will love making custom title screens. Honestly this concept could even be applyed to an in-game menu, but that is a little more complex and time consuming...

Next


Credits and Thanks




Author's Notes

If you want to see a more complex title example please look at the KH demo. It has menus that pop up after the screen is made, animations on the logos etc. and more. Also please note that you can use a simple map as a background, and you can just use characters that walk around, etc. instead of making a fancy background. You just have to think a bit of what you want to do, and the events will do the rest!
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on April 07, 2013, 02:40:39 pm
Oops...I was just typing it up lol... I accidently submitted it. Hold up yall.

Okay i added the descriptions, but I am lacking the pictures as well as the demos which are important.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Blizzard on April 07, 2013, 03:09:53 pm
LMAO! I'll move it into database anyway.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: AnimeGirl on April 07, 2013, 05:56:24 pm
Most of the spoilers don't work could you fix that :facepalm:.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on April 07, 2013, 06:02:28 pm
I wasn't done still lol.
It's complete with a demo now. I'm going to work on the complex demo to add comments and what not.

Edit: OO i forgot one EXTREMELY important part. To disable menu access. Will include it in the demo and make a note in the tutorial.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: AnimeGirl on April 07, 2013, 06:07:59 pm
 :^_^': Oh sorry.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on April 07, 2013, 06:11:35 pm
It's fine. I updated the demo, so if you downloaded it before this post, then re-download. I included the menus access thing.

All in all, this took a while actually. It usually does though, and I am pleased with the results I get :)

Added complex demo and screenshots. I now dub this officially done! :)
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Heretic86 on April 07, 2013, 10:05:16 pm
Nice work!

I dont mean to nitpick, but the script could use some serious intenting...
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on April 07, 2013, 10:26:28 pm
Lol, well I didn't make it soo... nit pick away! :P

The one by Pk8 is much nicer, but causes more incompatibility than this one.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Globock on June 04, 2013, 02:36:30 pm
I have one problem - when you quit from game to title screen or press cancel in load screen all the splashes appear again, how to fix this?
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on June 04, 2013, 08:42:33 pm
Can you send me a demo with the events you used in it? Nothing else necessary its just hard to explain haha
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Globock on June 14, 2013, 04:11:08 pm
Sorry for not replying but I'm not home atm, and I won't be for next two months so I can't send you that demo ; /
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on June 15, 2013, 10:30:04 pm
The best option would be to make a script edit to scene_menu (or scene_end) there is a part that deals with going to the title screen, and you could simply add
$game_switches[#] == true
. You would have to do this for any switches that need to be on after the splashes play.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: BanisherOfEden on June 30, 2013, 03:44:21 am
I'm stubbornly set in my title screen, but this script has made me reconsider my stubbornness.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Seltzer Cole on December 09, 2013, 10:37:59 am
Downloading complex demo...

Going to give this a try. Looks interesting.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Ranquil on January 12, 2014, 09:04:26 am
I just tried the complex demo. Even though the animation isn't too great, the demo's still very cool!
Though this is probably the only RMXP game I've seen so far that doesn't work properly on full screen. Instead of filling the whole screen, it just fills the upper-left corner and the rest is black.
Also, if one were to keep the right arrow key pressed when asked if they really want to quit, the map scrolls a bit to the right after about a second. I think this is because the "hero" is moving out of set bound, which could be avoided by surrounding him with impassable tiles or events. I haven't checked the demo in the editor yet though.

Just a thought; would it be possible to skip the splash screens after canceling load game by setting the load menu script to return to map like in the pause menu instead of returning to the title screen?
Like this:
From
#--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = Scene_Title.new

to
#--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Return to the "new" title screen
    $scene = Scene_Map.new

I haven't tried this yet and I don't know pretty much anything about Ruby or scripting, so... it's just a thought. :p Also this wouldn't return to the title screen if, say, one had the load menu available in the pause menu.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on January 12, 2014, 05:04:34 pm
To answer your question, yes that will work :P
The fullscreen thing is caused by using F0's custom resolution script unfortunately it kinda does that lol.
For moving the hero off the screen, thank you first of all for telling me! As a fix you could literally just make a tile impassable and fill the entire 3rd layer with it.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Heretic86 on January 12, 2014, 08:12:55 pm
The section of code to make the game go fullscreen is not very much:

    # If going Fullscreen
    if not $fullscreen
      # Alt Enter to go to Fullscreen
      showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
      showm.call(18,0,0,0)  # Hold the Alt Keyboard key
      showm.call(13,0,0,0)  # Hold the Enter Keyboard key
      showm.call(13,0,2,0)  # Release the Enter Keyboard key
      showm.call(18,0,2,0)  # Release the Alt Keyboard key
      $fullscreen = true
    end 


Its really nothing more than an Alt + Enter command when the Title Screen loads.  Most of the Fullscreen Scripts use these calls so they should be relatively easy to find and at least comment out if its causing some conflict.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Seltzer Cole on February 13, 2014, 02:09:00 am
I downloaded the complex demo back in December and I still love how you evented the title screen. I made my own evented title screen and even though it does not compare to your kingdom heart one...it still owns  :D I highly recommend this to anyone who is interested.
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: SquareMan on July 21, 2014, 09:25:36 pm
Damn, it seems the download links are broken. Any chance of fixing them?
Title: Re: Evented Title Screen: Zexion's Way :)
Post by: Zexion on July 21, 2014, 10:15:35 pm
Sure I think I have these demos backed up so I'll upload them soon. I might re-do this whole tutorial because this was back when i didn't know much about scripting, and I found a few things that would really help. (Especially for controls)