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.8.

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\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 Conditions and Actions and follows this basic format:

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.

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 Actions 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 actions. Sans conditions, the rule will apply to all items. Sans actions, 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 action 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

Actions
Actions 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 ¸).

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 Actions 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 Actions (overwriting the default name or previously stored actions) 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 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
This is an upcoming feature that will be available in season 5.

Filter strictness 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 of strictness: "Standard" and "No Filtering". The "Standard" level is the normal filter behavior that would be seen without any filter strictness changes, whereas "No Filtering" will just prevent any items from being filtered out (hidden).

To enable custom filter strictness 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 the "No Filtering" level which is always available, up to 9 other levels can be enabled and the order in which they're listed determines which number will reference them when used with the FILTLVL/TIER codes (e.g. FILTLVL=1 and %TIER-1% for the first level).

Hides Antidote Potions if strictness level 2+ is selected

Shows notifications for unidentified magic small charms if strictness level 2 or lower 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

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 2-digit color code. The icon may be black (00), bright green (84), red (62), or any of the other colors shown in the chart. 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 following keyword only applies if Item Detailed Notifications are disabled.

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 Item Detailed Notifications, so NOTIFY is incompatible with them. Note that without Item Detailed Notifications enabled, Item 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

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.

Gems
Also see GEMLEVEL and GEMTYPE

Runes
Also see RUNE

Quest Items
     
 * Unique quest items (not essences/tokens or uber keys/organs) cannot be sold so they have no price

PD2 Items
  </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> </ul>

 <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> </ul>
 * FILTLVL is a new code that can be used to create multiple filter versions with different strictness levels or other variations (see new category above)
 * %TIER-X% is a new keyword (X is 0-9) that can be used to disable text notifications for filter levels above X - if left out, %TIER-9% will be assumed (so that the text notifications apply at all levels)
 * Note: Minimap icons are not disabled, so for filter levels 1-9, items can be shown with map icons only (may be useful for items that would be too spammy with text notifications but are still desireable)


 * STAT486 will refer to whether an item is "mirrored" with Lilith's Mirror (may be useful for preventing cube recipes from showing on mirrored items since they can't be affected by any)

Other Notes for Season 5 which may be relevant for filters:
 * Gold that is hidden will no longer be picked up automatically (auto-gold-pickup will be handled client-side instead of on the server so it can be done faster with better performance)
 * New Uniques
 * Occultist, Crusader Gauntlets (utg)
 * Odium, Colossus Sword (7fb)
 * Zerae's Resolve, Matriarchal Pike (ame)
 * Merman's Socket, Wyrmhide Boots (ulb)
 * Martyrdom, Overseer Skull (ned)
 * Brimstone Rain, Shillelagh (6bs)
 * Akarat's Devotion, Seraph Rod (7qs)
 * Stalker's Cull, Runic Talons (7tw)
 * Raekor's Virtue, Guardian Crown (baf)
 * Purgatory, Archon Plate (utp)
 * Ursa's Nightmare, Dream Spirit (drf)
 * Runewords
 * Zenith runeword can be made in any bow/crossbow (instead of just Amazon bows) as well as spears/polearms
 * Unending Will runeword name changed to Dominion
 * New Runewords
 * Unbending Will, 6-socket swords (Fal+Io+Ith+Eld+El+Hel)
 * Obsession, 6-socket staves (Zod+Ist+Lem+Lum+Io+Nef)
 * Mist, 5-socket bows/crossbows (Cham+Shael+Gul+Thul+Ith)
 * Flickering Flame, 3-socket helms (Nef+Pul+Vex)
 * Wisdom, 3-socket helms (Pul+Ith+Eld)
 * Rampage, 4-socket spears/polearms/staves (Shael+El+Ith+Eth)
 * Neophyte, 2-socket clubs/scepters/claws/orbs/staves (Thul+Tir)
 * Uber-Related
 * Keys have been reverted back to their original drop rates and organs back to 100% droprates
 * Ingredients for Vision of Terror (DClone) are roughly twice as common
 * Ingredients for Voidstone (Rathma) are roughly 8x as common
 * Prime Evil Soul removed from Voidstone recipe
 * Tainted Worldstone Shards can now brick Annihilus again (20% chance)
 * Minions and mercs die when entering diablo clone or rathma
 * Various item balance changes
 * Flat elemental damage on charms increased
 * Large charms can now roll up to 4% elemental damage
 * Rare jewels now always roll 4 affixes
 * Rare equipment now rolls a minimum of 4 affixes at ilvl 45+, 5 affixes at ilvl 65+ and 6 affixes at ilvl 85+
 * Rare equipment can now be used in crafting recipes
 * Repair cost of superior items reduced
 * Base damage of weapons increased and ethereal bonus changed from 50% to 25% so that there's less of a gap between non-eth and eth weapons
 * Base defense of armors may be adjusted if there's time
 * Lower resist wands will now roll with level 15 lower resist (80 charges)
 * Boots Base Damage
 * Heavy boots kick damage increased from 4-10 to 4-12
 * Chain Boots kick damage increased from 6-12 to 6-14
 * Light plated boots kick damage increasd from 8-16 to 8-18
 * Demonhide boots kick damage increased from 26-46 to 30-64
 * Sharkskin boots kick damage increased from 28-50 to 32-72
 * Mesh Boots kick damage increased from 23-52 to 35-78
 * Battle boots kick damage increased from 37-64 to 42-84
 * War boots kick damage increased from 39-80 to 45-90
 * Wyrmhide boots kick damage increased from 65-100 to 75-100
 * Scarabshell Boots kick damage increased from 60-110 to 70-110
 * Boneweave boots kick damage increased from 69-118 to 80-125
 * Mirrored boots kick damage increasd from 50-145 to 69-147
 * Myrmidon greaves kick damage increased from 83-149 to 83 to 155
 * Other
 * Maps now require level 80 and hell mode ancients quest to enter
 * The new unique tp book Horadric Navigator can now be used infinitely with hel rune + town portal scroll recipes as a substitute for the town portal scroll

Misc
 <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </li> <li style="display:inline-table; margin-left:0px; margin-right:8px;"> </i> </ul>
 * Tome of Town Portal and Tome of Identify can only have their name modified, not their description

Info Codes
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.  <li style="display:inline-table; margin-left:0px; margin-right:8px;">

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

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

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

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

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, STAT360) are slightly different than most others, referring to distinct area/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 area/map the character was in when the item was loaded by the game. Items don't get re-loaded when changing areas, so this condition does not necessarily refer to the character's current location.

shows all items from towns, including shopped items and any items in character inventories/stashes when the game began

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

hides keys unless they were found within the cow level

hides player ears found 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> 

These area/map IDs can be determined from PD2's Levels.txt file.

SUFFIX and PREFIX 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

These suffix/prefix IDs can be determined from PD2's MagicSuffix.txt and MagicPrefix.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.

STAT360 IDs
STAT360 refers to which corruption items have.

changes corrupted items to be red

 <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> 

These corruption IDs can be determined from PD2's BH files.