1. But checksum is like file hash, It changes if the save change, Like add a new Building, or a new player connects, isn't ?
     
  2. You don't need checksums and ProtoBuf.Save. It's enough hook without arguments.
     
  3. From what I understand, it is a hash of the generated world data, not of the save data itself meaning it only changes when the generated world data itself changes. Could be wrong though.

    Then feel free to implement it and PR it to the Oxide Patcher github. Less work for me for a feature I don't need.
     
  4. A feature you don't need NOW, but some day you might need, As i need one now, And a lot of plugins can use a feature like that.
     
  5. When I do need it, I'm perfectly capable of adding it. What he was saying is that you don't need checksums, that the hook just needs to be there, which in my opinion is incorrect. Just because the world successfully loads doesn't mean that it hasn't changed. Rust itself uses the checksums to determine differences in world generation so it would be useful to us to have the same capability. Just detecting that the world successfully loaded isn't very useful at all in my opinion. ProtoBuf.Save contains the checksum of the saved world generation data and World.checksum contains the current checksum of the newly generated world with the same seed. If they match, the world generation has not changed and objects from the save are spawned in. If the checksums do not match, the world generation procedure has changed and the newly generated world is used with no data loaded from the save and no saved objects spawned in. The generated world itself is never actually saved, just the objects in it. It is always generated at runtime which is why the checksums are used to make sure that the generation procedure hasn't changed, otherwise you'd end up with objects spawned in the wrong places. It also greatly reduces the size of the save file. So when the dev version that has the checksum data easily accessible in the ProtoBuf.Save and World types becomes the current release version, I'll look into adding the hook for it. The only case I can think of where this wouldn't work is if you generated a new, empty world with the same seed and same generation engine as the old one because then the checksums would match even though the server had been wiped. Even then, you wouldn't have to use the checksum data from ProtoBuf.Save, you could just do whatever you like with the hook if the checksums aren't necessary for what you're trying to achieve.
     
    Last edited by a moderator: Jan 16, 2015
  6. Well i might founded a easier way i found this on the log: [1/16/2015 6:32:54 AM] Terrain checksum is 91efc714e8c9c79c3ceccfbaa139168f-7585240c240188cb693406fe4810d79f, There is anyway to read the log by using a plugin?
     
  7. Wulf

    Wulf Community Admin

    Here's an easy solution for detecting if the server was force-wiped via save version change.

    Simply check the save protocol version, store it, and compare every start.
    Code:
    Rust.Protocol.save
     
  8. Thanks that will help.