The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Tutorials => Topic started by: Zylos on April 16, 2012, 03:37:47 PM

Title: [VXA] Cutscene/Logo Before Title
Post by: Zylos on April 16, 2012, 03:37:47 PM
Have you ever wondered how to put in little logos before your main title screen like professional game companies do, or have a pre-title cutscene to open your story with? It's surprisingly simple to do with minimal scripting knowledge! All you need to do is create what you wish to show on a new map in your game and follow the instructions below.



The core that you need to do starts by simply creating a new map to use as your pre-title sequence, whatever it may be. This is entirely up to your own creativity, as long as you remember to eventually use the "return to title" command to bring up the title screen and whatnot. Or not if you want to go completely without a title screen or have something more unique in mind, your call completely.

Next we need to tell the game to have the player start off on this map rather than the official "player starting point" that the New Game option in title screen would take us to. We can do this by adding this mini scriptlet piece down in the materials section of your script editor (where it says Insert Here) as a new script:

Code: [Select]
class Scene_Cutscene
  def main
    DataManager.create_game_objects
    $game_party.setup_starting_members
    $game_map.setup(Map_ID)
    $game_player.moveto(x, y)
    $game_player.refresh
    Graphics.frame_count = 0
    $game_map.autoplay
    SceneManager.goto(Scene_Map)
  end
end

If you have any common sense, it will be obvious looking over this snippet of coding what you need to add to personalize it. Replace "Map_ID" with the ID of the map you wish your player to start out on for the pre-title stuff, and "x, y" with their x/y coordinates respectively. Once you've got that all in place, go up to the SceneManager and look for this:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get First Scene Class
  #--------------------------------------------------------------------------
  def self.first_scene_class
    $BTEST ? Scene_Battle : Scene_Title
  end

This line of coding is what tells the game to start with the title screen, but we don't want to do that. SO! Instead of "Scene_Title", replace the line with "Scene_Cutscene". This will instead use our little scriptlet instead of the usual title script as the first scene in the game, and place the player where we have earlier designated him.



And that's actually pretty much it! As a personal recommendation, I'd suggest you start the "logo map" you're making with a parallel process event that tints the screen entirely black with as quickly as possible, then follow it with an autorun event that does whatever you're wanting your pre-title scene to do. Makes it look a lot nicer. ^^
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: yuyu! on April 16, 2012, 10:33:29 PM
Woooo! Thanks for this, Zylos! :) A nice and simple tutorial!
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: jomarcenter on April 27, 2012, 07:36:01 AM
it there any other way to skip the cut scene if a user press a button, or i have to find a script to do that?
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: Brady on June 03, 2012, 05:18:21 PM
I'm getting a syntax error with the "octal" whatevers for the line30 (x,y co-ords) but I can't see anything wrong with them.  I have the co-ords for where I want the player to start, that's right isn't it?  Any idea what's wrong?
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: D&P3 on June 03, 2012, 05:44:53 PM
Upload your project.

I can't tell the problem based on what you've currently told us :)
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: Brady on June 03, 2012, 06:04:43 PM
What other info can I give you to help out?  The project is still basically empty, I only got VXA a couple of hours ago and have just been using my time to learn more stuff, gather resources (that I can hardly find) and stuff :(

Or would uploading it genuinely just be easier?


EDIT:
http://www.mediafire.com/?advvk4scqxqao5h

I have a small event set in the "PRE_TITLE" map so it should all be fairly easy to see, there's nothing much at all to complicate things, so I might have just put the script in completely wrong.  Sayin' that, I had trouble with DTs exp/hit script as well so I probably am just doin' somethin' wrong rather than tehre bein' a problem with the game QQ
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: D&P3 on June 03, 2012, 06:47:17 PM
This is an eventing thing, the majority of the time, people say they are doing it exactly as they should but often forget something. which is why I tell people to upload their projects.

In your case, you forgot to copy the script that Zylos said to do so.
I fixed that for you and set it up.

As for DoctorTodd's script.
That only works for battle, your game isn't showing any signs of ever having a battle.
You don't have any random or Map monster encounters.

Therefore, the script should be working, you just haven't set up a battle encounter yet :) Be sure to do that.

http://www.mediafire.com/?t4tw59bzw66gbm6 (http://www.mediafire.com/?t4tw59bzw66gbm6)
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: Brady on June 03, 2012, 06:53:33 PM
I took a chunk of the script out to cancel it, as it was preventing me from loading up the game at all for test plays.  What exactly did you change to get it working?

And for DTs script I was setting up events to trigger random battles so I could test it.  Monsters weren't high on my priority list so I just made a quicky monster and set it for a random encounter event (thinking that test plays might not have it).  Does that mean there's a problem otherwise or that it just doesn't apply on event-based encounters?
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: D&P3 on June 03, 2012, 07:02:12 PM
I took a chunk of the script out to cancel it, as it was preventing me from loading up the game at all for test plays.  What exactly did you change to get it working?

And for DTs script I was setting up events to trigger random battles so I could test it.  Monsters weren't high on my priority list so I just made a quicky monster and set it for a random encounter event (thinking that test plays might not have it).  Does that mean there's a problem otherwise or that it just doesn't apply on event-based encounters?
It probably didn't work because you didn't set the co-ordinates.

Take a look at the one I sent back to you, notice how it doesn't say '(Map ID) (X,Y)' anymore.
These were things that you actually needed to fill in.

As for DT's script.
I'm not going to continue discussing it on this thread but instead on the actual thing.
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: Brady on June 03, 2012, 07:04:50 PM
Aye, I took them out as well, becasue it was the co-ordinates that was causing the error.  I couldn't load a test play for anything until I removed them.  I had the co-ords set to (008,  002) to plonk the character at the top in the middle of the pathway.  I tried removing the space and got the same error.
Title: Re: [VXA] Cutscene/Logo Before Title
Post by: Brady on June 03, 2012, 07:53:49 PM
RIGHT!  I googled up the problem and apparently it had something to do with the fact I had "008" (and 9) as one of my coordinates.  Literally just changed it to 7 and the octal error vanished...!  Amazing and weird.

Also, I realised that my main problem (as showed up after the octal error vanished) was that I was foolishly typing in the actual map NAME, not the ID :')...

Thanks for the help R&P3, and thanks for the cool script Zylos :)