Astral Sorcery

Astral Sorcery

63M Downloads

[Suggestion] Persistant data

DemonfangArun opened this issue ยท 6 comments

commented

Mods should never try to save data outside of the instance directory. This function should be disabled by default.

commented

Then the data wouldn't be persistent across all instances. Which defeats the purpose, and is why it is in the minecraft root instead of the instance root.

commented

Except that the location it is saving to is not my minecraft root (and isn't for anyone using twitch). The farthest out data should be saved is the folder outside the instance folder, which would keep it persistent across saves, and not save it to a hardcoded location that may or may not exist on an operating system (appdata doesn't exist outside windows).

Additionally, people starting a new world typically don't want to carry stuff over from an old world (hence the reason they're making a new world).

commented

Appdata is the default mc installation path with windows. Even if you dont install to there it references the path. Linux has a similar pathing. There is a reason the default pathing is the same as PSI's.

And if you want to have to redo 70ish constellation lookups that are purely information every single pack and world, then delete the file. It is intentional that it be carried over.

commented

is the folder outside the instance folder, which would keep it persistent across saves

Actually no. If you switch then from Twitch to MMC or other(s), the data would be lost.

to a hardcoded location that may or may not exist on an operating system (appdata doesn't exist outside windows).

Which is why the path is different from platform to platform: https://github.com/HellFirePvP/AstralSorcery/blob/master/src/main/java/hellfirepvp/astralsorcery/client/data/PersistentDataManager.java#L61

It being enabled by default was a result of me trying to be in line with what the only other mod that has a persistency system also has as a default - Namely PSI if you don't want to click on the github links there. Since i haven't seen any backlash against him, i took the same approach; also with an info file on what this directory is/means.

Locking this issue is i think not necessary as long as a healty discussion can arise.

commented

Actually I wrote the exact same complaint for that mod (I was actually combing through PSI's config and came across it, then noticed this mod saving stuff there). My real problem isn't with persistence, but rather with where the files are being saved. The main goal of my entire modpack is persistence, although on a much larger scale.

A good option with persistence would to be to save just outside of the instance folder, thereby keeping everything together under a much wider range of scenarios. A notice could be generated that this is going on (which neither this mod nor PSI does) and that if players choose they can copy the files over to the new respective location of the launcher they switch to (this is a bit of an edge case, but it does exist). Something this would also do is make it much more likely to get backed up should the user reinstall the OS, move to a new computer, etc... as it would be together with the other files (very often people don't back up appdata).

commented

As i mentioned above, keeping it one level above the currently running mc instance won't work either, because, as i said, switching over from Twitch to MMC or others will just break the mechanic.

There's an info file right where the data is at that describes why it is there and what it's for. Writing this in logs is unnecessary because people don't read the logs. And even for those that do, they won't find that line due to the mass of log output. Ingame chat message is also unstuitable as the 1.7.X era has blatantly shown. Having a gui pop up when you start a new world or join a server is similarly bad and - again, as the past has shown - subject to rant against the mod.
If completely reinstall your OS, then why would you back up that 2 year old modpack that happens to still lie around in your modpacks folder. A user backing up all modpacks they've ever downloaded is equally unlikely as them not backing up the AS persistent savedata; much like PSI's. Why would a user do that to begin with. You can just download the pack again. The only thing you might want to save are your singleplayer worlds in those packs. Not just flat all packs.