Skip to content

Advanced Item Display

youbetterdont edited this page May 19, 2020 · 8 revisions

By enabling the "Advanced Item Display" configuration parameter, you can customize exactly how items are displayed. When this parameter is enabled, it will supersede these other parameters:

  • Show Ethereal
  • Show Sockets
  • Show iLvl
  • Show Rune Numbers
  • Alt Item Style
  • Color Mod
  • Shorten Item Names

To use Advanced Item Display, you will configure one or more rules in BH.cfg. Each rule looks like this:

ItemDisplay[ ...CONDITIONS... ]: ACTIONS

The CONDITIONS specify a set of conditions an item must satisfy, and ACTIONS specify the actions taken when a matching item is found. The most basic type of action is to simply enter the name you want to see when viewing that item. If you leave the CONDITIONS empty, the rule will match all items. If you leave the ACTIONS empty, the rule will blank out the names of any matching items.

You will normally have multiple rules in your configuration file. The first rule that matches a given item is the one that will be used to display that item (with one exception, the %CONTINUE% action, described below).

The simplest rule has no conditions and no actions:

ItemDisplay[]:

This rule will match every item in the game, and will prevent the client from showing that item. (So when you hit the alt key, you will see nothing other than gold stacks.) Next is another simple rule that matches every item in the game, and gives them all the same name:

ItemDisplay[]: Wirt's Other Leg

Rules with No Actions

In version 0.1.4, items matching rules with no actions were still visible on the ground, but their names were changed to a single space. As of version 0.1.5, this is no longer true; these items are actually filtered out by the game client. As far as your game is concerned, the items do not exist. This is useful for reducing ground clutter from small gold stacks, junk items, etc. But be careful when using rules like this, as they can cause unexpected effects. For example, if you have a rule with no actions that matches health potions, they will effectively be invisible to you and you will not be able to see the potions on your own belt.

As of 1.9.9, an ignore rule is only created when the item name and description are not blank, there is no map action, and there is no %CONTINUE% statement. Essentially only blank lines can create ignore rules.

Additionally, blank item names are no longer generated. This could occasionally happen in previous releases when a name was set blank but the item was not completely filtered. To warn users that an item they see in game will be blocked by the packet filter, a [blocked] tag is added to the item. For example:

image

The blocked tag is only generated when the item has an ignore rule and not an explicit whitelist rule (could be any valid name or a map condition).

Item Codes

The simplest condition consists of an item code. An item code is the unique 3-letter code assigned to each type of item. You can find a full list of item codes here: http://bhfiles.com/files/Diablo%20II/ItemCodes.html.

EDIT: the bhfiles.com list contains some incorrect codes (e.g. gnarled staff is actually cst). A more correct (though less readable) list can be found here: https://github.com/dkuwahara/OmegaBot/blob/master/data/item_data.txt (the item code is the second column).

The item code for a scroll of town portal is "tsc". So to shorten the names of all town portal scrolls in the game to just "TP", you would put this line in BH.cfg:

ItemDisplay[tsc]: TP

To give all super healing potions (item code hp5) the name "Pan-Galactic Gargle Blaster", you would put this in BH.cfg:

ItemDisplay[hp5]: Pan-Galactic Gargle Blaster

Changing Colors

You can change the color of item text. To make your super healing potions appear with red text, do this:

ItemDisplay[hp5]: %RED%Pan-Galactic Gargle Blaster

The %RED% color will apply to everything that comes after it, until another color is encountered. To display the word "Blaster" in green text (with everything else still red), you would write:

ItemDisplay[hp5]: %RED%Pan-Galactic Gargle %GREEN%Blaster

These are the colors you can use:

  • %WHITE%
  • %RED%
  • %GREEN%
  • %BLUE%
  • %GOLD%
  • %GRAY%
  • %BLACK%
  • %TAN%
  • %ORANGE%
  • %YELLOW%
  • %PURPLE%

If you ever had the "Shorten Item Names" parameter enabled, you can use these rules to replicate exactly what it does:

ItemDisplay[tsc]: %GREEN%**%WHITE%TP
ItemDisplay[isc]: %GREEN%**%WHITE%ID
ItemDisplay[vps]: Stam
ItemDisplay[yps]: Anti
ItemDisplay[wms]: Thaw
ItemDisplay[gps]: Ranc
ItemDisplay[ops]: Oil
ItemDisplay[gpm]: Chok
ItemDisplay[opm]: Expl
ItemDisplay[gpl]: Stra
ItemDisplay[opl]: Fulm
ItemDisplay[hp1]: %RED%**%WHITE%Min Heal
ItemDisplay[hp2]: %RED%**%WHITE%Lt Heal
ItemDisplay[hp3]: %RED%**%WHITE%Heal
ItemDisplay[hp4]: %RED%**%WHITE%Gt Heal
ItemDisplay[hp5]: %RED%**%WHITE%Sup Heal
ItemDisplay[mp1]: %BLUE%**%WHITE%Min Mana
ItemDisplay[mp2]: %BLUE%**%WHITE%Lt Mana
ItemDisplay[mp3]: %BLUE%**%WHITE%Mana
ItemDisplay[mp4]: %BLUE%**%WHITE%Gt Mana
ItemDisplay[mp5]: %BLUE%**%WHITE%Sup Mana
ItemDisplay[rvs]: %PURPLE%**%WHITE%Rejuv
ItemDisplay[rvl]: %PURPLE%**%WHITE%Full
ItemDisplay[aqv]: Arrows
ItemDisplay[cqv]: Bolts
ItemDisplay[key]: Key

Adding to Existing Names

Sometimes it's nice to add onto an existing item name. To leave a super healing potion with the same name, but write it in red text, do this:

ItemDisplay[hp5]: %RED%%NAME%

To prepend "Ninja" to every item name in the game, use this rule:

ItemDisplay[]: Ninja %NAME%

You can append every item's vendor value to its name using the %PRICE% action, as shown here:

ItemDisplay[]: %NAME% ($%PRICE%)

To add item level to item names, do this:

ItemDisplay[]: %NAME% {L%ILVL%}

To show an item's item code, use the following rule:

ItemDisplay[]: %NAME% [%CODE%]

To add the number of sockets to item names, this would work:

ItemDisplay[]: %NAME% -%SOCKETS%-

Logical Operators

Often you will want to match multiple conditions. This rule will match any item that satisfies both CONDITION1 and CONDITION2 (since no logical operators are given, the conditions are implicitly ANDed together):

ItemDisplay[CONDITON1 CONDITION2]: ...

For more complicated conditions, you can use the following logical operators:

  • AND
  • OR
  • ! (logical negation)

The previous rule is exactly equivalent to this one:

ItemDisplay[CONDITON1 AND CONDITION2]: ...

You can also use parentheses to group conditions. See below for examples of these logical operators.

Item Quality

Several conditions let you match items of certain quality:

  • INF: matches inferior items
  • SUP: matches superior items
  • MAG: matches magic items
  • RARE: matches rare items
  • SET: matches rare items
  • UNI: matches unique items
  • NMAG: matches nonmagical (white/gray) items
  • ETH: matches ethereal items
  • RW: matches runewords
  • CRAFT: matches crafted items

For example, to write all unique ethereal item names in purple, do this:

ItemDisplay[ETH UNI]: %PURPLE%%NAME%

Item Groups

Normal, Exceptional, Elite

  • NORM: matches normal items
  • EXC: matches exceptional items
  • ELT: matches elite items

Class Specific Items

There are conditions that refer to class specific items:

  • CL1 or DRU: druid pelts
  • CL2 or BAR: barbarian helms
  • CL3 or DIN: paladin shields
  • CL4 or NEC: necromancer heads
  • CL5 or SIN: assassin katars
  • CL6 or SOR: sorceress orbs
  • CL7 or ZON: amazon weapons

To display all ethereal paladin shields in purple, use this line:

ItemDisplay[ETH CL3]: %PURPLE%%NAME%

Weapon Groups

  • WP1 or AXE: axes
  • WP2 or MACE: maces
  • WP3 or SWORD: swords
  • WP4 or DAGGER: daggers
  • WP5 or THROWING: throwing weapons
  • WP6 or JAV: javelins
  • WP7 or SPEAR: spears
  • WP8 or POLEARM: polearms
  • WP9 or BOW: bows
  • WP10 or XBOX: crossbows
  • WP11 or STAFF: staves
  • WP12 or WAND: wands
  • WP13 or SCEPTER: scepters
  • WEAPON: any weapon

Armor Groups

  • EQ1 or HELM: helms
  • EQ2 or CHEST: body armor
  • EQ3 or SHIELD: shields
  • EQ4 or GLOVES: gloves
  • EQ5 or BOOTS: boots
  • EQ6 or BELT: belts
  • EQ7 or CIRC: circlets
  • ARMOR: any armor

To display ethereal elite polearms capable of 4+ sockets in purple, use this line in BH.cfg:

ItemDisplay[WP8 ETH ELT NMAG (SOCK=0 OR SOCK>3) !7o7]: %PURPLE%%NAME%

The exclamation point prevents matching item code 7o7 (ogre axe), which can only have 3 sockets.

Sockets

You can match items with a certain number of sockets. To display all items with more than 4 sockets in green:

ItemDisplay[SOCK>4]: %GREEN%%NAME%

For conditions like SOCK that compare with a number, you can use <, >, or =.

Runes, Gems, and Gold

The "RUNE" condition can be used to match different types of runes based on the rune number. To display runes Lem and higher in purple "20 - Lem" format:

ItemDisplay[RUNE>19]: %PURPLE%%RUNENUM% - %RUNENAME%

The "GEM" condition will match based on gem quality (1=chipped, 5=perfect). To display all flawless and perfect gems in purple:

ItemDisplay[GEM>3]: %PURPLE%%NAME%

The "GEMTYPE" condition will match on the type of the gem, based on this list: gem types. To match all perfect diamonds:

ItemDisplay[GEM=5 GEMTYPE=2]: ...

To block the game from showing any gold stacks smaller than 1000:

ItemDisplay[GOLD<1000]:

Unlike other conditions, GOLD can only be used to filter out small stacks. It cannot currently be used to change the color or show stacks of certain sizes on the map.

Skills

It is possible to match bonuses to all skills, bonuses to class skills, bonuses to particular skill trees, and bonuses to individual skills.

All Skills

To match all items with +2 or more to all skills:

ItemDisplay[ALLSK>1]: ...

Class Skills

Find the number of the class from this page: class list; next, append that number to "CLSK". This will match grand matron bows with +2/+3 to amazon skills (class number 0 from the list):

ItemDisplay[amc CLSK0>1]: ...

Skill Tabs

Find the number of the skill tab here: skill tabs; then append it to "TABSK". So to match all items with +1 or more to warcries (#34 from that list):

ItemDisplay[TABSK34>0]: ...

Individual Skills

Look up the number of the skill on this page: skills list. For example, Battle Orders is skill number 149. So to display barbarian helms capable of 3os with +3 to BO in purple:

ItemDisplay[CL2 ((ILVL>25 SOCK=0) OR SOCK=3) NMAG SK149>2]: %PURPLE%%NAME%

Other Conditions

Other miscellaneous conditions:

  • ILVL: matches against the item level
  • QLVL: matches against the item quality level
  • ALVL: matches against the item affix level
  • CLVL: matches against you character current level
  • DIFF: matches against the games current difficulty
  • ED: matches % effective defense/damage (depending on item type)
  • RES: matches resist all
  • FRES: matches fire resist
  • CRES: matches cold resist
  • LRES: matches lightning resist
  • PRES: matches poison resist
  • FCR: matches faster cast rate
  • FHR: matches faster hit recovery
  • FBR: matches faster block rate
  • FOOLS: matches against the Fools mod
  • LVLREQ: matches against the items level requirement
  • ARPER: matches against attack rating based on char level
  • MFIND: matches magic find
  • GFIND: matches gold find
  • STR: matches +STR items
  • DEX: matches +DEX items
  • FRW: matches faster run walk rate
  • MINDMG: matches +MIN damage items
  • MAXDMG: matches +MAX damage items
  • DTM: matches damage to mana
  • MAEK: matches mana after each kill
  • REPLIFE: matches replenish life
  • REPQUANT: matches repair quantity
  • REPAIR: matches repair durability
  • ID: matches items that have been identified
  • DEF: matches total defense
  • LIFE: matches +HP items
  • MANA: matches +MANA items
  • IAS: matches increased attack speed
  • CRAFTALVL: matches the resulting affix level of the item if it were to be crafted by the character holding it

Marking Items on the Map

You can mark any matching item on the map with a square by putting %MAP% anywhere in the action for the rule. This will put all mage plates on the map as a white square without changing the name:

ItemDisplay[xtp]: %NAME%%MAP%

This square will be white because a color was not specified; if a color is used before the %MAP% action, then that will be used as the square color. For example, this marks mage plates with blue squares:

ItemDisplay[xtp]: %NAME%%BLUE%%MAP%

Item Descriptions (as of BH 1.9.9)

Item descriptions allow users to add custom descriptions to items. For example, we can set a line describing how to make a Hoto runeword with an eligible flail (below).

Item descriptions are added using curly braces {}. The above description was created with the following line.

ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: {%WHITE%Heart of the Oak: %ORANGE%KoVexPulThul}

It is also valid to set the description in the same line as the item name or item MAP actions. For example:

ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: %NAME%%MAP%{%WHITE%Heart of the Oak: %ORANGE%KoVexPulThul}

Descriptions are processed separately from name and map actions, so a line with only a description will not set an ignore rule. For example, the following would still result in the item being visible in game.

ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: {%WHITE%Heart of the Oak: %ORANGE%KoVexPulThul}
ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: %NAME%

Descriptions do not white list items. So an item with only a description can still be hidden. For example:

ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: {%WHITE%Heart of the Oak: %ORANGE%KoVexPulThul}
ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]:

Descriptions support any keywords that the normal item name does with the exception of %CONTINUE%. The %CONTINUE% keyword is not valid inside curly braces, but it can still be used outside curly braces to further modify descriptions. For example:

ItemDisplay[NMAG !RW (fla OR 9fl OR 7fl) SOCK=4]: {%WHITE%Heart of the Oak: %ORANGE%KoVexPulThul}%CONTINUE%
ItemDisplay[NMAG !RW ETH fla SOCK=4]: {%NAME% (best base)}

Above, the description will be "Heart of the Oak: KoVexPulThul (best base)" for an eth 4 socket flail. The %NAME% keyword becomes a replacement token for the description up to that point.

Native ilvl display (as of BH 1.9.9)

The item level is now displayed within the item properties. Similarly, affix level is shown for magic, rare, and crafted quality items. Affix level is only shown if it is different than item level. Additionally, the user must set "Advanced Item Display" and "Show iLvl" for these features to be active. Below shows some rare gloves with item level and affix level display.

image

In-game item filter modes (as of BH 1.9.9)

The in-game menu supports four options for "Filter Level": None, Minimal, Moderate, and Aggressive. It is up to the BH.cfg to set the behavior for the filter modes. There is a new keyword FILTLVL to support these modes. The modes described previously correspond to FILTLVL 0, 1, 2, and 3, respectively.

Here's an example of what can be done using the "Filter Level":

image

The skull cap is blocked when the filter level is set to moderate but not when it is set to None. This is because of the FILTLVL>0 condition in the blocking line.

In-game configurable ping levels (as of BH 1.9.9)

The "Ping Tiers" setting allows the user to control which lines in the config will ping and be drawn on the map. There is a new keyword, TIER-x that supports this. For example:

image

image

Above we set the skull cap as a TIER-2 item. This means that "Ping Tiers" must be set to 2 or more in game in order for this item to ping. The TIER-x command impacts only the map-box and notification. It does not impact the item name. All items with an explicit name or a map condition are whitelisted regardless of the "Ping Tiers" setting in game. In this context "whitelist" means that the named- or mapped-item will always show in-game, even if the config had another line that tried to block the item.

For example, in the following situation, the skull cap would be displayed in game regardless of "Ping Tiers", but it will only notify and map when "Ping Tiers" is set to 2 or more.

ItemDisplay[!RW NMAG skp]: %NAME%%MAP%%TIER-2%
ItemDisplay[!RW NMAG skp]:

If no TIER level is specified, it defaults to TIER-0. This is essentially an unconditional map + notification.

Craft affix level condition and display (as of BH 1.9.9)

There is a new keyword CRAFTALVL that evaluates to the affix level of an item if it were to be crafted by the character holding it. For example, the below displays the new affix level as part of the item description.

 // Magic Amulets [VERBOSE]
 ItemDisplay[MAG amu]: %NAME%{%WHITE%Caster: %ORANGE%Ral %PURPLE%O%WHITE%Perfect %BLUE%Jewel %WHITE%(%CRAFTALVL%)}

image

The keyword can also be used as part of the filter condition. For example:

 // Magic Amulets [VERBOSE]
 ItemDisplay[MAG amu CRAFTALVL>89]: %NAME%%MAP%

Example Configuration

Here is a sample configuration file containing some basic rules that display certain items in purple. Ethereality, sockets, and item level are added to the item name. Inferior items are filtered out. Runes over lem are shown on the map.

//Item Display Configuration
ItemDisplay[tsc]: %GREEN%**%WHITE%TP
ItemDisplay[isc]: %GREEN%**%WHITE%ID
ItemDisplay[vps]: Stam
ItemDisplay[yps]: Anti
ItemDisplay[wms]: Thaw
ItemDisplay[gps]:
ItemDisplay[ops]:
ItemDisplay[gpm]:
ItemDisplay[opm]:
ItemDisplay[gpl]:
ItemDisplay[opl]:
ItemDisplay[hp1]: %RED%**%WHITE%Min Heal
ItemDisplay[hp2]: %RED%**%WHITE%Lt Heal
ItemDisplay[hp3]: %RED%**%WHITE%Heal
ItemDisplay[hp4]: %RED%**%WHITE%Gt Heal
ItemDisplay[hp5]: %RED%**%WHITE%Sup Heal
ItemDisplay[mp1]: %BLUE%**%WHITE%Min Mana
ItemDisplay[mp2]: %BLUE%**%WHITE%Lt Mana
ItemDisplay[mp3]: %BLUE%**%WHITE%Mana
ItemDisplay[mp4]: %BLUE%**%WHITE%Gt Mana
ItemDisplay[mp5]: %BLUE%**%WHITE%Sup Mana
ItemDisplay[rvs]: %PURPLE%**%WHITE%Rejuv
ItemDisplay[rvl]: %PURPLE%**%WHITE%Full
ItemDisplay[aqv]: Arrows
ItemDisplay[cqv]: Bolts
ItemDisplay[key]: Key
ItemDisplay[tes]: Andy*Duriel Essence
ItemDisplay[ceh]: Mephisto Essence
ItemDisplay[bet]: Diablo Essence
ItemDisplay[fed]: Baal Essence

// Ignore all inferior items
ItemDisplay[INF]:

// Runes and gems
ItemDisplay[RUNE<20]: %RUNENUM% - %RUNENAME%
ItemDisplay[RUNE>19]: %PURPLE%%RUNENUM% - %RUNENAME%%MAP%
ItemDisplay[GEM>3]: %PURPLE%%NAME%

// Add ethereality, sockets, ilvl to the name
ItemDisplay[ETH]: Eth %NAME%%CONTINUE%
ItemDisplay[SOCK>0]: %NAME% (%SOCKETS%)%CONTINUE%
ItemDisplay[]: %NAME% L%ILVL%%CONTINUE%

// Polearms
ItemDisplay[WP8 ETH ELT NMAG (SOCK=0 OR SOCK>3) !7o7]: %PURPLE%%NAME%

// Body armor
ItemDisplay[EQ2 ELT ETH NMAG !SUP SOCK=0]: %PURPLE%%NAME%
ItemDisplay[uui !ETH NMAG !SOCK=1 !SOCK=2 DEF>450]: %PURPLE%%NAME%
ItemDisplay[utp !ETH NMAG !SOCK=1 !SOCK=2 DEF>505]: %PURPLE%%NAME%
ItemDisplay[xtp !ETH NMAG !SOCK=1 !SOCK=2 DEF>254]: %PURPLE%%NAME%
ItemDisplay[xtp !ETH NMAG ED>13]: %PURPLE%%NAME%

// Paladin shields
ItemDisplay[CL3 ELT ETH NMAG RES>29 SOCK=0]: %PURPLE%%NAME%
ItemDisplay[CL3 ELT !ETH NMAG RES>39 !SOCK=1 !SOCK=2]: %PURPLE%%NAME%

// Barb helms with +3 BO
ItemDisplay[CL2 ((ILVL>25 SOCK=0) OR SOCK=3) NMAG SK149>2]: %PURPLE%%NAME%

// Druid pelts with +3 tornado
ItemDisplay[CL1 ((ILVL>25 SOCK=0) OR SOCK=3) NMAG SK245>2]: %PURPLE%%NAME%

// Wands with BS/BS capable of 2os
ItemDisplay[WP12 !wnd !9wn !ywn NMAG !SOCK=1 SK84>1 SK93>1]: %PURPLE%%NAME%

// Leaf/memory bases
ItemDisplay[WP11 NMAG (SOCK=0 OR SOCK=2) SK52>2]: %PURPLE%%NAME%
ItemDisplay[WP11 NMAG (SOCK=0 OR SOCK=4) SK58>2]: %PURPLE%%NAME%

// Grand matron bows
ItemDisplay[amc ((SOCK=0 !SUP) OR SOCK=4) NMAG CLSK0=3]: %PURPLE%%NAME%

// Monarch shields
ItemDisplay[uit (SOCK=0 OR SOCK=4) NMAG DEF>145]: %PURPLE%%NAME%

More Information

See the BH 1.9.9 Pre-Release Notes for detailed changes on this release.