red_ned

[Updated] Easy Trader set up

948 posts in this topic

Thought I should give back to this community so here goes, please be gentle with criticism but I will attempt to keep updating, especially with your help.

I wanted and easier way to deal with mods and items in the traders, all happened when we decided to change our server from CUP and MAS to RHS/MAS/HLC and the mission config became a nightmare. I had come across this technique before in A2 using the flat-file system and something almost identical in A3 Epoch so thought it was possible.

The basic idea is to have separate trader files for each mod you use, each mod has classes unique to it, and each class has that mods items, this allows you to turn off classes quickly.

I have included:

CUP vehicles, CUP weapons, HLC, RHS vehicles (US and RUS 0.4.1), MAS vehicles, MAS weapons, RHS weapons (US and RUS 0.4.1), TRYK, PODS, Arma 3 base vehicles, HVP v2.1, R3F Weapons, Extended Building Mod, Apex, Fox Vehicles, HAP, Jonzie, RHSGREF and NIArms -  as I said we did a whole mod change on the server so I had most of the trader files already, but as always there are things I will have missed although everything seems to be working without issue on my current server (except we aren't using clothes outside of the Exile mod and no longer use CUP/TRYK + I don't use loads of the other mods any more).

To keep the theme running I also made and Exile file-set so you can call those too and it keeps it all in the same structure (plus made the recent update really easy to update my files).

This trader system is offered free without any guarantee or promise and users should back up their files before proceeding.

All the folders and files are included in the download, I have also included full instructions and mod class list and trader list and have updated to recent update prices and structure but have mainly updated prices of mods we currently use (as I don't know when TRYK etc. will fix issues with clothes).

Download the scripts from GiTHub - https://github.com/redned70/Trader-Mod

*** Update v7.2 ***
Added : TankDLC
Thanks to @ItsDutch for the files

*** Update v7.1 ***
Added : HAFM
Added : MASWW2
Added : NLD
Added : POOK
Thanks to @ItsDutch and his contributors

*** Update v7.0***

Updated for Exile Pineapple

 

***************************************************
****** Thanks to all the following for help ***************
****** XxFri3ndlyxX, [RG] Salutesh, SE7EN ***************
****** Tobias Solem, pomp4h, Bob_the_K  **************
****** Razor77, jmayr2000, C][G GhostTown™ ***********
****** ElShotte, Killerpoodezz    ***********************
***************************************************

Installation is in the text files but basically you unzip, copy the TRADERS folder into your mission PBO, then delete whatever you don't use. In your mission folder you remove all the pricing, replacing with file calls, and then remove item classes, again replacing with file calls (again its in the zip with more detailed instructions) and finally copy in the traders over the top of what's in the file (or replace with external file call) removing any unused classes or mods.

There are 2 files in each folder one contains prices, the other makes items into classes (a full list of the classes I used is in the zip), this method seems pretty good at helping to change over mods on your server or controlling what parts of each mods are in the server traders (we only have guns and vehicles from any of the mods till all of them are fixed so we just leave out the clothing classes).

I have tried to balance the prices but I am sure you can change it to suit (you can copy items straight out of your config file as long as the formatting remains the same) and also I have tried to add all the items from each of the mods I have included but some are harder to track down every possible item.

I don't claim to have invented this script as there are many out there like it (probably), but I have compiled everything I have found or information/knowledge I have got from making games servers for 16 years so please don't shout "you ripped me off" as I am sure to have done just that in some way as we all have when we "borrowed" other servers trader prices etc but as ever I will take down anything which people say is 100% theirs (but I am pretty sure I haven't done that).

I hope this just makes it easier with trader lists.

cheers

****** You may not use my script on a server which takes real money for items in game ******

Edited by red_ned
updated v7.2
  • Like 37

Share this post


Link to post
Share on other sites
Advertisement

I presumed there were people out there doing this kind of thing but I just decided to post mine as I couldn't see anyone else had and it makes setup a lot less of a ball-ache when it comes to massive trader lines in the config

Share this post


Link to post
Share on other sites

hey i wanted to thank you , im currently trying to set my server up with all those exact mod but without cup , i will probably end up fucking up my server but thats okay xD. Thank you for this simple release

Share this post


Link to post
Share on other sites
12 hours ago, imdam said:

hey i wanted to thank you , im currently trying to set my server up with all those exact mod but without cup , i will probably end up fucking up my server but thats okay xD. Thank you for this simple release

I am just about to update the traders for the release of RHS v0.4 updates to try and list more of the contents + there is the Exile update tomorrow with grinder so may be a minor update to the Exile ones.

We don't use CUP either but I included what I had for all mods because I had them.

If people share their trader files and have suggestions I am always open and it could help us all.

cheers

Share this post


Link to post
Share on other sites

hey Can i ask you if adding those items/vehicle into trader could give me the error :Failed to purchase:13 , Like does it touch by any way , Where/How big the vehicle will spawn to ? Cant really figure what i did wrong haha.

Share this post


Link to post
Share on other sites
18 minutes ago, imdam said:

hey Can i ask you if adding those items/vehicle into trader could give me the error :Failed to purchase:13 , Like does it touch by any way , Where/How big the vehicle will spawn to ? Cant really figure what i did wrong haha.

1st make sure you copy the TRADERS fold into your mission PBO and remove any of the mods you don't use (you require exile folder as that is the basic exile trader list).

2nd you grab your mission config.cpp file open and scroll down to find

class CfgExileArsenal
 

You then highlight and delete to the very last };

class CfgExileArsenal
{
 blah etc
};

You then replace the whole lot with (choosing whichever mods you have installed - this is mine)

class CfgExileArsenal
{
 #include "TRADERS\HLC\ItemListHLC.hpp"
 #include "TRADERS\MASV\ItemListMASV.hpp"
 #include "TRADERS\MASW\ItemListMASW.hpp"
 #include "TRADERS\RHSV\ItemListRHSV.hpp"
 #include "TRADERS\RHSW\ItemListRHSW.hpp"
 #include "TRADERS\Exile\ItemListExile.hpp"
};

This loads the item names and prices, you then highlight and delete from class CfgTraderCategories to its last }; and replace with (this is mine)

class CfgTraderCategories
{
 #include "TRADERS\HLC\TraderCategoriesHLC.hpp"
 #include "TRADERS\MASV\TraderCategoriesMASV.hpp"
 #include "TRADERS\MASW\TraderCategoriesMASW.hpp"
 #include "TRADERS\RHSV\TraderCategoriesRHSV.hpp"
 #include "TRADERS\RHSW\TraderCategoriesRHSW.hpp"
 #include "TRADERS\Exile\TraderCategoriesExile.hpp"
};

This loads the items into groups that can now be inserted into the actual traders. So you now find class CfgTraders which is where each trader is loaded with the groups of items (get default one from the text file and remember to delete or comment out "//" any item groups which you don't have installed).

If you insert any item or item group into your traders which isn't installed then you will get blank items in the trader, if you don't have the correct groups then you get a blank in the top dropdown.

Spelling mistakes, removing punctuation can all get items to drop out of the list and give you the error you had.

If you are stuck then post ALL the exact mods you are using and I can format for you so you can see it

Share this post


Link to post
Share on other sites
3 minutes ago, red_ned said:

1st make sure you copy the TRADERS fold into your mission PBO and remove any of the mods you don't use (you require exile folder as that is the basic exile trader list).

2nd you grab your mission config.cpp file open and scroll down to find

class CfgExileArsenal
 

You then highlight and delete to the very last };

class CfgExileArsenal
{
 blah etc
};

You then replace the whole lot with (choosing whichever mods you have installed - this is mine)

class CfgExileArsenal
{
 #include "TRADERS\HLC\ItemListHLC.hpp"
 #include "TRADERS\MASV\ItemListMASV.hpp"
 #include "TRADERS\MASW\ItemListMASW.hpp"
 #include "TRADERS\RHSV\ItemListRHSV.hpp"
 #include "TRADERS\RHSW\ItemListRHSW.hpp"
 #include "TRADERS\Exile\ItemListExile.hpp"
};

This loads the item names and prices, you then highlight and delete from class CfgTraderCategories to its last }; and replace with (this is mine)

class CfgTraderCategories
{
 #include "TRADERS\HLC\TraderCategoriesHLC.hpp"
 #include "TRADERS\MASV\TraderCategoriesMASV.hpp"
 #include "TRADERS\MASW\TraderCategoriesMASW.hpp"
 #include "TRADERS\RHSV\TraderCategoriesRHSV.hpp"
 #include "TRADERS\RHSW\TraderCategoriesRHSW.hpp"
 #include "TRADERS\Exile\TraderCategoriesExile.hpp"
};

This loads the items into groups that can now be inserted into the actual traders. So you now find class CfgTraders which is where each trader is loaded with the groups of items (get default one from the text file and remember to delete or comment out "//" any item groups which you don't have installed).

If you insert any item or item group into your traders which isn't installed then you will get blank items in the trader, if you don't have the correct groups then you get a blank in the top dropdown.

Spelling mistakes, removing punctuation can all get items to drop out of the list and give you the error you had.

If you are stuck then post ALL the exact mods you are using and I can format for you so you can see it

i have done exactly this and its working great , Thanks to you , The Weapon/clothes/food/hardware trader works great ! :D But the vehicle trader , Even with vanilla one, Started giving me The error : Purchase failed : 13 , Basically from what i looked for on google, and alot of website, Is the trader failing to find a safe spot to spawn the vehicle, Tried editing but it doesnt work :/ . I just wanted to know if this ''process '' of adding item could fuck this up. Thanks again :)

Share this post


Link to post
Share on other sites
Advertisement

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.