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

The mod does not create .explore #46

Closed Daimkake closed 1 year ago

Daimkake commented 1 year ago

Hey. I have been using this mod for a long time but now that i made a new server it does not work anymore. I cant seem to find any logs on this server side, but my client post me this when i start it: [Info : BepInEx] Loading [ServerSideMap 1.3.7.0] [Info :ServerSideMap] Store1: False [Info :ServerSideMap] Store2: False

The dll's are in the proper locations but it simply doesnt work. The .explore file is not created both on client and server side, with the world files etc as they should. Can you please help me out here?

Mydayyy commented 1 year ago

Greetings,

thank your for creating this issue.

I would have a few questions first:

1) Did valheim get updated? I currently do not follow the update cycle of Valheim, so I am not sure whether the mod stopped worked due to an update.

2) When did the mod work last? Just a few days ago or was that a longer time ago?

3) Did you install the modloader on the server? Can you verify that it it working and loading the ServerSideMap dll correctly? My first impression is that the mod is not loaded at all

Thank your for your answers!

Best Regards Mydayyy

Daimkake commented 1 year ago

Thank you for such fast reply!

Valheim was updated some days ago and they have implemented mistland files into the core game files. The mod did work a week ago on an old setup, but we had to reinstall everything due to a error, this is when your map mod stoped working for us.

We all use r2modman but the server is running on linux and we do not know how to install it there, so i am copying all files needed from my files to it trough ftp. This has been working flawless for years.

And you might be right, it feels like the mod doesnt load on the server, but this error i posted was on my local client. Maybe you need to update something? I have no idea.. ^^

Best regards

Mydayyy commented 1 year ago

Do you have any logfiles from the server? Usually the modloader should have some kind of logging messages. Also ServerSideMap should log a few messages if it is loaded.

I will be able to take a look at the game later and test it myself, I have to install and configure it first tho, since I have not touched it in a while.

Daimkake commented 1 year ago

I have been looking trough the files on the server and cant find any logs except from my client logs, which only post what i stated in the first post of this case. I kind of gave up trying to make it work, as i have put the files where they should etc.

I will be waiting for your test result and then we can go from there. I suppose many users have this issue and end up using the ingame map device that Irongate added some time ago.

Mydayyy commented 1 year ago

Greetings,

I tested the plugin on my side and I can confirm that is is still working. Here is what I did:

I also have the relevant log lines from the ServerSideMap plugin inside the server log:

[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server
[Info   :ServerSideMap] Server deleted pin by client
[Info   :ServerSideMap] Client deleted pin by server
[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server
[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server
[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server
[Info   :ServerSideMap] Server received pin by client
[Info   :ServerSideMap] Client received pin by server
[Info   :ServerSideMap] Packing pins: 4

This leads me to believe that we have to investigate an issue around the server configuration and mod loading on your server. Just for comparison, I was using client and server version 0.211.11.

I assume you have your server hosted by a third party? Currently the server log files would be the most interesting. But I would still say it seems like the mod is not loaded at all. Can you give a quick overview on how the server is set up and configured? Is BepinEx installed?

Best Regards Mydayyy

Daimkake commented 1 year ago

So it seems to be a server related issue then. I have installed the server on a private ubuntu server, bepinex and it's plugins/configs are copied over manually as i have done several times before. /home/user/valheim/BepInEx/ As in, i dropped the bepinex folder and the 3 other files into the main valheim server folder. So bepinex is not "installed" but added to the server with copy and paste.

The world files with saves and explore files is located in /.config/unity3d/IronGate/Valheim/, the world files is there with it's backups but the explore file does not show up as it have used to.

What troubles me is that this issue is on the clients aswell, it is installed with r2modman, but we all get: [Info :ServerSideMap] Store1: False [Info :ServerSideMap] Store2: False in the bepinex loader.

I just added logging in the server script to see what is going on from that end, but im not sure what to do with the clients.

Mydayyy commented 1 year ago

Greetings,

the client logfiles are normal. Those 2 lines just mean that no hotkeys were configured inside the config file but the mod is loaded.

As soon as you get logfiles please feel free to share them here so I can help diagnose this issue. Most likely this will be some issue with bepinex not working correctly and thus, the mod not getting loaded.

Take care not to share any sensitive data from the logfiles, if it contains any.

Daimkake commented 1 year ago

I tried to add log to the strart script but the server seems to halt and shut down. ">> /tmp/valheim_log.txt < /dev/null &" (this is the line i tried) So unless you know of a way to activate logs, i am sorry to tell you that i ran out of options here.

But i truly appreciate your effort in solving this case. :)

Mydayyy commented 1 year ago

Are you able to post the full command which you use to start the server?

Daimkake commented 1 year ago

./valheim_server.x86_64 -name "xxx" -port 2456 -world "xxx" -password "xxx" -public 1

This is my current line. Some say i should add "<-nographics> <-batchmode>" in there but it works just fine without.

Mydayyy commented 1 year ago

Do you have any environment variables set?

I do not know your specific setup, but BepinEx works in a way where the modloader is injected via LD_PRELOAD. In order to do that you need to set quite a few variables correctly.

Here is my full startup script:

# BepInEx-specific settings
# NOTE: Do not edit unless you know what you are doing!
####
export DOORSTOP_ENABLE=TRUE
export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll
export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib

export LD_LIBRARY_PATH="./doorstop_libs:$LD_LIBRARY_PATH"
export LD_PRELOAD="libdoorstop_x64.so:$LD_PRELOAD"
####

export LD_LIBRARY_PATH="./linux64:$LD_LIBRARY_PATH"
export SteamAppId=892970

echo "Starting server PRESS CTRL-C to exit"

# Tip: Make a local copy of this script to avoid it being overwritten by steam.
# NOTE: Minimum password length is 5 characters & Password cant be in the server name.
# NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall.
exec ./valheim_server.x86_64 -name "My server" -port 2456 -world "Dedicated" -password "123123"
Daimkake commented 1 year ago

Wait a minute.. This is alot more than what i have! I'm gonna try to add all this and edit the exec line to what I use and see what happends. I'll poke you when i see some results :)

Mydayyy commented 1 year ago

Alright. Please keep in mind that those variables references specific dlls which need to exist. Otherwise if it continues to not work, I would recommend installing BepinEx on the server from scratch and following their instructions. It's been quite a while since I installed it so I might have out of date information on that.

Daimkake commented 1 year ago

After updating to the new .sh we still have the same issue. Server cfg is in /BepInEx/config/ and dll is in /BepInEx/plugins/ Every other mod we have in these folders work as intended, we have 9 in total and 8 work. I also checked ~/.config/unity3d/IronGate/Valheim/worlds/ and i see alot of map files but no .explore.

Can it be an issue with world and world_local folders? Can i force this with using my local .explore file and copy it to the server?

Mydayyy commented 1 year ago

Just to clarify: You have 8 other mods running on your server and all of them work correctly?

Dedicated servers should be using the path worlds_local. The folder world was used in the early days, but it got changed some time ago.

Inside your servers BepInEx folder you should be able to locate a log file named LogOutput.log. This should give some insight as to what is going on

Daimkake commented 1 year ago

Correct. Every other mod is working like a charm, so it doesnt make any sense. Thank you for clearing up the world folder frustration, it felt messy.

On the server in BepInEx folder i have config, core, patches and plugins folders.

Mydayyy commented 1 year ago

The log location might vary depending on setup as I gathered. I saw some people mentioning <server_directory>/logs.

May I ask what other mods you are running?

Daimkake commented 1 year ago

We're running Bepinex, Autorepair, Equipmentandquickslots, useequipmentinwater, torcheseternal, creaturelevelandlootcontrol, epicloot, extendeditemdataframework(dependency).

There is no logs folder in the server directory. Seems like the server doesnt log at all, somehow.

Mydayyy commented 1 year ago

I have to ask unfortunately, but I am still a bit puzzled. Some of those mods are not mods for your server: E.g Equipmentandquickslots is a clientside mod. Why is that installed on the server?

Daimkake commented 1 year ago

I have a habbit of having the same dll/cfg on all sides to make sure things are shared properly. We have used that mod for a long time and it has not been a issue. Your mod has neither, until now, which is very anoying and i eager to figure it out. lol

Mydayyy commented 1 year ago

Yea, so the thing is: For example Equipmentandquickslots or useequipmentinwater are not required on the server. They work just as well when its only installed on the client. So that those mods are working on your client is not an indication that the server is loading them too, which is why I still believe we might have an issue with the modloading part.

Unfortunately its really hard to diagnose without any kind of logfiles, which puzzles me since somewhere has to be one. Does the server print anything to stdout if you start it manually?

Daimkake commented 1 year ago

Fair enough, i deleted those two mods on dll/cfg from server now. The other mods seems to be loading but we have noticed that creatures have different colors on the stars trough levelcontrol. So, i can see blue start while someone else see green stars, on the same mob. I might just have to delete everything and start over. lol

stdout is a new word to me so i have no idea how to use it. The server start silent so i dont see any log.

Mydayyy commented 1 year ago

Hmm. I looked into creaturelevelandlootcontrol and the level control seems to not be requiring a server mod, it works without it too. The only advantage that installing that mod on the server has is that the config is synced between the players.

stdout means standard out and in this case just means what is printed to your terminal by the process. It is very weird that your server does not seem to output anything tho. I do have a lot of log output when starting the valheim server:

(Just an excerpt):

image

Daimkake commented 1 year ago

Yes, you have a point, it might explain why our creatures have different stats when we are looking at them together. Something is just off.

I figured out how to get the log, so i can confirm that it is not loading addons at all.

Starting server PRESS CTRL-C to exit ERROR: ld.so: object 'libdoorstop_x64.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Mono path[0] = '/home/steam/valheim/valheim_server_Data/Managed' Mono config path = '/home/steam/valheim/valheim_server_Data/MonoBleedingEdge/etc'

12/05/2022 05:40:43: Using default prefs 12/05/2022 05:40:43: isModded: False This also confirm that it is not working as intended. :P

What have i done, i have done this so many times..

Daimkake commented 1 year ago

I have taken a deeper look into bepinex github and i see now that they have changed some things sinse i was installing a server.-. I downloaded the new files and did as i should, now i get this when i try to start the server:

Starting server PRESS CTRL-C to exit Found UnityPlayer, hooking into it instead Mono path[0] = '/home/steam/valheim/valheim_server_Data/Managed' Mono config path = '/home/steam/valheim/valheim_server_Data/MonoBleedingEdge/etc' No override (or failed to find), unsetting. Setting config paths; basedir: /home/steam/valheim; config: /home/steam/valheim/valheim_server.x86_64.config Managed dir: /home/steam/valheim/valheim_server_Data/Managed Fallback handler could not load library /home/steam/valheim/valheim_server_Data/Mono/0▒__▒U/mono/aot-cache/amd64/BepInEx.Preloader.dll.so Got image: 0x55db5f61fe90

Unhandled Exception: System.MissingMethodException: void System.IO.File.WriteAllText(string,string) [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: void System.IO.File.WriteAllText(string,string)

Daimkake commented 1 year ago

Seems like your mod is working like a charm, it is however the bepinex that doesnt work on the server. The problem start when you are supposed to type ./run_bepinex.sh to generate the files needed. This is not your issue, but i am unable to solve it even with alot of google time. So if you are up for the challenge, feel free to poke me.

Regardless, thanks alot for your effort. :)

Mydayyy commented 1 year ago

I apologize for the late response, I drifted asleep yesterday and was working today.

This also confirm that it is not working as intended. :P

Yep, pretty much

If you want you can look into this: https://github.com/mbround18/valheim-docker

I used this image to host my server back then, and I am still using it for my dev testserver. It appears it is still maintained too.

Otherwise I am happy to help you out, you can add me in discord if you want.

I will go ahead and close this issue tho.

Daimkake commented 1 year ago

I appreciate your kindness!

I have heard of this docker, but I am that guy that never give up and it’s very exhausting some times.

I like to run the server trough a service in linux and maintain the mods separately, which seems to be hard these days.

So if you would like to take the challenge and see if we can figure out what the heck is going on, and hopefully make it work, I would love to add you to discord and dig into this.

I do however need your username on discord, I cant see this info on your github profile.

Fra: Mydayyy @.> Sendt: mandag 5. desember 2022 17:48 Til: Mydayyy/Valheim-ServerSideMap @.> Kopi: Daimkake @.>; Author @.> Emne: Re: [Mydayyy/Valheim-ServerSideMap] The mod does not create .explore (Issue #46)

I apologize for the late response, I drifted asleep yesterday and was working today.

This also confirm that it is not working as intended. :P Yep, pretty much :D

If you want you can look into this: https://github.com/mbround18/valheim-docker

I used this image to host my server back then, and I am still using it for my dev testserver. It appears it is still maintained too.

Otherwise I am happy to help you out, you can add me in discord if you want.

I will go ahead and close this issue tho.

— Reply to this email directly, view it on GitHub https://github.com/Mydayyy/Valheim-ServerSideMap/issues/46#issuecomment-1337713249 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWYUTJW6BQFKVCJQ4ZY2M3WLYMDHANCNFSM6AAAAAASTIIQK4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ATWYUTNJCDOPZNTK6WEQSDTWLYMDHA5CNFSM6AAAAAASTIIQK6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPXPRGC.gif Message ID: @. @.> >

Mydayyy commented 1 year ago

Just shoot me an email including your discord tag and I'll add you.

You can find my email on my blog on the bottom left: https://blog.mydayyy.eu