How to properly convert Single saves to Multiplayer saves ?
#1
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) Sad

Someone know how to make them work please ?
Reply
Thanks given by:
#2
Hello, and welcome to the forum Smile

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.
Reply
Thanks given by:
#3
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.
Reply
Thanks given by:
#4
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).
Reply
Thanks given by:
#5
Thanks for the quick answers Smile

Yes an executable converter could be a good idea or as you said it xoft directly read playersdata.dat filesBig Grin
Reply
Thanks given by:
#6
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 Smile Thanks a lot
Reply
Thanks given by:
#7
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.
Reply
Thanks given by:
#8
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.
Reply
Thanks given by: flow969
#9
(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
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)