gavinnn101 / palworld_dedi_helper

Helper utilities for managing a Palworld dedicated server in python. Send rcon commands, backup server, etc.
GNU General Public License v3.0
15 stars 3 forks source link

Can't send palworld broadcast with spaces #1

Open gavinnn101 opened 5 months ago

gavinnn101 commented 5 months ago

I believe this is a Palworld bug as far as I can tell. Trying to /Broadcast My Message! while in game will only broadcast My. I haven't found any special delimiters that make it work...

Related issue: https://github.com/gorcon/rcon-cli/issues/34

gavinnn101 commented 5 months ago

I'll note that PalworldUtil:log_and_broadcast replaces spaces with underscores as a temporary fix for this problem.

Lukium commented 5 months ago

I dropped a PR that works pretty well. It uses "\x1F" (Unit Separator) to join args when the command is broadcast. The server parses Unit Separator as a blank space (albeit a wide space that looks like 2 spaces), but I think that's the best that can be done that looks like a space in ASCII

gavinnn101 commented 5 months ago

I dropped a PR that works pretty well. It uses "\x1F" (Unit Separator) to join args when the command is broadcast. The server parses Unit Separator as a blank space (albeit a wide space that looks like 2 spaces), but I think that's the best that can be done that looks like a space in ASCII

Thanks a bunch! I built on your PR a bit and merged it. Will keep this issue open until a real solution is found.

IMRastafari commented 5 months ago

Cant figure out how to send it whe server is runnin with server watcher up. I mean i can use info in source_rcon.py and get server info back. But when i try to broadcast it end up saying unrecognized arguments

`C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Broadcast "Test" usage: source_rcon.py [-h] [-ip SERVER_IP] [-port RCON_PORT] [-pwd RCON_PASSWORD] -cmd COMMAND [-args [ARGUMENTS ...]] [-ll LOG_LEVEL] source_rcon.py: error: unrecognized arguments: Test

C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Broadcast Test usage: source_rcon.py [-h] [-ip SERVER_IP] [-port RCON_PORT] [-pwd RCON_PASSWORD] -cmd COMMAND [-args [ARGUMENTS ...]] [-ll LOG_LEVEL] source_rcon.py: error: unrecognized arguments: Test`

If i just put info comand i get full respond "C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Info Welcome to Pal Server[v0.1.4.1] BAREV [RU | AM] - 1.5X 24/7"

gavinnn101 commented 5 months ago

Cant figure out how to send it whe server is runnin with server watcher up. I mean i can use info in source_rcon.py and get server info back. But when i try to broadcast it end up saying unrecognized arguments

`C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Broadcast "Test" usage: source_rcon.py [-h] [-ip SERVER_IP] [-port RCON_PORT] [-pwd RCON_PASSWORD] -cmd COMMAND [-args [ARGUMENTS ...]] [-ll LOG_LEVEL] source_rcon.py: error: unrecognized arguments: Test

C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Broadcast Test usage: source_rcon.py [-h] [-ip SERVER_IP] [-port RCON_PORT] [-pwd RCON_PASSWORD] -cmd COMMAND [-args [ARGUMENTS ...]] [-ll LOG_LEVEL] source_rcon.py: error: unrecognized arguments: Test`

If i just put info comand i get full respond "C:\Users\IMRastafari>C:\Users\IMRastafari\Desktop\Palworld\palworld_dedi_helper\palworld_dedi_helper-main\src\palworld_rcon\source_rcon.py -cmd Info Welcome to Pal Server[v0.1.4.1] BAREV [RU | AM] - 1.5X 24/7"

You need to provide the -args CLI flag. The error you pasted is giving you usage examples. You can also do python source_rcon.py --help to get a clean help output.

python .\source_rcon.py -ll "DEBUG" -cmd Broadcast -args "test msg"