zolantris / ValheimMods

Collection of ValheimMods, ValheimRaft (originally created by Sarcen) and a few other upcoming mods including a vehicles mod.
GNU General Public License v3.0
8 stars 4 forks source link

dedicated server issues with boats and portals #12

Open Jalewis1990 opened 6 months ago

Jalewis1990 commented 6 months ago

on my server raft falls apart when returning to it. old rafts from previous versions that I could not interact with after crafting still remain ghost rafts.

Mod List:

-Valheim + (by grantapher) -hookgenpatcher -jotunn the valheim library -seed totem -plant everything -weaponadditions -magicplugin -multi user chest -spyglass -odinsfoodbarrels -rune magic -speedy paths -balronds shipyard

i have not replicated in isolation

zolantris commented 6 months ago

I'll update the readme. It's replicable. And I did not test on server 😞

zolantris commented 6 months ago

Looks like the following is happening:

1.5.2 does not fix this. But if you use 1.5.2 on client only it will work even on dedicated servers. Everyone will need the mod on their client otherwise people will not see the ship

Jalewis1990 commented 6 months ago

If you need any help testing on a server I would be more than happy to get you on mine

zolantris commented 6 months ago

Edit: 1.6.1 does not fix this. But I have figured out part of the issue. Somehow the game ZDOs are not set as permanent and therefore are garbage collected by the server raft mod. The Server also can garbage collect if it has a mod that does this already.

Looks like the fix is finding out why the ZDOs are not considered permanent even though there is a bunch of code setting the as such.

jackerzhaques commented 5 months ago

Not sure if this helps or if you're still working on this issue. I notice that it only happens rarely on my server, and only when using portals. If I teleport to the boat, sometimes it will get stuck in an infinite loading screen. After I force quit on client side and rejoin the server, the raft is missing. The only thing left is a base raft with no floors. I've never had the issue if I don't use teleporters.

zolantris commented 5 months ago

Yeah portals are unstable. I'm looking into it. Probably have to re-write the rendering logic to directly hook into zone loading (especially for multiple boats).

Other users have reported 2 teleports consecutively back and forth will cause the problem.

LtDoc commented 5 months ago

We're running a dedi with about 10 people and also have pretty severe issues that crop up where ships will be fine for awhile but suddenly a player will log on and half the ship is gone. I've tried recreating steps for reporting but it's mostly random on when it happens. Portals don't cause it as as far as players rendering and unrendering it go, it mostly appears to happen between server restarts.

zolantris commented 5 months ago

Are players still logged in but moving when the server restarts? Also is the desync happening when multiple players are on the same boat?

LtDoc commented 5 months ago

No. Thus far the desync has exclusively happened only when the ship is docked at port and the server restarts. We control the restarts manually since it's just a few of us, so we stop all the ships and disembark them when a restart is about to happen and save the world before as well.