Custom Game Over behavior

Discussion in 'JS Plugin Releases (RMMV)' started by McKathlin, Jan 16, 2016.

  1. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A

    Custom Game Over


    Version 1.3


    by McKathlin



    Introduction
    Change what happens when the party dies or an event calls Game Over processing.

    In some games, after the party dies they find themselves in a recently visited safe place, where they can continue their game with all experience and progress intact, but some money or items lost. With Custom Game Over, you can have party death cause something similar to that, or something completely different!

    Features
    • New: Set a common event to run when the party dies, before the fade to game over.
    • Choose whether or not the Game Over Screen shows first.
    • Choose whether to reload from the last save.
    • Set a common event to run after game over, instead of going back to the title screen.

    How to Use
    Download or copy this plugin, and save it inside your project's js\plugins folder as Kath_GameOver.js -- The filename is important, because the plugin manager refers to it when retrieving the plugin parameters. Add and enable it in the plugin manager, as you would with any other plugin. It should function properly regardless of where it's placed in the plugin list.

    This plugin offers parameters that accept common events by their ID. First create a common event in the database, take note of its ID, then go to the plugin manager and enter that ID number for the value of the common event parameter you would like to set.


    Your Party Death Common Event will run in the same scene that the party dies, in place of a standard Game Over. If the party dies in battle, then this common event will play out in battle, unless the common event explicitly calls a scene change command (such as the Game Over command).


    Your After Game Over Common Event can do practically anything you want. The default post-Game-Over state is dark and silent to provide a blank slate for the common event to work from. At minimum, you'll need to make sure that your Game Over common event includes the following commands:

    1. Transfer Player

    2. Fadein Screen

    Everything else you add is up to you.



    Full Help Text

    Code:
    
    This plugin is designed to play well by itself and with other plugins.
    There are no known conflicts, but conflict is possible with other plugins
    that directly alter Game Over behavior.
    
    ================================
    = Party Death Common Event ID  =
    ================================
    Assigning a Party Death Common Event replaces the usual Game Over scene
    call with a common event call. This lets you (the game designer) make
    something happen instead of (or before) the standard Game Over screen.
    Open the database to Common Events to find the ID of the common event
    to call on party death, and enter this ID number as the parameter.
    Here are some pointers:
    * The Party Death common event will run in the same scene where the party
      was just defeated. If the party died in battle, the common event will run
      in battle, right after the party-is-defeated message and music effect.
      So if you want to make something happen after a slow fadeout
      and return to the map, I recommend using the After Game Over Common Event
      instead.
    * If you would like the Game Over screen (or a fadeout and cut to the map
      if "Show Game Over Scene" is false) to show at the end of your common
      event, remember to use the Game Over command in your common event.
      Avoiding the Game Over screen is easy: avoid calling the Game Over command.
    * Directly calling the Game Over command from any event will still show
      the Game Over screen normally (unless you've set Show Game Over Scene to
      false). To force your custom party death behavior, use a command that
      calls your party death common event instead.
    
    =========================
    = Show Game Over Scene  =
    =========================)
    RPG Maker's default behavior takes the player to Scene_GameOver on
    party death or on a scene processing call to Scene_GameOver.
    This processing shows a Game Over screen.
    After the player sees the screen and presses any key,
    the game exits to the title screen.
    
    If Show Game Over Scene is set to false, player will see a fade to black
    before going to the next scene. This will be the case regardless of whether
    Game Over state is reached by party death or by a direct command in an event.
    
    Whether or not the Game Over screen shows, which scene is next depends on
    whether the After Game Over Common Event is set, and what it is set to.
    
    ====================
    = Reload Last Save =
    ====================
    Set Reload Last Save to true to make the game automatically reload from its
    most recent save on game over. If a Game Over Common Event is specified,
    the reload occurs before the common event is reserved. If no common event
    is given, then the reload happens instead of going to the title screen.
    
    If Reload Last Save is true but the player has not yet saved,
    then the player is returned to the Title Screen.
    
    ====================================
    = After Game Over Common Event ID  =
    ====================================
    Assigning a After Game Over common event makes gameplay continue after
    the party loses, instead of RPG Maker's default behavior of returning the
    party to the title screen. Open the database to Common Events to find the
    ID of the common event to call on game over, and enter this ID number as
    the parameter.
    
    In the content of the common event, the game designer can customize what
    happens when the party dies or reaches an event-dictated Game Over state.
    The After Game Over common event might do some of the following things:
    * Take away gold and/or items
    * Return the player to a safe place
    * Restore HP to one or more party members
    * Have the party's rescuer say something
    * ...anything that suits this game!
    
    IMPORTANT: When control flows to the Game Over common event,
    the screen will start blacked out. This gives the event time to handle
    transfers and other processing before showing the player the screen.
    Once those things are ready, remember to fade in!
    
    The After Game Over Common Event (AGOCE) differs from the Party Death Common
    Event (PDCE) in the following ways:
    * The PDCE runs instead of or before the Game Over screen or fadeout;
      the AGOCE runs after the Game Over scene or fadeout completes.
    * The PDCE only automatically replaces Game Overs caused by party death.
      The AGOCE autoruns after all Game Overs, regardless of their cause.
    * The PDCE runs in the same scene where party death occurred.
      The AGOCE runs in a newly started map scene, with the screen faded to
      black, and the party leader revived to 1 HP.



    Script

    //=============================================================================
    // Custom Game Over, version 1.3
    // by McKathlin
    // Kath_GameOver.js
    // Last Update: 2016.08.18
    //=============================================================================

    /*:
    * @plugindesc Change what happens when the party dies or Game Over is called.
    *
    * @param Party Death Common Event ID
    * @desc The ID of the common event to run as soon as the party dies.
    * Leave blank to fade immediately to Game Over.
    * @Default
    *
    * @param Show Game Over Scene
    * @desc Whether to show Scene_Gameover. If false, only a brief fade to black is seen.
    * @Default true
    *
    * @param Reload Last Save
    * @desc If true, reload from last save instead of title screen,
    * or before common event, if any.
    * @Default false
    *
    * @param After Game Over Common Event ID
    * @desc The ID of the common event to run AFTER the Game Over scene (or fadeout).
    * Leave blank to go to title.
    * @Default
    *
    * @Help This plugin is designed to play well by itself and with other plugins.
    * There are no known conflicts, but conflict is possible with other plugins
    * that directly alter Game Over behavior.
    *
    * ================================
    * = Party Death Common Event ID =
    * ================================
    * Assigning a Party Death Common Event replaces the usual Game Over scene
    * call with a common event call. This lets you (the game designer) make
    * something happen instead of (or before) the standard Game Over screen.
    * Open the database to Common Events to find the ID of the common event
    * to call on party death, and enter this ID number as the parameter.
    * Here are some pointers:
    * * The Party Death common event will run in the same scene where the party
    * was just defeated. If the party died in battle, the common event will run
    * in battle, right after the party-is-defeated message and music effect.
    * So if you want to make something happen after a slow fadeout
    * and return to the map, I recommend using the After Game Over Common Event
    * instead.
    * * If you would like the Game Over screen (or a fadeout and cut to the map
    * if "Show Game Over Scene" is false) to show at the end of your common
    * event, remember to use the Game Over command in your common event.
    * Avoiding the Game Over screen is easy: avoid calling the Game Over command.
    * * Directly calling the Game Over command from any event will still show
    * the Game Over screen normally (unless you've set Show Game Over Scene to
    * false). To force your custom party death behavior, use a command that
    * calls your party death common event instead.
    *
    * =========================
    * = Show Game Over Scene =
    * =========================)
    * RPG Maker's default behavior takes the player to Scene_GameOver on
    * party death or on a scene processing call to Scene_GameOver.
    * This processing shows a Game Over screen.
    * After the player sees the screen and presses any key,
    * the game exits to the title screen.
    *
    * If Show Game Over Scene is set to false, player will see a fade to black
    * before going to the next scene. This will be the case regardless of whether
    * Game Over state is reached by party death or by a direct command in an event.
    *
    * Whether or not the Game Over screen shows, which scene is next depends on
    * whether the After Game Over Common Event is set, and what it is set to.
    *
    * ====================
    * = Reload Last Save =
    * ====================
    * Set Reload Last Save to true to make the game automatically reload from its
    * most recent save on game over. If a Game Over Common Event is specified,
    * the reload occurs before the common event is reserved. If no common event
    * is given, then the reload happens instead of going to the title screen.
    *
    * If Reload Last Save is true but the player has not yet saved,
    * then the player is returned to the Title Screen.
    *
    * ====================================
    * = After Game Over Common Event ID =
    * ====================================
    * Assigning a After Game Over common event makes gameplay continue after
    * the party loses, instead of RPG Maker's default behavior of returning the
    * party to the title screen. Open the database to Common Events to find the
    * ID of the common event to call on game over, and enter this ID number as
    * the parameter.
    *
    * In the content of the common event, the game designer can customize what
    * happens when the party dies or reaches an event-dictated Game Over state.
    * The After Game Over common event might do some of the following things:
    * * Take away gold and/or items
    * * Return the player to a safe place
    * * Restore HP to one or more party members
    * * Have the party's rescuer say something
    * * ...anything that suits this game!
    *
    * IMPORTANT: When control flows to the Game Over common event,
    * the screen will start blacked out. This gives the event time to handle
    * transfers and other processing before showing the player the screen.
    * Once those things are ready, remember to fade in!
    *
    * The After Game Over Common Event (AGOCE) differs from the Party Death Common
    * Event (PDCE) in the following ways:
    * * The PDCE runs instead of or before the Game Over screen or fadeout;
    * the AGOCE runs after the Game Over scene or fadeout completes.
    * * The PDCE only automatically replaces Game Overs caused by party death.
    * The AGOCE autoruns after all Game Overs, regardless of their cause.
    * * The PDCE runs in the same scene where party death occurred.
    * The AGOCE runs in a newly started map scene, with the screen faded to
    * black, and the party leader revived to 1 HP.
    */

    var Imported = Imported || {};
    Imported.Kath_GameOver = true;

    //=============================================================================
    // Helper method: parseBoolean
    //=============================================================================
    var Kath = Kath || {};
    Kath.Core = Kath.Core || {};

    // Convert a user-entered string into a Boolean true or false value.
    Kath.Core.parseBoolean = function(parameter, defaultValue) {
    switch (String(parameter).trim().toLowerCase()) {
    case 'true':
    case 't':
    case 'yes':
    case 'y':
    case 'on':
    case '1':
    return true;
    case 'false':
    case 'f':
    case 'no':
    case 'n':
    case 'off':
    case '0':
    return false;
    default:
    return defaultValue;
    } // end switch
    };

    //=============================================================================
    // Parameters and Constants
    //=============================================================================

    Kath.Parameters = PluginManager.parameters('Kath_GameOver');
    Kath.Param = Kath.Param || {};

    Kath.Param.PartyDeathCommonEventID =
    Number.parseInt(Kath.Parameters['Party Death Common Event ID']);
    Kath.Param.ShowGameOverScene =
    Kath.Core.parseBoolean(Kath.Parameters['Show Game Over Scene'], true);
    Kath.Param.ReloadLastSave =
    Kath.Core.parseBoolean(Kath.Parameters['Reload Last Save'], false);
    Kath.Param.AfterGameOverCommonEventID =
    Number.parseInt(Kath.Parameters['After Game Over Common Event ID']);

    Kath.GameOver = {};
    Kath.GameOver.RELOAD_FADE_DELAY = 60;

    //=============================================================================
    // Party death common event
    //=============================================================================

    // Replacement method
    // Like original, but with handling added for Party Death Common Event case.
    BattleManager.processDefeat = function() {
    this.displayDefeatMessage();
    this.playDefeatMe();
    if (this._canLose) {
    this.replayBgmAndBgs();
    this.endBattle(2);
    } else {
    AudioManager.stopBgm();
    if (Kath.Param.PartyDeathCommonEventID) {
    $gameParty.reviveLeader();
    $gameTemp.reserveCommonEvent(Kath.Param.PartyDeathCommonEventID);
    $gameTroop.setupBattleEvent(); // Run the reserved common event.
    // the battle doesn't end here in this case,
    // unless a scene control command ends it in the common event.
    } else {
    this.endBattle(2);
    }
    }
    };

    // replacement method
    Scene_Base.prototype.checkGameover = function() {
    if ($gameParty.isAllDead()) {
    if (Kath.Param.PartyDeathCommonEventID) {
    $gameParty.reviveLeader();
    $gameTemp.reserveCommonEvent(Kath.Param.PartyDeathCommonEventID);
    } else {
    SceneManager.goto(Scene_Gameover);
    }
    }
    };

    Game_Party.prototype.reviveLeader = function() {
    if ($gameParty.isAllDead()) {
    $gameParty.leader().setHp(1);
    $gameParty.leader().clearStates();
    }
    };

    //=============================================================================
    // Skip Game Over Scene
    // Redefine several methods of Scene_GameOver
    // so that it skips straight to the next scene.
    //=============================================================================

    if (!Kath.Param.ShowGameOverScene) {
    Scene_Gameover.prototype.create = function() {
    Scene_Base.prototype.create.call(this);
    //this.playGameoverMusic(); // No music.
    this.createBackground();
    };

    Scene_Gameover.prototype.start = function() {
    Scene_Base.prototype.start.call(this);
    //this.startFadeIn(this.slowFadeSpeed(), false); // No fadein.
    };

    Scene_Gameover.prototype.update = function() {
    // Do not require a trigger.
    if (this.isActive() && !this.isBusy()) {
    this.gotoTitle();
    }
    Scene_Base.prototype.update.call(this);
    };

    Scene_Gameover.prototype.createBackground = function() {
    // Load image to avoid potential conflicts.
    this._backSprite = new Sprite();
    this._backSprite.bitmap = ImageManager.loadSystem('GameOver');
    //this.addChild(this._backSprite); // But don't show it!
    };
    }

    // new method
    Kath.GameOver.findPostGameOverSceneClass = function() {
    if (Kath.Param.ReloadLastSave) {
    if (DataManager.isThisGameFile(DataManager.lastAccessedSavefileId())) {
    return Scene_Map;
    } else {
    return Scene_Title;
    }
    } else if (Kath.Param.AfterGameOverCommonEventID) {
    return Scene_Map;
    } else {
    return Scene_Title;
    }
    };

    //=============================================================================
    // After-Game-Over behavior. This includes reload last save, if called for.
    //=============================================================================

    if (Kath.Param.ReloadLastSave) {
    // extended method
    Kath.GameOver.Scene_Gameover_gotoTitle = Scene_Gameover.prototype.gotoTitle;
    Scene_Gameover.prototype.gotoTitle = function() {
    var saveId = DataManager.lastAccessedSavefileId();
    if (!DataManager.isThisGameFile(saveId)) {
    // This game hasn't been saved yet. Go to the title screen.
    return Kath.GameOver.Scene_Gameover_gotoTitle.call(this);
    }
    DataManager.loadGame(saveId);
    $gamePlayer.requestMapReload();
    $gameScreen.startFadeOut(1); // start next scene blacked out
    if (Kath.Param.AfterGameOverCommonEventID > 0) {
    $gameTemp.reserveCommonEvent(Kath.Param.AfterGameOverCommonEventID);
    SceneManager.goto(Scene_Map);
    } else {
    SceneManager.goto(Scene_Map);
    // Transfer to where we are, to set BGM, map fadein, etc.
    $gamePlayer.reserveTransfer($gameMap.mapId(),
    $gamePlayer.x, $gamePlayer.y, $gamePlayer.direction(), 0);
    $gameScreen.startFadeIn(this.slowFadeSpeed());
    }
    };
    } else if (Kath.Param.AfterGameOverCommonEventID > 0) {
    // replacement method
    Scene_Gameover.prototype.gotoTitle = function() {
    $gameScreen.startFadeOut(1); // start next scene blacked out
    $gameParty.reviveLeader();
    $gameTemp.reserveCommonEvent(Kath.Param.AfterGameOverCommonEventID);
    SceneManager.goto(Scene_Map);
    };
    }



    Download here: Kath_GameOver.js

    Version History
    Version 1.0.1 - Minor edits to Version 1.0, mostly in help text.


    Version 1.0.2 - Show/Skip Game Over Screen bugfix attempted, but found to cause the game to freeze on some machines.


    Version 1.0.3 - Show/Skip Game Over Screen feature removed for now.


    Version 1.1 - Show/Skip Game Over Screen feature is back. The bug appears to be fixed.


    Version 1.2 - New parameter allows you to reload data from the player's last save.


    Version 1.3 - Set the Party Death Common Event to customize what happens before (or instead of!) the Game Over fadeout.

    FAQ

    Q: I've set a common event to occur after Game Over, but when I try it, the screen stays black and I can't see anything. Help!
    A: After Game Over, the screen starts out faded to black to give the After Game Over Common Event a chance to handle transfers and other "behind-the-scenes" processing before showing the screen. To get rid of the blackness, make sure to run a "Fade In" command as part of your After Game Over Common Event.


    Q: My game lets the player continue exactly where they left off after they die. But when they continue, the music for the map they're in doesn't autoplay like it's supposed to. Is this a bug, or do I need to do something differently?


    A: This is not a bug. The silence gives the Game Over common event a chance to run its course without being interrupted by the BGM of the map where the player died. A transfer will cause the music of the destination to autoplay. Though you don't need the player to go anywhere, transferring the player to where they already are will fix your music problem. Here's how to do it:

    1. At the start of your Game Over common event, use the Control Variables command three times to assign three variables: the player's current map ID, X coordinate, and Y coordinate.

    2. Place a Player Transfer command at the part of the event when the map's BGM should start playing.

    3. As always, remember to use a Fadein Screen command! (The fade that accompanies the Player Transfer command won't cut it.)


    Terms of Use
    This plugin is free for all use, including commercial use. Please credit me (McKathlin) where appropriate. Sending me a free copy of your completed game is encouraged but not required.
     
    Last edited: Nov 16, 2018 at 11:08 PM
    #1
    Eliaquim, Sebezua, Archeia and 8 others like this.
  2. Corrupt_Directory

    Corrupt_Directory That one lazy guy Member

    Messages:
    15
    Likes Received:
    2
    Location:
    Somewhere in Australia
    First Language:
    English
    nice, I might consider this in a potential project!
     
    #2
  3. Aurom2014

    Aurom2014 Villager Member

    Messages:
    5
    Likes Received:
    1
    First Language:
    Spanish
    This is excatly what I need. I try it, but I got an error.... if I Set "Show Game Over Scene" to FALSE, a TypeError comes into play:

    "Cannot read property 'bitmap' of undefined"

    Any idea why it happend?
     
    #3
  4. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Thanks for the bug report, Aurom. I haven't been able to see this problem happen, so I'm not exactly sure why it happened for you. I've tried patching up a couple of things that might have made the plugin vulnerable to a problem like that. Could I please have you replace your copy of Kath_GameOver.js with the latest version (now available from the original post) and let me know if that fixes the bug?


    If you're still having the same problem (or any problem) with Kath_GameOver after the update, I could use your help to track down this bug. One of these two advanced bug reporting measures would help me have more details:

    • Add the Yanfly Core Engine plugin if you don't already have it, and set its "Open Console" parameter to true. When the error appears in your game window, the console window should show a dump of error information called a stack trace. Copy the stack trace and paste it to show me.
    • Or if you'd rather, send me a download link or zip file of an MV project in which the bug occurs.
      Thanks!
     
    Last edited by a moderator: Jan 17, 2016
    #4
    JRibbons likes this.
  5. Aurom2014

    Aurom2014 Villager Member

    Messages:
    5
    Likes Received:
    1
    First Language:
    Spanish
    I try it again, and i got a similar error this time is "Cannot read property 'width' of undefined"

    also, i did what you say with the YEP console. here's the error description:

    TypeError: Cannot read property 'width' of undefined

        at Scene_Gameover.rescaleImageSprite (YEP_CoreEngine.js:843)

        at Scene_Gameover.rescaleBackground (YEP_CoreEngine.js:839)

        at Scene_Gameover.start (YEP_CoreEngine.js:835)

        at Function.SceneManager.updateScene (rpg_managers.js:1668)

        at Function.SceneManager.updateMain (rpg_managers.js:1641)

        at Function.SceneManager.update (rpg_managers.js:1576)

    rpg_managers.js:1618 SceneManager.catchExceptionrpg_managers.js:1579 SceneManager.update

     

     

    I ll try to update the YEP to the latest version, and see what happen
     
    #5
    McKathlin likes this.
  6. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you; this stack trace was very helpful. (Though the crash occurred in YEP_CoreEngine, the cause of the crash was an un-initialized bitmap due to some overly-aggressive corner-cutting in Kath_GameOver.) My latest Kath_GameOver version (Version 1.0.2) attempts a fix for the issues you've reported. Please download it from the OP and let me know if it fixes things for you.
     
    Last edited by a moderator: Jan 19, 2016
    #6
  7. Baerthe

    Baerthe An Art Director Veteran

    Messages:
    154
    Likes Received:
    39
    Location:
    Commonwealth of America
    First Language:
    English
    Just though anyone would want to know this, but if you run the attached script in an event it will delete the last used save file.


    This would let you use this plugin, or any death event plugin or you just hate players, to create a PERM-DEATH effect! :D

    Code:
    var cursave = DataManager.lastAccessedSavefileid();
    StorageManager.remove(cursave);
     
    #7
    McKathlin likes this.
  8. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    That's cruel, Baerthe. I think I like it! :D

    My first attempt at fixing this bug that Aurom reported was unsuccessful, and I was unable to figure out how to make the bug occur in my test project at the time. I recently stumbled upon the bug by chance, not by changing any project configurations, but just by having my laptop unplugged and on low power. Evidently, it's a parallel process error that only occurs on some machines. Since that's a deal-breaker for publicly released projects, I've chosen to remove the Skip Game Over Scene feature and its "Show Game Over Scene" parameter until I'm sure I have the bug fixed. That's what's new with Version 1.0.3.


    TL;DR: To avoid a fatal error, please either make sure you're using Version 1.0.3, or set "Show Game Over Scene" to true.
     
    Last edited by a moderator: Feb 20, 2016
    #8
  9. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    I've come up with a bugfix for the issue with the feature for skipping the Game Over screen, but I'd like to get it tested thoroughly before I put it in an official release. This bugfix is part of Development Version 1.1, which is ready for testing and feedback on the Custom Game Over development thread. Thank you for your support!
     
    #9
  10. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    Can I use your pluggin just for do load back the last save point without going to title screen?
     
    #10
  11. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A


    Hi XGuarden,


    Thanks for asking. I've tried using my plugin so that a script call in a common event would load the game from the last save. It sort of works, but the scene control looks ugly because the player can see a glimpse of where they were before they died.


    I've found that it works better when I write some custom code into the plugin to handle it. I nearly have a plugin ready for you that will do what you want, but I need to know one more thing: what would you like to have happen if the player gets a Game Over on a game that they haven't yet saved?
     
    #11
  12. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    In my game they don't have that much way for diing. In fact only player can ask to die for reset a level. When entering a level, an auto save happen(I still need to find how doing that too). So They will alway have an auto save before. In the case they really don't have any save(because player did't enter any donjon yet for exemple) that will jsut go back to title screen.
     
    #12
  13. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A


    Thanks for the feedback. I've created an extended version of my plugin (attached to this post) that should meet your needs. All you need to do is install it like any other plugin, set the "Reload Last Save" parameter to true, and you're good to go! (This version also has my experimental feature for choosing whether to show or skip the Game Over screen.) I'm the only one who has tested this version so far, so please let me know if anything goes wrong.

    View attachment Kath_GameOver.js
     
    #13
    JRibbons likes this.
  14. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    thanks, I try it, did you want feedback?


    Hum it's dont't appear in my pluggin list
     
    Last edited by a moderator: Jun 16, 2016
    #14
  15. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A


    Was the Kath_GameOver plugin missing from your list in the Plugin Manager, or was it missing from the dropdown in the new plugin dialog box? Or did something else go wrong?


    The process for installing this plugin is the same as for most plugins. Please refer to Yanfly's tutorial on plugin installation, which shows where you need to place the plugin file so that it will be available to add to your plugin list, and how to add it to your plugin list.


    The steps are as follows:

    1. Download the plugin, and save it in your project's plugins directory. To find the plugins directory, first go to the directory that contains your project's Game.rpgproject, and then go into the subdirectory called "js", and from there to the subdirectory "plugins". Make sure to save the plugin as Kath_GameOver.js
    2. Now open your project in RPG Maker MV, and open the Plugin Manager. Each plugin must be added to the plugin list before it will appear. (Some plugins may need to be in a specific order on the list, but Kath_GameOver can safely go anywhere.) You can add a new plugin by double clicking the empty space at the bottom of the plugin list. A new Plugin dialog box should appear.
    3. In the dialog box, click under "Name:" to see a dropdown list. Select Kath_GameOver from the list. The plugin description and parameters should appear below. Help text is also available at the click of a button.
    4. Click on a parameter to change its value. For your project, you will want to set "Reload Last Save" to true. Once you've done this, click OK. You'll also need to click OK on the Kath_GameOver plugin dialog box and the Plugin Manager dialog box, so that the changes will take effect.

    If anything goes wrong on any of these steps, please tell me specifically what happened that didn't go as you expected. Thank you!
     
    #15
  16. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    Yes I installed a lot of plugin in the past.... but for a good reason, this one just dont appear at all in my pluggin list.  pressed cancel instead of ok lol.


    Now I will need to find a plugin for add a game over button on screen or in menu and finally a auto save.


    Ok first think I discovert. I see that they have no game over sound. Maybe add this possibility.


    Anyway so I decide de add common event just for the gameovert sound during fadeout screen.


    I discovert that fadeout dont hapen in same time then the sound and that putting a common event in pluging make the last option(reload last save do nothing). 


    So maybe make auto event happen happen and after load last save if enabled or add possibility to play the game over sound =:0) you do great work =:0)
     
    Last edited by a moderator: Jun 16, 2016
    #16
  17. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A


    Hi XGuarden,


    Oops! I'm glad you figured out the issue with plugin installation. :)


    Have you had a look at the music options in the System part of the database editor? On the system music list, Defeat is the Music Effect that plays when the party is defeated in battle, before cutting to the Game Over screen. Game Over is the Music Effect that plays while the Game Over screen is showing. Any OGG or M4A sound file that you save into the audio/me subdirectory of your project should be available for those. Or in the Sounds list just below the Music list, the Actor Collapse sound effect may be what you're looking for. (Of these sound and music effects, I'm not sure that the Defeat and Actor Collapse sounds play if the player dies while on the map, but the Game Over music will always play whenever the Game Over screen shows, regardless of how it is reached.) Does this meet your needs?
     
    #17
  18. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    They already have music there. But If I enable your script, I set show game over screen to OFF because I dont want to see it and auto save to on and make sure they have sound eveywhere needed, then no game over sound appear. Surelly because I set game over screen to OFF.


    It's why I tryed to make it play by a common event. But when I make it play by the common event, first the sound appear after the fade out and not at same time and the game stay at a black screen, that dont load back. I hope im enoug clear for you to be able to understand what I do =:0) Possibilityto play a common event before the fadeout screen will be great too for a die on map game.
     
    Last edited by a moderator: Jun 17, 2016
    #18
  19. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    36
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    I see. It would be a good idea to add a feature to my plugin that lets you set a common event to happen on party death, before the fade out. I'll plan on doing that next, and I'll let you know when it's ready.
     
    #19
  20. XGuarden

    XGuarden Veteran Veteran

    Messages:
    419
    Likes Received:
    12
    First Language:
    French
    It's ready? lol
     
    #20

Share This Page