Your own HUD icons

Summary

This guide tells you how to add a custom HUD icon for a weapon. It is a subsection of the ItemAdditions: Weapons guide, but since the same principle applies for all parts of the UI, it can be used standalone.

The final result

Step 1: Setting up the files

We need an .inkatlas file and a texture.

  1. Download the correct template from the wiki's github repository. For a hudicon, that's weapons_hudicon.zip

  2. Extract both files to a fitting subfolder in your Wolvenkit project.

Now we need to custompath those files:

  1. Open your .inkatlas file

  2. Open the slots array

  3. Click on each slot and set the value to your texture's relative path

Optional: re-name your slot

If you're cool with your slot's name being your_custom_hudicon, you can change its name:

  1. Expand the first slot (the one with the number 0)

  2. Expand its list of parts

  3. Select the first entry your_custom_hudicon and change its name to whatever you want to use in the yaml

Editing the texture

Export your .xbm (texture) via Wolvenkit, then edit the resulting .png in chosen your image editor of choice.

Once you are done, Import your PNG over the xbm with those settings:

  1. Edit the inkatlas file as in the icon creation guide.

Editing the .yaml file

Now that you have a custom preview icon, it's time to hook it up. You do this by editing the .yaml file.

You'll find written instructions below the screenshot.

The base record

Add a HUDWeaponIcons entry at the root level of your .yaml (no indent). Give it a name, such as HUDWeaponIcons.TheFallout in the screenshot above.

It has the following properties (indent level 1):

KeyValueExplanation

$type

gamedataUIIcon_Record

This tells the game that it's a UI icon

atlasResourcePath

path/to/your/file.inkatlas

relative path to your inkatlas file (right-click it in Wolvenkit and select "Copy relative path")

atlasPartName

slot_02

name of the icon's slot in the inkatlas. If you don't know it, see here.

Making the weapon use it

Add a new property to the weapon that refers to the record you have created above:

hudIcon

HUDWeaponIcons.TheFallout

That's it! After starting the game,

Last updated