User Tag List

Results 1 to 1 of 1

Thread: Items with random Enchantment

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

    Join Date
    Sep 2013
    United Kingdom
    Thanked 134 Times in 94 Posts

    Items with random Enchantment

    Hello, i'm here today with some new researches and new tutorial for items with random enchantment ( stats / spell ).
    Since I like to research stuff more than develop my own project I started to make more tutorials about things like this. To be honest that took about 30 minutes to research how to do this but I had to Google all structures and check how one entry depends on other, so I decided to keep everything clear in one place...
    Lets get started.

    First of all what we need ?
    • An DBC editor - personaly I use DBCUtil and then editing files with notepad++ after I know which column I have to edit by checking it with CVSed
    • Item you wanna have random enchants.

    So first of all lets look at tables and DBC files we will edit and explain everything ( or most of the stuff you should know about them)

    item_enchantment_template - stores enchants ID and chances to trigger enchants on item that using unique ID. Note : In total chance column must be equal to 100 otherwise you will have a chance to trigger item without any enchants so that means no stats on it.column "ench" triggers value from file ItemRandomProperties.dbc

    Item_template - Database table that stores items data , adding unique entry from item_enchantment_template will trigger the enchants you set in item_enchantment_template.

    ItemRandomProperties.dbc - stores data of group / single enchants that will be added on event when their entry is triggered. Also stores data of random names
    that will be added on your items with random Enchantment columns 3-5 triggers enchants from SpellItemEnchantment.dbc that will be added on items. Note : column 24 must have value of : 0xFF01FE , otherwise your enchants data will be hidden, I guess it's used for item with visuals ?

    SpellItemEnchantment.dbc - stores data of everything that related to the enchants in world of Warcraft.

    Okay so now when we know what we will be editing and how everything we can start. First of all you have to have your item you editing.
    Now connect to your world database and open table item_enchantment_template , create not used entry with not used column ench value as well.
    I would suggest you to start from 9000 here. So I created row with values

    INSERT INTO `item_enchantment_template` (`entry`, `ench`, `chance`) VALUES 
    (9000, 9000, 50),(9000, 9001,50);
    Simply we just created an enchant template that will trigger enchants 9000 and 9001 with 50% chance bot. be careful that entry for same item enchants must be same, only the ench column is unique, since it triggers the random property from dbc file. Now when we here move on.

    Go to your item_template table and find your item, in column RandomProperty add entry to trigger you created in item_enchantment_template.

    Okay, we are done with database edits. congratulations you've done half of the job, easy right?

    Now lets move on the funniest part guys, dbc editing.
    First of all what we did ? We have and item that triggers enchant template that triggers random property from ItemRandomProperties.dbc with IDs 9000 and 90001 with 50 chance both, right?

    Lets create enchants first, it will be easier in the future edits. Open your SpellItemEnchantment.dbc here explanations of columns.
    Column    Field                     Type         Notes 
    1     ID                     Integer  
    2     charges                 Integer     Mostly unused. Added 3.x?
    3     SpellDispelType.dbc_1             Integer     Enchantment Type of effect 1 
    4     SpellDispelType.dbc_2             Integer     Enchantment Type of effect 2 
    5     SpellDispelType.dbc_3            Integer     Enchantment Type of effect 3 
    6     minAmount1                 Integer     Amount of damage/armor/apply/spell for effect 1 
    7     minAmount2                 Integer     Amount of damage/armor/apply/spell for effect 2 
    8     minAmount3                 Integer     Amount of damage/armor/apply/spell for effect 3 
    9     maxAmount1                 Integer     Mostly dupe
    10     maxAmount2                 Integer     Mostly dupe
    11     maxAmount3                 Integer     Mostly dupe
    12     objectId1                 Integer     if type1 == 5, then Stat Types, else Spell.dbc 
    13     objectId2                 Integer     if type2 == 5, then Stat Types, else Spell.dbc 
    14     objectId2                 Integer     if type3 == 5, then Stat Types, else Spell.dbc 
    15-31     sRefName                 String+Loc    The name of the enchantment 
    32     ItemVisuals.dbc             Integer     The glow to add to the items that has this enchant 
    33     Flags                     Integer     
    34     ItemCache.wdb                 Integer     Reference to the Gem that has this ability (Added in 
    35     SpellItemEnchantmentCondition.dbc     Integer     Conditions for the effect to take place (Added in 
    36     SkillLine.dbc                Integer     A required profession.
    37     SkillLevel                 Integer     And the level for that profession.
    38     requiredLevel                Integer        Required level to use the enchant
    Lets create new columns for our enchants. i suggest start from entry 90000 here. Since I trigger 2 properties I need 2 enchants

    Column 1 - 90000
    Column 3 - 5 (For stats or 3 fpr spells we will use 5 in this tutorial).
    Column 4 - 5
    Column 6 - 800
    Column 7 - 650
    Column 9 - 800 (Put it same as min ammount)
    Column 10 - 650
    Column 12 - 7 (Stamine stat_type)
    Column 13 - 45 (Spell Power Stat_type)
    Column 15 - " + 800 Stamina and + 650 Spell Power"
    Column 1 - 90001
    Column 3 - 5 (For stats or 3 fpr spells we will use 5 in this tutorial).
    Column 4 - 5
    Column 6 - 1000
    Column 7 - 450
    Column 9 - 1000 (Put it same as min ammount)
    Column 10 - 450
    Column 12 - 7 (Stamine stat_type)
    Column 13 - 38 (Attack Power Stat_type)
    Column 15 - " + 1000 Stamina and + 450 Attack Power"
    Lets edit our ItemRandomProperties.dbc

    Column 1 - Entry that you trigger from database (unique).
    Column 2 - Name of random property
    Column 3-5 - Enchants that will be triggered by this property.
    Column 8 - Name of random proprety (i dunno why second time)
    Column 24 - Just make sure it has value of : 0xFF01FE  otherwise your enchants will be invisible.
    So in my case since i created 2 enchantment templates with 50 % chance I need create 2 rows.

    Column 1 - 9000 (entry I trigger from database)
    Column 2 - Of Mystic (Name of property)
    Column 3 - 90000 ( enchantment ID for Stamina and spell power). 
    Column 8 - Of Mystic (Name of property)
    Column 24 - 0xFF01FE
    Column 1 - 9001 (entry I trigger from database)
    Column 2 - Of Barbarian(Name of property)
    Column 3 - 90001 ( enchantment ID for stamina and attack power).
    Column 8 - Of Mystic (Name of property)
    Column 24 - 0xFF01FE
    Congratulations you're done. In game it will show both stats you added at one, like real enchant if you wanna show them separated just create different enchants for each stat you wanna trigger on that property and add it's id to your property, each of property can handle up to 3 enchants, same as each enchant can handle 3 of stats/ spells. Note if you wanna create random enchantment with spell Just change the type to 3 and instead of adding stat values just add the spell id where it says stat_type.

    Now create new patch with DBFIlesClient folder, place edited .dbc files there, then copy them to your release/dbc folder and run server.
    Congratulations once more you have one item with possible two random enchants one of them
    Stamina + spell power and other Stamina + Attack power.

    Hope you find it useful.
    Best regards, Vitrex.
    Shopper Got a Sticky! 1 year registered Member Level XL Level C
    Raffle Winner Donator Member of Staff
    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

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

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