My code:
using (ES2Writer writer = ES2Writer.Create("Data.dat"))
{
// Missions
writer.Write(MissionManager.instance.mission1.ID, "mission1ID");
writer.Write(MissionManager.instance.mission1.done, "mission1Done");
writer.Write(MissionManager.instance.mission1.target, "mission1Target");
writer.Write(MissionManager.instance.mission1.progress, "mission1Progress");
// Remember to save when we're done.
writer.Save();
}
1) File contains unencrypted tags, is it possible to encrypt tags as well?
2) If I add ES2GlobalSettings and enable Encryption by Default, does it mean I don't have to mention encryption everytime I save?
Saving with encryption including tags?
Re: Saving with encryption including tags?
Hi there,
It's not possible to encrypt the tags because otherwise we'd have to decrypt every tag before being able to traverse the file, which would be extremely slow.
And that's correct, if you enable Encryption by default it will automatically encrypt everything that you save. We're actually adding a way to set the default settings from a Settings window in the Editor for v2.48, but ES2GlobalSettings will still work too.
All the best,
Joel
It's not possible to encrypt the tags because otherwise we'd have to decrypt every tag before being able to traverse the file, which would be extremely slow.
And that's correct, if you enable Encryption by default it will automatically encrypt everything that you save. We're actually adding a way to set the default settings from a Settings window in the Editor for v2.48, but ES2GlobalSettings will still work too.
All the best,
Joel
Re: Saving with encryption including tags?
Thanx a lot, just bought your asset, which was a gift on my birthday!
Just saw that you can add your own types, so I think I found a way to hide some tags by creating my custom types like Mission.
Just saw that you can add your own types, so I think I found a way to hide some tags by creating my custom types like Mission.
Re: Saving with encryption including tags?
Ah, well Happy Birthday from everyone here at Moodkie, and thank-you very much for the purchase!
If you need any help adding support for your own types then let me know and I'll see what I can do.
- Joel
If you need any help adding support for your own types then let me know and I'll see what I can do.
- Joel
Re: Saving with encryption including tags?
By the way, if I later update my own datatype, is there a way to check if it is consistent so I wouldn't load it (to avoid any errors)? Same question if encryption changes.
Re: Saving with encryption including tags?
If you plan on changing encryption or Types in future updates, the way we advise doing this is using version numbers.
So for example, you would keep a version number variable somewhere in your app, and also store this version number in your save file. When you come to load/save data, check that the version number in the file matches that in the app ... if it doesn't, the save file is incompatible with the current version. When you make a change to your encryption or types which will make the previous files incompatible, increase the version number in your app.
Hope this helps!
So for example, you would keep a version number variable somewhere in your app, and also store this version number in your save file. When you come to load/save data, check that the version number in the file matches that in the app ... if it doesn't, the save file is incompatible with the current version. When you make a change to your encryption or types which will make the previous files incompatible, increase the version number in your app.
Hope this helps!