Item Filtering: Difference between revisions

s7 changes (beta)
(→‎Colors: Added glide colors)
(s7 changes (beta))
Line 55:
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.
 
<code>ItemDisplay[NMAG AND SOCKSOCKETS=1 AND CLVL>10]:</code> <span style="color:gray;">''hides regular 1-socket items if the character is above level 10''</span>
 
<code>ItemDisplay[NMAG SOCKSOCKETS=1 CLVL>10]:</code> <span style="color:gray;">''hides regular 1-socket items if the character is above level 10 (same as above)''</span>
 
 
Line 76:
 
<code>ItemDisplay[MAG !ID HELM !(BAR OR DRU OR ELT)]:</code> <span style="color:gray;">''hides magic unidentified helms that are not barbarian helms, druid pelts, or elite''</span>
 
 
In addition to the standard comparison operators, value conditions can also be used with the "BETWEEN" operator ('''~''') to specify value ranges.
 
<code>ItemDisplay[NMAG SOCKETS~1-2]:</code> <span style="color:gray;">''hides regular items with 1-2 sockets''</span>
 
<code>ItemDisplay[NMAG SOCKETS>0 SOCKETS<3]:</code> <span style="color:gray;">''hides regular items with 1-2 sockets (same as above)''</span>
 
 
The following attribute codes can have addition applied between them prior to the condition being evaluated: '''STR''', '''DEX''', '''STAT3''' (vitality) '''LIFE''', '''MANA''', '''FRES''', '''CRES''', '''LRES''', '''PRES''', '''EDEF''', '''EDAM''', '''FCR''', '''AR''', '''REPLIFE''', '''STAT60''' (life leech), '''STAT62''' (mana leech)
 
<code>ItemDisplay[RARE FRES+CRES+LRES+PRES>79]: %NAME% %RED%!</code> <span style="color:gray;">''appends a red '''!''' to rares with 80+ total resistance''</span>
 
 
=== 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 [https://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin '''Basic Latin'''] and [https://en.wikipedia.org/wiki/List_of_Unicode_characters#Latin-1_Supplement '''Latin-1 Supplement'''] Unicode blocks (except '''·''' and '''¸''').
 
{| class="wikitable"
Line 97 ⟶ 110:
| space || <code>&nbsp;</code>
|-
| other symbols || <code>µ¶¢£¥®©§¿¡¯¨¬­&#173;¦«»÷×±ªº´¤°¹²³¼½¾·¸</code>
|-
| other capital letters || <code>ÐÞÆØÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝ</code>
Line 104 ⟶ 117:
|}
* 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 herein many places (including this wiki) but does show up in-game
* These characters display as "?" if HD text is disabled: ·¸
* These characters aren't displayed at all if HD text is enabled: ¬­÷±¤ (including soft hyphen)
 
 
Line 116 ⟶ 131:
Text and keywords can be used together to add extra information, change parts of the name to be different colors, and more. See [[Item_Filtering#Output_Keywords | all keywords]] below.
 
<code>ItemDisplay[SOCKSOCKETS>0]: %NAME% %GRAY%[%SOCKETS%]</code> <span style="color:gray;">''displays socketed items with '''[X]''' appended in gray, where X is the number of sockets''</span>
 
 
Line 135 ⟶ 150:
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.
 
<code>ItemDisplay[SOCKSOCKETS>0]: %NAME% [%SOCKETS%]%CONTINUE%</code> <span style="color:gray;">''appends '''[X]''' to socketed items, where X is the number of sockets (continues)''</span>
 
<code>ItemDisplay[ETH]: eth %NAME%%CONTINUE%</code> <span style="color:gray;">''prepends '''eth''' to ethereal items (continues)''</span>
Line 143 ⟶ 158:
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:
 
<code>ItemDisplay[ETH SOCKSOCKETS>0]: eth %NAME% [%SOCKETS%]</code>
 
<code>ItemDisplay[!ETH SOCKSOCKETS>0]: %NAME% [%SOCKETS%]</code>
 
<code>ItemDisplay[ETH SOCKSOCKETS=0]: eth %NAME%</code>
 
<code>ItemDisplay[!ETH SOCKSOCKETS=0]: %NAME%</code>
 
 
Line 173 ⟶ 188:
 
 
The '''''%NL%''''' keyword adds a new line above the previous line and can only be used within item descriptions, or within item names of identified items whose rarity is magic or higher.
 
<code>ItemDisplay[]: %NAME%{Affix Level: %ALVL%%NL%Item Level: %ILVL%}</code> <span style="color:gray;">''Shows item/affix levels on separate lines in description (same effect as '''Show iLvlItem Level''' setting)''</span>
 
<!-- End of "Filter Syntax" category -->
Line 185 ⟶ 200:
To enable custom filter levels, use the following format at the top of the filter:
 
<code>ItemDisplayFilterName[]: CustomLow Level 1Strictness</code> <span style="color:gray;">''Adds a new filter strictness level named "Custom LevelLow 1Strictness"''</span>
 
<code>ItemDisplayFilterName[]: CustomMedium Level 2Strictness</code> <span style="color:gray;">''Adds a new filter strictness level named "Custom LevelMedium 2Strictness"''</span>
 
<code>ItemDisplayFilterName[]: High Strictness</code> <span style="color:gray;">''Adds a new filter strictness level named "High Strictness"''</span>
 
 
Line 237 ⟶ 254:
| %ORANGE% || <span class="d2-orange">Orange</span> || crafted items, endgame quest items, runes
|-
| %CORAL% || <span class="d2-coral">Coral</span> || ''only works with Glide or with HD text enabledcustom''
|-
| %SAGE% || <span class="d2-sage">Sage</span> || ''only works with Glide or with HD text enabledcustom''
|-
| %TEAL% || <span class="d2-teal">Teal</span> || ''only works with Glide or with HD text enabledcustom''
|-
| %LIGHT_GRAY% || <span class="d2-light-gray">Light Gray</span> || ''only works with Glide or with HD text enabledcustom''
|}
* Custom text colors only work with Glide or if HD text is enabled, and will otherwise function the same as '''''%GRAY%'''''
 
Some items have their default color built into '''''%NAME%''''', so their color won't change unless their name is rewritten completely. This is likely [[Bugs|unintended behavior]], and applies to runes, Standard of Heroes, and the PD2-specific non-equipment items other than map/arena scrolls and jewel fragments.
Line 269 ⟶ 287:
|-
| %QTY% || quantity || 0 - 350
|-
| %SOCKETS% || number of sockets || 0 - 6
|-
| %RANGE% || melee range adder || 0 - 5
Line 287 ⟶ 303:
|}
 
InAdditionally, additionkeywords toalso these, keywordsexist for each [[Item_Filtering#Numbered_Attribute_CodesNamed_Attribute_Codes|numberednamed attribute code]] also exist. They should have a hyphen between(except ''STAT'MAXDUR''') and theeach number,[[Item_Filtering#Numbered_Attribute_Codes|numbered suchattribute ascode]]. '''''%STAT-18%'''''.Some examples are:
{| class="wikitable"
! Code !! Output !! Details
|-
| %SOCKETS% || total sockets ||
|-
| %DEF% || total defense ||
|-
| %ED% || enhanced defense/damage || refers to defense for armor,<br>damage for weapons
|-
| %EDEF% || +N% Enhanced Defense ||
|-
| %EDAM% || +N% Enhanced Damage ||
|-
| %AR% || +N to Attack Rating ||
|-
| %RES% || All Resistances +N ||
|-
| %STR% || +N to Strength ||
|-
| %DEX% || +N to Dexterity ||
|-
| %STAT1% || +N to Energy ||
|-
| %STAT3% || +N to Vitality ||
|-
| %STAT36% || Physical Damage Taken Reduced by N% ||
|-
| %STAT58% || +X Poison Damage over Y Seconds<br>''bitrate N = (256X) / (25Y)'' ||
|-
| %STAT60% || N% Life Stolen per Hit ||
|-
| %STAT62% || N% Mana Stolen per Hit ||
|-
| %STAT86% || +N Life after each Kill ||
|-
| %STAT91% || Requirements +N% ||
|-
| %STAT329% || N% to Fire Skill Damage ||
|-
| %STAT330% || N% to Lightning Skill Damage ||
|-
| %STAT331% || N% to Cold Skill Damage ||
|-
| %STAT332% || N% to Poison Skill Damage ||
|-
| %STAT357% || N% to Magic Skill Damage ||
|-
| %SK48% || +N to Nova (Sorceress Only) || see [[Item_Filtering#Multi-layered_Stats|multi-layered stats]]
|}
 
==== Notification Keywords ====
Line 337 ⟶ 402:
| <span class="d2-orange">Orange</span> || 0B || 60
|-
| <span class="d2-coral">Coral</span> || ? || ?
|-
| <span class="d2-sage">Sage</span> || ? || ?
|-
| <span class="d2-teal">Teal</span> || ? || ?
|-
| <span class="d2-light-gray">Light Gray</span> || ? || ?
|}
 
Line 371 ⟶ 436:
| %CONTINUE% || the item is compared against additional rules instead of being displayed by the current rule<br>the current rule's output is stored in %NAME%
|-
| %NL% || specifies a new line, (lines are constructed bottom-up)<br>only works within braces (descriptions) or for '''ID NMAG''' items (identified items which are magic or higher rarity)
|-
| {} || anything within the braces applies to the item's description rather than the item's name/title
Line 405 ⟶ 470:
|}
<code>ItemDisplay[key ASSASSIN]:</code> <span style="color:gray;">''hides keys when playing as an Assassin''</span>
 
Both '''SHOP''' and '''EQUIPPED''' behave as expected in most scenarios, but they each have a [[Bugs|bug]] associated with them. Most notably, '''EQUIPPED''' incorrectly applies to items that begin the game within the multiplayer shared stash.
 
==== Item Group Codes ====
Line 519 ⟶ 582:
|}
Since '''WP6''' overlaps entirely with both '''WP5''' and '''WP7''' (two very different kinds of weapons), it's rarely useful.
 
The '''1H''' code is currently [[Bugs|bugged]] and doesn't include Hand Axe.
 
===== Class-Restricted Item Groups =====
Line 550 ⟶ 611:
! Code !! Description !! Details
|-
| GOLD || Gold || can be hidden, but not modified (always displays as "N Gold")<br>gold is automatically picked up (hiding it does not prevent this)
|-
| <s>GEMLEVEL</s><br>GEM || gem quality level || 1 - 5 (Chipped-Perfect)<br>doesn't apply to ''unstacked'' Flawless/Perfect [[Item_Filtering#Gems|gems]]
|-
| GEMTYPE || gem type || 1 - 7 (Amethyst, Diamond, Emerald, Ruby, Sapphire, Topaz, Skull)
Line 559 ⟶ 620:
|-
| QTY || quantity ||
|-
| DEF || total defense ||
|-
| LVLREQ || level requirement ||
Line 578 ⟶ 637:
| DIFF || difficulty || 0 - 2 (Normal, Nightmare, Hell)
|-
| MAPID || item'scurrent initial locationzone || 1 - 175 (see [[Item_Filtering#MAPID_IDs|details]])
|-
| MAPTIER || map tier || 0 - 45 (PvP, T1, T2, T3, Dungeon, Unique)
|-
| SUFFIXPREFIX || item suffixprefix || 1 - 849805 (see [[Item_Filtering#SUFFIX,_PREFIX,_and_AUTOMOD_IDs|details]])
|-
| PREFIXSUFFIX || item prefixsuffix || 8501 - 1644900 (see [[Item_Filtering#SUFFIX,_PREFIX,_and_AUTOMOD_IDs|details]])
|-
| AUTOMOD || item automod || 16451 - 168844 (see [[Item_Filtering#SUFFIX,_PREFIX,_and_AUTOMOD_IDs|details]])
|-
| FILTLVL || filter strictness level || 0 - 9 (Show All Items, up to 9 custom levels)
|}
Since '''GEM''' doesn't apply to unstacked Flawless/Perfect gems, individual item codes are needed when referring to them:
 
<code>ItemDisplay[(GEM=4 OR gzv OR glw OR glg OR glr OR glb OR gly OR skl)]: %NAME%{%NAME%}</code> <span style="color:gray;">''displays all flawless gems''</span>
 
<code>ItemDisplay[(GEM=5 OR gpv OR gpw OR gpg OR gpr OR gpb OR gpy OR skz)]: %NAME%{%NAME%}</code> <span style="color:gray;">''displays all perfect gems''</span>
 
There is currently a [[Bugs|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.
 
Line 602 ⟶ 655:
! Code !! Description !! Item Appearance !! Details
|-
| SOCKETS<br>SOCK || total sockets || Socketed (N) ||
|-
| DEF || total defense || Defense: N<br>+N Defense ||
|-
| ED || enhanced defense/damage || +N% Enhanced Defense<br>+N% Enhanced Damage || refers to defense for armor,<br>damage for weapons
|-
| EDEF || enhanced defense || +N% Enhanced Defense ||
|-
| EDAM || enhanced damage || +N% Enhanced Damage ||
|-
| MAXDUR || max durability || Increase Maximum Durability N% ||
Line 658 ⟶ 717:
| FOOLS || fool's mod || +X to Attack Rating (Based on Character Level)<br>+Y to Maximum Damage (Based on Character Level) || boolean condition
|}
Some attributes (STR, DEX, LIFE, MANA, FRES, CRES, LRES, PRES) can have addition applied between them prior to the condition being evaluated.
 
<code>ItemDisplay[RARE FRES+CRES+LRES+PRES>79]: %NAME% %RED%!</code> <span style="color:gray;">''appends a red '''!''' to rares with 80+ total resistance''</span>
 
 
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.
 
<code>ItemDisplay[NMAG !ELT (FRW=-5 OR FRW=-10)]:</code> <span style="color:gray;">''hides regular non-elite medium/heavy armors''</span>
 
<code>ItemDisplay[NMAG !ELT FRW>1000]:</code> <span style="color:gray;">''hides regular non-elite medium/heavy armors''</span>
 
<code>ItemDisplay[NMAG !ELT FRW>-20]:</code> <span style="color:gray;">''hides regular non-elite medium/heavy armors''</span>
 
==== Numbered Attribute Codes ====
Line 758 ⟶ 805:
| STAT89 || +N to Light Radius
|-
| STAT91 || Requirements -+N%
|-
| <span style="color:gray;">STAT93</span> || +N% Increased Attack Speed
Line 1,230 ⟶ 1,277:
|-
| style="font-size:90%;" | STAT499 || ''map_glob_add_mon_shriek''
|-
| style="font-size:90%;" | STAT500 || Area Contains a Random Event
|-
|}
Line 1,692 ⟶ 1,741:
 
===== 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- formatif forfollows this condition is <code>MULTI{Stat ID},{Layer ID}>{Value}</code>format:
 
MULTI '''''Stat ID''''' , '''''Layer ID''''' '''''Operator''''' '''''Value'''''
Below is a list of stats with extra layers:
 
Any of the comparison operators ('''<''','''>''','''=''') may be used - below is a list of stats with extra layers:
 
{| class="wikitable"
! Name !! Stat ID !! Layer ID !! Value !! Example
|-
| Class Skill || 83 || [[Item_Filtering#Group_Skills|class_id]] || skill_bonus || <code>MULTI83,2=2</code> ([[Hellfire Torch]] with Necromancer skills)
|-
| O Skill || 97 || [[Item_Filtering#Individual_Skills|skill_id]] || skill_bonus || <code>MULTI97,74=20</code> ([[Corpsemourn]])
Line 1,705 ⟶ 1,756:
| Single Skill || 107 || [[Item_Filtering#Individual_Skills|skill_id]] || skill_bonus || <code>MULTI107,20=3</code> ([[Thunderstroke]])
|-
| Elemental Skill || 126 || elemental_id (<span class="d2-red">1</span>, <span class="d2-yellow">2</span>, <span class="d2-orange">3</span>, <span class="d2-blue">4</span>, <span class="d2-green">5</span>) || skill_bonus || <code>MULTI126,4=2>0</code> ([[Snowclash]])
|-
| Aura when Equipped || 151 || [[Item_Filtering#Individual_Skills|skill_id]] || aura_level || <code>MULTI151,98=8>5</code> ([[Templar's Might]])
|-
| Reanimate as: || 155 || monster_id || % chance || <code>MULTI155,492=6</code> ([[Demon Machine]])
|-
| Class Skill Tab || 188 || [[Item_Filtering#Group_Skills|skilltab_id]] || skill_bonus || <code>MULTI188,25=6>4</code> ([[Cloudcrack]])
|-
| Cast on Attack || 195 || (skill_id * 64) + skill_level || % chance || <code>MULTI195,3028=15</code> ([[Todesfaelle Flamme]])
Line 1,734 ⟶ 1,785:
|-
| Skill on Death (map mod) || 453 || (skill_id * 64) + skill_level || % chance ||
|}
 
There are also alternative ways to replicate what '''MULTI''' does for specific stats:
 
{| class="wikitable"
! Stat !! MULTI !! Alternative !! Example
|-
| Clss Skill || MULTI83 || CLSK || <code>CLSK2=2</code> ([[Hellfire Torch]] with Necromancer skills)
|-
| O Skill || MULTI97 || OS || <code>OS74=20</code> ([[Corpsemourn]])
|-
| Single Skill || MULTI107 || SK || <code>SK20=3</code> ([[Thunderstroke]])
|-
| Class Skill Tab || MULTI188 || TABSK || <code>TABSK25>4</code> ([[Cloudcrack]])
|}
 
Line 2,171 ⟶ 2,236:
|-
| SK155 || Battle Command
|-
| SK368 || Deep Wounds
|}
</li>
Line 2,734 ⟶ 2,801:
|-
| 175 || Ashen Plains
|-
| 176 || Zhar's Sanctum
|-
| 177 || Hidden Waterways
|-
| 178 || Colonnades of Madness
|-
| 179 || Counselor's Causeway
|-
| 180 || Stygian Caverns
|-
| 181 || Stronghold of Acheron
|}
</li>
Line 2,747 ⟶ 2,826:
AUTOMOD functions much the same as SUFFIX and PREFIX.
 
Two of the three basic comparison operators ('''<''' and '''>''') cannot be reliably used with SUFFIX or PREFIX. However, abut specialthe "BETWEEN" comparison operator ('''~''') canworks be usedwell with them to- referit towas IDactually ranges,developed sometimesspecifically referredfor to as the "BETWEEN" operatorthem. 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 '''>'''. ThisThe special"BETWEEN" 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.
 
<code>ItemDisplay[cm3 PREFIX>1278 PREFIX<1354]: %NAME% +1</code> <span style="color:gray;">''no effect (don'''t use)''</span>
 
<code>ItemDisplay[cm3 (PREFIX=1279 OR PREFIX=1280 OR PREFIX=1281 OR PREFIX=1291 OR PREFIX=1292 OR PREFIX=1293 OR PREFIX=1303 OR PREFIX=1304 OR PREFIX=1305 OR PREFIX=1315 OR PREFIX=1316 OR PREFIX=1317 OR PREFIX=1327 OR PREFIX=1328 OR PREFIX=1329 OR PREFIX=1339 OR PREFIX=1340 OR PREFIX=1341 OR PREFIX=1351 OR PREFIX=1352 OR PREFIX=1353)]: %NAME% +1</code> <span style="color:gray;">''appends '''+1''' to any grand charm with a skill''</span>
 
<code>ItemDisplay[cm3 PREFIX~1279-1353]: %NAME% +1</code> <span style="color:gray;">''appends '''+1''' to any grand charm with a skill (same as above)''</span>
 
External Chart of IDs: [https://docs.google.com/spreadsheets/d/1J5_V3bIloualyzb5_lDFueSSCcQyyPEkKYvoQR9Ve9Y/ Affix IDs]