Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP: player model color #19

Open
Sonicscream opened this issue Mar 12, 2019 · 15 comments
Open

PP: player model color #19

Sonicscream opened this issue Mar 12, 2019 · 15 comments

Comments

@Sonicscream
Copy link

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?

@NotAFile
Copy link
Member

So far, @xtreme8000 and me have agreed this is a good idea. I think we can discuss the implementation now.

@NotAFile
Copy link
Member

Another neat idea: marking your squadmates or similar in a different color

@NotAFile
Copy link
Member

NotAFile commented Mar 12, 2019

I also wonder why we, while we're at it, don't just allow setting the color for head, torso, legs, arms independently?

@Sonicscream
Copy link
Author

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).

@NotAFile
Copy link
Member

@yvt and @xtreme8000 would have to comment on how much harder that would be in their respective clients

@xtreme8000
Copy link
Contributor

xtreme8000 commented Mar 12, 2019

It's no problem to color each part differently. I think we should have different colors for left and right leg.

@xtreme8000
Copy link
Contributor

xtreme8000 commented Mar 13, 2019

PacketSetBodyPartColor

  • Packet ID: extID TBA
  • 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: extID TBA
  • 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

@yvt
Copy link

yvt commented Mar 13, 2019

No problem implementing it in OS either.

@Sonicscream
Copy link
Author

Sonicscream commented Mar 13, 2019

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 👍

@NotAFile
Copy link
Member

NotAFile commented Mar 13, 2019

@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.

@xtreme8000
Copy link
Contributor

xtreme8000 commented Mar 13, 2019

@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.

@NotAFile
Copy link
Member

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.

@xtreme8000
Copy link
Contributor

My thought was that it would allow to show e.g. damage to limbs

@NotAFile
Copy link
Member

that's a pretty awesome idea

@Sonicscream
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants