epoch - how to add vehicles, weapons and ammo to traders

Caboose69

Member
Hi i im struggling to work out how to do the above. Also struggling to put sql restock in. any help greatly appreciated, may be with a donation
 
Hi,
i add some item to the plane trader at the airfield (N-E)

what i've done :

I investigate the sql table to understand how it work.
You have 4 table.
- server_traders
- trader_items
- trader_tids
- traders_data.

Step 1 - In "server_traders"
there is :
ID - CLASSNAME - INSTANCE - STATUS - STATIC - DESC

Fisrt find in wich instance you are, for me it was "11" and i wanted to add some item to the airplane dealer. So easy i check "airplane dealer" and instance "11", it give me the ID "103".
static is what they deal with you, like wiskybottle or biomeat.
for me it's :
103 - WORKER2 - 11 - NEUTRAL - AIRPLANE DEALER
(remembre ID and CLASSNAME)

Step 2 - Next, "trader_items"
there is :
ID - CLASSNAME - TYPE - GROUP - AFILE

i just add what i wanted,
xxx - MortalBucket - 1 - Building Supplies - Trade_item
for the 3 last one, i just re copy what it was upper, if you want to add a vehicule, just seach upper.

Step 3 - Next, "trader_tids.
there is :
ID - NAME - TRADER
if you want to make a proper group, juste add another line as i do fo me :
693 - Building Supplies - 103 (<- this one was found in step 1)

Step 4 - Next, "traders_data"
there is :
ID - ITEM - QTY - BUY - SELL - ORDER - TID - AFILE
so just add what you what
for me i do :
XXX - ["MortarBucket", 1] (1 = quantity to sell/buy) - QTY (quanty trader can sell) - BUY (make your price) - SELL (here too) - ORDER (?) - TID (<- this one was found in step 3) - AFILE (<- this one was found in step 2)

Save and exit you DB tool.
Open your "server_traders.sqf" in you MPMISSIONS FOLDER (or PBO).
In Step one you found the classname of the trader, for me it was "worder2" so in you server_traders.sqf just search the classname of the trader you want.
for me it was :

// Aircraft Dealer 103
menu_Worker2 = [
[["Airplanes",517],["Helicopter Unarmed",519]],
[],
"friendly"
];

At the end of the line [["Airplanes",517],["Helicopter Unarmed",519]], - i just add this just before the "]," : ,["Building Supplies",693].

for me it is :

// Aircraft Dealer 103 <- i add 103 here to remember after
menu_Worker2 = [
[["Airplanes",517],["Helicopter Unarmed",519],[Building Supplies",693]],
[],
"friendly"
];

"Building Supplies" is the value found in "group" in step 2 and "name" in step 3.
"693" is the value found in id in step 3.

Save and start your server.

Tell me if it's good for you :D
(im french so sorry for my english. I don't like google trad ;) )
 
Thank you for this expalin, if i can, i wanting to made same additional stuff for the trader but by adding new vehicles not avaible so far on my server.

In the database:
- I created the new vehicle in the trader data ( price, etc)
- i created the new item for this new class of vehicle into tthe trader Tids
- I created the new vehicles into the trader item
- I settled the trader to let him sell/buy the new group trought the server_trader.sqf files
-I allowed the new vehciles in my dynamicvehicles.sqf folder to let it spawning too.

But now i have to add the new vehicles in the server to get it avaiable on the server i suppose ( because so far the trader got the right new group to sell/buy but no vehicles is still avaiable so far in this group).
So my question is how to add this new vehicles on the server and then let the server spawning normally and the trader sell/buy it?

PS: i use HFB server.
 
do you have the sql access

i use this code and fill out correctly, but its missing something

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["1Rnd_HE_M203",1]',10,'[4,"ItemGoldBar",1]','[2,"ItemGoldBar",1]',0,60,'trade_items')
 
Hi;

I have Mysql acces yes but i dont use it ( i'm not really good with this console)
Then i used the database to add them manually n each table.

1- I added the new vehicles in the vehicle table
2- I modified my dynamicvehicles.sqf to add them allowed in the server to spawn
3 - I modified the server_trader.sqf to add the new group to the trader that i wanted to buy/sell this new vehicle
4- I added the new group into trader tids
5- I goes to trader item and added the new vehicle in the right group
6- I added the vehicles in the trader data ( price etc)
7 - i added the new spawn location about this vehcile into the world vehicl table

So then all goes good. New group is apperaed on the trader.
But it seem the trader dont get any of this vehicle to sell/buy.

vehicles that i tryed so far what MLRS and BMP2_Ambul_CDF ...
Can someone help me to tell me what's wrong ( restriced vehicles banned many, or adding vehicles files to server etc)
All my add was good ( i mean i modified many actual item in some trader that dont get those item to seel buy in normal epoch. So i didnt make mistake by adding those vehicles. I just miss something that i dont know to let them spawn and buy/sell)
 
worked it out using this

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["1Rnd_HE_M203",1]',10,'[4,"ItemGoldBar",1]','[2,"ItemGoldBar",1]',0,60,'trade_items') the 60 being the server trader id from pbo server trader.sqf
 
I did it with Mysql console.

And nothing appearing on the trader in game. His new group to sell/buy still empty...
:(
 
and will this tool work with dayz.st?


these were some of the codes i was trying

INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["CinderBlocks",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 530, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["CinderBlocks",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 662, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["CinderBlocks",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 508, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["MortarBucket",1]', 15, '[2,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 530, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["MortarBucket",1]', 15, '[2,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 662, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["MortarBucket",1]', 15, '[2,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 508, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 555, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlywoodPack",1]', 15, '[3,"ItemGoldBar",1]', '[1,"ItemGoldBar",1]', 636, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 15, '[3,"ItemSilverBar10oz",1]', '[15,"ItemSilverBar",1]', 555, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["PartPlankPack",1]', 15, '[3,"ItemSilverBar10oz",1]', '[15,"ItemSilverBar",1]', 636, 'trade_items')
 
Any idea on how to use this tool?

You should have a working apache and php to use this tool.
And config this :

$host = "localhost";
$port = "3306";
$user = "USER";
$db = "dayz_epoch";
$pass="PASS";
in Trader_Config_Tool.php
 
Back
Top