Playername in Commandline - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10) +--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12) +--- Thread: Playername in Commandline (/showthread.php?tid=6199) |
Playername in Commandline - TheGoodGamer - 05-22-2016 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? RE: Playername in Commandline - cefiar - 05-22-2016 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. RE: Playername in Commandline - TheGoodGamer - 05-22-2016 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. RE: Playername in Commandline - Beagle - 05-22-2016 Or try Putty. The Linux Terminal for sure 99.9% can do this RE: Playername in Commandline - sev - 05-23-2016 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" RE: Playername in Commandline - TheGoodGamer - 05-29-2016 (05-23-2016, 04:54 AM)sev Wrote: Try this: 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. RE: Playername in Commandline - BuddyFriendGuy - 05-29-2016 @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? RE: Playername in Commandline - sev - 05-29-2016 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. RE: Playername in Commandline - TheGoodGamer - 05-30-2016 (05-29-2016, 02:33 PM)sev Wrote: At least on Linux, you can combine my above method into a "single" command: 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. |