# ItemAdditions: files from scratch

## Summary

**Created:** by **@manavortex**\
**Last documented edit**: June 10 2023

This page is a part of the [Adding new items](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items.md) guide and deals with finding the correct files for [an ArchiveXL item addition](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items.md).

* For an explanation of the file structure, see [ItemAdditions: File structure explained](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/archive-xl-item-structure-explained.md).
* If you want to add an atelier store, see [Your own Atelier Store](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/adding-items-atelier-integration.md).
* If you want to add preview items, check [Your own inventory preview icons](/cyberpunk-2077-modding/modding-guides/custom-icons-and-ui/adding-items-preview-images.md).
* If you want to port a mesh from a different game to Cyberpunk, check [Porting 3d objects to Cyberpunk](/cyberpunk-2077-modding/for-mod-creators-theory/3d-modelling/porting-3d-objects-to-cyberpunk.md)

{% hint style="info" %}
**TL;DR**: If you can't be arsed doing this by yourself, find a template project with one working item (female rigged) [here](https://www.mediafire.com/file/ef5xcacwomldizg/my_shirt.7z/file).
{% endhint %}

## Overview:

<table><thead><tr><th width="316">File in modded dir</th><th>was originally copied from</th></tr></thead><tbody><tr><td><code>rootentity.ent</code></td><td><code>base\gameplay\items\equipment\underwear\player_underwear_item.ent</code></td></tr><tr><td><code>appearance.app</code></td><td><code>base\gameplay\items\equipment\underwear\appearances\player_underwear_item_appearances.app</code></td></tr><tr><td><code>mesh_entity.ent</code><br><code>⚠</code> Check the red hint box <code>⚠</code></td><td><code>base\characters\garment\player_equipment\torso\t1_080_pwa_tank__judy.ent</code></td></tr><tr><td><code>my_mesh.mesh</code></td><td><code>base\characters\garment\gang_monk\torso\t2_135_jacket__monk_shirt\t2_135_wa_jacket__monk_shirt.mesh</code></td></tr><tr><td></td><td></td></tr><tr><td><code>my_tshirt_factory.csv</code></td><td><code>base\gameplay\factories\items\clothing.csv</code></td></tr><tr><td><code>translation_strings.json</code></td><td><code>base\localization\en-us\onscreens\onscreens.json</code></td></tr><tr><td><code>preview_icons.inkatlas</code></td><td><code>base\gameplay\gui\common\icons\items\item_icons6.inkatlas</code></td></tr><tr><td><code>preview_icons.xbm</code></td><td><code>base\gameplay\gui\common\icons\items\item_icons6.xbm</code></td></tr><tr><td></td><td></td></tr><tr><td><code>tutorial_my_custom_tshirt.archive.xl</code></td><td>Wolvenkit -> New File -> ArchiveXL</td></tr><tr><td><code>tutorial_my_custom_tshirt.yaml</code></td><td>Wolvenkit -> New File -> TweakXL</td></tr></tbody></table>

{% hint style="danger" %}
For `mesh_entity.ent,` your entity file needs to correspond to your item's **body part**. If you put a shirt in an entity file for shoes, it will deform badly once you put it on.

If you rename your components, we recommend using CDPR's [naming prefixes](/cyberpunk-2077-modding/for-mod-creators-theory/3d-modelling/garment-support-how-does-it-work.md) for reasons of garmentSupport. You don't need to understand how this works, just name your component like `l1_myCustomPants` instead of `myCustomPants` and call it a day.

For further details, check [here](/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/different-equipment-slots.md).
{% endhint %}

{% hint style="success" %}
It is good practice to keep local copies of everything that you change (=> `custompathing`) instead of overwriting files under `base`. This makes sure that no other mods will overwrite your changes.

\
ℹ Only keep files under `base` if you are okay with them being overwritten!
{% endhint %}

### Optional, but **very** recommended: Clean out obsolete entries

1. Open the file `translation_strings.json` in WolvenKit.\
   Expand the array `root` and then the array `entries`. Delete all entries but one.
2. Open the file `my_shirt_factory.csv` in WolvenKit.\
   In `compiledData`, delete all entries but one. In `data`, delete everything - these will get autogenerated.
3. Open the file `root_entity.ent`.

   Expand the list `appearances`. Delete all entries but the first (most likely `default`).
4. Open the file `my_custom_shirt.app`.\
   Expand the list `appearances`. Delete all entries but `default`.
5. Open the file `mesh_entity.ent`\
   Select `resolvedDependencies` and delete all the entries. (We don't need Judy's top anymore.)
6. Make a back-up copy of your `t1_custom_shirt.mesh`, then open it.
   1. Expand the first `appearances` at the top of the file. Open the appearance `default` and check which material is linked in the `chunkMaterials` array.

{% hint style="success" %}
**Now is a good time for a backup.**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/adding-new-items-files-from-scratch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
