smr icon indicating copy to clipboard operation
smr copied to clipboard

SectorPlayers.inc: change color of protected allies

Open hemberger opened this issue 8 years ago • 9 comments

Currently, players are displayed in sector with the following colors:

Enemies (newbie turns=NO): red Enemies (newbie turns=YES): yellow Allies (newbie turns=NO): green Allies (newbie turns=YES): green

However, this often causes confusion when an ally is in newbie turns. It can make it difficult to count the number of allies who are able to fight or to determine if an ally has forgotten to leave newbie protection.

We change the colors here to make it immediately visible if an ally is in newbie turns. Since you can already click "Examine" to inspect if the ally has newbie turns (it will say "Your target is under newbie protection!"), this change does not modify what information is available to players -- only how it is displayed.

Display players with the following new colors:

Enemies (newbie turns=NO): red Enemies (newbie turns=YES): yellow Allies (newbie turns=NO): green Allies (newbie turns=YES): yellow <-- changed

hemberger avatar Sep 10 '17 09:09 hemberger

Original colors: image

New colors: image

hemberger avatar Sep 10 '17 09:09 hemberger

The requested changes have been made. I'm not a huge fan of the name I chose, SmrPlayer.getPlayerRelationship, but everything else I could think of seemed like it would be too easy to mistake for a racial council function. I'm open to alternatives.

hemberger avatar Oct 03 '17 07:10 hemberger

One additional thought I had: should we make the same color changes to the local map? It might be confusing to have the two be different.

hemberger avatar Oct 05 '17 12:10 hemberger

I don't think the local map has an idea of neutral does it? If it does then it could make sense but I think I avoided it as the amount of db requests it would have to make to check every player in every surrounding sector could be fairly slow

Page- avatar Oct 05 '17 16:10 Page-

The local map does in fact check for friendly/enemy/neutral players here. So unless I hear otherwise, I'll go ahead and re-use the logic from the current sector in the local map.

hemberger avatar Oct 05 '17 22:10 hemberger

The code change for the local map won't affect performance. However, this is actually a little more complicated than I expected. In the piece of code I linked above (here), we can see how interlinked the idea of "friendly" and "allied" are. In the Current Sector screen, what you really want to see is "can this trader attack with me?" (because you can see the alliances -- there is no degeneracy between protected allies and protected enemies). However, that degeneracy does exist on the Local Map. So how do we reconcile this?

What we want:

  • Consistent colors between Local Map and Current Sector
  • A way to distinguish between protected and unprotected traders in the Current Sector (achieved by the original PR)
  • A way to distinguish between allied and enemy and protected and unprotected traders in the Local Map

So how do we do this, given that we only have 3 colors, but 4 states we want to identify (protected/unprotected ally, protected/unprotected enemy)?

Or do we want to argue that the Local Map has reduced information, and you shouldn't be able to identify all 4 states? In that case, I assume we would still want the colors to be consistent with the Current Sector, and that requires a restructuring of the logic in the code I linked. It also raises questions like: Do we want to see the location of all allied traders on the galaxy/local map, or do we want to see the location of all "friendly" (in the new definition, i.e. can attack with you) traders. If the former, then that means you would see both green and yellow icons in any sector (and thus a bit of a change in the code logic).

Thoughts?

hemberger avatar Oct 24 '17 16:10 hemberger

I think it's fine for the local map to have less granular info because from a roleplaying sense the info you're getting is via a longer range scan that isn't able to get all of the info (but for allies you can get more info via comms/whatever). Overall I think it's your call though as you know the state of the current game far better than I do

Page- avatar Nov 06 '17 21:11 Page-

Is this finished? I know the original way was confising but there was a reason for this. Mainly it was quite a cluster to do it the other way, and there is the fact that allied players show up on Galaxy map, thus having them show up yellow sometimes might be a bit confusing.

witold-cyrek avatar Dec 09 '20 05:12 witold-cyrek

I stopped working on this for the exact reason you pointed out -- I couldn't decide how this should behave on the Galaxy Map. I think before we make any further changes, we should decide on a motivation for how scanners behave. (Are the local map scanners the same as the current sector scanners? Are there long-range scanners, and if so should they be a perk of a particular race? Are ally positions broadcast by a different mechanism, or is it still some form of scanning?)

hemberger avatar Dec 12 '20 10:12 hemberger