Changes

ADVERTISEMENT
From Diablo Wiki
Jump to: navigation, search

Item Generation Tutorial

19,146 bytes added, 13:26, 11 May 2008
no edit summary
=1. Basics=
The goal of most players in ''Diablo II'' is to kill enemies while staying alive. There are three things that largely determine how effective your character is at this goal:
=2. Terminology=
* '''Item Type:''' The kind of item; a cap, a gem, a short sword, a ring, etc.
* '''SP:'''Single Player mode.
=3. Short Explanation of Drop Process=
When you kill a monster or open a chest the game may generate items to reward you. The properties of these items are generated at that moment, even though the item may be unidentified. The game creates dropped items with algorithm of such kind:
# selects item properties
=4.Game Data Files=
This section discusses the data files that are used in item generation process.
Many parameters of drops are stored in txt files, that are packed to MPQ files when ''Diablo II'' is installed. If you have installed [[ATMA]] you may find that files unpacked in its data folder. These files are stored in CSV format, a plain text format that may be viewed with Excel or OpenOffice.org. You do not need to know everything about these complicated files to be effective in item hunting, but it will help if you know something about their structure. Truly dedicated item hunters will want to dig deeper into the files, and will find the D2 file guides posted at the Phrozen Keep, of value.
==4.1. TreasureClassEx.txt==
This is the most important file. It organizes all droppable items into a system of Treasure Classes. Since each source of items in the game (except NPCs) drop items from Treasure Classes, this is crucial to understand.
* 1/22 for Vortex Shield;
* 1/22 for Bloodlord Skull.
 
==Monstats.txt==
 
This file holds a lot of information about monsters. The fields in this file are as follows:
 
* '''Id:''' Internal name of a monster type, the game refer to a monster using this field.
* '''NameStr:''' OIt is either the actual name of the monster or a reference to name table for names with spaces.
* '''rangedtype:''' 1 for monsters with ranged attack, blank for others.
* '''minion1 and minion2:''' Type of minions for the monster, e.g. normal fallen shamans usually have normal fallens as minions.
* '''PartyMin-PartyMax:''' The range for quantity of minions.
* '''MinGrp-MaxGrp:''' The range for quantity of normal monsters in one grope.
* '''Velocity:''' Movement speed, walking, flying, etc.
* '''Run:''' Run speed. Only a few monsters can run at a different speed than they walk.
* '''Level:''' Monster level in Normal difficulty.
* '''Level (N):''' Only for bosses. Monster level in Nightmare difficulty
* '''Level (H):''' Only for bosses. Monster level in Hell difficulty.
* '''lUndead:''' 1 for melee undeads.
* '''hUndead:''' 1 for ranged undeads.
* '''demon:''' 1 for demons.
* '''boss:''' 1 for bosses. They save their mlvl in Nightmare and Hell difficulties.
* '''Drain, Drain(N), Drain(H):'''Life and mana leech effectiveness in Normal, Nightmare and Hell difficulties (percents).
* '''coldeffect, coldeffect(N), coldeffect(H):''' Chill and freeze effectiveness in Normal, Nightmare and Hell difficulties (listed in percentages).
* '''ResDm, ResDm(N), ResDm(H):''' Damage resistance in Normal, Nightmare and Hell difficulties (percents).
* '''ResMa, ResMa(N), ResMa(H):''' Magic resistance.
* '''ResFi, ResFi(N), ResFi(H):''' Fire resistance.
* '''ResLi, ResLi(N), ResLi(H):''' Lightning resistance.
* '''ResCo, ResCo(N), ResCo(H):''' Cold resistance.
* '''ResPo, ResPo(N), ResPo(H):''' Poison resistance.
* '''ToBlock, ToBlock(N), ToBlock(H):''' Chance to block.
* '''Crit:''' Critical hit chance (5% for every monsters as of now).
* '''TreasureClass1:''' TC of normal monster in Normal difficulty.
* '''TreasureClass2:''' TC of champion monster in Normal difficulty.
* '''TreasureClass3:''' TC of unique monster in Normal difficulty (non-quest drop).
* '''TreasureClass4:''' TC of unique monster in Normal difficulty (quest drop).
* '''TreasureClass1(N):''' TC of normal monster in Nightmare difficulty.
* '''TreasureClass2(N):''' TC of champion monster in Nightmare difficulty.
* '''TreasureClass3(N):''' TC of unique monster in Nightmare difficulty (non-quest drop).
* '''TreasureClass4(N):''' TC of unique monster in Nightmare difficulty (quest drop).
* '''TreasureClass1(H):''' TC of normal monster in Hell difficulty.
* '''TreasureClass2(H):''' TC of champion monster in Hell difficulty.
* '''TreasureClass3(H):''' TC of unique monster in Hell difficulty (non-quest drop).
* '''TreasureClass4(H):''' TC of unique monster in Hell difficulty (quest drop).
* '''TCQuestId and TCQuestCP:''' Values for special quest drops like Mephisto's Soulstone.
 
The most important part for item drops is Treasure Classes of the monster and his level.
 
 
==Magicprefix.txt and Magicsuffix.txt==
 
These two files contains all affixes available in the game. They have almost the same field, so they're covered in the same section in this guide.
 
* '''Name:''' The name of the affix as it appears in the game.
* '''version:''' 0 for Classic, 100 for LoD.
* '''spawnable:''' 1 for available affixes, 0 for affixes, that cannot appear in the game.
* '''rare:''' 1 for affixes, that can appear on rare items, 0 for magic only affixes.
* '''level:''' Minimum Affix Level of an item that may spawn with this affix.
* '''maxlevel:'''Maximum Affix Level of an itemthat may spawn with this affix.
* '''levelreq:''' Minimum required character level for using item with this affix.
* '''classspecific:''' The class for which this affix will work, — ama, sor, nec, pal, bar, dru. (ArchAngel's prefix will only add skills for sorceress, for instance.)
* '''classlevelreq:''' Minimum required character level for using item with this affix. Although it usually is overrules by levelreq.
* '''frequency:''' The rate of appearance in the game of this affix (0 for items that cannot be selected at all).
* '''group:''' Group Id for selecting affixes for rare and crafted items. They cannot have more than one affix per group.
* '''mod1code, mod2code, mod3code:''' The codes of effects of this affix. This codes refer to internal game functions, however all of them are quite self-explanation, e.c. "ac%" is Armor Class increase, "dmg%" is Damage increase, "res-all" is resist all.
* '''mod1param, mod2param, mod3param:''' Parameters for the affix function. E.c. poison duration in frames, skill index, cold duration in frames. (Diablo II runs at an internal clock speed of 25 frames per second.)
* '''mod1min, mod2min, mod3min:''' Minimum parameters for affix function such as minimum of life range given by +life affix
* '''mod1max, mod2max, mod3max:''' Maximum parameters for affix function such as maximum of life range given by +life affix.
* '''transform:''' 1 for affixes that do palette shift on base item.
* '''transformcolor:''' Color code for affixes that do color shift on base item; "dgld" is dark gold, "lpur" is light purple, edtc.
* '''itype1, itype2, itype3, itype4, itype5, itype6, itype7:''' Include Type, item type codes of items, on which this affix may occur. These codes are stored in armor.txt, weapon.txt, misc.txt and ItemTypes.txt files.
* '''etype1, etype2, etype3, etype4, etype5, etype6, etype7:''' Exclude Type, item type codes of items, on which this affix may NOT occur.
* '''divide, multiply, add:'''Values for modifying item price.
 
The usage of these files is explained in more detail in chapter 11, when affix generation is covered.
 
==Weapons.txt==
 
This file is used to store information about weapon item types.
 
* '''name:''' The name of the weapon as it appears in the game.
* '''type, type2:''' Item type code, the index of respective raw in itemtypes.txt file.
* '''code:''' Internal item name.
* '''alternateGfx:''' Item code for choosing animation. Unimportant for item generation.
* '''namestr:''' Reference to the table. Contained correct name of the item.
* '''version:''' 0 for Classic, 100 for Lod.
* '''compactsave:'''Empty. Unimportant for item generation.
* '''rarity:''' The rate of dropping the weapon from weapon racks.
* '''spawnable:'''0 for items, that cannot be generated (except special cases like quests), 1 for others.
* '''mindam-maxdam:''' One-handed damage.
* '''1or2handed:''' 1 for two-handed weapons that may be held in one hand by the Barbarian.
* '''2handed:''' 1 for two-handed weapons.
* '''2handmindam-2handmaxdam:''' Two-handed damage.
* '''minmisdam-maxmisdam:''' Ranged damage.
* '''rangeadder:''' Weapon range adder. Weapon range=1+rangeadder.
* '''speed:''' Base weapon attack speed.
* '''StrBonus:''' Strange bonus for weapon damage. Enhanced damage percent=Strength*StrBonus/100.
* '''DexBonus:''' Dexterity bonus for weapon damage. Enhanced damage percent=Dexterity*DexBonus/100.
* '''reqstr:''' Strength required.
* '''reqdex:''' Dexterity required.
* '''durability:''' Base durability.
* '''nodurability:''' 1 for indestructible weapons.
* '''level:''' Quality Level.
* '''levelreq:''' Character level required.
* '''cost:''' base weapon cost.
* '''gamble cost:''' gambling cost.
* '''magic lvl:''' Magic Level (see chapter 11 and chapter 22).
* '''auto prefix:''' The code number of prefix, that always occurs on the weapon (like +mana on orbs).
* '''OpenBetaGfx:''' Unimportant for item generation.
* '''normcode:''' Code of normal version of the weapon.
* '''ubercode:''' Code of exceptional version of the weapon.
* '''ultracode:''' Code of elite version of the weapon.
* '''wclass, 2handedwclass:''' Weapon class for animation. Unimportant for item generation.
* '''component:''' Unimportant for item generation.
* '''hit class:''' Unimportant for item generation.
* '''invwidth:''' Width of the item in the inventory.
* '''invheight:''' Height of the item in the inventory.
* '''stackable:''' 1 for stackable weapons (throwing).
* '''minstack-maxstack:''' The range of quantity of items of this type in on stack.
* '''spawnstack:''' Quantity of items of this type in on stack upon founding.
* '''flippyfile, invfile, uniqueinvfile, setinvfile:''' Graphics files for the weapon.
* '''hasinv:''' 1 for socketable weapons.
* '''gemsockets:''' Maximum possible number of sockets in the weapon.
* '''gemapplytype:''' Item class for gems and runes. 0 for all weapons.
* '''special:''' Unimportant for item generation.
* '''useable:''' 1 for items, that you may use (e.c. town portal scroll). 0 for all weapons.
* '''dropsound, dropsfxframe, usesound:''' Sound-related information. Unimportant for item generation.
* '''unique:''' 1 for special quest items.
* '''transparent, transtbl:''' Not used.
* '''quivered:''' 1 for weapons, that need ammo.
* '''lightradius, belt, quest, questdiffcheck, missiletype:''' Unimportant for item generation.
* '''durwarning:''' Id of low durability warning icon.
* '''qntwarning:''' Id of low quantity warning icon.
* '''gemoffset:''' Unimportant for item generation.
* '''bitfield1:''' Weapon material code (is used in golem creation and rack drop checks).
* '''CharsiMin (and all other *Min fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMax (and all other *Max fields):''' If CharsiMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicMin (and all other *MagicMin fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMagicMax (and all other *MagicMax fields):''' If CharsiMagicMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicLvl (and all other *MagicLvl fields):''' If ilvl>=CharsiMagicLvl then she can sell this item (see chapter 12).
Source Art, Game Art, Transform, InvTrans, SkipName:''' Unimportant for item generation.
* '''NightmareUpgrade:''' Item code for selling by Nightmare difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''HellUpgrade:''' Item code for selling by Hell difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''Nameable:''' 1 for items that may be personalized by Anya's quest reward.
* '''PermStoreItem:''' Unimportant for item generation.
 
==armor.txt==
 
This is a file similar to weapons.txt.
 
* '''name:''' The name of the weapon as it appear in the game.
* '''version:''' 0 for Classic, 100 for Lod.
* '''compactsave:''' Unimportant for item generation.
* '''rarity:''' The rate of dropping the armor from weapon racks.
* '''spawnable:''' 0 for items, that cannot be generated (except special cases like quests), 1 for others.
* '''minac-maxac:''' Defence range.
* '''absorbs:''' Not used. Unimportant for item generation.
* '''speed:''' Run/walk speed penalty.
* '''reqstr:''' Strength required.
* '''block:''' Base chance to block.
* '''durability:''' Base durability.
* '''nodurability:''' 1 for indestructible armors.
* '''level:''' Quality Level.
* '''levelreq:''' Character level required.
* '''cost:''' Base weapon cost.
* '''gamble cost:''' Gambling cost.
* '''code:''' Internal item name.
* '''namestr:''' Reference to the table, contained correct name of the item.
* '''magic lvl:''' Magic Level (see chapter 11 and chapter 22).
* '''auto prefix:''' The code number of prefix, that always occurs on the armor (like poison damage on heads).
* '''alternategfx, OpenBetaGfx:''' Unimportant for item generation.
* '''normcode:''' Code of normal version of the armor.
* '''ubercode:''' Code of exceptional version of the armor.
* '''ultracode:''' Code of elite version of the armor.
* '''spelloffset, component:''' Unimportant for item generation.
* '''invwidth:''' Width of the item in the inventory.
* '''invheight:''' Height of the item in the inventory.
* '''hasinv:''' 1 for socketable armors.
* '''gemsockets:''' Maximum possible number of sockets in the armor.
* '''gemapplytype:''' Item class for gems and runes. 1 for headgear and body armor, 2 for shields.
* '''flippyfile, invfile, uniqueinvfile, setinvfile:''' Graphics files for the armor.
* '''rArm, lArm, Torso, Legs, rSPad, lSPad:''' Types of used graphics files.
* '''useable:''' 1 for items, that you may use (e.c. Town portal scroll). 0 for all armors.
* '''throwable:''' Not used.
* '''stackable:''' 1 for stackable items (not used for armors).
* '''minstack-maxstack:''' The range of quantity of items of this type in on stack (not used for armors).
* '''type, type2:''' Item type code, the index of respective raw in itemtypes.txt file.
* '''dropsound, dropsfxframe, usesound:''' Sound-related information. Unimportant for item generation.
* '''unique:''' 1 for special quest items.
* '''transparent, transtbl:''' Not used.
* '''quivered:''' 1 for weapons that need ammo (not used for armors).
* '''lightradius, belt, quest, questdiffcheck, missiletype:''' Unimportant for item generation.
* '''durwarning:''' Id of low durability warning icon.
* '''qntwarning:''' Id of low quantity warning icon (not used for armors).
* '''mindam-maxdam:''' Damage range for smite or kick.
* '''StrBonus:''' Strength bonus for kick damage. Enhanced damage percent=Strength*StrBonus/100.
* '''DexBonus:''' Dexterity bonus for kick damage. Enhanced damage percent=Dexterity*DexBonus/100.
* '''gemoffset:''' Unimportant for item generation.
* '''bitfield1:''' Armor material code (is used in golem creation and rack drop checks).
* '''CharsiMin (and all other *Min fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMax (and all other *Max fields):''' If CharsiMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicMin (and all other *MagicMin fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMagicMax (and all other *MagicMax fields):''' If CharsiMagicMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicLvl (and all other *MagicLvl fields):''' If ilvl>=CharsiMagicLvl then she can sell this item (see chapter 12).
* '''Source Art, Game Art, Transform, InvTrans, SkipName:''' Unimportant for item generation.
* '''NightmareUpgrade:''' Item code for selling by Nightmare difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''HellUpgrade:''' Item code for selling by Hell difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''mindam, maxdam:''' Not used.
* '''Nameable:''' 1 for items that may be personalized by Anya's quest reward.
 
 
==Misc.txt==
 
This file is similar to weapons.txt and armor.txt, but contains information about all items, that are neither weapon nor armor.
 
* '''name, *name:''' The name of the item as it appears in the game.
* '''szFlavorText, compactsave:''' Unimportant for item generation.
* '''version:''' 0 for Classic, 100 for Lod.
* '''level:''' Quality Level.
* '''levelreq:''' Character level required.
* '''rarity:''' The rate of dropping the item from different objects (e.c. book shelves).
* '''spawnable:''' 0 for items, that cannot be generated (except special cases like quests), 1 for others.
* '''speed:''' Not used for misc items.
* '''nodurability:''' 1 for indestructible items.
* '''cost:''' Base item cost.
* '''gamble cost:''' Gambling cost.
* '''code:''' Internal item name.
* '''alternategfx:''' Unimportant for item generation.
* '''namestr:''' Reference to the table, contained correct name of the item.
* '''component:''' Unimportant for item generation.
* '''invwidth:''' Width of the item in the inventory.
* '''invheight:''' Height of the item in the inventory.
* '''hasinv:''' 1 for socketable items.
* '''gemsockets:''' Maximum possible number of sockets in the item (not used for misc items).
* '''gemapplytype:''' Item class for gems and runes (not used for misc items).
* '''flippyfile, invfile, uniqueinvfile:''' Graphics files for the item.
* '''special:''' Not used.
* '''Transmogrify, TMogType, TMogMin, TMogMax:''' Unimportant for item generation.
* '''useable:''' 1 for items, that you may use (e.c. Town portal scroll). 0 for all others.
* '''throwable:''' Not used.
* '''type, type2:''' Item type code, the index of respective raw in itemtypes.txt file.
* '''dropsound, dropsfxframe, usesound:''' Sound-related information. Unimportant for item generation.
* '''unique:''' 1 for special quest items.
* '''transparent, transtbl:''' Not used.
* '''lightradius, belt:''' Unimportant for item generation.
* '''autobelt:''' 1 for items that automatically get placed on the belt.
* '''stackable:''' 1 for stackable items.
* '''minstack-maxstack:''' The range of quantity of items of this type in on stack.
* '''spawnstack:''' Quantity of items of this type in on stack upon founding.
* '''quest:''' >0 for quest items. Unimportant for item generation.
* '''questdiffcheck:''' Unimportant for item generation.
* '''missiletype, spellicon:''' Not used.
* '''pSpell, state, cstate1, cstate2, len:''' Unimportant for item generation.
* '''stat1, stat2, stat3:''' Effect of usable item. E.c. life restore for life potion.
* '''calc1, calc2, calc3:''' The value for effect of usable item. E.e. 100% life and mana for full * '''rejuvenation potion.
* '''spelldesc, spelldescstr, spelldesccalc:''' Used to refer to description of item effect.
* '''durwarning:''' Id of low durability warning icon.
* '''qntwarning:''' Id of low quantity warning icon.
* '''gemoffset:''' Unimportant for item generation.
* '''BetterGem:''' The code of gem for upgrade with cube or shrine.
* '''bitfield1:''' Item material code (is used in golem creation and rack drop checks).
* '''CharsiMin (and all other *Min fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMax (and all other *Max fields):''' If CharsiMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicMin (and all other *MagicMin fields):''' Should be minimal quantity of the item in vendor's price list, but isn't used (see chapter 12).
* '''CharsiMagicMax (and all other *MagicMax fields):''' If CharsiMagicMax>0 then she can sell this item (see chapter 12).
* '''CharsiMagicLvl (and all other *MagicLvl fields):''' If ilvl>=CharsiMagicLvl then she can sell this item (see chapter 12).
* '''Source Art, Game Art, Transform, InvTrans, SkipName:''' Unimportant for item generation.
* '''NightmareUpgrade:''' Item code for selling by Nightmare difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''HellUpgrade:''' Item code for selling by Hell difficulty vendors, "xxx" for items, that don't get upgrade (see Chapter 12).
* '''mindam, maxdam:''' Not used.
* '''PermStoreItem:''' 1 for items, that always available in stores.
* '''multibuy:''' 1 for items, that may be bought with Shift+Click (Multiple Buy function).
* '''Nameable:''' 1 for items that may be personalized by Anya's quest reward.
* '''*eol:''' Not used (however "eol" is usually End Of Line in programming).
 
 
 
Administrators
2,378
edits