Transfer party to location after party defeat in battle (skip Game Over processing)

● ARCHIVED · READ-ONLY
Started by adamhwong 8 posts View original ↗
  1. Hey all - couldn't find anything fits this request. End Phase Triggers is pretty close, but it looks like it only works for Troop defeat conditions, rather than party defeat conditions. Also, I would prefer that this be global/scalable - scripting every Troop event isn't quite scalable, but I'll do whatever it takes to get the job done. Please let me know if you need more info, thanks!

    ###

    Goal

    If the party is defeated in battle, then the party is transferred a specific location. Their levels are reset to 1, equipment, gold, etc is also reset to null. 

    Use Cases

    We want to create a plugin that allows the game to skip the Game Over processing when the party is defeated. 

    Examples

    • Party randomly encounters Troop A. Party loses to Troop A, and is transferred to a location (home base), each party member's level is reset to 1, all equipment/gold/etc (all consumables) are removed and set to null. 
    • Party hits an Event battle in Troop Boss. Party loses to Troop Boss, and is transferred to a location (home base), each party member's level is reset to 1, all equipment/gold/etc (all consumables) are removed and set to null. 
    ###
  2. Try this and see how it works.


    I have not officially released it but it should do what you need.


    Of course, because it has not been released yet, there is minimal information provided.


    I've included the usage.
  3. Awesome, thanks. This almost works for me. A few things: 

    I have to edit the coordinates in the plugin js, which is fine, just an FYI:

    •   /* Overwrite */

        Scene_Gameover.prototype.create = function() {

          Scene_Base.prototype.create.call(this);

          $gamePlayer.reserveTransfer($.MapID, 7, 7);
    With this script enabled, it transfers player to the correct region ID and location, it gets caught it some sort of loop. Here's a link to an .avi video for you to take a look at the bug. 

     

    Thanks for the help!
  4. I just randomly transfer to (0, 0). You can use an event command to set the player's location on the map using a parallel process and then erasing the event.


    For the looping issue, does it occur when other plugins are disabled?


    I have encountered this looping issue before and thought I solved it, but it looks like it still occurs in certain scenarios.
  5. I tried to event command the player's location but it didn't work. Not sure it's user error or because of the looping issue (I haven't been this deep since RM2k so I'm a little rusty).

    For the looping issue, it occurs both when there is a plugin in the plugin manager and it's disabled, and when that disabled plugin is removed from the plugin manager. I've attached a snip of what it looks like. I'm getting a solid repro of the loop either way. Let me know if you need more info. 

    Plugin-snip.JPG
  6. Can you create a new project, set up a simple game over event and a scenario where you game over, then remove the img folder and audio folder so that there are no unnecessary resources, and send it to me?
  7. Ok, so I set up a new project with just the HIME_GameOverEvents js. I created a map with a Game Over Event with a Player Touch trigger and I'm not getting a repro. The plugin works as intended. 

    I created another new project, same thing, but I made a random encounter on the map. Once the party dies, I am getting a consistent repro of the bug. 

    Creating a Drive link for you to pull the folders down, I'll DM it to you. Let me know if you need anything else. 
  8. I've found the issue. Currently looking into a fix.

    EDIT:

    ah...here it is

    Scene_Base.prototype.checkGameover = function() { if ($gameParty.isAllDead()) { SceneManager.goto(Scene_Gameover); }};The game checks game over every frame in every scene.EVERY scene lol

    And so if you died in battle, everyone's still basically dead.

    Hmm I'm not sure what's the best way to solve this. Perhaps the game over scene shouldn't be checking game over.