Jump to content

Add items to the traders?


Guest

Recommended Posts

Is it possible to add new items to the traders to enable buying\selling for each new item? Like adding new guns if we choose to use the @mas weapons addon?

Link to comment
Share on other sites

It is possible yes however it requires you to have @Emod (available on A3Launcher) installed to override features that epoch by default compiles. Then you can override the CfgPricing.hpp and choose your own weapons and prices. Also handy for overriding server files which you will have to do. Simply add your own copy of the file (with your edits) in your mission and then use compilefinal to tell your server to use this.

Link to comment
Share on other sites

Emod is a very small mod which essentially enables you to call compile a file before any other mod loads. If you open A3Launcher (http://www.a3launcher.com)and download Emod (0.2) and wait a second for that to download. Then press settings (in the top right) and press "open mod folder", this will take you to your Arma 3 directory. Go into Emod02 and then look at the Readme.txt (I will summarize below).

 

Simply load this mod after epoch:
-mod=@Epoch;@EpochHive;@Emod
(This is the instruction for loading the mod in the arma launch parameters)
 
In your description.ext (mission file) add the following:
 
class CfgEmod {
    override = 1; // Set to 1 to enable the override
    file = "maca134\precompile.sqf"; // path to the file to be call compile'd before Epoch's compiles
};

 

(The directory above can be changed to wherever your precompile will be located, it is essentially an sqf file that will define variables and run anything you would like to run before Epoch)

 

And you're done, its as simple as that. Then add whatever you would like to add in there (a quick example below).

 

Random_Function = compileFinal preprocessFileLineNumbers "Custom\Random_Function.sqf";

 

Again read through the Readme.txt inside the mod folder as it contains all the info required!

Link to comment
Share on other sites

Keep getting this error when trying to load into the server. 

 

Warning Message: Script x\addons\a3_epoch_server\DQR\precompile.sqf not found

 

Any help would be much appreciated. You've already help me a ton by sharing this much information.

Link to comment
Share on other sites

OK stupid question time . 

 

I have been looking at this as it sound exactly what i need for my server , BUT when i download it i do not see any precompile.sqf.   so , where is it  or how do i make one ?  any input from the more experienced users would be greatly appreciated.

 

nishma 

Link to comment
Share on other sites

OK stupid question time . 

 

I have been looking at this as it sound exactly what i need for my server , BUT when i download it i do not see any precompile.sqf.   so , where is it  or how do i make one ?  any input from the more experienced users would be greatly appreciated.

 

nishma 

You create a file and save it as .sqf.

 

Hell could just call it motherfucker.sqf then add this to the discription.ext

class CfgEmod {
    override = 1; 
    file = "Motherfucker.sqf"; 
};

Then you need to create a file to compile final and such.. But then you would need to know how to add in the cfgpricing defines..  If you are getting stuck at this precompile step you really shouldn't go down the mas+epoch route (since it will require you to trail blaze).

Link to comment
Share on other sites

I couldn't get it to work right on my server.  Called an sqf file in description.ext inside which I then did a  #include CfgPricing.hpp, which seems to me should have worked.  But I got errors out of it and it wouldn't load.  I've got a thread up on the CCG forums about it but no response as of yet.  

Link to comment
Share on other sites

my RPT

 

20:48:54 "Epoch: Compiles Init"
20:48:54 "EMOD: Checking for mission file"
20:48:54 Could not load 'CfgPricing.hpp'. Extension not in allowedPreprocessFileExtensions Listed
20:48:54 Attempt to override final function - random_function
20:48:54 "Continuing to load Epoch"
 
Tip?
Link to comment
Share on other sites

#include "cfg\CfgPricing.hpp"
 
class CfgEmod {
    override = 1; // Set to 1 to enable the override
    file = "custom\a3_epoch_code\init\precompile.sqf"; 
};
 
and have full price list in that directory but for some reason it does not let me sell the guns from @mas still..did i miss something? ;p
 
no mags wont sell too
 
do i need to call this  #include "cfg\CfgPricing.hpp"  from the precompile.sqf file too?
Link to comment
Share on other sites

The config file cannot be edited with Emod, you can however overwrite the config file references within the epoch trading system (anything relating to cfgpricing) with missionconfigfile and then include the CfgPricing in your description.ext. CfgPricing is a config entry, not a variable, so trying to do this

 

if (isServer) then {

CfgPricing                    = compile preprocessFile "SpecOps\Config\CfgPricing.hpp";
};

 

will not work or do anything. The missionconfigfile is used for anything inside the description.ext (use the #include feature to make it a bit cleaner), this will then make your CfgPricing accessible through missionconfigfile >> CfgPricing. Then there are 2 client files and server files that must be edited from configfile to missionconfigfile where it uses CfgPricing to force the server to reference to your custom CfgPricing.

Link to comment
Share on other sites

Where i can find CfgPricing.hpp

???

 

greez

you need to create a CfgPricing or copy the 1 from server and add your extra weapons to it.

 

dont ask me how to get it to overwrite yet still trying to figure it out my self..i have the #include CfgPricing in my description.ext but thats not enough YET!

Link to comment
Share on other sites

so which are the files that need to be edited from configfile to missionconfigfile? :P

 

diag_log 'EMOD: Precompile Running';


EPOCH_npcTraderAdd = compileFinal preprocessFileLineNumbers "custom\compile\traders\OP_npcTraderAdd.sqf";
EPOCH_startNpcTrade = compileFinal preprocessFileLineNumbers "custom\compile\traders\OP_startNpcTrade.sqf";
call compile preprocessFileLineNumbers "custom\init\fn_init.sqf";
diag_log 'EMOD: Precompile Finished';

 

thats wat i have so far but still not there..guns wont sell yet!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...