Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Holyrapid on September 13, 2012, 03:20:34 am

Title: Script to delete saves on RMXP
Post by: Holyrapid on September 13, 2012, 03:20:34 am
You read that right. I want a script that deletes a SPECIFIC save or saves from the saves folder upon condition.
I'm currently hatching up a RPG (duh) that has somewhat of a p&p/tabletop rpg feel to it.
I will either use Blizz-ABS or a tactical system for battle...
The reason i want it to delete the saves is so that when you die, you can't just load up from before, and continue...
Title: Re: Script to delete saves on RMXP
Post by: Blizzard on September 13, 2012, 03:53:45 am
First you should consider whether this is a good designer idea before you implement this. There have been games that tried this and it didn't work out as they wanted.
Title: Re: Script to delete saves on RMXP
Post by: diagostimo on September 13, 2012, 07:16:43 am
also on a note if you do plan on doing this you should really consider how the default saving works, if you did implement this there would be nothing stopping me(a user) from copying my saves into another directory and pasting them back in when the script deletes them upon death
Title: Re: Script to delete saves on RMXP
Post by: Memor-X on September 13, 2012, 09:18:32 pm
Quote from: Holyrapid on September 13, 2012, 03:20:34 am
The reason i want it to delete the saves is so that when you die, you can't just load up from before, and continue...


instead of deleting files you could just have an auto save profile, you start a new game bu making a new profile and that profile is 1 save, have it save automatically without the user knowing at points (like checkpoints) and then have the game save on death as well

ofcause, the user can still just copy and past backup saves, to prevent this timestamp in the save filehave a system file which stores the timestamp for each profile, when you go to load, compare the timestamp in the system file with that in the save file, if they don't match, the save file is invalid and don't load the game

now, how do you stop a user from backing up both save file and system file........stuffed if i know, best guess is that you also have a timestamp in the system file for the last time it was edited and check this against the files own Modified date, don't know if you can do that in Ruby or RGSS, also, that's just a theory i have yet to successfully implement in Game Maker, thing it might be C.C's doing there since one file, even after i permanently delete it and have Game Maker recreate, dates the Created date as being that of over a year ago
Title: Re: Script to delete saves on RMXP
Post by: ForeverZer0 on September 15, 2012, 01:47:29 pm
There is nothing stopping anyone from editing a timestamp file either, so that really won't help.
The only real way to do it is to have saves stored in memory, and only save to file when the player is quiting/exiting the game.
Title: Re: Script to delete saves on RMXP
Post by: Blizzard on September 15, 2012, 02:35:40 pm
And this has its own risks. If a game crashes for some reason, the save is gone. I'll not go further into detail what else can go wrong.
Title: Re: Script to delete saves on RMXP
Post by: winkio on September 15, 2012, 05:13:11 pm
If you want full control over saves, make your game online and store all the saves on your server.  Otherwise, people will find some way to reverse engineer them.
Title: Re: Script to delete saves on RMXP
Post by: LiTTleDRAgo on September 16, 2012, 05:00:34 am

Quote from: Holyrapid on September 13, 2012, 03:20:34 amThe reason i want it to delete the saves is so that when you die, you can't just load up from before, and continue...


I think it's futile to implement it by deleting saves, you can just copy and paste the save to another folder
but... if you want to delete saves....

    File.delete(filename) 


example :

    File.delete('Saves/Save1.rxdata')