The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Arrow on October 08, 2006, 11:46:54 PM

Title: Splash Screens/Default Text
Post by: Arrow on October 08, 2006, 11:46:54 PM
I guess my search skills are lacking, as I'm sure this MUST have been asked before...

What I want to do is (A) Make a splash screen appear before the title (or more preferably, a small video clip), and I want to change the default text in the game. I.E: New Game would become Beginning or something of that nature.

Sorry if this is a dumb question, as I'm sure it is.
Title: Re: Splash Screens/Default Text
Post by: Naphe on October 09, 2006, 01:58:32 AM
Alright I know how to do the last part.
Though the first part your going to have to work with me to get it done.

I'll post a tutorial on how to do it.
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 09, 2006, 02:02:09 AM
Thanks, amigo. Kind of embaressing I can't figure it out on my own. Does it involve editing the script for Scene_Title?
Title: Re: Splash Screens/Default Text
Post by: Naphe on October 09, 2006, 02:33:31 AM
MAJOR BREAK THROUGH!

I found out how to do the video, *was playing with FF7*, but one thing, the player must go through the whole movie before being able to play. Could someone make me a small insertable script like the following:

If Esc key is pressed
Jump To Title Scene
Else Do Nothing
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 09, 2006, 05:21:57 AM
Actually, I don't want them to be able to skip, as it's a very short intro to the title screen. Could I have the non-skippy version?
Title: Re: Splash Screens/Default Text
Post by: Blizzard on October 09, 2006, 11:12:54 AM
If you want an intro scene before the Title, I suggest two scripts: My credits script can easily be used as an intro script OR get an .avi player script.
But if you need a real splash screen, I suggest you find a program that implements a splash screen into your .exe.
Title: Re: Splash Screens/Default Text
Post by: Doctor Professor Nikolai on October 09, 2006, 02:52:01 PM
Hey, I need a splash screen, too >_>
Title: Re: Splash Screens/Default Text
Post by: Naphe on October 10, 2006, 12:22:54 AM
Quote from: Naphe on October 09, 2006, 02:33:31 AM
MAJOR BREAK THROUGH!

I found out how to do the video, *was playing with FF7*, but one thing, the player must go through the whole movie before being able to play. Could someone make me a small insertable script like the following:

If Esc key is pressed
Jump To Title Scene
Else Do Nothing

Blizzard can you do this for me?
Title: Re: Splash Screens/Default Text
Post by: Blizzard on October 10, 2006, 11:42:39 AM
In the main method of the scene should be somewhere this part:

    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end


Replace if with:

    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
      if Input.trigger?(Input::B)
        $scene = Scene_Title.new
        break
      end
    end


Note that I assume the next scene is the Scene_Title so I put there $scene = Scene_Title.new . Of course you can change that if you like.
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 10, 2006, 09:00:55 PM
What I did was I took the movie script (see the AVI insert topic on the first page of this section) and named it Scene_Movie.

I replaced Scene_Title (in the Main script) with Scene_Movie.

I got this message:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg187.imageshack.us%2Fimg187%2F2301%2Funtitledzo6.png&hash=7b643d4245de40f929f8b1a12ac66f5eecd0c39e)

It puts me at this line when I open the script editor back up (in bold for easier viewing):



#==============================================================================
# ? Main
#------------------------------------------------------------------------------
# ???????????????????????????????
#==============================================================================

begin

  # This variable determines the default font type
  $defaultfonttype = "Tahoma"
  # This variable determines the default font size
  $defaultfontsize = 22

  # ?????????
  Graphics.freeze
  # ????????? (??????) ???
  $scene = Scene_Movie.new <----THIS ONE
  # $scene ?????? main ?????????
  while $scene != nil
    $scene.main
  end
  # ???????
  Graphics.transition(20)
rescue Errno::ENOENT
  # ?? Errno::ENOENT ???
  # ????????????????????????????????
  filename = $!.message.sub("No such file or directory - ", "")
  print("File #{filename} not found.")
end



So what do I do now?
Title: Re: Splash Screens/Default Text
Post by: Lord Cloud on October 11, 2006, 06:14:31 AM
im pretty sure i remember seeing this posted int the fourms a long hwile back. ill see if i can dig it up
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 11, 2006, 06:15:41 AM
Thank you man.
Title: Re: Splash Screens/Default Text
Post by: Lord Cloud on October 11, 2006, 06:23:13 AM
http://www.dubealex.com/asylum/index.php?showtopic=4227&hl=splash+screen

here you go, i believe this is what your looking for.
Title: Re: Splash Screens/Default Text
Post by: Blizzard on October 11, 2006, 11:50:26 AM
Post the movie script. I need to see what argument he is missing when calling main.
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 11, 2006, 11:57:53 AM
###########################################################
class Scene_Movie
###########################################################
#Created by SoundSpawn
###########################################################
#Fixed by Popper
###########################################################
#Instruction
#  1) Movies must in in a new folder called Movies in your directory
#  2)If you call this script from and event (EG:    Call Script: $scene = Scene_Movie.new("INTRO") )
#  3) Have fun playin movies with this script!!!
###########################################################
###########################################################
###########################################################

def initialize(movie)
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@movie_name = Dir.getwd()+"\\Movies\\"+movie+".avi"
main
end

def main
game_name = "\0" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\0")
@wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')
@temp = @wnd.call(0,0,nil,game_name).to_s
movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
movie.call("open \""+@movie_name+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')

@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
@width = @detector.call(0)
if @width == 640
fullscreen
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
fullscreen
end


status = " " * 255
movie.call("play FILE",0,0,0)
loop do 
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@message.call(@temp.to_i,11,1,0)
Input.update
movie.call("status FILE mode",status,255,0)
true_status = status.unpack("aaaa")
if true_status.to_s != "play"
break
end
if Input.trigger?(Input::B)
$scene = Scene_Map.new
break
end
end
$scene = Scene_Map.new
end

end
Title: Re: Splash Screens/Default Text
Post by: Blizzard on October 11, 2006, 01:17:43 PM
Ok, in main it shouldn't be

$scene = Scene_Movie.new

but

$scene = Scene_Movie.new("NAME_OF_YOUR_MOVIE")

where NAME_OF_YOUR_MOVIE is the name of your movie without the extension .avi .
Title: Re: Splash Screens/Default Text
Post by: Arrow on October 11, 2006, 08:42:25 PM
Ah. KK.
Title: Re: Splash Screens/Default Text
Post by: Kakashi0978 on April 24, 2007, 02:51:57 AM
I'm getting an error:

????? 'Spriteset_Map' ? 21 ??? NoMethodError ????????
undefined method 'tileset_name' for nil:NilClass
Title: Re: Splash Screens/Default Text
Post by: ChaosSpartan28 on April 24, 2007, 04:29:30 AM
lol, you bumped something from 6 months ago. Well if you havent noticed, Naphe has been banned and Blizzard has gone on a break. Im not sure but I think there is already a better script in the Script Database.

Please try not to bump something this old.
Title: Re: Splash Screens/Default Text
Post by: Kakashi0978 on April 24, 2007, 05:18:08 AM
Sorry, I didn't realize how old it was. I was just searching and this thread seemed to meet my needs.
Title: Re: Splash Screens/Default Text
Post by: bublet on July 28, 2007, 07:33:58 AM
to change your font.... add this code to your Game_Temp script (the first one)

Font.default_name = 'YOUR FONT HERE!!!'
 
I do not take credit for this. Anyway, make sure everyone that plays your game has the font!!
(I put the font sydnie cuz it's an rpg font..all pixely...)

;)
Title: Re: Splash Screens/Default Text
Post by: Irock on July 28, 2007, 07:47:50 AM
You posted in a really old thread...don't do that again.