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 refence 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 refence 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.
Some examples of how to use the above:
<tab>
<icon>pack</icon>
<name>$INVENTORY</name>
<filter>4294967295</filter>
</tab>
This shows a tab using the pack icon which shows all inventory items.
<tab>
<icon>star</icon>
<name>$InventoryCategoryFav</name>
<filter>4294967295</filter>
<filterflag>1</filterflag>
</tab>
This shows a tab using the star icon which shows all inventory items that are legendary or favorited.
<tab>
<icon>weap</icon>
<name>$InventoryCategoryWeapons</name>
<filter>2</filter>
<distags>Grenade</distags>
<distags>Mine</distags>
<distags>Signal</distags>
</tab>
This shows a tab using the weap icon which shows all Weapons items unless they have a tag Grenade, Mine, or Signal.
<tab>
<icon>food</icon>
<name>$InventoryCategoryFood</name>
<filter>8</filter>
<inctags>Food</inctags>
<inctags>Prewar</inctags>
<inctags>Raw</inctags>
</tab>
This shows a tab using the food icon which shows Aid items that match tags Food, Prewar, and Raw.
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
46 comments
<filterMask type="int">1536</filterMask>
wth is 1536? is this just a random number? All of the values that are listed in the comment section of lyrConf are Base-2 values (with nothing listed for 64, 128, or 256) .. I'm just trying to add my own <subcategory> but Im not sure which value to use for the <filterMask> element .. I suppose I should stick with one of the defined values listed above.. but I am curious about these other values that Valdacil uses which are not listed.. what do they mean, how and why did you choose this number, etc.
FilterMask 1536 matches both 512 "all misc" and "1024 junk".
If this makes sense to anyone out there on the Nexus....HALP!
I tried changing the brackets of the tags of the items going into the rollups. Didn't do anything.
It doesn't have anything to do with the order in which the rollups are entered into the xml file, and it doesn't seem to have anything to do with the unique subfilter number either (don't even get me started on why those start at 2^16 and go up by increments of power)...
I've managed to change the order of the rollup by adding more item tags into a particular rollup tag, and to a certain extent I've managed to change the order of the rollups once or twice by changing how the rollup tag is written... BUT I can't find any pattern in it, which is utterly infuriating. Most changes to the particulars of the rollup tag yield no changes in order whatsoever. I'm suspecting there is some sort of weird sorting of regex lines going on which isn't immediately apparent from looking at the characters in order...
What it HAS taught me however is that whoever wrote this file got something slightly wrong with the regex. "\[Milk|Eggs|Ham\]" won't bring back results specifically for "[Milk]","[Eggs]" and "[Ham]". It brings back results for "[Milk", "Eggs" and "Ham]". Seems if you don't put the brackets around every word, they don't count around every word... and if you happen to have an item with the word "Eggs" in the middle, it gets dragged into the group. It seems that "\[(Milk|Eggs|Ham)\]" works though.
Still... none of this tells me why it is ordering the way it is.
Funny that your drinks end up at the start. My drinks are at the end and I want to put them in third place (what I want is Aid>Chems>Drinks>Ingredients>Food>Prewar, but what I seem to be stuck with is Chems>Ingredients>Prewar>Food>Aid>Drinks, and the only ones I've managed to move are Ingredients up and Prewar down... slightly).
The order of the rollups (subcategories) are just as random as ever.
GuruSR.
When customizing lyrConf.xml, each item roll-up is uniquely identified by the subFilter entry. This is a number following this pattern 2^X, starting with 2^16 = 65536. Importantly, this can only reach a maximum of 2^31=2147483648, as 2^32 is larger than what a int datatype can hold. Thus there can only be 15 possible item roll-ups (2^15 to 2^31).
This was painfully discovered whilst attempting to add more roll-ups to my settings.