minetest / minetest

Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.8k stars 2.03k forks source link

Reconsider local chat command character, currently “.” #5835

Closed Wuzzy2 closed 5 years ago

Wuzzy2 commented 7 years ago

Is it possible that you can change the character which starts local commands to something other than the “.”?

In chat, the expression “...” is fairly common. See:

https://www.urbandictionary.com/define.php?term=...

~Local commands make it “impossible” (read: inconvenient) to enter this, or users may not understand why their chat message didn't work. Thus, using the “.” as the first character in local commands was not the smartest move. I suggest to use a character which is much less likely to be used at the beginning of any chat message .~ EDIT: Strikethrough added by paramat.

Random ideas:

Note: The question of which key to use to open local chat is an entirely different one. This issue is not concerned with key bindings.

SmallJoker commented 7 years ago

All messages starting with two full stops (..) are ignored by the CSM chatcommand handler, see here. The exclamation mark is perhaps the best alternative here. While looking at other projects (chatting/helper bots), all other characters are only used rarely.

Wuzzy2 commented 7 years ago

Lol, this makes it even more gotcha than I thought. Because chat commands with a trailing slash (forcing you to enter, like “//pos1” are allowed. This is a weird inconsistency. At least my claim with “...” is obviously false. Good.

I still think we should go with a different key. I'm for exclamation mark. took.

red-001 commented 7 years ago

some servers already use ! for server-sided commands

nerzhul commented 7 years ago

the . is good, and if .. is detected as a non local command it's good and sufficient. "." is commonly used in multiplayer games for server commands. World of Warcraft uses "/" for client commands and "." for server commands for example and it's not a problem

ghost commented 7 years ago

There are common interpretations of the number row characters ...

` = start a parsable code string ! = invert the next character # = Comment $ = Variable % = Replacable string variable ^ = beginning of the line & = run the previous command in background * = everything in the given context ( and ) = combine the contained handle is at once thing - = substract = = set variable to value

Those should not be used for denoting commands.

/ is pretty fine for chat commands because it is used for entering commands in most games that allow entering commands.

Maybe use , for denoting client-side chat commands. The comma isn't used as first character in everyday communication nor chatting. It has no common "function" assigned with it in general. And it is just two keys away from /.

Wuzzy2 commented 7 years ago

Comma is OK with me, too. But I disagree with the rationale of rejecting the other characters you mentioned. It's just a chat box, not an entire programming language.

Desour commented 7 years ago

What about ~, : or |?

Wuzzy2 commented 7 years ago

Sound good, too. I currently prefer ! because it is easy to type.

Desour commented 7 years ago

I would prefer :, it needs shift, like /, and is good reachable with right hand, like /. But . is also good to differ sscc from cscc. ! and ~ should be left for bots.

Wuzzy2 commented 7 years ago

But . is also good to differ sscc from cscc.

I already said I do not want the peroid. :stuck_out_tongue:

By the way, I think the Minetest slang is seriously getting out of hand lately. :grin:

ghost commented 7 years ago

I would prefer :, it needs shift, like /

/ does not need shift on US layout. But yes, . was a bad idea. From all the possible characters , and : are the most sane to me because they're easy reachable on all three common keyboard layouts (QWERTY, QWERTZ and AZERTY) and typically are not used at the beginning of a chat communication line.

Wuzzy2 commented 7 years ago

Note: The question of which key to use to open local chat is an entirely different one. This issue is not concerned with key bindings.

nerzhul commented 7 years ago

"," doesn't make sense, just the "." was mostly discussed and agreed at its introduction in CSM, no reason to change it.

ghost commented 7 years ago

no reason to change it.

Except all the points mentioned in this issuer discussion :smile:

nerzhul commented 7 years ago

. and / are the most common and natural characters for commands. : is used only in VIM and , is just unfriendly.

MisterXtreme commented 7 years ago

I personally would go for '!' as it seems like a good key IMHO.

ghost commented 7 years ago

most common

For /, yes it's pretty common. But . being common for commands? [citation needed] :wink:

: is used only in VIM

Yes. And because most Minetest players probably don't know Vim there is no "prejudice" on what : is for. Other with the dot. I'm pretty sure more players know . as first character hides a file or directory on Linux, than : for entering the command line mode in Vim.

, is just unfriendly.

Why? It's near / on two of the three most common keyboard layouts. Even on non-ANSI/non-ISO layouts like JIS , is available in the same area as / on first or second level.

... oh, but the whole discussion screams for having chat command prefixes being configurable by the user ...

nerzhul commented 7 years ago

It's near / in your keyboard, on mine it's not.

For . i can quote, World of Warcraft and generally all blizzard products, counter strike server admin for example, it's only for multiplayer games, as in singleplayer games console doesn't have start command character

ghost commented 7 years ago

It's near / in your keyboard, on mine it's not.

It's near / on 2 of the 3 most used layouts. Personal preference is not a valid point here.

bigfoot547 commented 7 years ago

Maybe we should not use a character that requires the shift key.

HybridDog commented 7 years ago

You also need to consider that there may be other languages where e.g. . is used at the beginning of a sentence.

paramat commented 5 years ago

Any core dev support?

'!' is used in chat. '..' is detected so this is a low priority issue. Just a request, if changed, please avoid a symbol that requires shift, to keep typing easy like '/'.

ClobberXD commented 5 years ago

/ is the most intuitive prefix to me. But on the other hand, this should definitely be a setting, as everyone might prefer a different key.

It'd be nice to (optionally) be able to use the same prefix for both server-side chat commands and client-side chat-commands for ease of use. The word following the prefix is checked against all CSM commands first, and when there's no match, it's sent to the server. As of now, the only issue with this approach is server-side and client-side chat-commands with the same name.

LoneWolfHT commented 5 years ago

I use CSMs quite a lot and the '.' is pretty easy to get used to. A setting would be the best solution IMO. You'll never please everyone

Desour commented 5 years ago

We don't need a setting for everything.

And there are settings for what you can press to open command line. (Eg. "/" default opens chat with a "/" at the beginning.) Ergo chatcommands are accessible for everyone. Edit: You can see them below in LoneWolfHT's comment.

LoneWolfHT commented 5 years ago

I just checked and there is already a setting :thinking: Screenshot

paramat commented 5 years ago

Heh good. The default of '.' has no issue so closing.

Wuzzy2 commented 5 years ago

...

No, this is wrong, @paramat.

This is only the KEY you have to press. The syntax still stays the same. The KEY only opens the chat and pre-enters the dot.

Same for slash. Pressing / just opens the chat and pre-enters the slash.

If you re-bind the key, you only change the key, but not the leading character for chat. There is no separate dialog for command input, technically, this is just the chat.

ClobberXD commented 5 years ago

Oh, that I did not expect.

But coming to think of it, changing the actual command prefix means this setting won't be pure client-side anymore. The server is hard-coded to compare the first char of the message with / to check if it's a command.

What can be done here is to distinguish chat-commands from normal chat-messages in the client-side itself. If the client detects the first char of a message to be the command prefix, it should send the string as a chat-command instead of a chat-message to the server. On the server-side, there'll be separate register_on_chatcommand callbacks that'll execute the chat-command and return the result.

Wuzzy2 commented 5 years ago

I do not propose to make the local command character configurable, I propose to change it.

paramat commented 5 years ago

This is only the KEY you have to press. The syntax still stays the same. The KEY only opens the chat and pre-enters the dot.

I see, i misunderstood that.

However, i can type '...' in chat fine, the code detects '..' already and avoids this being treated as a command. That was the issue stated in the first post. So what issue remains? The only one i can see is ease of typing.

Does '.' ever require shift on the most likely used layouts? Whatever is chosen should not require shift, so '!' is a really bad idea and if other games use this they are wrong and should not be copied. '!' on it's own is used in chatting as an expression of surprise, this will then be impossible, and impossible to detect whether it was intended as chatting or a command start.

'.' is next to '/' on my keyboard, so is easy to remember as the clientside version of '/', is it so on the most likely used keyboards?

If on the most likely used layouts '.' does not require shift and is next to '/' it seems optimum. I haven't seen any valid reason given to change it :-1:

HybridDog commented 5 years ago

If on the most likely used layouts '.' does not require shift and is next to '/' it seems optimum.

On the qwertz layout, which is used everywhere in Germany and there are many German players, '/' is far away from '.' and it requires shift. img