Open Hi-ImKyle opened 3 years ago
Hello and thanks for your bug report !
It is not a bug but a feature that is not currently available.
Both /s and normal chat messages are not executed in the same way, Valheim uses routing mechanisms that are verry special and a little complicated to use.
I'll explain:
So first of all, that is the part where the client manages messages to send (it's important to note that it is the client that decides WHO will receive the message, and not the server, the server will transfer the message to the client that is targeted by the sending client, which makes it very tricky)
So, what happens here it that the Server is also targetted when messaged are sent with the ZRoutedRpc.Everybody
route is used to send the message, that's why my strategy was to listen on the RPC_ChatMessage
method, but this method is not called on the server part if the server is not the target.
And the only way to make this work would be to override the routing system of their network library, which I am planning to do but it will take me some time to do, that's why I've decided to start by providing more feature before starting to work on this specific part, until then, commands will need to pass by the /s command unfortunately !
I am also retro-engineering the way they use to execute commands, so this may evolve in the next days !
EDIT: RPC_Say will not work cause the server is still not targetted by the view, because the view will only consider players that are near the view !
Ok noted.
Just a FYI, if you need it, I forked and created a BepInEx branch on my repo. If you're unsure on how BepInEx works anyway, you may do a way better job but might help :) :+1:
Thanks, I'll take a look at it :)
The title explains the majority. Whether this is just a byproduct of my BepInEx port or just down to the wrong chat method being hooked. I'll only know if I ask, though I'd prefer discussions being enabled on this repo so I don't clog the Issues with issues that aren't issues.
In-Game:![image](https://user-images.githubusercontent.com/25551312/108612060-b153f180-73dc-11eb-819e-b8076d70b578.png)
Server Console:
Notice that there is no "test" chat message just before the "/server" one.
I did try and chat the chat patch to use
Talker.RPC_Say()
but to no avail, that seems to get nothing at all.