Opened 11 years ago

Closed 8 years ago

Last modified 8 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 9 years ago.
1767.2.diff (5.1 KB ) - added by trompetin17 9 years ago.
1767.3.diff (5.0 KB ) - added by trompetin17 9 years ago.
1767.4.diff (15.3 KB ) - added by trompetin17 9 years ago.
remove trailing space too
1767.5.diff (15.3 KB ) - added by trompetin17 9 years ago.
1767.6.diff (7.0 KB ) - added by trompetin17 9 years ago.
1767.7.diff (7.4 KB ) - added by trompetin17 9 years ago.
1767_chat.diff (2.3 KB ) - added by trompetin17 9 years ago.
1767_chat.2.diff (2.0 KB ) - added by trompetin17 9 years ago.
1767_g_players.diff (498 bytes ) - added by trompetin17 9 years ago.
screenshot.jpg (176.3 KB ) - added by elexis 8 years ago.
chat_addressee_dropdown_v1.patch (16.4 KB ) - added by elexis 8 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 by leper, 11 years ago

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 11 years ago by leper (previous) (diff)

in reply to:  1 comment:2 by historic_bruno, 11 years ago

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 by Kieran P, 11 years ago

Milestone: Alpha 13Alpha 14

comment:4 by Kieran P, 11 years ago

Milestone: Alpha 14Backlog

comment:5 by leper, 10 years ago

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

in reply to:  1 comment:6 by trompetin17, 9 years ago

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

by trompetin17, 9 years ago

Attachment: 1767.diff added

by trompetin17, 9 years ago

Attachment: 1767.2.diff added

by trompetin17, 9 years ago

Attachment: 1767.3.diff added

comment:7 by trompetin17, 9 years ago

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

by trompetin17, 9 years ago

Attachment: 1767.4.diff added

remove trailing space too

by trompetin17, 9 years ago

Attachment: 1767.5.diff added

comment:8 by trompetin17, 9 years ago

Owner: set to trompetin17
Status: newassigned

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

can you review please?

comment:9 by Itms, 9 years ago

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 by Itms, 9 years ago

In 16244:

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

by trompetin17, 9 years ago

Attachment: 1767.6.diff added

in reply to:  9 comment:11 by trompetin17, 9 years ago

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!

by trompetin17, 9 years ago

Attachment: 1767.7.diff added

comment:12 by leper, 9 years ago

In 16261:

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

comment:13 by leper, 9 years ago

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.

by trompetin17, 9 years ago

Attachment: 1767_chat.diff added

in reply to:  13 comment:14 by trompetin17, 9 years ago

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.

by trompetin17, 9 years ago

Attachment: 1767_chat.2.diff added

by trompetin17, 9 years ago

Attachment: 1767_g_players.diff added

comment:15 by leper, 9 years ago

In 16297:

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

comment:16 by leper, 9 years ago

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.

in reply to:  16 comment:17 by elexis, 9 years ago

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 by elexis, 9 years ago

Milestone: Alpha 19Alpha 20

by elexis, 8 years ago

Attachment: screenshot.jpg added

by elexis, 8 years ago

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

comment:19 by elexis, 8 years ago

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 by elexis, 8 years ago

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 by elexis, 8 years ago

Keywords: review removed
Resolution: fixed
Status: assignedclosed

comment:22 by elexis, 8 years ago

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.