Pages: [1]
  Print  
Author Topic: Disabling implicit chat in console  (Read 12782 times)
commie
Nub


Cakes 0
Posts: 8


« on: August 04, 2017, 05:43:51 AM »

I would like there to be an option to disable implicit chat in console.

Where if you are connected to a server and type a command like team blue and instead of switching to the blue team it will write "team blue" to all-chat. I am sure everyone have done this at some point.

This is mostly to fix minor annoyance. It can feel embarrassing to have your command leak to public chat.

I propose to add a cvar to disable the implicit chat functionality. When searching for a way to do so in OpenArena/Quake3, I found that Quake Live has such a cvar called cl_allowConsoleChat and think that it is good to use the same name for consistency.

The idea is that if cl_allowConsoleChat is 1 (default setting): The console will behave like it currently does. Any text not entered with a preceding slash will implicitly become a all-chat command.

When the user has cl_allowConsoleChat set to 0: Any text not entered with a preceding slash get interpreted as a command. The command gets put into console history with a preceding slash. This is how it works currently if you are in the main menu.

Obviously users can still enter chat commands in console. They just need to explicitly write say <message...>.

---

Another idea that I previously had was putting the command in console history without slash and making the autocomplete not include slash when cl_allowConsoleChat is set to 0. This however seems to be the worse option as it shortens the gap between what is a chat command and what is not. It will also make the console more inconsistent between settings.
« Last Edit: August 04, 2017, 05:55:17 AM by commie » Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: August 04, 2017, 06:32:22 AM »

I don't know what would be better for such stuff. On one hand, maybe it may be useful, while on the other hand, maybe it's not the case to mess with this stuff after so many years?

In case someone changes something about this stuff, please pay attention to do not break something in how this works also in dedicated server mode.

IIRC, DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Dedicated_server]dedicated server mode[/i] recognizes everything as commands, without slashes, and there is also some different behavior in case dedicated mode is run from "complete" binaries (e.g. openarena.exe, yes it may also be used to run dedicated server) or from "dedicated server only" binaries (e.g. oa-ded.exe).
Examples:
- Running a dedicated server from openarena.exe accepts commands both with or without the initial "\"; running it from oa-ded.exe accepts only commands without the initial slash.
- Running a dedicated server from openarena.exe and typing "say hello" seems to have a bug (which would be nice to fix): the message sender is shown to everyone as "own weapon]" (literally those words); doing the same from oa-ded.exe correctly identifies the sender as "console". (UPDATE: Commie told me on Discord that the bug happens if enabling dedicated after launching the game).

Trivia: with the original Q3A game (I'm not talking about dedicated server now), pulling down the console already prepared a "\" at the beginning of the line (for the first command you type only), while with OA this does not happen. Tested with Italian keyboard, Windows.
Trivia2: being "\" the keyboard key which opens and closes OA console (on Italian keyboards at least), I then have to enter "/" in front of the commands, as I can't enter enter "\" character in console. Probably the chages you may do -if you will do changes- would have no impact on this, but I say it anyway to be sure.
« Last Edit: August 05, 2017, 11:11:36 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
commie
Nub


Cakes 0
Posts: 8


« Reply #2 on: August 04, 2017, 08:29:19 AM »

Good to be careful of not breaking anything with dedicated servers.

The good thing is that code to treat entered text as commands by implicitly inserting a leading slash is already there (when not in game). So doing this requires very little changes.

I did a quick test that implements the behavior I am looking for. Made a short video that illustrates the option.

https://www.youtube.com/watch?v=EyPLRbxyVuM

I have tested the change running the game with oa_ded and with openarena +set dedicated 1 and the console works as it should in both cases.
« Last Edit: August 04, 2017, 10:12:06 AM by commie » Logged
commie
Nub


Cakes 0
Posts: 8


« Reply #3 on: August 05, 2017, 09:00:03 AM »

I tried another thing... when someone enters an implicit chat command in the console it shows up as an explicit say command in console history.

https://www.youtube.com/watch?v=jQPHuTueyhg&feature=youtu.be

It changes the behavior of the original console which I see is something people here want to preserve. It also isn't very useful, and may look confusing to the user.

Maybe not worth implementing but thought I would share it anyways.
Logged
commie
Nub


Cakes 0
Posts: 8


« Reply #4 on: August 10, 2017, 08:37:04 AM »

Notice that `ioquake3` has implemented what I am talking about. They use a cvar called `con_autochat` for it.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #5 on: August 10, 2017, 04:36:32 PM »

Do you think it's better following quake live or ioquake3 naming?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
commie
Nub


Cakes 0
Posts: 8


« Reply #6 on: August 11, 2017, 07:41:59 AM »

OpenArena has a lot more common with ioquake3 than with Quake Live so I think ioquake3 naming should be used.

Then the option will work with both engines.
Logged
Pages: [1]
  Print  
 
Jump to: