Item-Based Continue System/save removal upon game over

I can't quite seem to figure a way to make it so that upon all party members dying, a check is run, so that if at least one of a particular item is in your inventory, that instead of the standard game over screen, you are given the choice to use up one of said item to "continue"(I.E, near death states are moved and HP is increased back to full for everyone), or not. And if not, then standard game over screen, and your save gets deleted.

Anyone know what do for this one? I want to make a game that is slightly rogue-like in nature.
Just checking that I've understood your description correctly.

No item leads to game over and my save file is deleted?  So I lose a battle and I also lose x hours of game play?  Seems a tad harsh.
I'm shooting for a rogue-like, you see.

Also, I couldn't get Tsukihime's Game Over Events script to work for this. Matter of fact, it did nothing. Standard game over screen.
Game Over Events only allows you to play something different for the game over scene; it doesn't make it so that you can avoid game over.


I don't know why it doesn't work for you. Compatibility issues (check on new project), incorrect setup (post relevant setup details), etc.
Nevermind, Tsukihime. I managed to get it to work using Custom Page Conditions. $game_party.all_dead?

Still not sure what to do regarding game over equaling save delete.

Say, maybe the Ace Save Engine could do the job? If I could figure out how to make Ace Save Engine automatically delete save file 1 through a line of script.
you can call File.delete(file path) on the part where you need to delete the save
How would I syntax that with save file 1?

I'm going to be forcing one save file atm(because I see potential for abuse if there's multiple save files)
probably Save01.whatever-extension-it-was


anyway, you can always make a save by yourself and see the filename afterwards
I mean, literally, what would I enter into the script box?

File.delete(Save01.rvdata2)

No $ signs or anything?
well, it should be a string so you put it inside quotation marks
Got it to work, but there now seems to be a 1 out of 2 chance of the default game over playing, INSTEAD of the custom scripting.
what?
I'm testing the new setup now, and about 1 out of every two game overs, the default, Play Gameover sequence without deleting your save and bumping you back to the title screen, game end, will occur instead of the custom script with save deletion that I set up.

It sometimes doesn't work D:
then maybe it's something with the set-up... you better post up the set-ups that you used...
p4h9b3h.jpg


Z0ilUyK.jpg


Here's the troop event i'm using for testing. And here's the picture of my script editor materials:

gDxyWTr.jpg
Hmmm... just looking at it alone, it would always be deleting your save file before going to GO sequence... does the choices always show?
1. It's not deleting the save the wrong half of the time.

2. The choices only show if you have the continue item to use.
can you add a print to console thingy in top of the event (before the wait I guess) just to ensure that it (the event) always runs whenever your party dies?


btw, printing things to console is a nice way to debug in my experience...
I'll look into that tomorrow.

EDIT: I threw in some text for debug purposes. One out of two times, same thing happens. Nothing prints to console when the standard gameover happens instead.

Halp.

Original thread: https://forums.rpgmakerweb.com/threads/item-based-continue-system-save-removal-upon-game-over.21156/