Opened 7 years ago

Closed 4 years ago

Last modified 3 years ago

#1767 closed defect (fixed)

[PATCH] Team chat doesn't work for allies made using diplomacy

Reported by: Kieran P Owned by: trompetin17
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

When you ally with someone via diplomacy that you weren't allied with when the game started, then you try to team chat, that message will not reach your allies.

This needs though, because if I (player A) am allied with B and B is allied with A and C, when I send a team chat, it'll reach only A, but when B replies to my message in team chat, it'll reach his ally C, even though A and C are enemies and the reply might be sensitive info that A doesn't want C to know.

This is where private chat comes in handy, but I can't remember the command for it. There, we need two things here:

  • Make private chat more accessible, a button on the diplomacy screen, which when clicked, pops open chat box with the command that'll make it send to that player only
  • Make team chat send to mutual allys? So in the scenario above, when B replies, it won't send to C because A and C aren't allies. IT only sends to players where plays are all allies of each other. This probably makes it quite confusing. Maybe we just offer team chat when teams are locked? (i.e. reuse lock teams button, and if set to true, don't allow changing diplomacy settings). This I think might be the best way to go about it.

Attachments (12)

1767.diff (4.4 KB) - added by trompetin17 5 years ago.
1767.2.diff (5.1 KB) - added by trompetin17 5 years ago.
1767.3.diff (5.0 KB) - added by trompetin17 5 years ago.
1767.4.diff (15.3 KB) - added by trompetin17 5 years ago.
remove trailing space too
1767.5.diff (15.3 KB) - added by trompetin17 5 years ago.
1767.6.diff (7.0 KB) - added by trompetin17 5 years ago.
1767.7.diff (7.4 KB) - added by trompetin17 5 years ago.
1767_chat.diff (2.3 KB) - added by trompetin17 5 years ago.
1767_chat.2.diff (2.0 KB) - added by trompetin17 5 years ago.
1767_g_players.diff (498 bytes) - added by trompetin17 5 years ago.
screenshot.jpg (176.3 KB) - added by elexis 4 years ago.
chat_addressee_dropdown_v1.patch (16.4 KB) - added by elexis 4 years ago.
Implements a chat-addressee dropdown, observer-only chat and private-messaging for observers and also fixes #3441.

Download all attachments as: .zip

Change History (34)

comment:1 Changed 7 years ago by leper

Following from some discussion on irc:

  • Restrict /team to the team only (as set at the beginning); disable if no teams set.
  • Add something like /allies to chat with mutual allies.
  • Extend /msg nick with autocompletition
  • Extend /msg to take numbers as a parameter (e.g. /msg 1,2,4 abc (or /msg 1 2 4 abc) (maybe with a delimiter after the last player number)) to message specific players + a nice gui with checkboxes for that)
  • Quick chat button on diplomacy screen to prefill chat with "/msg nick
Last edited 7 years ago by leper (previous) (diff)

comment:2 in reply to:  1 Changed 7 years ago by historic_bruno

Replying to leper:

  • Restrict /team to the team only (as set at the beginning); disable if no teams set.
  • Add something like /allies to chat with mutual allies.

Wouldn't it be simpler to only have /allies to chat with your allies? The distinction between team and allies doesn't sound very useful to me, from a chat perspective, but it is another thing to remember and possibly get wrong.

comment:3 Changed 7 years ago by Kieran P

Milestone: Alpha 13Alpha 14

comment:4 Changed 6 years ago by Kieran P

Milestone: Alpha 14Backlog

comment:5 Changed 6 years ago by leper

Component: Core engineUI & Simulation
Keywords: simple added
Owner: leper deleted

comment:6 in reply to:  1 Changed 5 years ago by trompetin17

Keywords: review patch added

Replying to leper:

  • Add something like /allies to chat with mutual allies.
  • Extend /msg nick with autocompletition

Added in my patch, could someone review please

Changed 5 years ago by trompetin17

Attachment: 1767.diff added

Changed 5 years ago by trompetin17

Attachment: 1767.2.diff added

Changed 5 years ago by trompetin17

Attachment: 1767.3.diff added

comment:7 Changed 5 years ago by trompetin17

Milestone: BacklogAlpha 18
Summary: Team chat doesn't work for allies made using diplomacy[PATCH] Team chat doesn't work for allies made using diplomacy

Changed 5 years ago by trompetin17

Attachment: 1767.4.diff added

remove trailing space too

Changed 5 years ago by trompetin17

Attachment: 1767.5.diff added

comment:8 Changed 5 years ago by trompetin17

Owner: set to trompetin17
Status: newassigned

This is the new "AutoCompletation?" behavior http://youtu.be/Z8R-fniS0eE

can you review please?

comment:9 Changed 5 years ago by Itms

I'll commit first the trailing spaces cleanup part of the patch. Could you regenerate your patch on top of the current SVN, before I start to review it?

Thanks in advance!

comment:10 Changed 5 years ago by Itms

In 16244:

Trailing spaces cleanup, based on patch by trompetin17, refs #1767.

Changed 5 years ago by trompetin17

Attachment: 1767.6.diff added

comment:11 in reply to:  9 Changed 5 years ago by trompetin17

Done!

Replying to Itms:

I'll commit first the trailing spaces cleanup part of the patch. Could you regenerate your patch on top of the current SVN, before I start to review it?

Thanks in advance!

Changed 5 years ago by trompetin17

Attachment: 1767.7.diff added

comment:12 Changed 5 years ago by leper

In 16261:

Improve auto-completition of nick names and add it to the in-game chat. Patch by trompetin17. Refs #1767.

comment:13 Changed 5 years ago by leper

Keywords: review removed

(Committed everything (including the session.xml change that got lost in later versions of the patch) apart from the messages.js change which is broken)

Allies made during the game do not get messages send with /allies. Allies from the start of the game (by having teams (non-locked as else you can't change the diplomacy setting)) still get messages sent with /allies even if you set them to an enemy.

Changed 5 years ago by trompetin17

Attachment: 1767_chat.diff added

comment:14 in reply to:  13 Changed 5 years ago by trompetin17

Keywords: review added

When I was testing in a hosted game (4 games in my local pc), I found:

  • message.js is using g_Players for get player data from sim status
  • when a diplomacy is changed, g_players is never update

-- so when you change and ally to enemy from initial data, you are enable to send message to allies(Im not sure even teams).

  • "/enemy" was sending just when you are in a team

My Patch solve this problems.

"/allies": the message is only showing if both are mutual allies "/enemy": if sender has you like enemy you are going to see the message

Replying to leper:

(Committed everything (including the session.xml change that got lost in later versions of the patch) apart from the messages.js change which is broken)

Allies made during the game do not get messages send with /allies. Allies from the start of the game (by having teams (non-locked as else you can't change the diplomacy setting)) still get messages sent with /allies even if you set them to an enemy.

Changed 5 years ago by trompetin17

Attachment: 1767_chat.2.diff added

Changed 5 years ago by trompetin17

Attachment: 1767_g_players.diff added

comment:15 Changed 5 years ago by leper

In 16297:

Add /allies to chat with mutual allies. Patch by trompetin17. Refs #1767.

comment:16 Changed 5 years ago by leper

Keywords: review removed
Milestone: Alpha 18Alpha 19

Thanks for the patch.

Some things that should still be done to consider this ticket fixed are deciding on what should happen with /team (just replace it with /allies? only do so when teams are locked? etc), adding a chat button (opens the chat window with /msg playername) next to players on the diplomacy screen, or even a dedicated chat dialog allowing you to select to which players a message should be sent (with toggle buttons next to each player that you can tick via some buttons (team, allies, enemies) or individually.

comment:17 in reply to:  16 Changed 4 years ago by elexis

TODO (1): Replying to leper: what should happen with /team (just replace it with /allies? A good solution would be a dropdownlist that contains the choices "Everybody", "Allies", "Enemies" and the playernames (it could show the diplomacy in parenthesis after the playername). The hotkey 'enter' should still work and 't' should send a message to the allies (instead of team). See irc discussions on april 12'th 2015.

TODO (2): If a player was defeated, the team / allies / enemies / private messages must be disabled, just like for observers. Maybe even change the player assignment after defeat to -1, so that they can use all features of the observer mode (for example #3168)? If saved properly (see #3253), the name of the old player would still be saved in GameAttributes?.settings and show up correctly in the diplomacy screen.

comment:18 Changed 4 years ago by elexis

Milestone: Alpha 19Alpha 20

Changed 4 years ago by elexis

Attachment: screenshot.jpg added

Changed 4 years ago by elexis

Implements a chat-addressee dropdown, observer-only chat and private-messaging for observers and also fixes #3441.

comment:19 Changed 4 years ago by elexis

Keywords: review added; simple removed

PMs from observer to player are still prohibited. http://trac.wildfiregames.com/raw-attachment/ticket/1767/screenshot.jpg

comment:20 Changed 4 years ago by elexis

In 17771:

Add chat-addressee dropdown, refs #1767.
Add observer-only chat and allow private messages from observer to observer.
Prevent defeated players from using the team-chat, fixes #3441.

comment:21 Changed 4 years ago by elexis

Keywords: review removed
Resolution: fixed
Status: assignedclosed

comment:22 Changed 3 years ago by elexis

In 17933:

Check for GUID, as the playerIndex doesn't distinguish between observers. Refs #1767.
(Avoid private messages where sender and addressee are identical).

Note: See TracTickets for help on using tickets.