Customizing Fallout PipBoy Icons Using DEF_UI: Tags Included

in #fallout6 years ago (edited)

DEF_UI
https://www.nexusmods.com/fallout4/mods/10654?tab=description
FireShot Capture 35 - DEF_UI at Fallout 4 Nexus - M_ - https___www.nexusmods.com_fallout4_mods_10654.png

Customizing DEF_UI

HTML TAGGING INCLUDED w/ PASTEBIN LINK
https://pastebin.com/47A9AJEt

Credit To Mod Authors: Neanka, Valdacil, Old Nick, ParasiteX, and sekoms

This guide is indented to describe customizing DEF_UI; first via the customize utilities, then via the xml files.

Contents

  1. DEF_HUD Files and Customize Tool
  2. DEF_HUD.xml
  3. DEF_INV Files and Customize Tool
  4. DEF_INV.xml
  5. DEF_INV_TAGS.xml
  6. DEF_INV_TABS.xml
  7. lyrConf.xml

DEF_HUD Files and Customize Tool

DEF_HUD requires the following files for proper function (all files are in reference to your game folder):

  • Data\interface\HudMenu.swf (this is the main HUD interface file)
  • Data\interface\iconslibs2.swf (this contains all of the icons used by the Quick Container element)
  • Data\interface\DEF_CONF\DEF_HUD.xml (this contains the DEF_HUD settings)
  • Data\interface\DEF_CONF\DEF_INV.xml (this is the DEF_INV settings, but parts are referenced by DEF_HUD even if DEF_INV isn't installed)
  • Data\interface\DEF_CONF\DEF_INV_TAGS.xml (this is referenced by the Quick Container element for icon substitution)

The customize file used by DEF_HUD is not required to make it run, but for customizing:

  • Data\interface\HUDMenuSet.swf

In order to customize DEF_HUD, open HUDMenuSet.swf with Flash Player. DO NOT open it with your default web browser. The web browsers do not properly interpret the .swf file and you won't be able to do all the customization and save the file properly. There is a copy of Flash Player 20 included in DEF_HUD and should be located at Data\Interface\flashplayer_20_sa.exe. Just drag and drop HUDMenuSet.swf onto flashplayer_20_sa.exe and it should automatically open your existing Data\interface\DEF_CONF\DEF_HUD.xml so you can continue customizing from there.

In the tool, cursor over any element will show you properties of that element as well as some help dialog. Top left corner of the tooltip shows the X,Y position of the element, then the X scale and Y scale (scale from default), and finally the rotation from default. You can move elements either by dragging them to a new position or using WASD. Holding [Shift] and scrolling the mouse wheel will increase/decrease the width of the element. Holding [Cntl] and scrolling the mouse wheel will increase/decrease height of the element. And finally, [Q] and [E] rotate the element counter-clockwise and clockwise respectively. Pressing [Z] restores the element to default position, size and rotation.

Some elements have additional options. These elements will show properties numbered [1] through [8]. Pressing the corresponding number will toggle that option On/Off. For instance you can turn off Enemy Markers on the Compass by toggling [3].

Once you are satisfied with your customized HUD, press [Ctrl]+[S] to save. When prompted make sure to name the DEF_HUD.xml and save it to Data\interface\DEF_CONF\DEF_HUD.xml. Launch the game and enjoy your customized interface. If at any time you want to change something, you can just re-open HudMenuSet.swf as described above and it should open your existing DEF_HUD.xml in edit mode.

DEF_HUD.xml

The easiest way to customize the HUD is to use HudMenuSet.swf as described above. However, you can inspect (and alter) the DEF_HUD.xml file. This will not be an exhaustive list of every element of that .xml file, but here are a few highlights.
In the top header, author, name and version are useful if you plan to release the HUD on Nexus for others to download.

I believe trunc controls the border area which prevents elements from going off the screen. Do not change this unless you know what you are doing. I believe the globalscale tags will control the scale of every object at once. trunc, SafeX, SafeY, globalscaleX, and globalscaleY should not be edited.

After the header elements, you'll see tag groups for each HUD element. Within these tag groups, are various properties. x, y, scaleX, scaleY, and rotation control position, size, and rotation. These are all safe to edit. I believe flags has to do with the options set on the element, but I cannot tell you how to decode the value. Use HudMenuSet.swf to set flags properly. I don't know what the impact of editing the color attributes is, but a value of 0xFFFFFF causes the game to use the HUD color defined in game settings. Do not change parname.

DEF_INV Files and Customize Tool

DEF_INV requires the following files for proper function (all files are in reference to your game folder):

  • Data\interface\BarterMenu.swf
  • Data\interface\ContainerMenu.swf
  • Data\interface\CustomFonts.swf
  • Data\interface\ExamineConfirmMenu.swf
  • Data\interface\ExamineMenu.swf
  • Data\interface\iconslibs2.swf (contains all of the icons used by DEF_INV for icon substitution)
  • Data\interface\lyrConf.xml (configuration file for item rollups)
  • Data\interface\Pipboy_InvPage.swf
  • Data\interface\PipboyMenu.swf
  • Data\interface\translate_xx.txt (where xx is your language code, eg: en, de, fr, etc)
  • Data\interface\Workshop.swf
  • Data\interface\DEF_CONF\DEF_INV_TABS.xml (configuration file for tabs in Barter and Container screens)
  • Data\interface\DEF_CONF\DEF_INV_TAGS.xml (configuration file for icon substitution)

The customize file for DEF_INV is not required for it to run, but for customization:

  • Data\interface\Settings.swf

In order to customize DEF_INV, open Settings.swf with Flash Player. DO NOT open it with your default web browser. The web browsers do not properly interpret the .swf file and you won't be able to do all the customization and save the file properly. There is a copy of Flash Player 20 included in DEF_INV and should be located at Data\Interface\flashplayer_20_sa.exe. Just drag and drop Settings.swf onto flashplayer_20_sa.exe and it should automatically open your existing Data\interface\DEF_CONF\DEF_INV.xml so you can continue customizing from there.

In Settings.swf tool, you can choose a number of options, most should be self explanatory. The search string value is a regular express (regex) for what delimiters are present in your sorting tags. If your sorting mod uses non-standard delimiters, then you'll need to research how to write a regex to include those non-standard delimiters. If you aren't sure what this means, don't edit this expression.

You can also click the "Icons" button to get a reference chart for all of the icons contained in iconslibs2.swf. You will need this reference later if you choose to customize what icons are assigned to item tags. Once you are satisfied with your customization, click the Save button in the bottom right corner and make sure to save the file named DEF_INV.xml at this location: Data\interface\DEF_CONF\DEF_INV.xml.

DEF_INV.xml

Most elements within the XML file match up to settings in the utility pretty clearly. I am actually not going to go into much detail here since the utility spells these out fairly clearly. Best thing to do if you are curious is to modify something in the utility then look for the change in the XML file.

DEF_INV_TAGS.xml

This is where the magic starts to happen. DEF_INV_TAGS.xml controls all icon-to-tag mappings. With the tags node, each line contains a single sorting tag to icon map. Each line should read similar to the following:

tag icon='med' keyword='Aid' hidetag='true'/

icon - this must match the definition of an icon in iconslibs2.swf. You can find these listed on the Icons tab of the utility as described above.
keyword - this is the sorting tag that you wish to use the icon for. DEF_INV will search for this keyword at the beginning of an item name based on the regex defined by Search String
hidetag - this property must be either 'true' or 'false' and toggles whether to show the tag in addition to the icon. If set to 'true' then the tag is hiden, if set to 'false', then the icon AND the sorting tag will show

That's about all there is to this file. It is used by both DEF_INV (for Pipboy, Container, and Barter screens) and DEF_HUD (for Quick Container).

DEF_INV_TABS.xml

This file controls the tabs that are present in the Container and Barter screens. Within the tabs node, each tab>definition controls a new tab in the display. Each has the following properties:

icon - this must match the definition of an icon in iconslibs2.swf. You can find these listed on the Icons tab of the utility as described above.
name - this matches some items in the code of BarterMenu.swf or ContainerMenu.swf. Do not change this value.
filter - this matches the defined filters as described in the comment at the top of the xml and below

Additionally, the following properties further control what items show up on that tab:
filterflag - set to 1 to only show legendary and favorited items matching the filter value
incltags - additional tags to include in this tab even if they don't match the filter value
distags - tags to be not included even if they match the filter value
incltags and distags are mutually exclusive. Use either one or the other.

Filter Values:
4294967295 - all
1 - favorites
2 - weapons
4 - apparel
8 - aid
512 - all misc
1024 - junk
2048 - modifications
4096 - ammo
8192 - all holotapes
128 - all notes and magazines

To include items from multiple tabs, sum those filter values together. For instance, to make a tab that shows armor and weapons: 2+4 = 6, so set 6 as the filter value.

SEE PASTEBIN LINK FOR HTML STEEMIT DOES NOT ALLOW!

lyrConf.xml

This file controls the item rollups in the Pipboy. Between the subCatagories node are the definition for each rollup defined by subCatagory. Each subCatagory node contains a number of elements:

subCatagory - tag value is a regex of the text to search for items to include in the rollup (search the internet for more on regex (or 'regular expression')
favorite - whether the rollup shows the heart icon
taggedForSearch - whether the rollup shows the magnifying glass icon (visual only)
isLegendary - whether the rollup shows the star icon
filterFlag - which Pipboy tab to put the rollup. Match a value from the table below
equipState - whether the rollup shows the square icon to indicate it is equiped (visual only)
text - name of the rollup. You can use sorting tags in the name to get icon substitution. If so, you must make a definition in DEF_INV_TAGS.xml. DO NOT use the same tag as items contained within the rollup or you were generate a circular reference and bad things will happen.
canFavorite - whether the rollup can be favorited. This should always be set to False and ignored.
filterMask - from which Pipboy tab should items be included in the rollup. Match a value from the table below
subFilter - must be a unique value across all defined rollups and a power of 2 starting from 65536. Example: first rollup 65536, second rollup 131072, third rollup 262144, etc.

Filter Mask and Flag values:
4294967295 - all
1 - favorites
2 - weapons
4 - apparel
8 - aid
512 - all misc
1024 - junk
2048 - modifications
4096 - ammo
8192 - all holotapes
128 - all notes and magazines

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 55758.52
ETH 2348.78
USDT 1.00
SBD 2.31