PP: player model color
This packet / extension would tell supporting clients what color to render a player model for a specific player id (it would override whatever their team color is for the player model, not add accents or anything new)
It is intended for only the server to handle any logic relating to what colors are assigned to specific ID's outside (clients wouldn't change the colors unless they receive a player model color packet from the server).
Theoretically there would be a magic number to represent there being no set player model color that the server could send whenever to revert back to the team color, and that the client would initially start out with upon connecting to a server.
Use cases off the top of my head:
-
Implementation of the Garry's Mod game mode Trouble in Terrorist Town (TTT) into Ace of Spades. Tl;dr In TTT there are three effective teams which are all represented by a specific color which can't currently be accomplished with just two teams.
-
Make a player who is performing exceptionally well stand out amongst other players, making them more of a target.
-
Enhance the rampage script by coloring a player while on a rampage.
-
Show admins a different color.
-
Subtle team color variations, eg make zombies be different dark colors.
-
Etc.
Thoughts?
So far, @xtreme8000 and me have agreed this is a good idea. I think we can discuss the implementation now.
Another neat idea: marking your squadmates or similar in a different color
I also wonder why we, while we're at it, don't just allow setting the color for head, torso, legs, arms independently?
I also thought about the squad coloring too! As far as individual body parts, I was aiming for something that would require minimal editing to implement (individual body parts would be cool too).
@yvt and @xtreme8000 would have to comment on how much harder that would be in their respective clients
It's no problem to color each part differently. I think we should have different colors for left and right leg.
PacketSetBodyPartColor
- Packet ID:
extIDTBA - Packet subID: 0
- Length: 7
It is possible to set the color of many body parts at once.
| Field name | Field type | Example | Notes |
|---|---|---|---|
| player id | UByte | 31 | |
| body part | bitfield | 0x1F | See bit meaning below |
| blue | UByte | 0 | |
| green | UByte | 255 | |
| red | UByte | 0 |
Bitfield structure of field body part:
| Field name | Index | Mask |
|---|---|---|
| head | 1 | 0x01 |
| torso | 2 | 0x02 |
| arms | 3 | 0x04 |
| left leg | 4 | 0x08 |
| right leg | 5 | 0x10 |
| intel? | 6 | 0x20 |
PacketResetBodyPartColor
- Packet ID:
extIDTBA - Packet subID: 1
- Length: 4
This will reset the body parts back to team color.
| Field name | Field type | Example | Notes |
|---|---|---|---|
| player id | UByte | 31 | |
| body part | bitfield | 0x1F | See bit meaning above |
No problem implementing it in OS either.
If we're going to allow left leg and right leg we should do the same for the arms. Edit: Intel color is good too 👍
@xtreme8000 isn't your proposal missing the player id? Intel would be harder to do because of this. I feel like we should have a different packet for setting map entity color by ID then.
@NotAFile you're right, I forgot about that, will add it. @Sonicscream arms dont have a seperate kv6 model The intel would only be colored when it is on the player's back.
I can't personally think of any reason why you'd want to color the legs differently. But I mean, it's just one bit. so it doesn't really matter.
My thought was that it would allow to show e.g. damage to limbs
that's a pretty awesome idea
@xtreme8000 how difficult would using separate models be?
Maybe it would be something to consider for a later revision of this packet. I think it would be useful just as the separate legs would.