Theronguard / Emergency-Dice

A lethal company mod. Adds new equipment and scrap.
3 stars 3 forks source link

Only Host can use dice #4

Open tiredmitch opened 9 months ago

tiredmitch commented 9 months ago

Everyone in the lobby had the mod and all dependencies downloaded. When anyone besides the host used the dice, it would play the animation and that's it. When the host used it, it would actually have effects. We tested it multiple times which each type of dice.

Theronguard commented 9 months ago

Can someone that wasn't the host go into the Emergency dice.cfg config file and see if the effects are set to false?

Theronguard commented 9 months ago

Also, what mods are using, and are you getting any errors in the console when using the die by non-hosts?

Theronguard commented 9 months ago

Okay, I think I resolved it. Uploaded a new version (1.1.11) to thunderstore: https://thunderstore.io/c/lethal-company/p/Theronguard/Emergency_Dice/ Check it out, and if the issue persists, let me know.

Theronguard commented 9 months ago

Seems to be resolved. Thanks for reporting it!

1111-glitch commented 6 months ago

Hey, this is broken again on v50. What do you need from me to diagnose it? I am running with other mods as well, though. I haven't tested with just this mod.

Theronguard commented 6 months ago

If you could, then please use the die as a non host and post the non host console logs here.

1111-glitch commented 6 months ago

So I tried this and saw some errors during runtime but when I went to look at the log there was nothing, I even got the host to send me their log file and still nothing and I know it's not just me missing something because I can see the grab event from when I grabbed the dice. I can't test again until I play with friends and I'm not sure when that is unless you know of a way to make myself appear as non-host so I can test myself?

I actually think it may be a different error than this original post now because it doesn't even play the animation, when anyone but the host uses the dice it just drops it as if you pressed G.

Edit: Double checked, absolutely nothing gets put into the log when someone else tries to roll.

Theronguard commented 6 months ago

There is a way you can run 2 instances of lethal company. You'd have to install the mods manually instead of through r2modman and then you can run the .exe twice, use one instance as a LAN Host and other as a LAN client. If you can, test the mod in isolation with all other mods disabled (dependencies still need to be left on) and see if this still happens, as I suspect it's a mod conflict. You can send me your mod list then.

Also, I'm not sure if this will make a huge difference but if you're on the public_beta branch on steam then return to the original version.

Mihaylov93 commented 6 months ago

I got this log

22:16:43.3174267] [Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
CursedScraps.Patches.PlayerManagerPatch.PostDropObject (GameNetcodeStuff.PlayerControllerB& __instance) (at <304603177630431c9196bdc591bf903d>:IL_001C)
(wrapper dynamic-method) GameNetcodeStuff.PlayerControllerB.DMD<GameNetcodeStuff.PlayerControllerB::DiscardHeldObject>(GameNetcodeStuff.PlayerControllerB,bool,Unity.Netcode.NetworkObject,UnityEngine.Vector3,bool)
MysteryDice.Dice.DieBehaviour.ItemActivate (System.Boolean used, System.Boolean buttonDown) (at <7e76924f43cc44ff9a2d93d4df210d8b>:IL_0085)
GrabbableObject.UseItemOnClient (System.Boolean buttonDown) (at <255c0877f9414c3aa6f1fe5079ac13f3>:IL_005C)
(wrapper dynamic-method) GameNetcodeStuff.PlayerControllerB.DMD<GameNetcodeStuff.PlayerControllerB::ActivateItem_performed>(GameNetcodeStuff.PlayerControllerB,UnityEngine.InputSystem.InputAction/CallbackContext)
UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe[TValue] (UnityEngine.InputSystem.Utilities.CallbackArray`1[System.Action`1[TValue]]& callbacks, TValue argument, System.String callbackName, System.Object context) (at <dbb0ce7b96144bd8bcbcb8b0d765f970>:IL_001B)
UnityEngine.Logger:LogException(Exception, Object)
AsyncLoggers.Wrappers.Unity.<>c__DisplayClass4_0:<LogException>b__0() (at ./src/Wrappers/Unity/AsyncLoggerWrapper.cs:36)
AsyncLoggers.Wrappers.Unity.<>c__DisplayClass28_0:<wrapCallback>b__0() (at ./src/Wrappers/Unity/AsyncLoggerWrapper.cs:136)
AsyncLoggers.Wrappers.JobWrapper:LogWorker() (at ./src/Wrappers/JobWrapper.cs:84)
AsyncLoggers.Wrappers.LogJob:Execute() (at ./src/Wrappers/JobWrapper.cs:68)
Unity.Jobs.JobStruct`1:Execute(LogJob&, IntPtr, IntPtr, JobRanges&, Int32)

[22:16:43.3174267] [Error  : Unity Log] NullReferenceException while executing 'performed' callbacks of 'Movement/ActivateItem[/Mouse/leftButton]' 

When I left click I throw it but it doesn´t activate

1111-glitch commented 6 months ago

Ah I also have that mod, so that must be the issue.

Mihaylov93 commented 6 months ago

Forgot to add that initially I was unable to throw it only host was able to use them, but swapping it for another scrap and throwing it starts behaving like that, it drops without activating