This guide is ment for those who are trying to create custom projects, or whatever purpose that needs huge amount of green items and EASILY. You will understand quickly what is this all about and hopefully you will see its benefits too, as it is MUCH faster than creating item 1 by 1 or any other way.
I suggest learning the use of SQL queries as it can make this even more powerful. With simple queries you can make hundreds or thousands of items in just 1 day.
Example of what we are going to do:
Files we are going to edit:
SpellItemEnchantment.dbc (For reference only, no edits)
This guide is based on Trinitycore 3.3.5a
Part - 1: Adding RandomProperty
Open Item_Template in your database and create or use existing item, you can also use any item creator you want. Fill in all details as you would normally do, but don't add stats, except armor and other values like that.
In item_template there is a field called RandomProperty, lets add our own number there.. It can be one of the existing ones, but it would be too boring. We'll make our own and 8000 is a safe number to use. Place 8000 there.
Part - 2: Creating our own RandomProperties
Open up ItemRandomProperties.dbc with any dbc editing program. Go to the bottom and add new line.
Explanation of rows:
1 = ID (Does not matter, as long as it is unique, use 8000 for example)
2 = Name
3 = EnchantmentValue
4 = EnchantmentValue
5 = ProbablyEnchantmentValue(nottested)
6 = ProbablyEnchantmentValue(nottested)
7 = ProbablyEnchantmentValue(nottested)
8 = Name again
9-23 = Ignore
24 = 16712190
Add to the line we created, name like: of the Berserker, for example. RandomProperties are suffixes. It would display on a item name "Broadsword" like this: "Broadsword of the Berserker".
Next, open up "SpellItemEnchantment.dbc" and search for stat that you wish to use. That table is very self-explanatory, the very first row is the id that you will place on EnchantmentValue in your new line at ItemRandomProperties.dbc.
Lets take this for example(ID: 1067 +40 Strength):
After adding it:
Now, do several new lines or should we call RandomProperties. I recommend creating at least 10 for extra variety.
Save it when you are done!
Part - 3: Editing Enchantment Chances
Next we are going back to database, open "Item_Enchantment_Template". Fill the entry with 8000 as it is the same value as we place in item_template in the item, remember? Next is the enchvalue which is the value we entered in ItemRandomProperties.dbc and lastly "chance" is the percentage that decides likeliness of your enchantment to show up when you loot the item in game.
Place all of your added RandomProperties in there and save.
Part - 4: Testing
Patch up your edited ItemRandomProperties.dbc in patch-x.mpq and remember to also add the edited dbc in your server's dbc folder.
Then you just add the item in-game to see how it works. :)
- You can now use the RandomProperty entry 8000 on other items as well and you don't have go through all this to create new item if you are fine with the enchantments that you previously linked to your 8000 entry.
- If you link this up with basic SQL knowledge, it is possible to modify a lot of items at once with ease.
- More to come..
Hopefully you enjoyed this guide! I'll update it if I deem it necessary. :D