• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[SOLVED] How to easy wipe older save codes?

Status
Not open for further replies.
Level 7
Joined
Mar 10, 2012
Messages
53
Hello Hive!

Im using a save/load code for an RPG I am making and i need to wipe the old codes. Im looking for an easy way to wipe all the existing codes created for NPS save/load system. Is there a general/easy way to make sure the old codes will no longer work.

Appreciate help and can elaborate further if needed.
 

Attachments

  • NPSSaveandLoad.PNG
    NPSSaveandLoad.PNG
    61.9 KB · Views: 63
Level 45
Joined
Feb 27, 2007
Messages
5,578
The simplest solution I can think of is to save some additional (otherwise useless) data with any new save. When you load a save, if those data are not present in the output unit/item/whatever from the load function then remove the unit/don't progress the level/whatever. A quick way to do this would be to add some sort of invisible but useless ability (based on an item like claws of attack but with no bonus) to the saved unit, then check for this ability on load. You can implement a sort of versioning by changing the saved ability whenever you make an update that should break old saves.

In principle you should be able to do this without adding an ability and simply encoding the new data into the save/load mechanics, but honestly I'm not familiar with NPS and I can't find it anywhere by googling. Found lots of threads about people using it though.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Add an integer variable to your save system which corresponds to "version" of your save system. You can increment the value when you change something, if you encounter a load attempt from a previous version you can reject the request or perform it.
 
Status
Not open for further replies.
Top