I want to eliminate the Game Over function altogether. No game over on death. Something similar that Stardew Valley does, but instead of one specific location, the respawn location would be in a stored variable. I figured that part out with variables RespawnX, RespawnY, and RespawnMap. The part I'm struggling with is removing the Game Over screen and setting up the teleport itself.
I'm terrible with code, but I am trying to learn so that I can do more on my own without always asking for help (which is why I try not to use plugins that others have made to do all the work for me). I took a deep delve into the Scenes js file to try modifying some things in the hopes of learning how certain code functions. I modified a small section to try and generate a choice option for testing purposes. It didn't change anything, game over screen still happened. I went looking even further into the file and saw a huge section for Game Over function that I honestly have no idea where to even begin modifying. I also was scared that just deleting that entire Game Over section would break the game somehow (I do have a backup of the original, unedited file just in case, and the one thing I did remove to test something did end up breaking the game XD).
I saw an option I could do is just make every fight one that you can lose, and just have the lose condition teleport the player....but the problem becomes that it brings the player back to the original screen where the fight started, THEN teleports them, and it looks choppy, weird, and trash. What I want is for the screen to fade out like normal, but instead of playing the game over screen, it fades back in to the player's saved respawn location.
I honestly, legitimately thought this wouldn't be too difficult to do....but, I guess I should have figured that it wouldn't be easy either.
I'm terrible with code, but I am trying to learn so that I can do more on my own without always asking for help (which is why I try not to use plugins that others have made to do all the work for me). I took a deep delve into the Scenes js file to try modifying some things in the hopes of learning how certain code functions. I modified a small section to try and generate a choice option for testing purposes. It didn't change anything, game over screen still happened. I went looking even further into the file and saw a huge section for Game Over function that I honestly have no idea where to even begin modifying. I also was scared that just deleting that entire Game Over section would break the game somehow (I do have a backup of the original, unedited file just in case, and the one thing I did remove to test something did end up breaking the game XD).
I saw an option I could do is just make every fight one that you can lose, and just have the lose condition teleport the player....but the problem becomes that it brings the player back to the original screen where the fight started, THEN teleports them, and it looks choppy, weird, and trash. What I want is for the screen to fade out like normal, but instead of playing the game over screen, it fades back in to the player's saved respawn location.
I honestly, legitimately thought this wouldn't be too difficult to do....but, I guess I should have figured that it wouldn't be easy either.
Code:
Scene_Base.prototype.checkGameover = function() {
if ($gameParty.isAllDead()) {
$gameMessage.setChoices(['Respawn', 'Title_Screen'], 0, -1);
$gameMessage.setChoiceBackground(0);
$gameMessage.setChoicePositionType(1);
$gameMessage.setChoiceCallback(n => {
$gameVariables.setValue(1, n);
});
this.setWaitMode('message');
}
};