1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[SOLVED] How to easy wipe older save codes?

Discussion in 'World Editor Help Zone' started by JohnnyBoy, Oct 5, 2019.

  1. JohnnyBoy

    JohnnyBoy

    Joined:
    Mar 10, 2012
    Messages:
    37
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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.
     

    Attached Files:

  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    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.
     
  3. JohnnyBoy

    JohnnyBoy

    Joined:
    Mar 10, 2012
    Messages:
    37
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Okay i found an easy solution.

    I just changed the characters required for the code generation to different ones.
     
  4. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,114
    Resources:
    0
    Resources:
    0
    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.