[VX ACE] SAVE GAME MANIPULATION

Posts

Pages: 1
Max McGee
with sorrow down past the fence
9159
So this is something I'm not absolutely POSITIVE I want to do with the game project I'm currently messing around with, but before I decide whether to go with doing it or not, I figured it would be good to find out if it's even possible.

What I'm looking for--and I've read through a dozen or so save game scripts without encountering this exact functionality-- is a bit of script that will allow me to delete a specific save game file, maybe with a script call through an event or whatever.

The idea is, I'm going for a rogue-like like design, with "permadeath". What that means is that when the player dies, instead of going to the title screen and reloading their last save like in your typical JRPG, their save file for that character is deleted, and events return them to the character creation screen where they can make a new character and start again. I realize I'd probably have to somehow lock saving to one save slot per play-through to make this work, and I have no idea if this is even possible, and I'm definitely not sure I want to do it if it IS possible, but I wanna see what my options are.

Ideally, I'd call another save function after they were perma-dead just to record their "progress" (switches, variables, etcetera) for the purpose of a stats screen and unlocks and stuff, but that's an add-on for if the basic functionality if there's a way to manage it.

Lot of scripting whizzes around here. Can anyone help me?

Thanks!

Edit: I found THIS script from the amazing Yanfly. One of the neat things it does is let players delete their own saves from the menu. It involves a new method called on_action_delete, and it seems like something inside there could be re-purposed into a script call that would delete a specific save file, which would be a start, but I don't quite know my way around RGSS3 well enough to figure that out.

Edit2: Situation update. I found this script and it seems to work as an autosave script. If I restricted the player to one playthrough/character at a time, and used a script call from an event to delete the autosave file (which is called Autosave.rvdata2 -- neat!) upon game over that would work as a workaround. Actually it wouldn't be necessary to delete the file at all...I could 'call' the autosave after the game over event when the player's death and return to the beginning is already being processed via events. Far from ideal, of course, since it would only allow one playthrough/character at once...
File.delete("nameofsavefilehere")

should do the trick. When I get home I'll look at the save game name format and make it more exact. iirc there's a bit of code that'll create the save game name based on the slot number too in... Scene_File I'd bet.
Pages: 1