Game icons: The inkatlas file

Apart has prepared a reference project with an import-ready inkatlas. You can download it here.

This page explains the .inkatlas file and its logic.

Wait, this is not what I want!

Summary

The .inkatlas is a map file that slices textures into sprites (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:

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

inkTextureSlots

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.

As of Wolvenkit 8.11.1, this requires reopening the file.

Inkatlas: Slot names

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

UIIcon.clothing_my_custom_shirt_factory_name_appearance_root_entity_white_red_Female_:
    $type: UIIcon
    atlasResourcePath: tutorial\path\subfolder\preview_icons_pwa.inkatlas
    atlasPartName: slot_01

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.

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

Last updated