I was thinking on how this might be implemented somewhat quickly and how to later utilize the information for adding players to coalitions or treaties in the future. Food for thought and discussion.
We already have a leaderboard that has every player who is active (or at least has a system) in an active galaxy. Can we utilize the leaderboard as a way of searching for our “friend” (all are “foe” by default) and initially sending this “friend” a request that will add them to your “friend” list.
Modify the “Hi Neighbor” chat to recognize that a “friend” has accepted your request and regardless of their location be added to both your chat (the requestor) and the friend’s chat list. Add a column or designation in the chat that indicates the player is a “friend” (with a simple F or something (that can be adjusted later to an C to identify a coalition member, A for alliance member or T for a player with a treaty (or start everyone that is a friend to automatically be a “T” as a friend by default has a treaty with you).
This will allow a “communication” feature to exist immediately with the friend code implemented, though it will be just a simple chat between individual players to begin with.
assign a color to the fleets for “friends”, that can later be assigned to players that have a treaty, that is other than white or red. “Foes” by default will be red as they are now.
allow friends to cross minefields without damage, disallow the “attack” function when sending a fleet to a “friend’s” position and not auto attack another “friend” if in the same planet’s orbit.
I believe this can be a building block for later full alliance features. As an example - once coalitions exist, the coalition leader (who should be “friends” with all members) would be able to send a “join” request to the “friends” who should be part of their coalition. This will seed the existing coalitions with the existing players who should be part of it.
Later when the full features for coalitions/alliances/treaties exist, you could 1) utilize this as a recruitment tool and 2) also have a feature where players who are not friends can request to join (please discuss #2 on a separate thread)