amaranth
Dec 21 2008, 07:07 PM
I'm moving all of my scripts from rmxp.org to this site. I like it here better.IntroductionThis is a really simple splash screen for you. When you use this, two splash screens will appear when you open your game.
Steps1. Open Main and change
Scene_Title.new to
Scene_Splash.new.
CODE
$scene = Scene_Splash.new
2. Put two graphics called
Intro-1.png and
Intro-2.png into your project's
\Graphics\Pictures folder.
(note: these graphics can also be jpgs, gifs, or bmps... it really depends upon your preference)
3. Add this
Scene_Splash script above Main:
CODE
#------------------------------------------------------------------------
# Show two splashscreens when your game loads
#------------------------------------------------------------------------
class Scene_Splash
#--------------------------------------------------------------------------
# ● Initialize the scene
#--------------------------------------------------------------------------
def main
# Load the System database & create a new game
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# Initialize some transition stuff
@show = true
@hide = false
@n = 0
@splash_numb = 2
# Define info about each splash screen
@sprite1 = Sprite.new
@sprite1.bitmap = RPG::Cache.picture("Intro-1")
@sprite1.opacity = 0
@sprite2 = Sprite.new
@sprite2.bitmap = RPG::Cache.picture("Intro-2")
@sprite2.opacity = 0
# Update graphics and input
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# Discard your graphics when you leave this scene
Graphics.freeze
@sprite1.dispose
@sprite2.dispose
end
#--------------------------------------------------------------------------
# ● Update the contents in this scene
#--------------------------------------------------------------------------
def update
# If SPACEBAR is pressed, go to to title screen
if Input.trigger?(Input::C)
$scene = Scene_Title.new
end
# Change the opacity of the graphics
transition
# Update graphics
@sprite1.update
@sprite2.update
end
#--------------------------------------------------------------
# Transition through splash screens
#--------------------------------------------------------------
def transition
# Fade in a splashscreen
if @show == true
@n += 2
if @n > 255
@hide = true
@show = false
@n = 255
end
end
# Fade out a splashscreen and load the next one
if @hide == true
@n -= 2
if @n < 0
@hide = false
@show = true
@splash_numb -= 1
@n = 0
end
end
# Choose which action to perform in this scene
case @splash_numb
when 0
$scene = Scene_Title.new
when 1
@sprite2.opacity = @n
when 2
@sprite1.opacity = @n
end
end
end
4. Play your game!
ShadowKing55
Dec 21 2008, 08:02 PM
If I only have Intro-1.png will it show another blank screen?
amaranth
Dec 21 2008, 08:56 PM
It will crash. Delete everything for splash2, change @splash_numb = 2 to @splash_numb = 1. In case @splash_numb, make sure you put splash1 under case 1, not case 2.
ShadowKing55
Dec 22 2008, 11:45 AM
If you're not to busy, could you do it to where there is only one? I would try like you said but I know nothing of scripting.
amaranth
Dec 22 2008, 11:48 AM
Sure. Here you go:
CODE
#------------------------------------------------------------------------
# Show one splashscreens when your game loads
#------------------------------------------------------------------------
class Scene_Splash
#--------------------------------------------------------------------------
# ● Initialize the scene
#--------------------------------------------------------------------------
def main
# Load the System database & create a new game
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# Initialize some transition stuff
@show = true
@hide = false
@n = 0
@splash_numb = 1
# Define info about each splash screen
@sprite1 = Sprite.new
@sprite1.bitmap = RPG::Cache.picture("Intro-1")
@sprite1.opacity = 0
# Update graphics and input
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# Discard your graphics when you leave this scene
Graphics.freeze
@sprite1.dispose
end
#--------------------------------------------------------------------------
# ● Update the contents in this scene
#--------------------------------------------------------------------------
def update
# If SPACEBAR is pressed, go to to title screen
if Input.trigger?(Input::C)
$scene = Scene_Title.new
end
# Change the opacity of the graphics
transition
# Update graphics
@sprite1.update
end
#--------------------------------------------------------------
# Transition through splash screens
#--------------------------------------------------------------
def transition
# Fade in a splashscreen
if @show == true
@n += 2
if @n > 255
@hide = true
@show = false
@n = 255
end
end
# Fade out a splashscreen and load the next one
if @hide == true
@n -= 2
if @n < 0
@hide = false
@show = true
@splash_numb -= 1
@n = 0
end
end
# Choose which action to perform in this scene
case @splash_numb
when 0
$scene = Scene_Title.new
when 1
@sprite1.opacity = @n
end
end
end
ShadowKing55
Dec 22 2008, 11:56 AM
tyvm ^^
Thelozeldaman
Mar 4 2009, 10:42 PM
Awesome script! Can't wait to use it.
Momo_san
Mar 5 2009, 01:00 AM
Want to try it for myself..
Thanx
Redd
Mar 6 2009, 11:18 AM
Very nice. I've used this somewhere before, probably .org, but I will use it definetely!
EDIT: Shadowking55... your sig scared the shit outta me.
Momo_san
Mar 6 2009, 05:30 PM
I already put in my game project,and it worked just totally fine!!

Than'x a lot
DespairReigns
May 10 2009, 04:37 PM
Is there a way for it to start playing the beginning BGM while the first splash is showing?
Please and thank you XD
handy333
Aug 26 2009, 05:53 PM
Is it possible to change the x and y values of a small picture?
brewmeister
Aug 27 2009, 12:39 PM
slightly modified. Will center each picture. (added lines 25-26, 31-32)
CODE
#------------------------------------------------------------------------
# Show two splashscreens when your game loads
# 27Aug09 Brew Modified to Center Images
#------------------------------------------------------------------------
class Scene_Splash
#--------------------------------------------------------------------------
# ● Initialize the scene
#--------------------------------------------------------------------------
def main
# Load the System database & create a new game
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# Initialize some transition stuff
@show = true
@hide = false
@n = 0
@splash_numb = 2
# Define info about each splash screen
@sprite1 = Sprite.new
@sprite1.bitmap = RPG::Cache.picture("Intro-1")
@sprite1.opacity = 0
@sprite1.x = 320 - @sprite1.bitmap.width / 2
@sprite1.y = 240 - @sprite1.bitmap.height / 2
@sprite2 = Sprite.new
@sprite2.bitmap = RPG::Cache.picture("Intro-2")
@sprite2.opacity = 0
@sprite2.x = 320 - @sprite2.bitmap.width / 2
@sprite2.y = 240 - @sprite2.bitmap.height / 2
# Update graphics and input
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# Discard your graphics when you leave this scene
Graphics.freeze
@sprite1.dispose
@sprite2.dispose
end
#--------------------------------------------------------------------------
# ● Update the contents in this scene
#--------------------------------------------------------------------------
def update
# If SPACEBAR is pressed, go to to title screen
if Input.trigger?(Input::C)
$scene = Scene_Title.new
end
# Change the opacity of the graphics
transition
# Update graphics
@sprite1.update
@sprite2.update
end
#--------------------------------------------------------------
# Transition through splash screens
#--------------------------------------------------------------
def transition
# Fade in a splashscreen
if @show == true
@n += 2
if @n > 255
@hide = true
@show = false
@n = 255
end
end
# Fade out a splashscreen and load the next one
if @hide == true
@n -= 2
if @n < 0
@hide = false
@show = true
@splash_numb -= 1
@n = 0
end
end
# Choose which action to perform in this scene
case @splash_numb
when 0
$scene = Scene_Title.new
when 1
@sprite2.opacity = @n
when 2
@sprite1.opacity = @n
end
end
end
Zeffa
Oct 8 2009, 04:07 AM
Sick, I'll be using this script. Will give credit in... Well... The credits.
Thanks again!
dorky106
Oct 15 2009, 08:34 AM
Unable to find file Data/System.rxdata
can i get help with this?
Seitei Son Goku
Apr 5 2010, 10:59 PM
You know, I realized that the RPG Maker XP engine did not have a default method of an opening. You can't have a game without some type of opening showing the personal symbol or signature of the game creator! But this script solved all of that! Much obliged!
gyashinero
May 26 2010, 06:13 PM
Is there any way to display the splash for longer? It just kind of fades out as soon as it appears.
Night_Runner
May 27 2010, 03:13 AM
@> gyashinero: Welcome to the forums

To put a pause in, somewhere about the middle of the code there's a snippet that reads:
CODE
# Fade in a splashscreen
if @show == true
@n += 2
if @n > 255
@hide = true
@show = false
@n = 255
end
end
Change that to read:
CODE
# Fade in a splashscreen
if @show == true
@n += 2
if @n > 255
# This is at full opacity, so we'll put a pause in!
for i in 0..40 # For 40 frames
Graphics.update # Update the grahics (basically a pause)
end
@hide = true
@show = false
@n = 255
end
end
If you prefer to work in seconds instead of frames, change the
40 to
3 * Graphics.frame_rate which'll make it last 3 seconds
EvillyElven
Feb 3 2011, 06:16 AM
Question: Is it possible to have it play an SE or ME for each title?
Night_Runner
Feb 6 2011, 02:37 PM
Answer: Yes; it is possible.
At the end of the script you'll find the code:
CODE
# Choose which action to perform in this scene
case @splash_numb
when 0
$scene = Scene_Title.new
when 1
@sprite2.opacity = @n
when 2
@sprite1.opacity = @n
end
What you can do is edit this to read as follows:
CODE
# Choose which action to perform in this scene
case @splash_numb
when 0
$scene = Scene_Title.new
Audio.me_stop
when 1
@sprite2.opacity = @n
Audio.me_play("Audio/ME/Intro2Melody", 100, 100) if @n == 2 and @show
when 2
@sprite1.opacity = @n
Audio.me_play("Audio/ME/Intro1Melody", 100, 100) if @n == 2 and @show
end
Where "Audio/ME/Intro2Melody" is the melody you're trying to play, the first 100 is the volume, and the second 100 is the pitch
EvillyElven
Feb 13 2011, 05:42 AM
THANK YOU!
You rule!
Phantom0x0
Jun 18 2011, 10:37 PM
When you say "Add Script Above Main" what does that mean exactly In the "Main" script of in the script above main? (Sorry noob to the scripting thing)
Night_Runner
Jun 18 2011, 10:57 PM
In the script editor, along the left, scroll all the way to the bottom, and there is a space labeled
Main. Right click on that main, select Insert, and paste the code on the right

Don't worry about being a noob scripter, I've heard that question more times than I can think of
vincent329
Jul 9 2011, 07:17 PM
insted of useing a pic is there anyway to show like a video or something?
kudozus
Sep 3 2011, 05:18 AM
QUOTE (dorky106 @ Oct 15 2009, 09:34 AM)

Unable to find file Data/System.rxdata
can i get help with this?
I'm also receiving this error message when I try to play game with your script. Do you know how to correct?
Night_Runner
Sep 8 2011, 11:44 PM
Data/System.rxdata is a very critical file for your game....
Do you have any other scripts in your game that effect the title screen (please provide links)?
Nof56
Nov 7 2011, 10:14 AM
Great Script! Easy to set up and easy to use!
DoctorTodd
Nov 25 2011, 04:11 PM
I'm having the same problem where it can't find System.rxdata as well I looked and it is there I'm using Rafidelis Title X - Version 2.0 as my title screen does any one know a solution?
Night_Runner
Nov 26 2011, 05:14 AM
Would you be able to upload a demo of your game please?
I should point out that the copy of
the Title X Script that I found was for RPG Maker VX, and this script is under the XP section...
( Although it looks like all you would have to do is to change the line
CODE
$data_system = load_data("Data/System.rxdata")
to
CODE
$data_system = load_data("Data/System.rvdata")
and it should translate to VX. )
DoctorTodd
Nov 26 2011, 10:34 PM
QUOTE (Night_Runner @ Nov 26 2011, 06:14 AM)

Would you be able to upload a demo of your game please?
I should point out that the copy of
the Title X Script that I found was for RPG Maker VX, and this script is under the XP section...
( Although it looks like all you would have to do is to change the line
CODE
$data_system = load_data("Data/System.rxdata")
to
CODE
$data_system = load_data("Data/System.rvdata")
and it should translate to VX. )
Well now I feel like a idiot...
Thanks for your help I found a different one which I like better. I should of looked to see if it was for vx or xp.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.