Welcome to Ac-Web AC-Web

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask a Question

Ask Questions and Get Answers from Our Community

Ac-Web Official Repacks !

Here you will find all our official repacks

Contact Us

Contact a Staff member if needed

Custom Chest Creation 3.3.5a using HeidiSQL

Bosskoti

Registered
joined: Oct 7, 2020
messages: 2
Reaction score: 0
Points: 1
Credits: 5
Hello,
im sharing this guide for custom chest making, im sure there will be other chest guides, but this one is very easy to understand and make. If you have any questions regarded of the guide, please let me know!




Guide how to create a custom chest with rewards inside on a set location and time respawn for TrinityCore,
WoW Expansion 3.3.5a(12340) using HeidiSQL database edit
Following this guide will lead you to create the chest in 10 minutes once you hang in how easy it is

Explaining of what we will edit in this guide:
1. item_template ( the items we want to implement into our chest )
2. gameobject_loot_template ( the chest loot table in general, how many items ( up to 23 ) percent of the drop of items and how many items you wish to be dropped )
3. gameobject_template ( in here we create our actual object and look of our chest (including size and its displayid and X seconds
after that our chest will be opened ) and how many items we want to implement into it )
4. gameobject ( XYZ locaton where exactly the chest will spawn and its time for respawn after looting it )



Precisely following the steps is A MUST!


Lets follow these easy steps

STEP 1: item_template
1.1 Navigate to item_template
1.2 Open the World database and search for item_template
1.3 You can pick eather existing items or to make it fully customized
1.4 We pick our itemID's ( example: for this ill use GM Robe(itemid 2586),Slippers(itemid 11508) and Hood(itemid 12064)

STEP 2: gameobject_loot_template
2.1 Navigate to gameobject_loot_template
2.2 Here we will create our custom drop items, its chance of drop, how many we want to drop as of MinCount and MaxCount
( we can use existing items aswell, but its not the point of this guide ^^ )
2.3 IMPORTANT!!
2.3.1 If we want to create more then 1 item drop for 1 chest we must set all Entry to same ID
2.3.2 Lets make a new row, we can do that eather clicking the Green + in our menu or right click and click on "Insert Row"
2.3.3 All things we need to edit
- in "Entry" is our entryID where we will use it as Data1 in the steps below
( if we want to make 3 items drop from 1 chest make sure all new entry are set to the same entry
( example: we make new entry 200,000 as our primary entry, but we want 3 items, this is done by making 3 entry's with entry 200,000 (1 row per item ) )
- in "Item" we will write our item_template EntryID ( a new row is required for each item, recreating each step from 2.3.3 and placing a new EntryID for next item
(example: we want to make 3 items that drop, we make 1 row for GM Robe, 1 row for GM Slippers and 1 row for GM Hood, check 2.4 steps below to see precisely how )
- in "Reference" we leave it 0(its 0 by default)
- in "Chance" we write the drop chance of our items
- in "QuestRequired" we leave it as 0, as we do not need particular quest to be done for our items
- in "LootMode" we set to 1, as this allows our item to be looted from our chest
- in "GroupID" we leave it as 0
- in "MinCount" we set our minimum amount of drops (default is 1)
- in "MaxCount" we set our maximum amount of drops (default is 1)
- in "Comment" we can leave it blank or we can write something about our item for easy understanding for which chest is been made
and what is the item we set for its chance
2.4 Making more then 1 item drop from chest
2.4.1 As we already learned how to create a row and set the entry id and itemID, now lets see how should or loot table look like
New row:
- EntryID: 200,000
- ItemID: 2586( Gamemaster's Robe )
- Refference: 0
- Chance: 100( you can choose your drop chance from 1 to 100(default is 100) )
- QuestRequired: 0(default is 0)
- LootMode: 1 ( defines that this item is lootable )
- GroupID: 0(default is 0)
- MinCount: 1(default is 1) ( this defines the minimum amount of items that we want to drop )
- MaxCount: 1(default is 1) ( this defines the maximum amount of items that we want to drop )
- Commend: GM Robe ( for our easiness we can set a commend to describe what item is it in this loot table )
New row:
- EntryID: 200,000 ( yes, it needs to be the same in order for the game to define which items should be placed in our chest )
- ItemID: 11508( Gamemaster's Slippers )
- Refference: 0
- Chance: 100( you can choose your drop chance from 1 to 100(default is 100) )
- QuestRequired: 0(default is 0)
- LootMode: 1 ( defines that this item is lootable )
- GroupID: 0(default is 0)
- MinCount: 1(default is 1) ( this defines the minimum amount of items that we want to drop )
- MaxCount: 1(default is 1) ( this defines the maximum amount of items that we want to drop )
- Commend: GM Slippers ( for our easiness we can set a commend to describe what item is it in this loot table )
New row:
- EntryID: 200,000 ( again, we need the game to define our items by same ID and place them in 1 chest )
- ItemID: 12064( Gamemaster's Hood )
- Refference: 0
- Chance: 100( you can choose your drop chance from 1 to 100(default is 100) )
- QuestRequired: 0(default is 0)
- LootMode: 1 ( defines that this item is lootable )
- GroupID: 0(default is 0)
- MinCount: 1(default is 1) ( this defines the minimum amount of items that we want to drop )
- MaxCount: 1(default is 1) ( this defines the maximum amount of items that we want to drop )
- Commend: GM Hood ( for our easiness we can set a commend to describe what item is it in this loot table )


STEP 3: gameobject_template
3.1 Navigate to gameobject_template
3.2 You can copy paste existing chest and edit it
3.2.1 Lets start with copy pasting
3.2.1.1 Find a chest on your desire ( ill use Solid Chest with EntryID 2850 )
3.2.1.2 When you find your chest right click on it and pick "Duplicate row without keys(as of keys is our entryID of our custom chest)"
3.2.1.3 Now we duplicated our chest and its time to edit it
3.2.1.4 All rows that we need to edit
- EntryID will be our custom ID when we spawn it ( preferable to be 300,000 ID and above )
- in field "type" is set to 3(this tells the game that it has to be a chest loot table)
- in displayID is set to 259(our model that will look as chest)
- in name we write our name of our chest, for this guide ill call it Test Chest
- skip editing "IconName" , "castBarCaption" and "unk1" ( they are not needed for our chest, leave them blank )
- in "size" (default is 1) we pick our size of the chest
- in "Data0" (by default is set at 57(this decides how long our chest will be opened in seconds(default is 2 seconds)) for our Solid Chest,
it can be set also to 1599(arena chest that has a delay of 10 seconds)) we leave it as 57
- in "Data1" we write our custom made entryID in our gameobject_loot_template steps above
- however in "Data2(up to Data23)" we will write "1" for each item we placed inside STEP 2
( for example: we made 3 items in gameobject_loot_template, therefor Data1 IS our primary entryID and MUST have our customly made gameobject_loot_template ID,
after Data2 and above we set only 1 for each secondary item we set,
so this means if we made 3 items, we will set Data2 and Data3 to 1, rest up to Data23 will be 0 )
- skip "AIName" and "ScriptName" ( leave them blank )
- in "VerifiedBuild" Write "12340"(this defines our WoW Patch)

STEP 4: gameobject
4.1 Navigate to gameobject
4.2 Now we enter in our server find a good place for spawning our chest(in the guide ill use Human starting zone) and by using .gps command
we now have our coordinates we need in order to spawn our chest
4.3 Here we will set our spawn time, where exactly our chest will spawn and its GUID when it spawns, so we can remove it later if we want
4.4 Again we make a new row
4.5 All rows that we need to edit
- in "guid" we set our guid( guid is our spawned ID of an object that later we can delete with that ID )
- in "id" we write our gameobject_template entry ID of our chest
- in "map" we write the mapID provided by .gps command ( for human starting zone mapID is 0(Eastern Kingdoms) )
- in "zoneID" we write our zone ID provided by .gps command ( for human starting zone zoneID is 12(Elwynn Forest) )
- in "areaID" we write our area ID privided by .gps command ( for human starting zone areaID is 9(Northshire Valley) )
- in "spawnMask" and "phaseMask" we leave it as 1
- in "position_x" we write exactly the X: position provided by .gps command ( for human starting zone position_xID is -8941.718750 )
- in "position_y" we write exactly the Y: position provided by .gps command ( for human starting zone position_yID is -142.166702 )
- in "position_z" we write exactly the Z: position provided by .gps command ( for human starting zone position_zID is -83.469933 )
- in "orientation" , "rotation0" , "rotation1" , "rotation2" and "rotation3" we can leave them as 0 ( this provides where the chest should be facing at
and its not needed to be precisely set )
- in "spawntimesecs" we write the time that our chest will spawn in X SECONDS (default is 300 seconds(5 minutes spawn time)
- in "animprogress" we set it to 100
- in "state" we set it to 1
- in "ScriptName" we leave it blank
- in "VerifiedBuild"we set it to 0



Guide was made by Bosskoti, please give credits if you are going to share it! Thank you!
 

Tok124

Web/SQL Dev & 3D Artist
Modding
Webdev
joined: Oct 2, 2010
messages: 3,342
Reaction score: 226
Points: 63
Location: somewhere between <?php and ?>
Website trinitycore-sql-generator.com
Credits: 25
Thanks for share. Kinda hard to read tho, I think most people would rather want a query that they can customize as they like. That is alot easier for beginners. They just need to open world database and go to query tab and paste the query and click run button and it's all done.

Otherwise if you dont wanna write a query or if you don't have the experience to create it then i would suggest to make the guide more readable and preferebly shorten your guide a little. its a huge block of text.

But apart from this i am happy that there is still people around to post tutorials. It has been kinda dead for a while (and still is) so always nice to see new tutorials here.

- - - Updated - - -

And when you write query you can use variables and comments to explain stuff. Kinda like this
Code:
SET
@LootId = 200000, -- Value from Data1 Field in gameobject_template
@DropChance = 30, -- 30% Drop Chance
@MinCount = 1, -- Lowest drop count (1 means it will atleast drop 1 item)
@MaxCount = 1; -- Higest Drop Count (1 means it will only drop 1 item)


INSERT INTO gameobject_loot_template (entry, item, chance, mincount, maxcount)
SELECT @LootId, entry, @DropChance, @MinCount, @MaxCount  FROM item_template WHERE name LIKE "Gamemaster%";
 
Last edited:

Brunolopes

Official Ac-Web Repacker
ac-repack
joined: Nov 23, 2014
messages: 1,191
Reaction score: 119
Points: 63
Credits: 674
Thanks i believe you had a lot of effort doing this guide, and you actually wanted to give back to this community, but simple things like this only people that are very new to wow emulation/ SQL cant do and the way that tok124 presented the query is a lot more simple to learn and understend, BUT THANKS FOR THE TORTURIAL! i believe this will be usefull to some1
 

Bosskoti

Registered
joined: Oct 7, 2020
messages: 2
Reaction score: 0
Points: 1
Credits: 5
@tok124, the way it is presented is to follow up steps and also learn bit by bit how some parts are connected into the SQL tables to make it work properly, like for example the guide is step by step to make a new Row in item_template, which then leads to gameobject_loot_template, then gameobject_template and so on.

My point to the guide is to teach people how actually database works, its easy to set the query ready and done.
But will people learn from where actually the query takes the data to make it work? Thats the problem with query, ppl look of ready set instead of looking how to make it, by doing this they dont learn.
Step by step going into database and editing is way faster way to learn how to operate and later stage how to edit query more properly without giving errors.

Thats the reason the guide is plane text and nothing else.

Ofc, i can add pictures, may happend in future :)
 
Back
Top