• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Animated Title Screen and Other Title Improvements

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
Hey guys. So Thanks to thor348 I figured out how to do something that has been bugging a LOT of people. How to Animate the Title Screen! I've seen many posts asking how you can use a .gif or multiple frames in a loop as a title screen instead of a static image. I found out how (It was actually really simple XD) Anyway here we go.


Tutorial by Rayd12smitty using Pokemon Essentials Version 11

The Images
First, you need your new title screen. No .gif images here! You need all your images as frames, one for each frame in the game (Unless you want to mess around with the timer) There are 20 frames in one second, so you may have a LOT of images. Thats alright though. Name your images
Splash_1, Splash_2, Splash_3, etc. Put them in a folder Called Splash inside your game folder in Graphics/Titles. I recommend over 100 frames, even if they are just duplicates. I have 40 different frames, but 3 or 4 of each one in a row so it doesn't move so fast. This brings the total to 120 or 160 depending on how fast I want it. It takes a while to name all the images but it needs to be done.

The Script
Alright. The script we are dealing with is Scene_Intro. This is the scene that loads the start screen (The black screen with Pokemon Essentials creators on it) and the Title screen. Open the script and go to line 50. It should say
Code:
@pic.name="Graphics/Titles/"+@splash

Directly ABOVE it, add the line
Code:
@Animation = 1
This sets the title screen's frame to 1.

Then REPLACE the line that is now line 51 which says
Code:
@pic.name="Graphics/Titles/"+@splash
with
Code:
@pic.name="Graphics/Titles/Splash/Splash_#{@Animation}"
This will change where the images are found and makes it so the images name depends on the variable we created (@Animation)

Halfway done. Now find the line that says
Code:
@timer=0 if @timer>=80
it should be around line 62. AFTER this line add
Code:
@Animation+=1 if @Animation<ZZZ
    @Animation = 1 if @Animation==ZZZ
    @pic.name="Graphics/Titles/Splash/Splash_#{@Animation}"
This adds 1 to the variable @Animation every frame and once it reaches a certain number resets it to 1. It also updates what image is being shown depending on the variable @Animation.

Replace ZZZ with how many frames your title screen has. If you have 160 images in the folder Graphics/Title/Splash, this number is 160. If you have 40 frames, this number is 40. Simple right?

Thats should do it :D Now your title screen acts animated, not static. Below I will explain one more little change to the title screen to help your game.

The Cry
If you've played your game or any other Pokemon Essentials game, you know that a random pokemon's cry is played when the "Enter" button is pressed. But your game might be about Rayquaza, you don't want a random Wynaut screaming when the player hits start! This is a real simple fix. Once again in the script Scene_Intro search for
Code:
cry=sprintf("%03dCry",1+rand(PBSpecies.maxValue))
    pbSEPlay(cry,100,100)
and replace it with
Code:
pbSEPlay('ZZZCry',100,100)
where ZZZ is the national dex number of the pokemon who's cry you want played.
There are 2 places in the script where these lines are found. Do this to both

Please Read
Thats all. Thanks for reading through this and I hope you found it helpful. If you use the animated title screen edits, please give me credit Rayd12smitty. I don't require credit for the cry played. Please comment with any questions/errors (Although there shouldn't be errors if you followed the directions right)


Example (Mine don't use)
title_screen_by_rayd12smitty-d635l6g.gif
 
Last edited:

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
I love all your tutorials (as well as carmaniacs).
This tutorial hopefully will make my game more attractive thank you.

I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.

Thats interesting, I remember when carmaniac wasnt that good with scripting himself :) but nice tut, I do think it would be easier to just use .gif but this way works too
 

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
Thats interesting, I remember when carmaniac wasnt that good with scripting himself :) but nice tut, I do think it would be easier to just use .gif but this way works too

.gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.
 

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
.gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.

GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

Thats interesting, I remember when carmaniac wasnt that good with scripting himself :)

Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...



Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.


Yea Luka is right, if you modify the code like you did with the above method you could easily use .gifs

Oh, snap first name basis.. it just got serious.. :) Yea i know I've been seeing his posts havent talked to him lately since they got rid of MSN
 

thor348

That's Oak to You
137
Posts
11
Years
GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it
 

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.
 
Last edited:

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.

isnt your way editing a script as well? There is nothing against your method it just is gonna take a little bit more work than the .gif method. but your right some people may prefer this way opposed to the other way. to each their own...

anyways nice tutorial overall, very clear and precise with the instructions.. I like your style, looking forward to seeing more from you.
 

Pharetra

zzzz
451
Posts
12
Years
  • Age 27
  • Seen Nov 23, 2021
Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it
Don't worry, your way has it's own advantages. You won't be restricted to 252 colours for example, which is something I really like ;)

Thanks for the tutorial :)
 

tylerab01

Pokemon AquaHarmony
162
Posts
14
Years
Can someone please explain what exactly you have to change about smitty's script to make it work with .GIFs?

I believe this will work, but Luka knows better than I.

@viewport=Viewport.new(0,0,GRAPHICSHEIGHT,GRAPHICSWIDTH)
@sprites["Pic"]=GifSprite.new (@viewport)
@sprites["Pic"].bitmap=BitmapCache.load_bitmap("PATH TO PICTURE")


I set my own viewports so you will have to check the Settings Script of Essentials.

-AvD
 
1
Posts
10
Years
For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..
 
152
Posts
11
Years
  • Age 12
  • Seen May 11, 2015
For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..

What do you have on line 111?
 
3
Posts
9
Years
  • Age 22
  • Seen Aug 29, 2022
when i try to test this, i get the following error:
Script 'Scene_Intro' line 58: SyntaxError occured
please help me

This is my script
Spoiler:
 

Furankku

The True Befriender of Pokémon
3
Posts
14
Years
when i try to test this, i get the following error:
Script 'Scene_Intro' line 58: SyntaxError occured
please help me

I get the exact same error, has a solution been found?
My script if it helps:
Spoiler:


The solution to mine and ultrademise's problem was pointed out to me by the maker of another Pokemon Essentials game, it was simply that the tutorial doesn't have us close the
@pic.name="Graphics/Titles/Splash/Splash_#{@Animation
it should be
@pic.name="Graphics/Titles/Splash/Splash_#{@Animation}"
 
Last edited by a moderator:
1,224
Posts
10
Years
I get the exact same error, has a solution been found?
My script if it helps:
Spoiler:


The solution to mine and ultrademise's problem was pointed out to me by the maker of another Pokemon Essentials game, it was simply that the tutorial doesn't have us close the
it should be

Generally, syntax errors are because you need to use Thread Tools -> Show Printable Version

Pokecommunity's formatting breaks some coding
 

Reni

TheLoneReni
1
Posts
8
Years
I dunno if any one else is having this issue but I was following this tutorial and when I went in to play it, the game gave me the error, "Script 'Main' line 21: NameError occured. Uninitialized constant Scene_Intro."

This was the first time I was messing around with the script and I only changed and added exactly what was stated so I'm not sure what to do. I don't know a whole lot of coding either so I'm not certain what the issue is or how to fix it.
 
4
Posts
4
Years
  • Age 33
  • Seen May 23, 2022
How would I make out the script to mimic the style of the title screens of Pokémon Red and Blue, with playing the respective cry when that Pokémon is shown? I've figured out the credits, the shooting star, and Gengar vs Jigglypuff. The title screen after that baffles me.
 
Last edited:
Back
Top