Guide to Special Itemtypes
Moderator: Nizari
Guide to Special Itemtypes
There are a handful of hardcoded itemtypes which give special functionality. This functionality can usually be passed off as long as an item has it as a type/type2, or the type/type2 links to the type as an equiv1/equiv2 in itemtypes.txt.
For example, in vanilla the Large Axe has type=axe. If we go to itemtypes.txt and give axe's equiv2=shie, then Large Axes will become shields (that is, they will be able to block hits and deal smite damage and deal two-handed damage!).
THANKS:
Nagahaku for finding that the damage-zeroing-out behavior is given by 'armo' and not 'shld', and that 'shld' and not 'shie' makes items into shields; that bow/xbow allow quivers to be highlight-displayed when equipped; that hirelings can only drink hpot, wpot and apot.
---
[shld] ID=51
•Functionality seems to pass if type=shld, or if the type links to shld via equivs (type2 seems to work).
•Required to block (must also be equipped on larm or rarm).
•Displays chance to block.
•Displays string ItemStats1o="Smite Damage:" and the item's base mindamage to maxdamage range.
•Uses 'mindamage' and 'maxdamage' columns as smite damage.
•Can be used to make any weapon block.
[shie] ID=2
•Any items with this itemtype can be equipped by Iron Wolf Hirelings in their left-arm/right equipment slot.
[tors] ID=3
•Any items with this itemtype can be equipped by ANY Hirelings.
[helm] ID=37
•Any items with this itemtype can be equipped by ANY Hirelings.
[play] ID=7
•Use at your own risk, will corrupt character if the item is created by the cube. Causes a crash if the item is generated by a vendor. {Probably causes a crash if the item is spawned by a monster. Only safe usage is likely for ears dropped from murdered players.}
•Only applies if item generates of normal quality (damaged, magic, rare, etc will not have this), changes and adds item description strings.
•Line 1, item name, will have 's put before the item name (the name of the murdered player, or blank if not taken from a murdered player).
•Line 2 will be the class of the murdered player or from the player who cubed the item into existence, using the same class strings as on the LCS.
•Line 3 will display the former player's character level (will be = 0 if generated by cube)
[char] ID=13
•Displays the string Charmdes="Keep in Inventory to Gain Bonus" on the same line as attack speed.
•Item will gives its stats when placed in the inventory (note that weapons will even give their damage values globally to the user).
•Charms can be restricted based on strength/dexterity, but as long as the charm is currently equipped it won't be unequipped if your strength/dexterity falls below requirements.
[boot] ID=15
•Displays string ModStre10k="Kick Damage:" with a range of the item's base mindamage to maxdamage.
•Display only appears for Assassins.
•Does not control kick damage, kick damage can be given without this itemtype (kick damage is the base mindamage to maxdamage of the item equipped in the feet slot, a hand axe that can be equipped in the feet slot would give kick damage, although it would not display the kick damage; it would also allow for item_kickdamage to apply twice).
[book] ID=18
•If type2=book, erases the name of the item, presumably has a special naming system. {???}
•If type=book, it erases the entire item description and replaces it with:
line 1=erased name
line 2=string.tbl(2206)=InsertScrolls=Insert Scrolls
line3=string.tbl(2203)=RightClicktoUse=Right Click to Use
•Seems useless for softcoding purposes, functionality of Tome of Town Portal and Tome of Identify is hardcoded.
•If type≠book, then the Tome of Town Portal/Identify will be fully consumed on use (that is, type=book is required for these tomes to be used multiple times).
[belt] ID=19
•Requires type of the item to function (as in, this behavior cannot be passed down the itemtypes chain nor with type2, it must have type=belt).
•If type≠belt, then you will only be able to see the first potion row (the other rows will still exist and be functional, it's just that the UI breaks).
•When equipped in bodyloc=belt, it will apply the item's belt ID, which determines belt row menu.
[armo] ID=50
•Seems to be mutually exclusive with the itemtype weap.
•The item's speed column gives -# to velocitypercent (so if speed=-50, you gain +50 velocitypercent).
•Displays:
◦String ItemStats1h="Defense:" if the item has any defense.
◦String ItemStats1e="Required Strength:" if reqstr>0.
◦String ItemStats1f="Required Dexterity:" if reqdex>0.
◦String ItemStats1d="Durability:" if durability>0, which has the durability to maxdurability as a range.
◦Number of sockets on the item, displaying: Socketed (#). Where Socketed is from the string of the same name, and # is the number of item_numsocket on the item.
•Will set damage values of a weapon to 0, unless you have at least +1% Enhanced Damage on the weapon.
[weap] ID=45
•Seems to be mutually exclusive with the itemtype armo.
•The item's speed column gives -# to attackrate (so if speed=-50, you gain +50 attackrate).
•Displays:
◦String ItemStats1l="One-Hand Damage:" and the mindamage to maxdamage range (if 2handed=0 or 1or2handed=1 and you are a Barbarian).
◦String ItemStats1m="Two-Hand Damage:" and the secondary_mindamage to secondary_maxdamage range (if 2handed=1 or 1or2handed=1 and you are a Barbarian).
◦String ItemStats1e="Required Strength:" if reqstr>0.
◦String ItemStats1f="Required Dexterity:" if reqdex>0.
◦String ItemStats1d="Durability:" if durability>0, which has the durability to maxdurability as a range.
◦Strings WeaponAttackVeryFast="Very Fast Attack Speed", WeaponAttackFast="Fast Attack Speed", WeaponAttackNormal="Normal Attack Speed", WeaponAttackSlow="Slow Attack Speed", WeaponAttackVerySlow="Very Slow Attack Speed", depending on the weapon's total attack speed and the character's animdata breakpoints.
◦A WeaponDesc string, if the item has an itemtype with a weapon class.
◦Number of sockets on the item, displaying: Socketed (#). Where Socketed is from the string of the same name, and # is the number of item_numsocket on the item.
[staf] ID=26
•Displays the string WeaponDescStaff="Staff Class" on the same line as attack speed.
[axe] ID=28
•Displays the string WeaponDescAxe="Axe Class" on the same line as attack speed.
[swor] ID=30
•Displays the string WeaponDescSword="Sword Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Iron Wolf Hirelings and Barbarian Hirelings.
[knif] ID=32
•Displays the string WeaponDescDagger="Dagger Class" on the same line as attack speed.
[spea] ID=33
•Displays the string WeaponDescSpear="Spear Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Desert Mercenary Hirelings.
[pole] ID=34
•Displays the string WeaponDescPoleArm="Polearm Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Desert Mercenary Hirelings.
[bow] ID=27
•If you are equipping an item with this type, then a quiver will be displayed while equipped and highlighted.
•Displays the string WeaponDescBow="Bow Class" on the same line as attack speed.
•For a weapon to shoot as a bow, it must have:
◦Type links to bow at some point
◦wclass or 2handedwclass=bow
•Any items with this itemtype can be equipped by Rogue Hirelings.
[xbow] ID=35
•If you are equipping an item with this type, then a quiver will be displayed while equipped and highlighted.
•Displays the string WeaponDescCrossBow="Crossbow Class" on the same line as attack speed.
•For a weapon to shoot as a crossbow, it must have:
◦Type links to xbow at some point
◦wclass or 2handedwclass=xbow
[tpot] ID=38
•Type=tpot or throwing potions will not function properly: they will not arc, and they will detonate at end of range instead of at selected location. Equivs do not work, type2 does not work, Tpot must be directly connected via Type (this isn't that big of a deal since you can probably simulate throwing potion behavior with a skill that drains potion count per use).
•Displays the string WeaponDescThrowPotion="Equip to Throw" on the same line as attack speed.
•Adds a line displaying Quantity.
•Adds a line displaying Throw Damage, which is based on the missiletype column, which references a missile from missiles.txt, showing the damage range as the summation of physical and elemental damage.
•Removes the display for all other damage.
•Prevents the use of Attack.
•Item will not drop from autoTC.
•Item will not deal srcdam.
•Missiles will detonate at selected location, although cltside might not coincide.
[jave] ID=44
•Displays the string WeaponDescJavelin="Javelin Class" on the same line as attack speed.
[blun] ID=57
•Displays the string WeaponDescMace="Mace Class" on the same line as attack speed.
•If type1 is equivalent to blun at some point, the item gains +50% damage to undead.
[h2h] ID=67
[h2h2] ID=88
•Displays the string WeaponDescH2H="Claw Class" on the same line as attack speed.
•If the user has the Assassin token and is dual-wielding h2h and/or h2h2, then passive_weaponblock (the stat used by Weapon Block) will make block attempts.
[gem] ID=20
•{Crashes the game when added as type2 for Axe. Probably gets angry when the item has save bits and/or lacks an entry in gems.txt}
•Required for an item to make use of gems.txt socketable behavior
[sock] ID=53
•If applied via type/type2 or via equiv inheritance, the item will be able to be socketed into item sockets.
•Even works in absurd cases, like if you give helmets this itemtype, you'll be able to socket Caps into Caps.
•If you put Socketed Item 1 into Socketed Item 2, Socketed Item 2 will have its sockets + the number of sockets from Socketed Item 1. So if you insert a 6-socket-Phase-Blade-1 into 6-socket-Phase-Blade-2, then 6-socket-Phase-Blade-1 will have 12 sockets. This allows you to bypass the normal hardcoded limit of 6 sockets on an item.
•Items with this type will display string ExInsertSocketsX="Can be Inserted into Socketed Items"
[poti] ID=9
[scro] ID=22
[misl] ID=56
•Item can be picked up with Telekinesis.
[gold] ID=4
•Item can be picked up with Telekinesis.
•If type=gold, then the item will be converted into the 'gold' stat when picked up.
•If type=gold, then the item's name string will be changed into: "X (namestr)"
•Basically, if type=gold, the item becomes functionally identical to gold.
[key] ID=41
•Item can be picked up with Telekinesis.
•When in the inventory, will be consumed to open Locked Chests.
[body] ID=40
•Item has a prefix based on its creator (for example, a Hand Axe sold by Charsi will be a Charsi Hand Axe).
•Prefix only applies to normal items: damaged, superior, magic, tempered, rare, crafted, unique and set items will not have the body prefix.
[jewl] ID=58
•If type=jewl, then item cannot roll more than 4 affixes (type2 does not pass the behavior, type equivs do not pass either: no inheritance)
•This is the only thing keeping Jewels from having 6 affixes, so you can easily softcode in 6 affix jewels
[hpot] ID=77
[apot] ID=81
[wpot] ID=82
•Must have type=hpot or apot or wpot for hirelings to be able to drink a potion.
{how does potion stacking work? probly based on itype}
For example, in vanilla the Large Axe has type=axe. If we go to itemtypes.txt and give axe's equiv2=shie, then Large Axes will become shields (that is, they will be able to block hits and deal smite damage and deal two-handed damage!).
THANKS:
Nagahaku for finding that the damage-zeroing-out behavior is given by 'armo' and not 'shld', and that 'shld' and not 'shie' makes items into shields; that bow/xbow allow quivers to be highlight-displayed when equipped; that hirelings can only drink hpot, wpot and apot.
---
[shld] ID=51
•Functionality seems to pass if type=shld, or if the type links to shld via equivs (type2 seems to work).
•Required to block (must also be equipped on larm or rarm).
•Displays chance to block.
•Displays string ItemStats1o="Smite Damage:" and the item's base mindamage to maxdamage range.
•Uses 'mindamage' and 'maxdamage' columns as smite damage.
•Can be used to make any weapon block.
[shie] ID=2
•Any items with this itemtype can be equipped by Iron Wolf Hirelings in their left-arm/right equipment slot.
[tors] ID=3
•Any items with this itemtype can be equipped by ANY Hirelings.
[helm] ID=37
•Any items with this itemtype can be equipped by ANY Hirelings.
[play] ID=7
•Use at your own risk, will corrupt character if the item is created by the cube. Causes a crash if the item is generated by a vendor. {Probably causes a crash if the item is spawned by a monster. Only safe usage is likely for ears dropped from murdered players.}
•Only applies if item generates of normal quality (damaged, magic, rare, etc will not have this), changes and adds item description strings.
•Line 1, item name, will have 's put before the item name (the name of the murdered player, or blank if not taken from a murdered player).
•Line 2 will be the class of the murdered player or from the player who cubed the item into existence, using the same class strings as on the LCS.
•Line 3 will display the former player's character level (will be = 0 if generated by cube)
[char] ID=13
•Displays the string Charmdes="Keep in Inventory to Gain Bonus" on the same line as attack speed.
•Item will gives its stats when placed in the inventory (note that weapons will even give their damage values globally to the user).
•Charms can be restricted based on strength/dexterity, but as long as the charm is currently equipped it won't be unequipped if your strength/dexterity falls below requirements.
[boot] ID=15
•Displays string ModStre10k="Kick Damage:" with a range of the item's base mindamage to maxdamage.
•Display only appears for Assassins.
•Does not control kick damage, kick damage can be given without this itemtype (kick damage is the base mindamage to maxdamage of the item equipped in the feet slot, a hand axe that can be equipped in the feet slot would give kick damage, although it would not display the kick damage; it would also allow for item_kickdamage to apply twice).
[book] ID=18
•If type2=book, erases the name of the item, presumably has a special naming system. {???}
•If type=book, it erases the entire item description and replaces it with:
line 1=erased name
line 2=string.tbl(2206)=InsertScrolls=Insert Scrolls
line3=string.tbl(2203)=RightClicktoUse=Right Click to Use
•Seems useless for softcoding purposes, functionality of Tome of Town Portal and Tome of Identify is hardcoded.
•If type≠book, then the Tome of Town Portal/Identify will be fully consumed on use (that is, type=book is required for these tomes to be used multiple times).
[belt] ID=19
•Requires type of the item to function (as in, this behavior cannot be passed down the itemtypes chain nor with type2, it must have type=belt).
•If type≠belt, then you will only be able to see the first potion row (the other rows will still exist and be functional, it's just that the UI breaks).
•When equipped in bodyloc=belt, it will apply the item's belt ID, which determines belt row menu.
[armo] ID=50
•Seems to be mutually exclusive with the itemtype weap.
•The item's speed column gives -# to velocitypercent (so if speed=-50, you gain +50 velocitypercent).
•Displays:
◦String ItemStats1h="Defense:" if the item has any defense.
◦String ItemStats1e="Required Strength:" if reqstr>0.
◦String ItemStats1f="Required Dexterity:" if reqdex>0.
◦String ItemStats1d="Durability:" if durability>0, which has the durability to maxdurability as a range.
◦Number of sockets on the item, displaying: Socketed (#). Where Socketed is from the string of the same name, and # is the number of item_numsocket on the item.
•Will set damage values of a weapon to 0, unless you have at least +1% Enhanced Damage on the weapon.
[weap] ID=45
•Seems to be mutually exclusive with the itemtype armo.
•The item's speed column gives -# to attackrate (so if speed=-50, you gain +50 attackrate).
•Displays:
◦String ItemStats1l="One-Hand Damage:" and the mindamage to maxdamage range (if 2handed=0 or 1or2handed=1 and you are a Barbarian).
◦String ItemStats1m="Two-Hand Damage:" and the secondary_mindamage to secondary_maxdamage range (if 2handed=1 or 1or2handed=1 and you are a Barbarian).
◦String ItemStats1e="Required Strength:" if reqstr>0.
◦String ItemStats1f="Required Dexterity:" if reqdex>0.
◦String ItemStats1d="Durability:" if durability>0, which has the durability to maxdurability as a range.
◦Strings WeaponAttackVeryFast="Very Fast Attack Speed", WeaponAttackFast="Fast Attack Speed", WeaponAttackNormal="Normal Attack Speed", WeaponAttackSlow="Slow Attack Speed", WeaponAttackVerySlow="Very Slow Attack Speed", depending on the weapon's total attack speed and the character's animdata breakpoints.
◦A WeaponDesc string, if the item has an itemtype with a weapon class.
◦Number of sockets on the item, displaying: Socketed (#). Where Socketed is from the string of the same name, and # is the number of item_numsocket on the item.
[staf] ID=26
•Displays the string WeaponDescStaff="Staff Class" on the same line as attack speed.
[axe] ID=28
•Displays the string WeaponDescAxe="Axe Class" on the same line as attack speed.
[swor] ID=30
•Displays the string WeaponDescSword="Sword Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Iron Wolf Hirelings and Barbarian Hirelings.
[knif] ID=32
•Displays the string WeaponDescDagger="Dagger Class" on the same line as attack speed.
[spea] ID=33
•Displays the string WeaponDescSpear="Spear Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Desert Mercenary Hirelings.
[pole] ID=34
•Displays the string WeaponDescPoleArm="Polearm Class" on the same line as attack speed.
•Any items with this itemtype can be equipped by Desert Mercenary Hirelings.
[bow] ID=27
•If you are equipping an item with this type, then a quiver will be displayed while equipped and highlighted.
•Displays the string WeaponDescBow="Bow Class" on the same line as attack speed.
•For a weapon to shoot as a bow, it must have:
◦Type links to bow at some point
◦wclass or 2handedwclass=bow
•Any items with this itemtype can be equipped by Rogue Hirelings.
[xbow] ID=35
•If you are equipping an item with this type, then a quiver will be displayed while equipped and highlighted.
•Displays the string WeaponDescCrossBow="Crossbow Class" on the same line as attack speed.
•For a weapon to shoot as a crossbow, it must have:
◦Type links to xbow at some point
◦wclass or 2handedwclass=xbow
[tpot] ID=38
•Type=tpot or throwing potions will not function properly: they will not arc, and they will detonate at end of range instead of at selected location. Equivs do not work, type2 does not work, Tpot must be directly connected via Type (this isn't that big of a deal since you can probably simulate throwing potion behavior with a skill that drains potion count per use).
•Displays the string WeaponDescThrowPotion="Equip to Throw" on the same line as attack speed.
•Adds a line displaying Quantity.
•Adds a line displaying Throw Damage, which is based on the missiletype column, which references a missile from missiles.txt, showing the damage range as the summation of physical and elemental damage.
•Removes the display for all other damage.
•Prevents the use of Attack.
•Item will not drop from autoTC.
•Item will not deal srcdam.
•Missiles will detonate at selected location, although cltside might not coincide.
[jave] ID=44
•Displays the string WeaponDescJavelin="Javelin Class" on the same line as attack speed.
[blun] ID=57
•Displays the string WeaponDescMace="Mace Class" on the same line as attack speed.
•If type1 is equivalent to blun at some point, the item gains +50% damage to undead.
[h2h] ID=67
[h2h2] ID=88
•Displays the string WeaponDescH2H="Claw Class" on the same line as attack speed.
•If the user has the Assassin token and is dual-wielding h2h and/or h2h2, then passive_weaponblock (the stat used by Weapon Block) will make block attempts.
[gem] ID=20
•{Crashes the game when added as type2 for Axe. Probably gets angry when the item has save bits and/or lacks an entry in gems.txt}
•Required for an item to make use of gems.txt socketable behavior
[sock] ID=53
•If applied via type/type2 or via equiv inheritance, the item will be able to be socketed into item sockets.
•Even works in absurd cases, like if you give helmets this itemtype, you'll be able to socket Caps into Caps.
•If you put Socketed Item 1 into Socketed Item 2, Socketed Item 2 will have its sockets + the number of sockets from Socketed Item 1. So if you insert a 6-socket-Phase-Blade-1 into 6-socket-Phase-Blade-2, then 6-socket-Phase-Blade-1 will have 12 sockets. This allows you to bypass the normal hardcoded limit of 6 sockets on an item.
•Items with this type will display string ExInsertSocketsX="Can be Inserted into Socketed Items"
[poti] ID=9
[scro] ID=22
[misl] ID=56
•Item can be picked up with Telekinesis.
[gold] ID=4
•Item can be picked up with Telekinesis.
•If type=gold, then the item will be converted into the 'gold' stat when picked up.
•If type=gold, then the item's name string will be changed into: "X (namestr)"
•Basically, if type=gold, the item becomes functionally identical to gold.
[key] ID=41
•Item can be picked up with Telekinesis.
•When in the inventory, will be consumed to open Locked Chests.
[body] ID=40
•Item has a prefix based on its creator (for example, a Hand Axe sold by Charsi will be a Charsi Hand Axe).
•Prefix only applies to normal items: damaged, superior, magic, tempered, rare, crafted, unique and set items will not have the body prefix.
[jewl] ID=58
•If type=jewl, then item cannot roll more than 4 affixes (type2 does not pass the behavior, type equivs do not pass either: no inheritance)
•This is the only thing keeping Jewels from having 6 affixes, so you can easily softcode in 6 affix jewels
[hpot] ID=77
[apot] ID=81
[wpot] ID=82
•Must have type=hpot or apot or wpot for hirelings to be able to drink a potion.
{how does potion stacking work? probly based on itype}
Last edited by Cypress on Sat Jun 22, 2024 7:31 pm, edited 27 times in total.
Re: Guide: Special itypes
Great info, thanks!
Re: Guide to Special Itemtypes
Hi, i have just tested, if you give "shld" instead of "shie" to a weapon, its damage will not turn to 0 but block function works.
Re: Guide to Special Itemtypes
Hey Nagahaku, I can't get that to work. I tried using a Large Axe with type2=shld, and the damage still turns to 0 unless I add some +enhanced damage%. It is good to know that it is shld, and not shie, that turns the item into a blocking version, thank you!
Re: Guide to Special Itemtypes
Sorry that I forgot some thing... i erased the "armo" equiv from "shld" before using that. what made damage turns 0 is the "armo" type...
and, it seems that by using "shld" without "armo", the weapon's blocking chance can't be set by "block" column, always minimum, but works.
Re: Guide to Special Itemtypes
Nagahaku, that's perfect, thanks for figuring that out! Will just have to shuffle around the 'armo' type so that all the shields that should have that type will still have that type after it is deleted from 'shld'.
Re: Guide to Special Itemtypes
found something funny.
you can feed type hpot, apot and wpot to mercs.
mercs won't consume a rpot without equiv or type2 as above.
you can feed type hpot, apot and wpot to mercs.
mercs won't consume a rpot without equiv or type2 as above.
Re: Guide to Special Itemtypes
Nice find Nagahaku! It has been added to the list. I never really thought about why mercs can eat some potions and can't eat others, so it's interesting to know what really controls it.