Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Playername in Commandline

#1
If i start Xonotic with e.g.:

xonotic.exe +connect 213.198.94.130:26000 +_cl_name "^x103âš™^x999Test^x103âš™^7"

the the playername is not the same as if i edit my config.cfg and change it to:

"_cl_name" "^x103âš™^x999Test^x103âš™^7"

Rather
xonotic.exe +connect 213.198.94.130:26000 +_cl_name "^x103âš™^x999Test^x103âš™^7"

will cause this entry in config.cfg:

"_cl_name" "^x103âš™^x999Test^x103âš™^7"


For e.g. xonotic.exe +connect 213.198.94.130:26000 +_cl_name "Name123ABC" it works as i expect it.
Here my question: is it not possible to to set this kind of name over the commandline? And if yes how and if not why?
Reply

#2
This is most likely a limitation of the Windows Command Shell.

Are you using cmd.exe ? Those characters appear to be UTF encoded. cmd.exe dates back to the DOS days and probably doesn't handle UTF.

Have you tried using Windows PowerShell? It's newer and might be able to handle those characters.
[Image: 21975.jpg]

Quote:“To summarize the summary of the summary: people are a problem.” - Douglas Adams
Reply

#3
If i replace xonotic.exe with my selfwritten commanlineanalizer.exe and print out the part "^x103âš™^x999Test^x103âš™^7" it exactly is "^x103âš™^x999Test^x103âš™^7", like it is expected. So i think xonotic does not the same thing internaly with the string as if it is in config.cfg

In my opinion the cfg parser handles the string in a different way as the cmdline parser does.
Reply

#4
Or try Putty. The Linux Terminal for sure 99.9% can do this Smile
Reply

#5
Try this:

Create a file data/name.cfg which contains the following line:
Code:
_cl_name "^x103âš™^x999Test^x103âš™^7"

Then start Xonotic with:
Code:
xonotic.exe +exec "name.cfg"
Reply

#6
(05-23-2016, 04:54 AM)sev Wrote: Try this:

Create a file data/name.cfg which contains the following line:
Code:
_cl_name "^x103âš™^x999Test^x103âš™^7"

Then start Xonotic with:
Code:
xonotic.exe +exec "name.cfg"

Thx, i thought about the same. But i am looking for a solution to do it directly over the commandline. I noticed that i can use direcly "H:\Xonotic081\xonotic.exe +connect 64.74.97.161:26001 +_cl_name ⚙Test⚙" als commandline in a *.lnk file. This means i have to convert the UTF8-Name to Unicode Name and start the game.

So far so good, half way is done. But then i tried to use "Symbol of Flame here" as name, which is in UTF8 HEX "F0 9F 94 A5 " , in UTF16 HEX "D83D DD25 " and in UTF32 HEX "1F525 ", it happened, that i can put "Symbol of Flame here" in the commandline and it is stored right in the *.lnk file, but in the game the name looks like "□□".

Anyone an idea how to bring this in the game over cmdline.
Reply

#7
@TheGoodGamer, You can either write a wrapper caller yourself to do the conversion, or have several nameX.cfg, and call different ones as needed with "+exec".

Dev Team, is it because the default encoding of Windows CMD is different from common Linux consoles?
Reply

#8
At least on Linux, you can combine my above method into a "single" command:
Code:
echo '_cl_name "^x103âš™^x999Test^x103âš™^7"' > ~/.xonotic/data/name.cfg && ./xonotic-linux-sdl.sh +exec name.cfg

I'm sure this is possible on Windows as well.
Maybe it's not what you need, but a mention can't hurt.
Reply

#9
(05-29-2016, 02:33 PM)sev Wrote: At least on Linux, you can combine my above method into a "single" command:
Code:
echo '_cl_name "^x103âš™^x999Test^x103âš™^7"' > ~/.xonotic/data/name.cfg && ./xonotic-linux-sdl.sh +exec name.cfg

I'm sure this is possible on Windows as well.
Maybe it's not what you need, but a mention can't hurt.

Thats not a problem to create a file. I want to use the command line in my browser plugin to join a server. So i will code the filecreation in it. I'm now really at the point, that i think i can't get it to work with xonotic.exe over command line.

The strange thing is when i use the unicode command line and parse it with my commandline analyser the chars are printed in my editcontrol as i expected it.

But it is like it is, i will take your advice and start a prepared file over the command line.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-