1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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:
    35
    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,049
    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:
    35
    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,080
    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.