D3Inferno

GameBalance ItemTypes.gam File

This section discusses the "\GameBalance\ItemTypes.gam" file in the "CoreData.mpq" file. MPQ Patches to this file are located in the "base" subdirectory of the Diablo 3 "MPQs" directory. Please see the MPQs section for general MPQ information and basic information about how GameBalance (*.gam) files are encoded.

ItemTypes Structure

The ItemTypes structure size is 0x140 bytes. Here are the details of this structure:

struct ItemType // sizeof 0x140
{
0x000DWord unused1;// always 0x00000000 (probably the runtime vtbl_ptr)
0x004DWord itemTypeName[256];// non-NLS key name of the item type
0x104DWord parentHash;// hash of the parent item type
0x108DWord unused2;// always 0x00000000
0x10CDWord classMask;// class mask
0x110DWord slot1;// item slot 1
0x114DWord slot2;// item slot 2
0x118DWord slot3;// item slot 3
0x11CDWord slot4;// item slot 4
0x120DWord unused3[3];// always 0x00000000
0x12CDWord affixGroupHash;// affix group hash
0x130DWord bitMask1;// bit mask 1
0x134DWord bitMask2;// bit mask 2
0x138DWord bitMask3;// bit mask 3
0x13CDWord bitMask4;// bit mask 4
}

Additional ItemTypes Details

0x104: This DWord is the string hash of the parent. Please refer to the String Hashing guide for complete details on string hashing. This value is 0xFFFFFFFF for "root" item types such as "Weapon" and "Armor". All of the item types are defined with hierarchical relationships. Here is a snippet of the "Armor" tree:

Item TypeHashParent Hash
Armor071BAA81FFFFFFFF
ChestArmorC2B86318071BAA81
GenericChestArmor315FC915C2B86318
Cloak (DH only)073C97EAC2B86318

0x10C: The classMask indicates which classes can use a given item type. The "FollowerSpecial" items (e.g., "TemplarRelic") have a classMask of 0x00002F02; the 0x2F00 would seem to inidicate that these items can be used by players, but I doubt this is the case. Perhaps the classMask does not apply to all item types. The masks for the five player classes are shown below. For example, a "Staff" has a classMask of 0x2600 which means that it can be used by a Wizard, a Witch Doctor, or a Monk.

The classMask is also used for other item type information as well. For example,

0x110, 0x114, 0x118, 0x11C: These four DWords indicate the equipment slots that the item type can occupy. This includes the slots for Followers. Note that the Follower values were changed by 1 in Beta Patch 8296, and again in Patch 8610

0x12C: The affixGroupHash only seems to be used for item types that have a specific affix associated with them. See the hashing section for details on string hashing. For example, all Wizard Orbs have a "WizardD" affix; this affix "Adds X% More Damage to Wizards Only".

0x130, 0x134, 0x138, 0x13C: These four DWords are the bit masks that correspond to various attributes of an item including the item type, and whether it is a one or two-handed item. Together, these four fields provide 128 bits of mask. A few examples that use the bitMask1 field are shown below. These bitMask fields were also used in the "Treasure Class" files (which determine how loot is generated when a given mob is killed). Unfortunately, these files were removed from the Beta client as of version 7447 (since all loot is generated on the server).

I will be discussing the item files in more detail in an upcoming section.

In the coming week, I will be posting a full list of affixes, their mods, and the value ranges for each one.

Email Contact:

contact_email