Hi Darrell,

I deleted your original message with team selection question, so replying 
in this one.

>Question 2:
>I’m having trouble with the “picking team” logic in my netrek client.
>The server sends an SP_MASK packet:
>struct mask_spacket { /* SP_MASK py-struct "!bbxx" #19 */
>    char type;
>    char mask;
>    char pad1;
>    char pad2;
>Here’s what the currently online servers send:
>continuum.us.netrek.org <http://continuum.us.netrek.org/> sends mask = 15 
>(fed + rom + kli + ori)
>netrek.beesenterprises.com <http://netrek.beesenterprises.com/> sends 
>mask = 3  (fed + rom)
>pickled.netrek.org <http://pickled.netrek.org/> sends mask = 2 (rom)

So this one is pretty simple, each server sends current allowed teams as 

I can also confirm that I get same values (that's what I have as allowed
teams in selection tiles)

>Then the client sends a CP_OUTFIT packet:
>struct outfit_cpacket { /* CP_OUTFIT py-struct "!bbbx" #9 */
>    char type;
>    char team;
>    char ship;
>    char pad1;
>It looks like the “Team” has to be an integer between 0 and 3 inclusive:
>            if (teamPick < 0 || teamPick > 3) {
>                new_warning(UNDEF,"Get real!");
>                sendPickokPacket(0);
>                teamPick= -1;
>                continue;
>            }

So after reading netrekxpmod sources I can see that team selection is 
based on teams numerical order:

0 - FED
1 - ROM
2 - KLI
3 - ORI

You send CP_OUTFIT that contains your desired team and ship type.

In response you should expect SP_PICKOK packet with either 1 (approved) or 
0 (rejected)

>On beesenterprises.com <http://beesenterprises.com/>, when I send team = 0 
>I end up rom.  Anything else I am rejected.
>On pickled.netrek.org <http://pickled.netrek.org/> when I send team = 0 I 
>end up rom. Anything else I am rejected. 
>On continuum.us.netrek.org <http://continuum.us.netrek.org/>, when I send 
>team = 0, I end up rom.  Anything else I am rejected.

So here you'll have to expand on what do you mean by "I end up rom or get 
If you send 0 as team you're supposed to become federation player, not 
Also I would suggest running your own vanilla server which will allow you
enabling debugging and actually seeing what's wrong. That's the way I used
to code the client

>Is there a way to select teams?  What does the team = 0 or 1 or 2 or 3 
>mean in the CP_OUTFIT packet?
>I have a pulldown menu with the “preferred team”, but it doesn’t work the 
>way a player would expect.

Hope this helps

On Fri, 29 Mar 2019, Darrell Root wrote:

> Date: Fri, 29 Mar 2019 17:33:51 -0700
> From: Darrell Root <darrellroot at mac.com>
> Reply-To: Netrek Development Mailing List <netrek-dev at us.netrek.org>
> To: Netrek Development Mailing List <netrek-dev at us.netrek.org>
> Subject: [netrek-dev] Mac Swift Netrek client v0.5 now available
> netrek-dev folks,
> I’m a week late, but my Mac Swift Netrek Client v0.5 is now available on https://networkmom.net/netrek/ <https://networkmom.net/netrek/>
> Direct binary link: https://networkmom.net/download/netrek-v0.5.app.zip <https://networkmom.net/download/netrek-v0.5.app.zip>
> This binary is scanned/notarized by Apple and my developer ID.
> Updates too numerous to list.
> My thanks to Andrew Sillers for his CP_Updates suggestion.  Idle users don’t get Ghostbusted on continuum.us.netrek.org <http://continuum.us.netrek.org/> any more.
> I’m still stumped by team selection per my earlier email, and would appreciate any suggestions (preferably without implementing the “generic” packet type 32).
> I have support for “basic tips” (in green) and “advanced tips” (in red) which cycle every 5 seconds when not playing (and can be turned off in preferences).  I’m happy to accept pointers to any “list of advanced tips” to further populate it.
> Bug reports appreciated, but to avoid too much spam consider sending them only to me if they are not of general interest.
> Darrell
> darrellroot AT mac.com <http://mac.com/>