Creating Cosmetics with REPOLib SDK
NOTE
This guide assumes you have a REPOLib Unity project set up for REPOLib modding.
If not, follow Getting Started first.
1. Create a Cosmetic Prefab
Create a Unity prefab for your cosmetic. Use vanilla cosmetics as reference if needed.
Vanilla Cosmetics are located in Assets/REPO/Game/Resources/cosmetics. You can simply copy a prefab to your mod folder.
2. Create the REPOLib Cosmetic Asset
- Right-click in your mod folder (or subfolder), and choose
Create > REPOLib > Cosmetic. - Configure all properties:
Asset Id: A unique ID for this cosmetic. Avoid conflicts with other mods by using a format likemodname:hat1. Must not start withvanilla:.Asset: Reference to your Vanilla Cosmetic Asset (Follow steps 1 & 2 from the next section).Prefab: Reference to your Cosmetic prefab (drag-and-drop, can be located outside mod folder).Prefab Ref: Reference to your Cosmetic prefab (drag-and-drop, can be located outside mod folder).NOTE
Prefab Refis preferred overPrefabas it reduces in-game RAM usage. If using this, leave thePrefabproperty empty and add your prefab to theModasset underExtra Bundle Files.
3. Create the Vanilla Cosmetic Asset
- Right-click in your mod folder (or subfolder), and choose
Create > Cosmetics > Cosmetic Asset. - Configure the following properties:
Asset Name: Display name (e.g., "Big Hat").Type: The type of the cosmetic, that determines which category it will appear under in the Customize menu.Rarity: The rarity of the cosmetic.Custom Type List: Custom types:Custom Type List (click to expand):
Type Purpose Enemy_SlowMouthPlayer_CrownPlayer_DeathHeadHeadTopMesh_Shape_BigFootRight_Shape_LongFootLeft_Shape_LongFootRight_Shape_NormalFootLeft_Shape_NormalFootRight_Shape_ShortFootLeft_Shape_ShortBodyTop_Overlap_HeadBottomHeadBottom_Overlap_BodyTopHeadBottom_OverrideFlatBodyTop_OverrideFlatHeadTopMesh_Shape_DefaultHeadTopMesh_Shape_TinyEyeRight_DisableDisables the right eye. EyeLeft_DisableDisables the left eye. BodyTop_Overlap_BodyBottom_FrontBodyTop_Overlap_BodyBottom_BackBodyBottom_ProtrudeFrontBodyBottom_ProtrudeHat_Shape_WideBodyTop_State_FlatHeadBottom_State_FlatPlayer_LookDown_RestrictEyewear_Shape_VeryTall_InnerEyewear_Shape_TallHat_Overlap_FaceTopHat_Overlap_FaceBottomEyewear_Overlap_FaceTopEyewear_Overlap_FaceBottomFaceBottom_ProtrudeEyewear_Overlap_FaceBottom_ProtrudeFaceTop_Shape_HugeFaceTop_Shape_TallBodyTopMesh_Shape_DefaultBodyTopMesh_Shape_BigBodyTopMesh_Shape_TinyBodyBottomMesh_Shape_DefaultBodyBottomMesh_Shape_BigBodyBottomMesh_Shape_TinyArmRightMesh_Shape_DefaultArmRightMesh_Shape_BigArmRightMesh_Shape_TinyArmLeftMesh_Shape_DefaultArmLeftMesh_Shape_BigArmLeftMesh_Shape_TinyLegRightMesh_Shape_DefaultLegRightMesh_Shape_BigLegRightMesh_Shape_TinyLegLeftMesh_Shape_DefaultLegLeftMesh_Shape_BigLegLeftMesh_Shape_TinyFootRight_ProtrudeFootLeft_ProtrudeHeadTop_Covered_TopMiddleHeadTopMesh_Shape_UnchangedHeadBottomMesh_Shape_UnchangedHeadBottomMesh_Shape_DefaultHeadBottomMesh_Shape_BigHeadBottomMesh_Shape_TinyBodyTopMesh_Shape_UnchangedBodyBottomMesh_Shape_UnchangedArmRightMesh_Shape_UnchangedArmLeftMesh_Shape_UnchangedLegRightMesh_Shape_UnchangedLegLeftMesh_Shape_UnchangedEars_Shape_TallFaceBottom_Overlap_HeadBottomFaceTop_Shape_VeryTallArmRightMesh_Shape_BigUpperArmLeftMesh_Shape_BigUpperArmRightMesh_Shape_BigLowerArmLeftMesh_Shape_BigLowerHeadTopMesh_Shape_MissingRightFaceTop_Covered_MiddleFaceTop_Covered_LeftFaceTop_Covered_RightEyewear_Shape_EyesRightEyewear_Shape_EyesLeftEyewear_Shape_EyesBothEyewear_Shape_VeryTall_OuterEyeLidRightMesh_ProtrudeEyeLidLeftMesh_ProtrudeFaceTop_Overlap_FaceBottomHeadBottom_ProtrudeTintable: Whether the cosmetic can be colored by the player.Default Color: The default color of the cosmetic in the Customize menu, and when it's equipped for the first time.