steven4547466 / LC-API

General purpose utility API for modding Lethal Company
GNU Lesser General Public License v2.1
8 stars 3 forks source link

Can't join any lobby when using LC API #12

Open stargazer3240 opened 10 months ago

stargazer3240 commented 10 months ago

Currently using r2modman and I can't join lobbies when playing modded with LC API installed. Simply disabling LC API or using v2.2.0 allows me to join.

Learned about that in these reddit posts: post1 post2

Lordfirespeed commented 10 months ago

do you mean you 'can't join vanilla lobbies'?

could you post your logs?

stargazer3240 commented 10 months ago

I guess these are vanilla servers, tried joining 4 different ones. https://pastebin.com/raw/RuvvURMq

Lordfirespeed commented 10 months ago

Yeah. The latest version of LCAPI includes a networking bundle that makes the modded client incompatible with the unmodded one.

@steven4547466 I think the best solution will be to add a config switch that disables all networking. Then throw an error if any mod tries to register any network messages.

stargazer3240 commented 10 months ago

I mostly use client side mods and play pugs, so I would really like to be able to join vanilla lobbies. When I tried setting the modded server browser to true, I ran into the problem that I couldn't join the lobbies because I didn't have their server side mods and it is much harder to figure out what mods I need when joining randoms.

steven4547466 commented 10 months ago

@steven4547466 I think the best solution will be to add a config switch that disables all networking. Then throw an error if any mod tries to register any network messages.

The custom messages are actually fine, it's the player networking bundle that is the issue. Custom messages can be desynced.

But I can add a config option to disable any custom rpcs.

Lordfirespeed commented 10 months ago

Could we put LCApi's networking behaviour on a different game object then?? Would that enable vanilla interop?

steven4547466 commented 10 months ago

Could we put LCApi's networking behaviour on a different game object then?? Would that enable vanilla interop?

The main issue is I need to do it before the GO that has the Player behaviour is spawned, since mods like bigger lobby exists, I need to be able to dynamically instantiate and network spawn them into the scene. I will see if any object can fit this description

Lordfirespeed commented 10 months ago

How about adding a monobehaviour to the player prefab that will spawn the network object?

steven4547466 commented 10 months ago

How about adding a monobehaviour to the player prefab that will spawn the network object?

Players aren't prefabs, they exist in the scene just by default. I tried a bunch of stuff to reference them before the game is fully started, but I couldn't. And I need to add network behaviours before they are spawned by the host

steven4547466 commented 10 months ago

However, there is now a config option for vanilla support out in v3.3.0, but I will keep this open so we can potentially find a better option

ataknegn commented 9 months ago

Hey. So me and my friends have tried to play the game with mods installed and one of them required LC_api to be downloaded. 4 of us downloaded it and 3 of us managed to join the server without any problems but the last one was unable to join no matter what. He reinstalled the game, mods multiple times and none worked so we tried deleting mods one by one and when we deleted LC_api he could join. I don't know what is the reason so a fix would be very nice.

Edit: The error in-game he gets is “An error occured” and the error in the console is “[Netcode] Network mismatch”

steven4547466 commented 9 months ago

@ataknegn I will need the logs of at least 1 of the players that were able to join and the 1 that couldn't to diagnose that issue.