Mydayyy / Valheim-ServerSideMap

This plugin completely moves the explored map and created pins to the server. As clients explore, they will send their explored areas to the server who will then distribute it to all connected clients. When a client joins, the server will synchronize the currently explored areas to the client. Pins are shared as well but default to false and need to be enabled. When pin sharing is used, all newly created pins are send to the server who saves them along with the explored area.
38 stars 1 forks source link

[Issue] Patch 0.209.9 may have broken the mod #45

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hey @Mydayyy . Not even sure if you're maintaining this anymore.

But the valheim devs have moved their new "worlds" location to a new folder, "worlds_local".

Therefore the ServerSideMap can't access the .explored file(s) anymore. Atleast that what to log says. I just did a reinstall of the entire server, so I don't have the log snippet anymore sorry. But it said something along the lines of "can't access .explored files, permission denied".

It would be awesome if you could update the mod 👍

Mydayyy commented 2 years ago

Greetings,

Thank you for the heads up, I will look into it!

Best Regards Mydayyy

Mydayyy commented 2 years ago

Greetings,

I apologize for the late response, I was not monitoring my emails yesterday.

I looked into it and seem to have it fixed. Valheim changed around their handling of save files, as you already mentioned. Not only that, they also refactored a bit of code and some variables I relied upon were not available anymore, leading to the filepath being wrong.

I modified it to work with the new variable/functions they provide and attached a debug build here. If you have time I'd appreciate if you could try it out and report back. It is working again on my test server.

Please: 1) Backup your .explored file just in case to a secure location 2) Make sure your .explored file is in the same folder as the world file. They moved the world files with the last patch so you need to manually move the .explored file

ServerSideMap.zip

Thank you! Mydayyy

ghost commented 2 years ago

Greetings,

I apologize for the late response, I was not monitoring my emails yesterday.

I looked into it and seem to have it fixed. Valheim changed around their handling of save files, as you already mentioned. Not only that, they also refactored a bit of code and some variables I relied upon were not available anymore, leading to the filepath being wrong.

I modified it to work with the new variable/functions they provide and attached a debug build here. If you have time I'd appreciate if you could try it out and report back. It is working again on my test server.

Please:

1. Backup your .explored file just in case to a secure location

2. Make sure your .explored file is in the same folder as the world file. They moved the world files with the last patch so you need to manually move the .explored file

ServerSideMap.zip

Thank you! Mydayyy

Seems to work fine! It loads it as it should atleast:

[Info   :ServerSideMap] worldSavePath /home/steam/.config/unity3d/IronGate/Valheim/TestWorld/worlds_local/TestWorld
[Info   :ServerSideMap] loaded from existing explore file

Thanks for looking into it 👍 Appreciate it a lot

Mydayyy commented 2 years ago

Thanks for your feedback! I will continue to create a formal release later.

Question (for my release notes): Did you have to manually intervene and move the .explored file? I would assume yes?

Best Regards Mydayyy

ghost commented 2 years ago

Thanks for your feedback! I will continue to create a formal release later.

Question (for my release notes): Did you have to manually intervene and move the .explored file? I would assume yes?

Best Regards Mydayyy

Yeah, I think I did it manually. Not sure if it works without doing it. Can't really revert the patch to test it properly sorry.

ghost commented 2 years ago

Would be nice to have the new release on ThunderStore as well :D

Mydayyy commented 2 years ago

Will do :pray:

Didnt get around to it yesterday, I am on it now!

Mydayyy commented 2 years ago

The update is now uploaded to ThunderStore as well as NexusMods!