lonewolfgaming Posted December 16, 2015 Report Share Posted December 16, 2015 I am considering converting my server to use the config traders instead of off the database SQL. I have researched it and found out a premade trader list, like the one in Zupa's Coin script is a good place to start. My question is, does the server still access the database to know what items the traders are selling through their trader id? I noticed in the Zupa file it has the items set up similiar to how the server traders.sqf is. Link to comment Share on other sites More sharing options...
3steN8igall Posted December 17, 2015 Report Share Posted December 17, 2015 config trader don't need/use anything from database traders list all item with the category id that you gave him for exemple in your cfg files: class Category_100 { <--- here it is category 100 class CSJ_GyroC {type = "trade_any_vehicle";buy[] ={4000,"Coins"};sell[] ={2000,"Coins"};}; class CSJ_GyroCover {type = "trade_any_vehicle";buy[] ={4000,"Coins"};sell[] ={2000,"Coins"};}; ........................etc now set this number to a trader in server_trader.sqf: // Aircraft Trader, NEAF menu_Pilot_EP1 = [ [["Gyro Copter",100],["Cargo Planes",102],["Airplanes Unarmed",103],["Airplanes Armed",104],["Helicopter Unarmed",105]], [], "neutral" ]; Gyro Copter = this is the category name that shows ingame on trader it list all helis under the cat id 100 Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 17, 2015 Author Report Share Posted December 17, 2015 Thanks for the info, will the config trader work with the gold and silver as well? On the config traders is there still a qty the trader will have or is it a unlimited supply? Link to comment Share on other sites More sharing options...
3steN8igall Posted December 17, 2015 Report Share Posted December 17, 2015 config trader has unlimited qty and yes it works with gold and silver bars look in your folder @DayZ_Epoch --> addons --> dayz_epoch_b.pbo --> CfgServerTrader Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 17, 2015 Author Report Share Posted December 17, 2015 thanks 3steN8igall, you have been very helpful with this. After I add DZE_ConfigTrader = true; to my init.sqf, how do I link the CfgServerTrader info? Sorry to have so many questions, but this is something new to me since I have been running the SQL database traders. Link to comment Share on other sites More sharing options...
3steN8igall Posted December 17, 2015 Report Share Posted December 17, 2015 i think the best way is you copy to whole CfgServerTrader folder to your mission.pbo and add on top #include "CfgServerTrader\cfgServerTrader.hpp" in your description.ext arafinar 1 Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 17, 2015 Author Report Share Posted December 17, 2015 Appreciate the help 3steN8igall, think I got it figured out now, will work on it this weekend. Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 19, 2015 Author Report Share Posted December 19, 2015 3steN8igall, one more question. I sat down and looked at the cfg server trader folder today and I am wondering about something. Take for example, FriendlyAssultRifle has the line class Category_485 { with the available weapons under it. Can all three weapon traders have the same class Category of 485, or do I need to copy and paste the weapons under a different class Category number? Link to comment Share on other sites More sharing options...
3steN8igall Posted December 19, 2015 Report Share Posted December 19, 2015 yes they can all have the same category listed only if you wish different prices between the trader, then you must create a new category id Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 19, 2015 Author Report Share Posted December 19, 2015 thanks, that's what I was thinking, but just wanted to make sure before I set them up that way. Appreciate the help. Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 20, 2015 Author Report Share Posted December 20, 2015 Ok, got the config trader running with the game base traders, but when I enter the info for my custom traders and try to log in the game errors out with this: File.mpmissions\DayZ_Epoch_11.Chernarus\description.ext,line213:/CfgTraderCategory/Category_696/Category_699/Category_695/Category_694/Category_698/Category_693/;Missing'}' I have the info entered in under the name of the trader,i.e, ConstructionBuildingSupplies.hpp and have #include it in the Cfg Trader.hpp. Do I need to change the first part to one of the current listing like Bandit, Friendly, Neutral or Hero? Link to comment Share on other sites More sharing options...
DaveA Posted December 20, 2015 Report Share Posted December 20, 2015 You are missing a end bracket or brackets from one or more of those lines Link to comment Share on other sites More sharing options...
lonewolfgaming Posted December 20, 2015 Author Report Share Posted December 20, 2015 Thanks DaveA, that was the problem. Amazing what a }; will do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now