Script to delete saves on RMXP

Started by Holyrapid, September 13, 2012, 03:20:34 am

Previous topic - Next topic

Holyrapid

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...

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

diagostimo

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

Memor-X

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

ForeverZer0

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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

winkio

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.

LiTTleDRAgo


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')