iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> AlphaWhelp's Old Fashioned Gameovers, Old School gameovers for your game
AlphaWhelp
post Mar 26 2009, 12:08 AM
Post #1


You can dance if you want to, you can leave your friends behind.
Group Icon


Type: Coder




Version 0.1a
Author AlphaWhelp
Release Date 3/25/09


Introduction

Remember how in the old days of RPG Maker the game over screen played a BGM that went on perpetually instead of a silly little ME that lasts for a few seconds? Remember how you could change the game over screen and use it to make a difference between a good game over and a bad one? This script restores that functionality to RMVX, allowing you to play a BGM which will loop perpetually in the place of a single-play ME. Additionally, it allows you to offer two separate game over screens, one for a good ending and one for a bad one.


Features

Play specified BGM instead of ME at gameover
Option to play ME instead of BGM at defeat
Change gameover screen


Script

Spoiler:
CODE
=begin

Remember how in the old days of RPG Maker the game over screen played a BGM
that went on perpetually instead of a silly little ME that lasts for a few
seconds? Remember how you could change the game over screen and use it to
make a difference between a good game over and a bad one? This script
restores that functionality to RMVX, allowing you to play a BGM which will
loop perpetually in the place of a single-play ME. Additionally, it allows
you to offer two separate game over screens, one for a good ending and one
for a bad one.

To decide which game over a player gets, an in-game switch set by an event
will turn on the good ending. The switch (which is designated by you in
the configuration) should start the game OFF and stay OFF until the line
right before the Game Over command in the final event in your game. Right
before the Game Over command, simply add a control switch statement to
activate the switch to ON. Then, when the Game Over command executes, it
will display the alternative picture that you specify, and play a
(hopefully) happy-themed music to go along with your good ending.

This script overwrites the "start" and "create_gameover_graphic"
definitions of Scene_Gameover and may not be compatable with other scripts
which alter the Scene_Gameover functionality. It also overwrites the
initialize method, however, Scene_Gameover does not normally even have
an initialize method, so while not technically overwriting anything, other
scripts which give Scene_Gameover an initalizie method will conflict with
this script.

Here's to a good ending. Enjoy!

-AlphaWhelp

Original Game Overs version 0.1a
Created 3/25/09 8:09 p.m.

=end

class Scene_Gameover < Scene_Base

def initialize

#--------------------------------------------------------------------------
# START CONFIGURATION
#--------------------------------------------------------------------------

@playdefeatbgm = true # set false if you prefer to play the system-chosen
# gameover ME instead of a defeated BGM

@victoryswitch = 100 # this is the switch number that activates the good
# ending. Make sure it's OFF when the game starts

@goodending = "Audio/BGM/2k3ending1" # path of the good ending BGM
@goodendvolume = 100 # good ending BGM volume 0 - 100
@goodendpitch = 100 # good ending BGM pitch 50 - 150
@goodendingscreen = "TheEnd" # good ending screen in Graphics/System

@badending = "Audio/BGM/2k3defeat" # path of the defeated BGM
@badendvolume = 100 # defeated BGM volume 0 - 100
@badendpitch = 100 # defeated BGM pitch 50 - 150

#--------------------------------------------------------------------------
# END CONFIGURATION
#--------------------------------------------------------------------------

end

def start
super
RPG::BGM.stop
RPG::BGS.stop
if $game_switches[@victoryswitch] == true
Audio.bgm_play(@goodending, @goodendvolume, @goodendpitch)
else
if @playdefeatbgm
Audio.bgm_play(@badending, @badendvolume, @badendpitch)
else
$data_system.gameover_me.play
end
end
Graphics.transition(120)
Graphics.freeze
create_gameover_graphic
end

def create_gameover_graphic
@sprite = Sprite.new
if $game_switches[@victoryswitch] == true
@sprite.bitmap = Cache.system(@goodendingscreen)
else
@sprite.bitmap = Cache.system("GameOver")
end
end
end


Customization

Read the comments in the script to learn how to customize it


Compatibility

This script overwrites "start" and "create_gameover_graphic" and won't be compatible with scripts that overwrite those as well. Also adds an "initialize" method to Scene_Gameover where there wasn't one before, and wont be compatible with other scripts that add the "initialize" method to Scene_Gameover. In all likelyhood, the chances of you using another script that is incompatible with this one is very low.


Screenshot

Can't really take screenshots


DEMO

No demo include because script is plug-n-play, put it in a game and test it yourself


Installation

Copy and paste above main, and below Materials but doesn't really matter where in between it goes

You will need to supply RPG Maker VX with your own Victory and Defeat BGMs, as there are none in the RTP, and you will also need to create your own Victory Game Over screen, which should be imported into Graphics/System. Here is a rar containing one file of each for you to mess around with. I apologize for the horrid TheEnd screen, as I made it myself, and I couldn't make a TheEnd screen even half as good as the RTP's Game Over screen if you put a gun to my head. I am such a bad artist that I can't even draw a straight line with the help of a ruler. For your own sake, don't forget to change the TheEnd screen before you release your game to the public.

The End rar


FAQ

Q: I get an Unable to find _______ and my game crashes when I try to test for game over

A: The BGM or Game Over Screen you specified in the configuration does not exist. This is user error and if this is not enough information for you to fix it then I can't help any further.



Q: No matter what happens I always get Victory/Defeated game overs.

A: This is another user error. You are probably turning the wrong switch on or off, or you have an event somewhere that you have forgotten about that is messing with your victory switch. If you honestly can't figure out what is going wrong, my recommendation to you is to increase the maximum number of switches your game has, and then change the victory switch to one of the newly created switches.

Credits

- Just Me (AlphaWhelp)

Terms and Conditions

Because of how absurdly simple this script is, no credit is required, although it would be nice. Consider yourself to have permission to use this script in anything you want, but you cannot claim that you wrote it.

Please report bugs in this thread.


--------------------
My Scripts:
Spoiler:
Haste slow States for Tankentai with ATB 1.1c: http://www.rpgmakervx.net/index.php?showtopic=3781 (scroll down to about halfway through the first post and find it under add-ons.)

Old Fashioned Gameovers: http://www.rpgmakervx.net/index.php?showtopic=11819

Comic Book Scenes: http://www.rpgmakervx.net/index.php?showtopic=14072

Force Preemptive or Surprise battles: http://www.rpgmakervx.net/index.php?showtopic=15135
Go to the top of the page
 
+Quote Post
   
Jonel34
post Mar 26 2009, 02:03 AM
Post #2



Group Icon






Thanks. I'll try to use it! smile.gif


--------------------
My Projects 7% Complete

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 30th September 2014 - 09:02 PM

RPGMakerVX.net is an Privacy Policy, Legal.