User Tag List

Results 1 to 5 of 5

Thread: [TC][DBC EDITING] heirlooms

  1. #1
    Join Date
    Dec 2013
    Thanked 81 Times in 47 Posts

    [TC][DBC EDITING] heirlooms

    This is not my tutorial but im posting it here so people have an understanding of the process.
    it is a copy paste of a tutorial by MyLilSuccy CREDITS TO MyLilSuccy for their work.

    Please dont ask for support this is not my tutorial.
    I am only adding this because i think it will be useful in some way.
    Good luck :)

    Make backups
    Use at own risk!!!

    Info about scaling stats:
    Guide to the following info is in the next post below
    Hi folks! Been a long time lurker, thought I'd finally get around to contributing something back.
    Been seeing a lot of questions about heirlooms and scaling stat items. As I'm in the process of creating an in-depth guide to item creation, I've researched this topic and thought I'd post my notes.
    As this post is pretty much just a straight dump of my notes, things may not be overly clear, so see the guide in next post.
    This is for Trinity 3.3.5a, though I imagine it may be a nice lauching point for those mucking about with 4.3.4.
    Without further ado, here are my notes:
    Heirloom and scaling stats:
    In item_template, ScalingStatDistribution is the entry in ScalingStatDistribution.dbc to use for this item. Mostly takes over the normal item stat stuff.
    ScalingStatValue is a bit field as follows:
        SSVc    Grp  Bit   Value         Description
        ----    ---  ---   -----         ------------------------------
         3       1    0     1             Normal stats progression
         4       1    1     2             Trinket stats progression (only seen on trinkets)
         5       1    2     4             Low stats progression
         18      1    3     8             Boosted stats progression
         6       1    4     16            Very low stats progression
         7       2    5     32            Armor value (cloth shoulders)
         8       2    6     64            Armor value (leather shoulders)
         9       2    7     128           Armor value (mail shoulders)
         10      2    8     256           Armor value (plate shoulders)
         11      3    9     512           Weapon damage (1H DPS)
         12      3    10    1024          Weapon damage (2H DPS)
         13      3    11    2048          Weapon damage (1H DPS caster)
         14      3    12    4096          Weapon damage (2H DPS caster)
         15      3    13    8192          Weapon damage (RangeWpn DPS)
         16      3    14    16384         Weapon damage (Wand DPS ??)
         17      4    15    32768         Spell power (extra, not same as stat 45 in ScalingStatDistribution, can even have both) (used for caster weapons)
         --      -    16    65536         unused???
         --      -    17    131072        unused???
         19      1    18    262144        Mid stats progression
         20      2    19    524288        Armor value (very low progression) (cloak armor)
         21      2    20    1048576       Armor value (cloth armor)
         22      2    21    2097152       Armor value (leather armor)
         23      2    22    4194304       Armor value (mail armor)
         24      2    23    8388608       Armor value (plate armor)
    Progression values are taken from ScalingStatValues.dbc by column. (unsure how ID works or if even used for anything)
    SSVc is the ScalingStatValues.dbc column used for this progression. (columns 1 and 2 in DBC are ID and Level respectively)
    Group (Grp) number indicates bits that are mutually exclusive. Only one bit within a group should be set.
    At least one bit in group 1 must be on or the scaling stats won't work.
    Bits 16 and 17 don't appear to be used.
    If no scaling armor values used, regular item's armor is used. Otherwise, scaling armor takes over.
    If no scaling weapon damage is used, regular item's weapon damage is used. Otherwise scaling weapon damage is used.
    Scaling armor does not work on necklaces. It picks up the regular armor only (though item shows scaled armor). Trinity bug?
    Putting weapon damage on an armor piece, though it applies, will overwrite weapon damage from weapon itself when equiping/un-equipping armor so don't do that. This is true for both regular and scaled stat weapon damage. (Trin Bug or game limitation? Likely game limitation here)
    Item's required level is minimum for scaling stats shown.
    Item level limit in ScalingStatDistribution.dbc will also make the item unusable for levels ABOVE this limit.
    If item's required level is higher than item level limit, item is effectively un-usable.
    Quality 7 and Flags bit 27 (value 134217728) needed only for Bind to Account items. Scaling stats can be used on any item.
    Make sure to delete the item cache files (item*cache.wdb) from WoW's cache as well as restarting the server.
    Deprecated Stats:
    stat 40 (use 38 instead)
    stat 41 (use 45 instead)
    stat 42 (use 45 instead)
    ScalingStatDistribution.dbc entries:
    entry, stat1, stat2, ..., stat10, val1, val2, ..., val10, limit
        entry       is the ScalingStatDistribution ID
        statX       is the type of stat (same as item's stat_typeX, -1=none)
        valX        is the stat value to use (equivalent to item's stat_valueX, but not same)
                      - A value of 0 here effectively disables the stat.
                      - Basically, the stat value is a percentile * 100, So any stat value desired can be 
                        achieved at a desired level by setting the value here so that the progression 
                        gives the desired stat.
                        .: for normal progression at lvl80 we have 97 (see ScalingStatValues.dbc)
                           So to get 150, we'd want 150/97*10000 = 15463.9175258 or 15464
        limit       level limit of this item's progression. Item is unusable at levels above this.
    We want +200 spell power at level 80 (normal prog), limit at 80. We'll call this entry 666
    spell power is stat 45
    value = 200/97*10000 = 20618.556701 -> 20619
    So our new row for the ScalingStatDistribution.dbc becomes:
    666, 45,-1,-1,-1,-1,-1,-1,-1,-1,-1, 20619,0,0,0,0,0,0,0,0,0, 80
    Save the new DBC, make a patch for the client and copy the DBC into the server's DBC files
    In the database, set an item's ScalingStatDistribution to 666 and ScalingStatValue to 1
    Posted by toiboy Honestly I'll be forward the whole post is confusing. I want to make custom heirlooms that reach 255 and I am unsure how to go about that. If you would walk me through each DBC file for one item then I'd be able to understand the rest. I just need one example mostly I am a visual learner for the most part.
    Ok, an example. Before we start, please note: you mention you want your heirloom to reach level 255. The Trinity guys have said (can't remember where) that they do not recommend going above level 100, weird things start to happen when going above this. Further, if you go too hog wild with the stats, odd stat behaviour can appear (as in the higher your level, the lower the stat you actually end up with). This can happen due to what I call stat-rollover. Anyway, thought I'd mention this in case you start seeing this behaviour. First a few assumptions on my part You already have one (or more) custom item(s) in the database you want to apply this to. You have the tools needed to create/edit DBC files. You have all the tools you need to create/extract-from MPQ files. You know how to make patches for the client. For this example I'll be making a cloth armor piece for casters, but it is the same for any scaling stat item you'll create. Before doing anything, make backups of ScalingStatDistribution.dbc and ScalingStatValues.dbc, at least the ones in your server's DBC files. Getting Ready First step is to decide what type of stats we want on this armor. Obviously it is armor so we'll want one of the armor progressions, and as this is intended for casters, we'll put intel, stam, and spell power on it. For the sake of simplicity, we'll just use a normal progression for these stats. We'll tweak the values for the stats so that we get +150 when we reach level 80. We'll also need an ID number to use for the ScalingStatDistribution entry in the database. As we'll be making a brand new entry in the DBC itself, we can use any number we want as long as it doesn't already exist. Lets say 999 for no particular reason. Now to get the IDs for the stats we'll need. Head over to and look for the stat_type entry, this will give you the table of all the stats and their IDs (they all start with ITEM_MOD_). The table is the same for the regular, non-scaling stat items so nothing really mystical here. From that table we see that our desired stat IDs are: intel = 5 stam = 7 spell power = 45 The last piece of info we need is to calculate the value to use for the stats. For normal progressions, the stat reaches 97 at level 80 but we want it to reach 150 (this value of 97 is actually taken from ScalingStatValues.dbc, but take my word for it for now). As the numbers we need are based on a percentile*100, the math needed becomes: value = 150/97*10000 = 15463.9175258 rounding this gives: 15464 Editing ScalingStatDistribution.dbc Now that we got the numbers we need, open ScalingStatDistribution.dbc in a DBC editor and add a new row/line to it. The ID (first column) will be 999. The next 10 columns (numbers 2 to 11) of this DBC are the stat IDs we want for this distribution, so obviously we can have up to 10 stats per item distribution. So the first three columns (2, 3 and 4) get the IDs 5, 7, and 45 respectively (it doesn't really matter what order you put these in) while columns 5 through 11 get a value of -1 to indicate that they aren't used. Columns 12 through 21 are the values for each stat, associated with the stat IDs in the same order. That is, column 12 is the value for the stat in column 2. Column 13 is the value for the stat in column 3, etc. We could have different values for each individual stat, but we'll be using the same value across the board. For this example armor, we want our calculated value of 15464 in columns 12, 13 and 14, the rest (columns 15 through 21) just get 0. Finally, the last column of the DBC is the level limit for this distribution. As you wanted it to go as high as 255, put 255 in here. Save the DBC, and copy it over to your server's DBC files (make a backup of the old one first!). Changing the item's database entry Easy step here. We just created the ScalingStatDistribution.dbc line, so in the server database's item_template table, set this item's ScalingStatDistribution entry to 999. Though we want a normal progression for the stats, we haven't decided on the progression to use for the armor rating iteslf. For this example we'll simply use the regular cloth armor progression. By the way, don't think that you must use the cloth armor progression for cloth armors, we could use the plate armor one if we wanted and it will not make our armor piece suddenly become plate. These are just the progressions that Blizz typically uses for cloth armors. Using the first table I showed in the first post of this thread, select the desired progressions for our item. Note that progressions of the same type are mutually exclusive. That is, only one progression of the same type may be active on an item or things simply won't work (the Grp column in that table indicates these type groupings). For our example armor, we want a normal stat progression (bit 0) and cloth armor progression (bit 20). Take the values associated with each bit and add them up to get the number we need to put in ScalingStatValue in the database. In our case, bit 0 = 1 and bit 20 = 1048576 so: number = 1 + 1048576 = 1048577 Once done, the item is effectively complete, but there is one more thing we need to do. Editing ScalingStatValues.dbc Though our item is complete, since the item can scale all the way to level 255, we need to tell both the server and the client what values to use for levels greater than 80. This is where ScalingStatValues.dbc comes into play. Unlike most other DBCs, ScalingStatValues.dbc works mainly by column instead of rows because each row represents all the stat progressions an item may have at a given level. The first column of ScalingStatValues.dbc is an ID, but it doesn't appear to actually be used by the game (the 3.3.5a version has IDs that have no apparent relation, while the Cata 4.3.4 version is merely a count). For any new rows we create, I recommend just increasing the ID by 1 from the previous row. The second column is the player level this row represents. The remainder of the columns are the stat progressions themselves where each individual column is a progression. Looking at the first table in this thread's main post, SSVc in that table shows which column represents which progression (SSVc just stands for ScalingStatValues Column). So normal stat progressions are in column 3, the cloth armor progression is in column 21 etc. When we calculated the value to use for the stats, I said that the value of 97 came from this DBC, well we can see this here. We were calculating based on a normal stat progression (column 3) at level 80. Scrolling down the DBC we see that the row where column 2 (the player level) is 80, column 3 has a 97 in it. This is where I got the number from. So to allow for levels above 80, we need to add new rows (one per level) and set the values for each progression. This is going to be a lot of work, but the good news is that we only ever need to do this once since once complete, it'll affect all progressions. As an example line, I put in a new row for level 81 and simply added the same difference from level 79 to 80 to each column (if you look closely, you'll see that I screwed up on column 18, it should have been 136 but I put in 236, d'oh!). Entries for all the other levels (up to 255) are not shown. Once done, save the DBC and add it to your server's DBC files (again make a backup of the original one first!) Final step Once everything is done, create a patch file containing the new DBCs and may as well create a new Item.dbc as well so that any custom items show up properly. Give the patch file to your players and you are done. Edit: Also make sure to delete WoW's item cache or the item won't show up correctly. Here's some pics of the above test item (limited to level 81) at level 80 and 81. Note how at level 80, the item's stats are exactly +150 which is what we wanted, and at level 81 the armor is exactly 283 which is what column 21 of ScalingStatValues.dbc says it should be at level 81.
    More on Scaling Stat Items:
    Wanted to add a note or two about something I didn't really mention in the main post or the example guide. No pics this time, I'll leave the implementation as an exercise for the reader .
    You may have seen this behavior on some heirloom items. As you level, sometimes new stats appear on the item in question. How can we do that?
    Turns out, scaling stats don't really do that, but due to the way the game uses the ScalingStatDistribution.dbc entries, it can be faked.
    Basically, when the game calculates the stat value from the progression and the values in the distribution, it will truncate any decimal values it ends up with (so something like 2.76 would be truncated to 2). Further, since there is no count of the number of active entries in ScalingStatDistribution.dbc, the game will not show any stat where the final calculated value is 0. This is the key to performing this little bit of trickery.
    Lets say we want a trinket that will give +1 intel immediately, stamina starting at level 5, and spell power starting at level 10 (I'm using the same stat IDs as in the guide 'cause I'm being lazy  ). As this is a trinket item, we'll use the trinket progression.
    Looking at column 4 of ScalingStatValues.dbc (the trinket progression column), we see that the progression has a value of 2 at level 1, 4 at level 5, and 6 at level 10.
    So if we want to have the stat appear at a given level, we need to make sure that will hit +1 at that specific level. Using the same formula we did in the guide, we figure out the value we need so that the stat will be +1 at that level. So the three values we need are:
    intel value = 1/2*10000 = 5000
    stamina value = 1/4*10000 = 2500
    spell pwr value = 1/6*10000 = 1666.666666 rounds to 1667
    Note that because the spell power value is rounded, it may not show up exactly at the right level. So we need to calculate what the game will get one level below just to make sure and tweak the value to get it right. 
    So the math would be:
    @ level 10 = 6*1667/10000 = 1.0002 which truncates to 1
    @ level 9 = 5*1667/10000 = 0.8335 which truncates to 0 (the 5 here came from ScalingStatValues.dbc)
    Everything looks good, so we can create a new entry in ScalingStatDistribution.dbc as follows (I'll call this entry 888 for the hell of it, and we'll limit this trinket to level 80).
    888, 5, 7, 45, -1,-1,-1,-1,-1,-1,-1, 5000, 2500, 1667, 0,0,0,0,0,0,0, 80
    Try it out!
    Last edited by frost; 05-27-2014 at 07:24 AM.
    Raffle Winner

  2. The Following 4 Users Say Thank You to frost For This Useful Post:

  3. #2
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Thanked 1,855 Times in 1,119 Posts
    Thanks for making the tutorial and sharing it with us!

  4. #3
    Original Poster
    Join Date
    Dec 2013
    Thanked 81 Times in 47 Posts
    Quote Originally Posted by Tommy View Post
    Thanks for making the tutorial and sharing it with us!
    np :) enjoy guys!

  5. #4
    Join Date
    Apr 2014
    Thanked 38 Times in 6 Posts
    Thanks for sharing!

  6. #5
    Moderator <span style='color: #FF1493'><span class='glow_000000'>Vitrex</span></span>'s Avatar

    Join Date
    Sep 2013
    Vilnius , Lithuania
    Thanked 136 Times in 96 Posts
    damn didin't understand anything O.o
    but i need exactly that... hmm i'll try figure out all this text.
    Shopper Got a Sticky! 1 year registered Member Level XL Level C Referrer
    Raffle Winner Donator Member of Staff Pot Head
    I won't create anything for you, i can only guide you to right direction.
    Don't forget to read rules before posting.
    Forum Rules
    Need and assistance with your issue? use this section to ask for assistance !
    My Portfolio
    Wanna learn PHP ? check out my One-Page project

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts