Toemmsen96 / ChatCommands

Mod to add /commands to the chat to Lethal Company, especially for testing mods and messing around
MIT License
3 stars 1 forks source link

Spawning commands broken #16

Closed SammichLS closed 4 months ago

SammichLS commented 5 months ago

spawn scrap and spawn enemy commands are not working. For example, I typed this in: /spwscr Airhorn p=@me and it said it spawned, but there was nothing there. I tried multiple times inside and outside but nothing worked. Enemy spawning had the same issue. All commands were used on the moon experimentation and I only tried enemies and scrap listed as available.

Edit: After seeing that @me is broken, I used @playername to select myself and it did not recognize me as a player.

RedPiss commented 5 months ago

Having the same issues here, I believe they don't work after the first day.

RedPiss commented 5 months ago

Also, when doing /enemies, it comes up with nothing.

Toemmsen96 commented 5 months ago

@me should work again, im not sure if the game had an update that broke the mod in the meantime. Im in the middle of uni exams atm, i will look into it after them.

Toemmsen96 commented 5 months ago

Also, can you provide logs, otherwise i cannot see what the issue might be, if it doesnt appear for me.

Toemmsen96 commented 5 months ago

Also, when doing /enemies, it comes up with nothing.

If you use it as non host that is a know issue. As host it should work

SammichLS commented 5 months ago

Log for one spawn attempt:

Screenshot 2024-01-22 114633

[Info :toemmsen.ChatCommands] Received chat input: /spwscr Airhorn a=1 p=@me v=5 [Info :toemmsen.ChatCommands] Player who called: Sammich_LS [Info :toemmsen.ChatCommands] Amount 1 [Info :toemmsen.ChatCommands] @me [Info :toemmsen.ChatCommands] Checking Playername SammichLS [Info :toemmsen.ChatCommands] Checking Playername Player #1 [Info :toemmsen.ChatCommands] Checking Playername Player #2 [Info :toemmsen.ChatCommands] Checking Playername Player #3 [Info :toemmsen.ChatCommands] Value 5 [Info :toemmsen.ChatCommands] Spawning 1 Airhorn

If needed I have video clips of me trying spawn enemy and scrap commands but can't upload them here. I tested them on a used save using a mod profile only containing your mod and its dependency.

Toemmsen96 commented 5 months ago

hmm okay, it looks like there is an issue with it detecting your name. Does your name contain a "_" character or a space?

SammichLS commented 5 months ago

My steam name is Sammich_LS and my in game name appears to be SammichLS. I tried both and got the same result

Toemmsen96 commented 5 months ago

I believe there is an issue with how the game saves your name. Have you tried p=@SammichLS? The way i check who called the command is via the games input, so im kind of confused why this appears like that.

Toemmsen96 commented 5 months ago

image Found the issue, i will adjust my code according to it. This should enable lan players as well

Toemmsen96 commented 4 months ago

i pushed an update, i believe it should be fixed now, otherwise please just write here again