Opened 12 years ago

Closed 12 years ago

#1583 closed enhancement (fixed)

Team/private chats for multiplayer games

Reported by: fcxSanya Owned by: Jonathan Waller
Priority: Nice to Have Milestone: Alpha 11
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by fcxSanya)

It would be nice to have team and private chats for multiplayer games.

Change History (12)

comment:1 by Erik Johansson, 12 years ago

Maybe the easiest (in terms of what would it look like, I have no idea what would be the easiest way to program it ;) ) way would be to add a row of checkboxes to the chat dialog which when ticked would send the messages to the relevant player/players. Something like: Allies, Neutral, Enemies (and perhaps all in case you find it tedious to tick/untick the other boxes =) )

comment:2 by historic_bruno, 12 years ago

There are other ways of doing it, like scanning the first character of the message for special tokens that can signal an ally or enemy chat (something relatively uncommon like "@", "^", or "*"). I think that would at least make a nice shortcut since it can be annoying to use check boxes in the heat of the moment.

There is another case to consider: a private chat between two players. I don't know if we'll want to make a properly secure chat with encryption, but we could at least make a private chat possible in the UI.

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:3 by fcxSanya, 12 years ago

Description: modified (diff)
Summary: Team chat for multiplayer gamesTeam/private chats for multiplayer games

comment:4 by Deiz, 12 years ago

What if we follow the lead of multiplayer FPSes? Specifically, two keys could be used. One for regular chat and another for team chat (commonly Y and U, respectively). If a 'Team Only' checkbox was also included, it would be readily apparent what the difference between the two chat modes was.

Last edited 12 years ago by Deiz (previous) (diff)

in reply to:  2 comment:5 by historic_bruno, 12 years ago

Replying to historic_bruno:

There is another case to consider: a private chat between two players. I don't know if we'll want to make a properly secure chat with encryption, but we could at least make a private chat possible in the UI.

Maybe that case can be handled once we have a multiplayer lobby (#1504), the current patch uses XMPP/Jabber.

comment:6 by Jonathan Waller, 12 years ago

Owner: set to Jonathan Waller
Resolution: fixed
Status: newclosed

In 12360:

Added support for team chat in multiplayer. Team chat is default if you are on a team of size >1. Using the prefix g will make the message global. Fixes #1583.

comment:7 by Deiz, 12 years ago

I'm not fond of that patch. It's non-obvious that all messages will by default only go to team members and there's no hint about the 'g' keyword.

comment:8 by Kieran P, 12 years ago

Milestone: BacklogAlpha 11
Resolution: fixed
Status: closedreopened

I agree with Deiz here. It should be global by default, and there should be a label to the left of the text box, either "All" or "Team", and a hotkey, like Shift+Tab to change between chat types. Please correct this before Alpha 11 releases.

comment:9 by Deiz, 12 years ago

In 12371:

Implemented two chat commands, /restrictteam and /me. Refs #1583.

comment:10 by Deiz, 12 years ago

As of r12371, normal chat is "<name> message", team chat is "(Team) <name> message", and 'actions' (triggered by /me) are '* name message'.

I'm leaving the ticket open for now because the second part (messaging to a particular player) is unimplemented.

I suppose for now it'd be manually triggered via '/msg name' or something (maybe with tab completion?). In the future, I assume it would be available via a diplomatic menu or something. Implementation-wise it wouldn't be possible to use the 'split' array due to spaces being legal characters in names, but I don't think it'd be overly difficult to implement.

On the receiving end, you'd just need to iterate through all the player names, and show the message as long as no players have longer names that also match the start of the message (e.g. "Foo Bar" would not see messages meant for "Foo Bar Baz").

comment:11 by Kieran P, 12 years ago

As discussed in IRC, would like /restrictteam to be simply /team

Also would like /enemy added (speak only to enemies)

And /all should be an alias for global chat.

comment:12 by Deiz, 12 years ago

Resolution: fixed
Status: reopenedclosed

In 12392:

Renamed /restrictteam to /team, added /enemy, /msg, /all. Fixes #1583.

Note: See TracTickets for help on using tickets.