# Game icons: .inkatlas files

{% hint style="success" %}
Apart has prepared a reference project with an import-ready inkatlas. You can download it [here](https://mega.nz/file/vUUDEQxS#w66XKJ7acIsnXuJcOBEwPPDcm4GFtSa06MzZccAaX8Y).
{% endhint %}

This page explains the `.inkatlas` file and its logic.

##

{% hint style="info" icon="question" %}

### Wait, this is not what I want!

* Learn how to make [adding-items-preview-images](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/custom-icons-and-ui/adding-items-preview-images "mention")
* Make a [custom Atelier icon](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/items-equipment/adding-new-items/adding-items-atelier-integration#generating-an-icon)
* Find templates (by [Apart](https://app.gitbook.com/u/M4VsHKJyn3PakV5tOmAF87H61wh2 "mention")) in the wiki github's [file section](https://github.com/CDPR-Modding-Documentation/Cyberpunk-Modding-Docs/tree/main/_resources_and_assets/icons)
* Make your own inkatlas with Python: find the script on [The Magnificent Doctor Presto's github](https://github.com/DoctorPresto/Cyberpunk-Helper-Scripts/blob/main/generate_inkatlas.py).\
  Check [running-python-scripts](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/everything-else/running-python-scripts "mention") if you don't know how to use this.
* Make your own inkatlas with Photoshop CC (Adobe Creative Suite required): find the plugin on [deadlymustard's github](https://github.com/deadlymustard/inkatlas-utils)
  {% endhint %}

## Summary

The .inkatlas is a map file that slices [**textures**](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/materials/textures) into [sprites](https://stackoverflow.com/a/34575810) (slots), which are then used by the game for pretty much everything that is a picture - from your HUD to peoples' phone avatars to item preview icons in shops or custom atelier images.

Unlike other games, Inkatlas files don't slice by pixel coordinates but by **percentage** as a float value between 0 and 1 . The starting point is the TOPLEFT corner, the ending point is the BOTTOMRIGHT corner.

Each slot (`inkTextureAtlasMapper`) has four coordinates. This is a single slot across the entire inkatlas:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-9cd23d576891eb98ded3a9fe6355202bc621a5a4%2Finkatlas_coordinates.png?alt=media" alt=""><figcaption><p>Slightly out of order</p></figcaption></figure>

For example: two sprites in column will be written as:\
(y 0,5; x 0) X (x 1; y 0) for upper sprite and (y 1; x0) X (x 1; y 0,5) for lower

## `inkTextureSlot`s

Each inkatlasa has three different inkTextureSlots, which support different texture resolutions. For the purpose of modding, it is enough if you work with inkTextureSlot 0 (the first one in the list).

If an existing xbm is hooked up, the `Part Mapping` tab will appear, where you can check which parts of your image correspond to each slot name.

{% hint style="warning" %}
As of Wolvenkit 8.11.1, this requires reopening the file.
{% endhint %}

## Inkatlas: Slot names

You target sprites (slots in the inkatlas) via the `atlasPartName` property:

<pre class="language-yaml"><code class="lang-yaml"><strong>UIIcon.clothing_my_custom_shirt_factory_name_appearance_root_entity_white_red_Female_:
</strong>    $type: UIIcon
    atlasResourcePath: tutorial\path\subfolder\preview_icons_pwa.inkatlas
    atlasPartName: slot_01
</code></pre>

Any atlasPartName in the `yaml` must correspond with the name of a part in the inkTextureAtlasMapper. If the corresponding entry can't be found, an empty icon will be displayed.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-df9b0d1a8c04b23c2c4f79e7770b20cddc81d14b%2Finkatlas_slot_names.png?alt=media" alt=""><figcaption><p>You can change field names at your leisure. Depending on the template, there are a bunch of slotIcons already hooked up.</p></figcaption></figure>

You can see which sprite is targeted by any given entry in the `Part Mapping:`

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-012b99c49ab98262c26f3366ad67c54461623953%2Finkatlas%20partsMapping.png?alt=media" alt=""><figcaption><p>If you don't have a partsMapping tab, check your texture path and reopen the InkAtlas</p></figcaption></figure>


---

# 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/for-mod-creators-theory/files-and-what-they-do/file-formats/game-icons-the-inkatlas-file.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.
