> For the complete documentation index, see [llms.txt](https://solaartw.gitbook.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solaartw.gitbook.io/developer/documentation/generalized-guidees/replace-a-player-item-with-an-npc-item.md).

# Replace a player item with an NPC item

#### Summary <a href="#summary" id="summary"></a>

**Created by @manavortex Published November 05 2022​**This tutorial will teach you how to switch a player mesh for an NPC garment and map its variants to the existing colours.We'll assume that you know how to edit mesh appearances. If you don't, check the [corresponding tutorial](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/changing-items/recoloring-items).

### Step 1: Replace the mesh <a href="#step-1-replace-the-mesh" id="step-1-replace-the-mesh"></a>

Find the mesh that you want to use ("**target mesh**") and replace it with the one that you want to switch in ("**source mesh**").Example: Replacing the short-sleeved poser jacket with the monk shirt with the tied-back sleeves.​

| target mesh | `base\characters\garment\player_equipment\torso\t2_084_jacket__short_sleeves\t2_084_pwa__short_sleeves.mesh` |
| ----------- | ------------------------------------------------------------------------------------------------------------ |
| source mesh | `base\characters\garment\gang_monk\torso\t2_135_jacket__monk_shirt\t2_135_wa_jacket__monk_shirt.mesh`        |

1. 1.Find both files and add them to your project.
2. 2.Move the source mesh to the target mesh's folder.
3. 3.Rename the target mesh (e.g. "`t2_084_pwa__short_sleeves.mesh`" -> "`original.mesh`").
4. 4.Rename the source mesh to the target mesh (e.g. "`t2_135_wa_jacket__monk_shirt.mesh`" -> "`t2_084_pwa__short_sleeves.mesh`")
5. 5.Open both meshes in WolvenKit

<figure><img src="https://i.imgur.com/CzSBCvS.png" alt=""><figcaption></figcaption></figure>

Target (original) mesh and its variants

<figure><img src="https://i.imgur.com/1sj58tA.png" alt=""><figcaption></figcaption></figure>

Source (new) mesh and its variants

### Step 2: Change the .mlsetups <a href="#step-2-change-the-.mlsetups" id="step-2-change-the-.mlsetups"></a>

Now comes the annoying part: we need to find out which spawn code corresponds to which meshMeshAppearance. The process is a little tedious.​​

<figure><img src="https://i.imgur.com/MnUWU6O.png" alt=""><figcaption></figcaption></figure>

For example, the appearance "**black**" with the chunks pointing at **pasted\_ml\_t2\_135\_wa\_jacket\_\_monk\_shirt\_fancy** will look for:

| yes | archive\base\characters\garment\gang\_monk\torso\t2\_135\_jacket\_\_monk\_shirt\textures\ml\_t2\_135\_wa\_jacket\_\_monk\_shirt\_fancy.mlsetup   |
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| no  | base\characters\garment\player\_equipment\torso\t2\_084\_jacket\_\_short\_sleeves\textures\ml\_t2\_135\_wa\_jacket\_\_monk\_shirt\_fancy.mlsetup |

*Don't ask me how the lookup/naming works, I have no idea. Just copy it from the source mesh.*&#x54;he **names** of the meshMeshAppearance need to be taken from the **target** mesh - when spawning an item, the game will look for the variant "black", since that's mapped to the corresponding item code. The **values** in the chunkMaterials belong to the **source** mesh.Rename all the variants in the source mesh with those from the target mesh. Then, make sure that you can tell them apart (e.g. by giving each variant an individual appearance or colouring the mlmasks. What worked for me was using primary colours on the mlmasks, and then using each of them fully or with plastic sleeves. Your mileage may vary.)

### Step 3: Success! <a href="#step-3-success" id="step-3-success"></a>

After you've found out which spawn code corresponds to which appearance, you can now [alter the appearance files](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/changing-items/recoloring-items).

Enjoy!Cyberpunk 2077 Modding
