Jump to content

What determined the color of players' name?


Recommended Posts

There is infact a pattern. Heres what I notice. The first person to join the server is a red color. Which is usaly the host or server admin. Then the 2nd player is yellow, the 3rd is purple, and the rest of the player colors arent random either. Its a certain pattern but I forgot the pattern order. Also if enough people join a server. The game will run out of player colors and will make all of them a grey color. In this screenshot you can see most of the colors are grey

image.png.cfe3f1f520acf7028cc088c46edb4706.png

And I REALLY want someone to make a mod to allow you to asign someone a certain color. That would have so much potenial.

Link to comment
Share on other sites

9 minutes ago, Jrramon_GOLD said:

There is infact a pattern. Heres what I notice. The first person to join the server is a red color. Which is usaly the host or server admin. Then the 2nd player is yellow, the 3rd is purple, and the rest of the player colors arent random either. Its a certain pattern but I forgot the pattern order. Also if enough people join a server. The game will run out of player colors and will make all of them a grey color. In this screenshot you can see most of the colors are grey

image.png.cfe3f1f520acf7028cc088c46edb4706.png

And I REALLY want someone to make a mod to allow you to asign someone a certain color. That would have so much potenial.

Aye, they're not randomly selected but they're not directly controllable by the players.

They're chosen by the server based on the client slot index, which when players leave they'll have the slot indexes needing to be re-used to fill the holes created by the leavers.

The function GetAvailablePlayerColours() in networking.lua is used to control the table used as well as the default fallback for when there's no more entries to use, though I think it's sampled from the C-side.  Not sure if it's dynamic in that the C-side doesn't cache the table on start.

The colours the function returns are defined in constants.lua as the table PLAYERCOLOURS.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...