Gendered preview icons

This is a sub-page of "your own preview icons" and only contains information on how to hook up gendered variants once you already have the files. If you aren't quite there yet, refer to the other guide first.

For the technical documentation, check TweakXL's readme.

Requirements:

This will not work unless your item is using the corresponding suffix. Without it, the game has no way to tell male and female items apart.

  appearanceSuffixes: [ itemsFactoryAppearanceSuffix.Gender ]

If you want to know more about this, you can read up here: https://github.com/CDPR-Modding-Documentation/Cyberpunk-Modding-Docs/blob/main/for-mod-creators-theory/files-and-what-they-do/file-formats/entity-.ent-files#what-are-suffixes

If you don't have a gendered item yet, see the original ArchiveXL guide, section "adding a male instance".

The shortcut

Type the following command into your CET browser:

print(gameuiIconsNameResolver.GetIconsNameResolver():TranslateItemToIconName("Items.your_item_name_with_variant", false).value) 

That won't help you if you want to path items in bulk, but it'll help you to spot mistakes. For the rest, please keep reading.

How to do it

By adding an icon property to your item's yaml, you're setting the UIIcon property of your record. The generated records will be the same for all genders, variants and tags.

If you want to use a gendered preview picture, you can create a more specific record yourself. In this case, you can delete the icon entry from your item.

Its name will follow this schema:

Wait, what?

ENTITYNAME, APPEARANCENAME, SUFFIXES and VISUALTAGSabove are placeholders for the corresponeding fields in your YAML.

For example, if you have the following item:

… then you'd define a preview image like this:

The trailing underscore separates the empty visual tags from the suffixes entry.

Your items won't need an icon record anymore, the assignment now happens by magic!

Does this work with dynamic variants?

It does! All you need to do is to add the appearanceSuffix Gender and define an anchor for your $instances, like this:

ArchiveXL will ignore suffixes for dynamic variants, but they need to be present in the yaml file for the icons to work.

Then, you can define your preview images (remember to strip away the ! and + from the variants):

The rest just works (tm)

More Complex Examples

Multiple Variants

Given an item with multiple variants:

The icon definition would then look like:

Mixing Static and Dynamic Variants

You can also use static variants - the same rules apply, even if the result looks strange.

Given an item with a mixture of static and dynamic variants:

The icon definition would then look like:

Last updated