Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3379 closed enhancement (fixed)

[PATCH] Show diplomacy changes to observers and in replays

Reported by: elexis Owned by: elexis
Priority: Nice to Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

When spectating a match with multiple teams / diplomacy game, it would be nice to see if people change their diplomacy status.

For example sometimes you can only notice it because their neighboring towers have stopped shooting at each other and then you don't know if they are allied or neutral.

Since visual replay (#9) also uses observer mode, only g_IsObserver needs to be checked to implement it for both modes.

The code in messages.js, case "diplomacy" needs to be updated at

else // No need for other players to know of this.

Attachments (1)

t3379_show_diplomacy_changes_to_observers_v1.patch (3.9 KB ) - added by elexis 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by elexis, 9 years ago

Keywords: patch review added
Milestone: BacklogAlpha 19
Summary: Show diplomacy changes for observers and in replays[PATCH] Show diplomacy changes to observers and in replays

Notice that the diplomacy manager window can only be shown if the perspective of a player is selected and will be done in #3168.

This one only shows the notifications in the chat area.

  • The autoload requirement g_PlayerAssignments = { "local": { "name": translate("You"), "player": 1 } } is now done only for non-observers, otherwise it will show "You" instead of the playername in the autoloaded visual-replay.
  • g_Players = getPlayerData(null) was removed, as it didn't update g_Players with the actual autoload data, thus having "Player 1" in autoloaded games instead of "You"
  • Test autostart with
    ./pyrogenesis -autostart="random/alpine_lakes" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=2:petra
    
  • Those '[color="'+ playerColor + '"]' + username + '[/color]' calls can be refactored, but shouldn't be done in this ticket.
  • Not setting g_IsObserver = true for gaia anymore.

comment:2 by Itms, 9 years ago

Milestone: Alpha 19Alpha 20

comment:3 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 17542:

Refactor session chat.
Show chatmessages for diplomacy-changes and tributed resources to observers/in replays. Fixes #3379.

comment:4 by elexis, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.