How to properly convert Single saves to Multiplayer saves ? - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Discussion (https://forum.cuberite.org/forum-5.html) +--- Thread: How to properly convert Single saves to Multiplayer saves ? (/thread-2309.html) |
How to properly convert Single saves to Multiplayer saves ? - flow969 - 01-12-2016 Hi everyone, I tried to convert my Single save to Mulitplayer save on my Cuberite server but it is not correctly 'converted'. This is what I've done : 1) Made a back up of the 'world' folder 2) Delete all files from the 'world' folder 3) Copied all my single save file into the empty 'world' folder Everything works except for my inventory (players_data.dat files) Someone know how to make them work please ? RE: How to properly convert Single saves to Multiplayer saves ? - NiLSPACE - 01-12-2016 Hello, and welcome to the forum Cuberite doesn't use the player files. We save it all as a json file. Unfortunately there is currently no way to convert the player data into our format. @xoft Perhaps if we export cFastNBT to Lua we could make a plugin that would do this? What you could do though is put all your items in a chest, and return them once you've logged into cuberite. RE: How to properly convert Single saves to Multiplayer saves ? - xoft - 01-12-2016 I think exporting cFastNBT to Lua is not a good idea, it doesn't have the kind of interface that plugin writers expect, it would be very difficult to use. We need a higher level API. Still, I think the best way to go would be to make a standalone executable, a tool that could convert back and forth between the two formats. Maybe even better, make the server read "<playername>.dat" files if the JSON player file is missing, so it could import the world from vanilla effortlessly. I'm wondering, why do we even use JSON files? I don't see any other than historic reasons; we could go full NBT DAT files and thus make the server a bit more compatible with vanilla. RE: How to properly convert Single saves to Multiplayer saves ? - NiLSPACE - 01-12-2016 I guess there is no real reason not to move the playerdata files. But then we have another problem. Currently the playerdata is global, while vanilla saves it per-world (or world-cluster with the overworld, nether and end together). RE: How to properly convert Single saves to Multiplayer saves ? - flow969 - 01-12-2016 Thanks for the quick answers Yes an executable converter could be a good idea or as you said it xoft directly read playersdata.dat files RE: How to properly convert Single saves to Multiplayer saves ? - flow969 - 01-13-2016 I'm in a hurry getting the new version including this enhancement ^^ Could you keep me inform when it will be done please ? I guess it's not a priority for now but when it will be done Thanks a lot RE: How to properly convert Single saves to Multiplayer saves ? - NiLSPACE - 01-13-2016 I'm not sure if it's a easy to fix. The Json to NBT seems pretty straight forward, but currently Cuberite saves player data globally, not per-world. I'm not sure if that's easy to fix. RE: How to properly convert Single saves to Multiplayer saves ? - xoft - 01-13-2016 We won't be migrating to per-world storage anytime soon, so in order to import a world, you'll still need to move a few files around to different folders. But there won't be a need for a special tool. RE: How to properly convert Single saves to Multiplayer saves ? - tigerw - 01-14-2016 (01-12-2016, 09:27 PM)xoft Wrote: I'm wondering, why do we even use JSON files? I don't see any other than historic reasons; we could go full NBT DAT files and thus make the server a bit more compatible with vanilla. Hehe, FlySpray has an issue about removing JSON serialization :P |