playerID vs playerName

What is the difference? (Is there one?)

Why would you use one instead of the other…?

I’m sort of guessing that one is “immutable” and the other is “mutable”…

PlayerName is determined by the user in Settings…Personal (or at module startup). There’s nothing to stop the user from changing their PlayerName mid-game.

PlayerId is determined by the module and, by default, is a concatenation of PlayerName and PlayerSide. If the PlayerName changes (above), the PlayerId will change too.

PlayerId provides an easy way for the chat log to identify the side that each player is on.

1 Like

Thanks Mark! I couldn’t find any reference to PlayerID in the Designers Guide (I’m sure it’s buried somewhere…).

So for my use case (no sides), they are functionally identical.

This is actually one disadvantage to not having a PDF of ALL of the Vassal Documentation. You have to navigate the tree structure to find the relevant page, rather than just do a search…

1 Like

The format of PlayerId is set in Global Options and allows you to add any global formatting you may want to add to Player Name formatting throughtout the module (.e.g. Highlight player Names in <> brackets.

1 Like