ValheimMods icon indicating copy to clipboard operation
ValheimMods copied to clipboard

Lag & disconnects

Open Advo69 opened this issue 3 years ago • 4 comments

Hey I love the mod I don't see how I could play my favorite game without this. So thank you very much for your hard work. I play with two or three friends and when it's just me and one person the lag is very miniscule but once we get three or more people some they can't see enemies, boss fights are almost undoable, sometimes they disconnect and when anyone except me (the host) dies they have to relog or the lag will get much worse. I'm not very familiar with modding if there's info like an error log I need to share I can if I'm told how to locate it.

Advo69 avatar Sep 04 '21 20:09 Advo69

Valheim does a lot of processing on the local clients. If someone has a bad connection or an older PC. It can really slow things down. You could try this by creating a new world with new characters and no mods. Admin yourself and friends some gear and go kill the same bosses. I think you will find that what you are dealing with is not a mod issue. Take a look at https://www.pcgamesn.com/valheim/co-op-lag for more info.

Digitalroot avatar Sep 16 '21 22:09 Digitalroot

Valheim does a lot of processing on the local clients. If someone has a bad connection or an older PC. It can really slow things down. You could try this by creating a new world with new characters and no mods. Admin yourself and friends some gear and go kill the same bosses. I think you will find that what you are dealing with is not a mod issue. Take a look at https://www.pcgamesn.com/valheim/co-op-lag for more info.

Hi Digitalroot,

I have done a lot of testing with this issue and epic loot is causing a substantial increase in network traffic for some reason, to the point where it is saturating the send / receive limits that are hard coded into the game (150kb/s default) when you have 3 + players in the same area. We have been able to work around this issue by modifying the assembly_valheim.dll on both the server and the client to lift the cap on the send / receive.

Have a look at the comments section of the following blog post for the details, it isn't exactly a simple solution but it works. https://jamesachambers.com/revisiting-fixing-valheim-lag-modifying-send-receive-limits/

LP-Atkins avatar Sep 21 '21 21:09 LP-Atkins

Thanks for sharing. I think there is a network mod that was created to help with this issue.

Digitalroot avatar Sep 22 '21 00:09 Digitalroot

There was an early mod that increased the transfer rate that broke once they implemented a queue system for the network packages, and there is also a compression plugin (SebNetCompressionPlugin), but I haven't been able to get it to work. My C# knowledge is very limited but it appears to patch the methods for send and receive to compress/decompress the package, but when I try it I don't receive any data from the server.

Out of the discussion around the lag outside of here we have wondered if the developer was aware there was a lot of extra network data generated and if this was a bug or not.

LP-Atkins avatar Sep 22 '21 00:09 LP-Atkins