Evented Title Screen: Zexion's Way :)

Started by Zexion, April 07, 2013, 02:32:31 pm

Previous topic - Next topic

Zexion

April 07, 2013, 02:32:31 pm Last Edit: April 30, 2013, 09:58:52 am by Zexion
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


  • "Splash" screens if you wish
  • COMPLETE customization
  • Can add or take away options you want
  • Includes a way to skip the splash screens :D




Screenshots

Spoiler: ShowHide



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
Complex Demo - KH Edition


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

Spoiler: ShowHide

Spoiler: ShowHide



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


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


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


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

Spoiler: ShowHide

Spoiler: ShowHide

Spoiler: ShowHide


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


  • Whoever made the title skip I use... (I've used it too long to even remember)
  • Nintendo & Hudson for the logos used as an example
  • Zexion ( ME :D )



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!

Zexion

April 07, 2013, 02:40:39 pm #1 Last Edit: April 07, 2013, 03:59:34 pm by Zexion
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.

Blizzard

LMAO! I'll move it into database anyway.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

AnimeGirl

Most of the spoilers don't work could you fix that :facepalm:.


Zexion

April 07, 2013, 06:02:28 pm #4 Last Edit: April 07, 2013, 06:05:36 pm by Zexion
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.

AnimeGirl



Zexion

April 07, 2013, 06:11:35 pm #6 Last Edit: April 07, 2013, 06:39:23 pm by Zexion
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! :)

Heretic86

Nice work!

I dont mean to nitpick, but the script could use some serious intenting...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Zexion

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.

Globock

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?

Zexion

Can you send me a demo with the events you used in it? Nothing else necessary its just hard to explain haha

Globock

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 ; /

Zexion

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.

BanisherOfEden

I'm stubbornly set in my title screen, but this script has made me reconsider my stubbornness.
Max characters: 2000; characters remaining: 1952

Seltzer Cole

Downloading complex demo...

Going to give this a try. Looks interesting.
You know you play video games to much when you put sunglasses on and whisper "Plus 10 Appearance"

If at first you don't succeed, call it version 1.0

Ranquil

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.
Quote from: Some guy on FacebookLife is like a penis. It's short but it feels so long when it gets hard.


Quote from: Steven WinterburnBefore you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes.

Zexion

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.

Heretic86

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.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Seltzer Cole

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.
You know you play video games to much when you put sunglasses on and whisper "Plus 10 Appearance"

If at first you don't succeed, call it version 1.0

SquareMan

Damn, it seems the download links are broken. Any chance of fixing them?
QuoteThey've got helmets on they're heads. But I gotta watermeloan instead!