• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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: 61
Level 39
Joined
Feb 27, 2007
Messages
5,012
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