Recipe *.rcp Files
This section discusses the "\Recipe\*.rcp" files 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 files are encoded.
Each "*.rcp" file corresponds to a single crafted item. The "*.rcp" work in conjunction with the Recipes*.gam files (Blacksmith, Jeweler, and Mystic training-only) and with the ItemEnhancements.gam file (Mystic non-training). The three Artisans that provide crafting services are:
- Blacksmith: Armor/Weapon recipes
- Jeweler: Design recipes
- Mystic: Enchant recipes
The "*.rcp" files are also used for generating quest reward items. That's why you there are files like "Quest_Act1_SkeletonKing_BarbReward.rcp".
RecipeDetail Structure
The RecipeDetail structure is very small with a size of only 0x28 bytes. The size was increased up from 0x24 in Patch 8296; however, the new value at the end of the structure is always 0x0. Here are the details of this structure:
| struct RecipeDetail | // sizeof 0x24 | |
| { | ||
| 0x00 | DWord mpqId; | // MPQ Id |
| 0x04 | DWord unknown1; | // always 0x00000000 |
| 0x08 | DWord unknown2; | // always 0x00000000 |
| 0x0C | DWord baseTypeHash; | // hash of the item's base type |
| 0x10 | DWord numFixedAffixes; | // number of fixed affixes |
| 0x14 | DWord affixHash1; | // affix hash 1 |
| 0x18 | DWord affixHash2; | // affix hash 2 |
| 0x1C | DWord affixHash3; | // affix hash 3 |
| 0x20 | DWord numRandAffix; | // number of random affixes |
| 0x24 | DWord unknown3; | // always 0x00000000 |
| } |
The Recipe filename (excluding the ".rcp" extension) is the same as the "recipeName" found in the Recipes*.gam and ItemEnhancements.gam files.
The Items*.gam files contain the actual Recipe scroll items that you use to learn certain recipes. As of Patch 7728, there are now Set Item Recipe scrolls; for example, "CraftingPlan_Smith_T10_Legendary_Set_Inferno_001". The Item structure contains 7 fields that store the reference to the Recipes (*.rcp): "teaches1" through "teaches7". For Recipe scrolls that only teach a single item, only the "teaches1" value will be set; for Set Item Recipe scrolls, multiple of these fields will be set. The "teaches" value is the (lowercase) hash of the "recipeName". Note that Mystic Recipe scroll items use the "enchants" field to reference the Recipes (*.rcp).The "baseTypeHash" will tell you exactly what type of base item the recipe creates. For example the "T02_Armor_Boots.rcp" file has a "baseTypeHash" of 0x7F9B3D19. Looking at the Items*.gam files ("Items_Armor.gam" in this particular case), we can see that this is the hash for "Boots_003". And by examining the Items.stl (StringList) data, we can see that "Boots_003" corresponds to "Heavy Boots" (enUS).
Not surprisingly, we see from the Recipes.stl (StringList) data that "T02_Armor_Boots" corresponds to "Journeyman Heavy Boots" (enUS).
As you can see from the "RecipeDetail" structure above, crafted items can only have up to 3 specific affixes. Note that these are specific affixes and not affix groups. They can also have up to 6 random affixes, although the total number of affixes (fixed + random) can never be greater than 6. I am not certain on how the random affixes are chosen. From observations so far, it seems to be at least partly based on the item level (ilvl) of the item. In the case of crafted items, it is probably based on the crafting level. Note that for non-crafted items, affixes are at least partly dependent on the monster level (mlvl) of the creature that dropped it.
Please check out the String Hashing section for more details on Diablo 3 hashing.
For a complete list of recipes, check out D3Lexicon's Blacksmith and Jeweler. Please note that the Mystic was removed from the game during the Beta!
