Howto: Add Your Own Item Tag With Icon To DEF_UI Sorter
Important: This howto is for DEF_UI item sorters. When you use the new FallUI item sorting, see this article: FIS - Howto Modify And Extend.
This howto describes all necessary tasks in simple steps to add or change your own tag inclusive icon to an item in Fallout 4.
This tutorial uses the FallUI standard item sorting for examples. But you can use this guide for any def_ui-compatible item sorter.
Prerequisites
- FallUI - Inventory (or any def_ui-compatible UI)
- FallUI Item Sorter ESP (or any def_ui-compatible item sorter ESP)
- FallUI Item Sorter Tag Configuration (or any def_ui-compatible tag configuration)
- FO4Edit
- Text editor (like Notepad++)
Compatible items
This guide works for most items like aid, food, drinks, ammunition, books, notes, keys, holotapes, mods and misc items.
If you use the standard FallUI Item Sorter (so you don't use AWKCR), you can also use this guide for most apparel.
This guide can't be used for most weapons: The most weapon names are build by so called Instance Naming Rules (INNR), which make naming much more complex.
Introduction
So you have this favorite item (or new item from a mod) and you like it very much and use it very often. But it have a boring (or no) icon. Or it's just not eye-catching enough. And maybe you want to resort it to another category. So you decide to give that item a new tag, icon and/or category. So this guide will show you how to do that.
This howto takes the "Purified Water" as example. A delicious refreshing drink, which can be gathered fast and refills your health without rads. As you use it often, you want that item to be special and unique.
Overview
This howto is separated into five tasks:
- Find the item in FO4Edit
- Modify the items name in F04Edit
- Tag Configuration - Assign icon
- Tag Configuration - Assign container/trader category
- Tag Configuration - Assign Pipboy subcategory
Task 1: Find the item in FO4Edit
There are multiple approaches to find the item. As this guide is for beginners, this will describe an easy process step by step for vanilla items first as (A). For items from mods see the second section (B).
(A) For vanilla items (like "Purified Water")
- Open your favorite internet search engine and search "Fallout 4 wiki [Your Item Name]". So for this guides example search: "Fallout 4 wiki Purified Water".
- Open the search result, which leads to the fallout fandom wiki (Like: https://fallout.fandom.com/wiki/Purified_water_(Fallout_4) )
- Look to the right info box. In the bottom technical data section you find the Form-ID. For this example this is: 000366C0. Copy that FormID.
- Open F04Edit. Confirm the pre-selected plugins and modgroups (if any - depends on your mods).
- Let F04Edit initialize. You know it's done, when the tip-box disappears. Also you can read a "Background Loader: finished" in the log.
- Go to the FormID search box in the left top area and paste the item FormID in the box (It was 000366C0 in this example). Press enter.
- The search box background should be green and the item should be selected in the tree and in the main area.
- Proceed with task 2
(B) For items from custom mods
- Open FO4Edit.
- Search the mod's ESP in the left tree view.
- Open the category for the item (like "Armor" for apparel, "Weapon" for weapons, "Ingestible" for aids and food etc.)
- Search the item in the nodes of the category and click on it
- Proceed with task 2
Task 2: Modify the items name in F04Edit
You have found the item in F04Edit and see all it's data. Now it's time to add your tag.
After task 1 you should see all data of the item on the right side in F04Edit. If you have mods installed, which modify that item, they will be also visible there. If you installed FallUI you should see at least "Fallout4.esm" and "M8r_Item_Tags_Vanilla_EN.esp" (or similar) there. The "M8r_Item_Tags_Vanilla_EN.esp" (or similar) should be the right-most of all.
- Search in the main right area for the Field "FULL - Name" in the first column.
- The right-most cell in that row contain the item name, as it is used for your game. So this should be "[Drink] Purified Water". Note: You don't see the [Drink] in the game, because it is displayed as an icon
- Right-click on the right-most cell and select "Edit". Confirm the warning box.
- Choose your new tag name. For this example, we like to use "[MyNewTag]".
- Change the item name from "[Drink] Purified Water" to "[MyNewTag] Purified Water".
- You can choose any tag you like. Of course you have to adapt all following steps to match your choosen tag. You can rename the item too, if you like.
- You can choose any tag you like. Of course you have to adapt all following steps to match your choosen tag. You can rename the item too, if you like.
- Then confirm your input. You should see the new name in the right-most cell in bold text.
- Close F04Edit and confirm to save "M8r_Item_Tags_Vanilla_EN.esp" (or similar).
- Important: If you see another name or more ESPs in the list, you have changed a wrong file. In that case its the safest to disable all checkboxes, confirm (which will exit F04Edit without saves), and restart this task.
- Important: If you see another name or more ESPs in the list, you have changed a wrong file. In that case its the safest to disable all checkboxes, confirm (which will exit F04Edit without saves), and restart this task.
- F04Edit will save the ESP and exit.
Task 3: Tag Configuration - Assign icon
In this task you will assign an icon to your new tag.
Find an icon
First, search the name of the icon you like to have. You can find a very nice list of the icon names here:
Icon List for DEF_UI Iconlibs Rescaled and Fixed
For this example, we choose the "water3" icon, which is a nice water blob surrounded by a circle.
Go to the Item Sorter Mod folder
Open the FallUI Item Sorter Mod folder. In case you installed it with FallUI Inventory, it is in that mod folder. If you installed the optional package, go to that folder.
The way to the folder depends on your mod organization:
- If you use Mod Organizer 2, just right-click on the mod and select "Open in explorer".
- If you don't use any Mod Organizer, go to your Fallout 4 directory and go into the data folder there.
- If you use any other Mod Organizer, check your Mod Organizer documentation to get to the mods folder.
Assign the icon to the tag
When you there, you should see at least a folder "Interface" there. In the Interface folder there should be a file "lyrConf.xml" and another folder named "DEF_CONF". If you see them, you are at the right place.
- Open the file "Interface\DEF_CONF\DEF_INV_TAGS.xml" in any text editor.
- Note: Make sure you open the file with "TAGS", not "TABS".
- Note: Make sure you open the file with "TAGS", not "TABS".
- In that file you see any tags used in the item sorter.
- Insert your new tag definition directly after the "<tags>" in a new line:
<tag hidetag='true' icon='water3' keyword='MyNewTag' />
- If you have choose another icon or another tag, change the "icon" and "keyword" attributes accordingly.
- Save the file and close the editor.
- Now your tag have an icon.
Task 4: Tag Configuration - Assign container/trader category
In this task you will assign all items with your tag to a specific tab in the container and trader interface.
- Go to the Item Sorter Mod folder (See task 3 for step-by-step)
- Open the file "Interface\DEF_CONF\DEF_INV_TABS.xml" in any text editor.
- Note: Make sure you open the file with "TABS", not "TAGS".
- Note 2: If your editor doesn't show the line-breaks correctly, you should try another text editor.
- Search the "<tab>"-category where your item should go. For this example, we want the water in the Food section. So look for "<icon>food2</icon>" and "<name>$FOOD</name>" (Note: Depending on your locale this could vary).
- The whole section should look like this:
<tab autoSubTabs="true">
<icon>food2</icon>
<name>$FOOD</name>
<filter>AID</filter>
<inctags>Food</inctags>
<inctags>RadFood</inctags>
<inctags>Drink</inctags>
<inctags>Liquor</inctags>
<inctags>Beer</inctags>
</tab>
- Now just add a new line after the "<inctags>Beer</inctags>" with:
<inctags>MyNewTag</inctags>
- So your new section should look like this:
<tab autoSubTabs="true">
<icon>food2</icon>
<name>$FOOD</name>
<filter>AID</filter>
<inctags>Food</inctags>
<inctags>RadFood</inctags>
<inctags>Drink</inctags>
<inctags>Liquor</inctags>
<inctags>Beer</inctags>
<inctags>MyNewTag</inctags>
</tab>
- Save the file. Now your new tag will be sorted to that tab.
Task 5: Tag Configuration - Assign Pipboy subcategory
In this task you will assign your new tag to a Pipboy subcategory.
- Go to the Item Sorter Mod folder (See task 3 for step-by-step)
- Open the file "Interface\lyrConf.xml" in any text editor.
- Search the "<subCategory>" where your item should go. For this example, we want the water in the "Soft drinks" section of AID. So look for "<icon>bottle</icon>" and "<text>«${M8r_Drinks}»</text>" (Note: Depending on your locale this could vary).
- You just have to add your tag in the "tag"-attribute of the "<subCategory>".
- The line should look like this
<subCategory tag="\[(Drink)\]">
- Now just add your new tag "MyNewTag" separated by a "|" to the line. This should look like this:
<subCategory tag="\[(Drink|MyNewTag)\]">
- Save the file. Now your new tag will be sorted to that Pipboy subcategory.
3 comments
Question. How can I exclude tags from the subdirectories?
Example:
Subdirectory: Pistols
The following is located there.
[Pistol] Pistol (10mm)
[Pistol][Favourite] my special Pistol
I want to exclude the special pistol with tag [favourite], so that only the pistol (10mm) is shown.
I know how to do this in the main directory: distags. But in the subdirectories I have to put Exclude in a RegEx expression.
I have already tried many things.
E.g..
<tab><icon>w_rocket_launcher</icon> <inctags>/\[(Minigun|Gatling|Flamethrower|JunkJet|Cannon|Rocketlauncher|Fatman)\]|rocket launcher/</inctags></tab>-->
e.g. [Favourite] Cannon should not be displayed in the subdirectory, but the others should.
In the meantime, I have found out how to exclude certain tags from a subdirectory.
With the following RegEx expression, this can be achieved relatively easily.
^(?!.*\[OWN\]).*
If one wants to exclude another Tag:
Tags: [OWN] or/and (favourite)
^(?!.*(\[OWN\]|\(favourite\))).*
This is what a finished example expression in DEF_INV_TABS.XML would look like:
<tab><icon>neck</icon>
<inctags>/^(?!.*(\[EIGEN\]|\(Favorit\))).*([\(\[\{\|](Neck|Ring|Gloves|Hand)[\|\]\)\}]|Gloves)/</inctags></tab>
This allows you to create numerous combinations, there are no limits to your imagination.
The expressions can be tested very well here: RegEx Testing