[XP] Winkio's Custom Gameover Script

Started by winkio, February 02, 2008, 11:01:09 am

Previous topic - Next topic


February 02, 2008, 11:01:09 am Last Edit: February 21, 2009, 05:42:11 am by Blizzard
Winkio's Custom Gameover Script
Authors: winkio
Version: 1.0
Type: Custom Gameover Script
Key Term: Title / Save / Load / GameOver Add-on


This script will allow you to have a custom gameover, so that when your party dies, it respawns in the map of your choice.  This script does not reload data, but rather continues data, so progress is not lost at a gameover.  You can add in EXP or Gold loss at gameover too.


  • Respawn in the map of your choice upon gameover.
  • No need to setup events
  • Choose whether or not to subtract gold or xp upon death


Spoiler: ShowHide

# Winkio's Custom Gameover Script
# version 1.0
# ** Scene_Gameover
#  This class performs game over screen processing.
# Instructions
# This Script replaces Scene_Gameover.
# All the customization of this script appears in Frame_update

class Scene_Gameover
  # * Main Processing
  # This part is the same as in the original
  def main
    # Make game over graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
    # Stop BGM and BGS
    # Play game over ME
    # Execute transition
    # Main loop
    loop do
      # Update game screen
      # Update input information
      # Frame update
      # Abort loop if screen is changed
      if $scene != self
    # Prepare for transition
    # Dispose of game over graphic
    # Execute transition
    # Prepare for transition
    # If battle test
    if $BTEST
      $scene = nil
  # * Frame Update
  # This part is the part that has been changed.
  def update
    # If C button was pressed
    if Input.trigger?(Input::C)
   # Remove State Death for all party members
    for actor in $game_party.actors
    # Setup Map ID:005         Change this to the id of whatever map you want. 
    # Right click and select properties on a map to display the Map ID in the Title bar.
    # Move the player to position (9,2)  Change this to the location that you
    # want the  player to  respawn at.
    $game_player.moveto(9, 2)
    # Add in any decrease in Gold or XP here.
    $scene = Scene_Map.new 


Name This Script Scene_Gameover, as it will replace the original Scene_Gameover.
Other instructions are in the script.


No known issues

Credits and Thanks

  • Me.  There might be other people out there who have made similar scripts, but I came up with this one myself.

Author's Notes

This may cause more problems in your game if there is a gameover in the middle of a minigame or unorthodox event system, so be sure to account for extra items or variables that need to be dumped.


Looks good, I'll look more into a little later and let you know what I think!


Little tip. If only update method is replaced, you don't need to put in other methods. Instead of your script replacing the original one, you could just add it below Scene_GO and only update method will be replaced. It might help compatibility wise.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews

C.C. rOyAl

i hope some will reply to this but can we set it to where they start at their last save point?
Spoiler: ShowHide


Yeah, just make the map that you teleport blank with an autostart event that teleports the player to last save point or whatever.

Or you could do force load XD

C.C. rOyAl

Spoiler: ShowHide


1) On a completely blank and new map (This map will be related to the Gameover thing I assume?), make an auto-start event that teleports the player to the last start point. (Don't forget to erase it when done! :V)
2) Force-load

That's what I got from reading o3o

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).

C.C. rOyAl

Spoiler: ShowHide


hey, the script is great, but it's looping at the end.  I changed the script to teleport my party (upon death) to a specific respawn point, and that works. As soon as the screen shows them there, it kicks back to game over like the state 'knockout' wasn't removed. I checked the script and it looks sound, but i'm no master scripter.. any idea why it would loop?


Make sure that knockout is state # 1 in the database


ya, it is. I started a new game to test the script just to make sure and it still loops.