Item Filtering

Item filtering allows players to filter out items they don't want to see, and also change the appearance of items that are not filtered out. While there are in-game options for simple item filtering, players can use item filters to customize this to their liking. PD2's Filtering is open-source and based on BH 1.9.9.

For other out-of-game customization options, see Customization.

Filters
Item filters (often called lootfilters) are text files which contain rules for describing how items should be displayed in-game. The default filter only has a few simple rules for adding descriptions to some items (map orbs and stackable gems/runes), and otherwise displays all items the same as they would be in vanilla.

By default, filtering is done using default.filter in the ProjectD2 directory - unless changed, it only has a few simple rules. If loot.filter is present in the same directory, it will be used instead of the default file. If a filter is selected from the launcher, it will be saved in ProjectD2\filters and be used instead via a loot.filter system link from the ProjectD2 directory.

These files will function if encoded in UTF-8 (default), but ANSI encoding is needed to allow special characters to display properly.

Filters can be selected from the launcher and enabled via the in-game Settings menu.

To install manually, download a filter file and save it to Diablo II\ProjectD2\filters\local and then select it from the launcher. Make sure the relevant in-game settings are enabled.

Filter Syntax
Filters contain rules for how items should be displayed in-game. Each rule has Input and Output and follows this basic format:

ItemDisplay[ Input ]: Output

The Input specifies a set of conditions an item must satisfy for the rule to apply to it, and Output specifies the actions (text or keywords) used when a matching item is found.

If a line doesn't follow this format, it won't be considered a rule, which means it won't affect how items will be displayed in-game. If a line is intentionally ignored like this, it should begin with // (double slash) so the computer can ignore it immediately rather than spend time checking the rest of the line to determine whether it's a rule or not.

Filter rules are processed in-order from top to bottom. Items are displayed according to the output of the first rule whose conditions they satisfy. If the matching rule doesn't include %CONTINUE%, the procedure is halted and no additional rules are checked. In this way, rules that are higher than others have higher priority. The only exception is for notification keywords, which apply regardless of where they are in the filter.

The simplest rule is one without any conditions or output. Sans conditions, the rule will apply to all items. Sans output, nothing will be displayed for those items.

hides all items

The next simplest rule is one that displays all items with their default appearances. The output keyword %NAME% refers to an item's default appearance, and varies depending on which item is being shown. All items are displayed by default - the game essentially adds this rule to the bottom of the filter before beginning to process the filter's rules.

displays all items with their default appearances

Conditions
Conditions describe which item(s) the rule should apply to.

Many conditions refer to a single item or item group. These boolean conditions will be either true or false, depending on which item is being looked at.

hides keys (they can still be purchased from merchants)

Value conditions typically refer to the value of a specific property on the item being looked at. They each have three parts: code, comparison operator (<,>,=), and value to compare against.

hides gold stacks if they are less than 100

Rules with multiple conditions may use logic operators (AND,OR,!) to specify how the conditions relate to each other. If no operator is used between conditions, AND will be assumed.

hides regular 1-socket items if the character is above level 10

hides regular 1-socket items if the character is above level 10

To make a rule apply to any item from within a group of conditions, use OR and parentheses.

hides regular boots/gloves/belts if the character is above level 10

Parentheses can help combine conditions in other ways too.

hides gold stacks if they are less than 100, or less than 1000 if the character is above level 50

Negation (sometimes called the "NOT" operator) makes conditions mean the opposite of what they would otherwise. To negate a condition, use "!" in front of it.

hides magic ethereal armor that is not identified

Groups of conditions can be negated in the same way.

hides magic unidentified helms that are not barbarian helms, druid pelts, or elite

Output
A rule's output (text and keywords in the second part of the rule) describe how the matching item(s) should be displayed.

An item's default name can be referenced with the %NAME% keyword and modified by adding text. To shorten a name or change it entirely, write-out the new name instead. Valid text characters include all those in the Basic Latin and Latin-1 Supplement Unicode blocks (except · and ¸).


 * The last three categories require the filter file to be encoded in ANSI rather than the default UTF-8
 * The soft hyphen character doesn't display correctly here

Horadric Malus

Charsi's Horadric Malus

Charsi's Favorite Hammer

Text and keywords can be used together to add extra information, change parts of the name to be different colors, and more. See all keywords below.

displays socketed items with [X] appended in gray, where X is the number of sockets

As with elsewhere, the double slash (//) functions as an in-file way to write comments that will be ignored by the computer.

this rule hides TP scrolls, but can be changed to display them instead by deleting the first //

this "rule" is ignored, but can be quickly re-enabled by deleting the first //

Items can be highlighted by adding spaces to either side of their name, so long as there is a keyword or non-space character between them and the edge of the name. Whitespace surrounding the Output of each rule gets removed prior to evaluation (spaces first, followed by tabs), so tabs are often the best non-space character to use.

adds 1 space of highlighting for runes above #9 (tabs don't display properly on the wiki, so %ORANGE% is used instead)

The %CONTINUE% keyword replaces the contents of %NAME% with the current rule's Output (overwriting the default name or previously stored output) and makes the program continue checking rules. This allows multiple rules to modify an item's appearance based on different conditions.

appends [X] to socketed items, where X is the number of sockets (continues)

prepends eth to ethereal items (continues)

displays all items (with modifications from previous rules)

Without %CONTINUE%, this would require a separate rule for every possible combination of different conditions, the number of rules growing exponentially with each additional condition:

Item descriptions can be modified by using text and keywords within {} (braces). Anything outside the braces applies to the item name while anything inside the braces applies to the item description.

item price is shown in the description like $35000 in dark green''

Item descriptions aren't taken into account when hiding items, so descriptions can still be shown for hidden items if they have one.

items displayed with their descriptions

items hidden but their descriptions still shown

items hidden and their descriptions hidden too

The %CONTINUE% keyword only functions when used outside the braces and applies to both the item name and the item description.

Shows item level in description (continues)

Appends affix level in description with comma separator

The %NL% keyword adds a new line above the previous line and can only be used within item descriptions.

Shows item/affix levels on separate lines in description (same effect as Show iLvl setting)

Filter Strictness
Filter levels can be selected from the in-game settings menu and will change which rules/notifications are enabled based on the FILTLVL/TIER codes used in the filter. By default, there are two levels: "Standard" and "Show All Items". The "Standard" level is the normal filter behavior that would be seen without any filter level changes, whereas "Show All Items" will just prevent any items from being filtered out (hidden).

To enable custom filter levels, use the following format at the top of the filter:

Adds a new filter strictness level named "Custom Level 1"

Adds a new filter strictness level named "Custom Level 2"

In addition to level 0 ("Show All Items") which is always available, up to 9 other levels can be enabled and the order in which they're listed at the top of the filter determines which number will reference them when used with the FILTLVL/TIER codes (e.g. FILTLVL=1 and %TIER-1% for the first custom level).

These codes can be used to create separate versions of the same filter with varying levels of strictness, make separate versions which includes extra info so that players can more easily reference niche item info without it cluttering item tooltips during normal gameplay (the levels could be swapped to when needed), or even combine drastically different filters into one just so they can be more easily swapped between.

Hides Antidote Potions if filter level 2+ is selected

Shows notifications for unidentified magic small charms if filter level 2 or lower is selected (still shows map icons at all levels)

If a rule doesn't include FILTLVL as a condition, it won't be restricted by whatever filter level is selected.

If a rule includes a notification keyword and doesn't include a TIER keyword, it'll act as if %TIER-9% is included - it'll notify at all filter levels instead of being restricted by whatever filter level is selected.

Colors
These keywords change the color for subsequent text. If absent, the item's default color will be used instead.

Some items have their default color built into %NAME%, so their color won't change unless their name is rewritten completely. This is likely unintended behavior, and applies to runes, Standard of Heroes, and the PD2-specific non-equipment items other than map/arena scrolls and jewel fragments.

Worldstone Shard

Worldstone Shard

Value References
In addition to these, keywords for each numbered attribute code also exist. They should have a hyphen between STAT and the number, such as %STAT-18%.

Notification Keywords
These keywords add the item to the notification list and create a minimap icon for it.

The color of the minimap icon corresponds to the keyword's hexadecimal 2-digit color code. The icon may be black (00), green (84), red (62), or any of the other colors shown in the chart image. Note that %MAP% may be used without a 2-digit color code, in which case the icon will use the current text color (or white if no color has been set).

Multiple keywords can be used together to create multi-colored minimap icons.

The 2-digit hexadecimal codes which correspond to the text colors are listed below. Text colors have a solid inner color and their edges are blended to improve readability, so their average colors appear slightly different in some cases.

The following keyword only applies if Detailed Notifications is disabled, which is not recommended. To disable text notifications for items while keeping their minimap icons, use %TIER-0% instead.

The NOTIFY keyword may use a 1-digit color code (0-F) which corresponds to these colors in order: WHITE, RED, GREEN, BLUE, GOLD, GRAY, BLACK, TAN, ORANGE, YELLOW, DARK_GREEN, PURPLE, GREEN, WHITE, BLACK, WHITE. If DEAD is used instead of a color code, the item's notifications will be disabled instead.

Most filters are made to be used with Detailed Notifications, so NOTIFY is incompatible with them. Note that without Detailed Notifications enabled, Drop Notifications will only apply to items when they initially drop (prior to being picked up for the first time).

All notification keywords seem to bypass the normal rule-handling procedure. Normally, the rules are processed top-to-bottom and this process halts when a matching rule (without %CONTINUE%) is found. Notification keywords, however, can apply even after the process has halted. This may be unintended behavior.

Mutable Codes
Contrary to most "immutable" codes which refer to static item properties, these conditions depend on where and how the item is being viewed. Some value conditions such as CLVL and DIFF are also "mutable" in this way. hides keys when playing as an Assassin

Both SHOP and EQUIPPED behave as expected in most scenarios, but they each have a bug associated with them. Most notably, EQUIPPED incorrectly applies to items that begin the game within the multiplayer shared stash.

General Groups
 

Item Rarities
 

Item Tiers
 

Item Properties
 

Weapon Groups
Since WP6 overlaps entirely with both WP5 and WP7 (two very different kinds of weapons), it's rarely useful.

The 1H code is currently bugged and doesn't include Hand Axe.

Info Codes
Since GEM doesn't apply to unstacked Flawless/Perfect gems, individual item codes are needed when referring to them:

displays all flawless gems

displays all perfect gems

There is currently a bug with hiding stacked gems/runes - if the lootfilter attempts to hide them, they'll usually be loaded regardless and appear with an empty name.

Named Attribute Codes
Some attributes (STR, DEX, LIFE, MANA, FRES, CRES, LRES, PRES) can have addition applied between them prior to the condition being evaluated.

appends a red ! to rares with 80+ total resistance

It seems values get converted to unsigned integers before comparison. For negative values, this means that instead of counting backwards from 0, they count backwards from the maximum storeable value (a few billion). The following examples illustrate this point, but they're outdated since medium/heavy armors no longer have movement speed penalties.

hides regular non-elite medium/heavy armors

hides regular non-elite medium/heavy armors

hides regular non-elite medium/heavy armors

Numbered Attribute Codes
The relevant number for each code is shown as N. In many cases, if N is absent, it is either 0 or 1. For codes that refer to attributes which are based on character level, N is often a multiple of Y (+Y per Character Level) such as 8Y for STAT214 or 2Y for STAT224.

Some numbered attribute codes (shown in gray ) refer to the same attributes as named attribute codes or other named codes, which can be used instead for better readability.

 

General
 

Elements
 

Damage
 

Based on Character Level
</li> </ul>

Multi-layered Stats
Some stats have an additional layer that needs to be specified in order for the stat to filter properly. To access these layers, the MULTI condition can be used. The format for this condition is

Below is a list of stats with extra layers:

Group Skills
Also see STAT362-STAT366 (Cold, Fire, Lightning, Poison, Magic)  <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> 

Individual Skills
In addition to these "SK" codes, there are equivalent "CHSK" codes for skill charges and "OS" codes for oskills. For example, CHSK54 refers to skill charges for Teleport. "CHSK" codes for curse charges use separate 'proc' versions of those skills: CHSK445 for Life Tap and CHSK447 for Lower Resist.


 * Skills with gray names are not in the skill tree.
 * Skills with gray codes do not appear on items as pointmods/staffmods under normal circumstances.

 <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Amazon
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Sorceress
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Necromancer
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Paladin
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Barbarian
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Druid
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Assassin
</li> <li style="display:inline-table; margin-left:0px; margin-right:8px;">

Other
</li> 

Value Condition IDs
Certain value conditions (MAPID, PREFIX, SUFFIX, AUTOMOD, STAT360) are slightly different than most others, referring to distinct zone/affix/corruption IDs instead of the value for attributes or other item stats with value ranges. Some other value conditions such as GEMLEVEL, GEMTYPE, RUNE, or DIFF behave in a similar fashion, but their IDs aren't listed in this section due to having relatively few possible values.

MAPID IDs
MAPID refers to the zone (or map) the character is currently in. When using a portal, nearby items are updated before the zone ID so any items within a screen length of the portal will be displayed as if the character was still in the previous zone. If the character walks a couple screen lengths away and returns, the ID will be updated and those items will be displayed as expected.

shows all items in town

hides antidotes at level 90+ unless they're found in Rathma zones

hides keys outside of the cow level

hides player ears within the PvP duel arenas

 <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> 

SUFFIX, PREFIX, and AUTOMOD IDs
SUFFIX refers to the suffixes items have whereas PREFIX refers to the prefixes they have. They're similar to the numbered attribute codes, but refer to affixes rather than affix attributes.

Unlike other value conditions, IDs for SUFFIX and PREFIX are not all mutually exclusive with eachother. Rules can have multiple SUFFIX or PREFIX conditions and still match with valid items.

appends a red ! to rare items that have a chance to cast Amplify Damage on hit and also have Ignore Target's Defense

AUTOMOD functions much the same as SUFFIX and PREFIX.

Two of the three basic comparison operators (< and >) cannot be used with SUFFIX or PREFIX. However, a special comparison operator (~) can be used with them to refer to ID ranges, sometimes referred to as the "BETWEEN" operator. Since multiple PREFIX or SUFFIX conditions are not mutually exclusive with themselves, ID ranges would not be able to be referred to accurately with only < and >. This special operator condenses the ranges to a single condition so that it can be evaluated as either true or fase, and is much more convenient than creating large groups of conditions using only = as comparison operators.

no effect'''

appends +1 to any grand charm with a skill

appends +1 to any grand charm with a skill

External Chart of IDs: Affix IDs

STAT360 IDs
STAT360 refers to which corruption items have.

appends a red * to corrupted items

 <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> 

Source of Information on this Page

Corruption IDs can be determined from PD2's BH files.

See PD2's text files for updated info when game changes are made. The files are best viewed in table format since they are tab-delineated, so they should be opened with Microsoft Excel (or similar programs) or their text should be copy/pasted into a spreadsheet. For convenience, many of the game's text files are also saved on Google Drive: D2 Text File Tables.

Prefix/suffix IDs can be determined from PD2's MagicPrefix.txt and MagicSuffix.txt files. All lines have their own ID except the line between the classic affixes and the expansion affixes, which is skipped. The suffix IDs begin counting from 1 and the prefix IDs continue from where the suffixes end.

Zone IDs can be determined from PD2's Levels.txt file.

If the files in these locations are not updated by others, you can extract them yourself from pd2data.mpq (found in Diablo II/ProjectD2) using an MPQ editor and D2 listfile - the text files will be in /data/global/excel.