Character Customization Flow
How a skin picked in the Locker ends up on every party member's screen and in the match.
The Pieces
| Piece | Role |
|---|---|
WB_Locker | The locker room UI where the player picks a character and variation. |
CharacterDataAsset instances | Define each character: mesh variations map (string key → mesh), portraits, anim BP, unique Skin Type Key. See Character Data Asset. |
BPC_CharacterCustomization | Applies a skin to its owning character (menu avatar or game character). |
BPC_PlayerData | Persists the chosen skin locally + Steam Cloud. |
| Steam lobby member data | Shares the chosen skin with other party members. |
Two string keys describe any skin: Skin Type Key (which character, e.g. Manny/Quinn) and Skin Variation Key (which mesh variation of that character).
Selection Flow (Menu)
- Player opens the Locker (
WB_Locker) and clicks a character/variation. - The selection is saved through
PDATA_SavePlayerCharacterData(local save + cloud). - The keys are written into the local player's lobby member data.
- On every member,
HandleOnLobbyDataUpdate→Character Data Updatereads the new keys, resolves the mesh throughGet Skin Mesh with Anim(fromBP_SPM_Library, using theCharacterDataAsset), and applies it to that member's avatar viaBPC_CharacterCustomization → Set Character Skin and Color. Meshes are soft references loaded async withBPML_Components → LoadAndSetSkeletalMesh.
Validation
Because members may come from different builds, Validate Skin Type checks the received Skin Type Key against All Characters in DA_PM_Settings. Unknown skins fall back to default via Reset Skin Type, so a modified client can't crash the menu.
In-Match Flow
BP_GameCharacter also carries BPC_CharacterCustomization (Character Type = Game Character). In the match (a real replicated level), the component uses the Refresh RepNotify (OnRep_Refresh) to replicate skin application: the server sets the skin keys from the player's data, and each client applies the mesh in the RepNotify.
Component Details
BPC_CharacterCustomization functions:
| Function | Purpose |
|---|---|
Set Character Skin and Color / Get Character Skin and Color | Apply/read the current skin keys on the owner. |
Set Spot Index / Get Spot Index | Which party spot this avatar belongs to. |
Get User Steam ID | Which Steam user this avatar represents. |
Set Menu Avatar Visibility | Show/hide the avatar (used when spots empty). |
Get Used As Avatar | Whether the owner is a menu avatar vs game character. |
OnRep_Refresh | RepNotify handler that reapplies the skin on clients. |
Name plate placement is adjusted with the Name Plate X/Y/Z Offset variables (see Character Customization).
Adding Your Own Character
- Create a new
CharacterDataAssetinstance inDataAssets/Characters/with a unique Skin Type Key, your mesh variations map, portraits and anim BP. - Add it to
All CharactersinDA_PM_Settings. - Done. The Locker, avatars and validation all read from that array.