Jump to content

[Release] cfgCrafting (Craft a Item,Gun,Vest or Magazine)


Suppe

Recommended Posts

could you explain in detail how to prepare the recipes

 

Go into your root\@epoch\a3_epoch_config.PBO and find the file named cfgCrafting.hpp and the file named cfgPricing.hpp.

 

Make a copy of those files and put them in your mission.PBO root and add the following to the top of your Description.ext

#include "cfgPricing.hpp"
#include "cfgCrafting.hpp"

cfgCrafting.hpp is where all your receipes and available "ingredients" are set up.

 

cfgPricing.hpp is usefull to have in the mission.pbo root aswell cause it allows you to alter the item prices.

 

 

This is how i set up my craftable Satchelcharge in cfgCrafting.hpp: 

//Satchelcharge
	class SatchelCharge_Remote_Mag : Default
	{
		recipe[] = {{"HandGrenade",2}, {"ItemSilverBar",1}, {"ItemWatch",1}};
	};
	class HandGrenade : Default
	{
		usedIn[] = { "SatchelCharge_Remote_Mag" };
	};
	class ItemSilverBar : Default
	{
		usedIn[] = { "SatchelCharge_Remote_Mag" };
	};
	class ItemWatch : Default
	{
		usedIn[] = { "SatchelCharge_Remote_Mag" };
	};

To add a requirement of water or fire you add this aswell (Without the "//" ) :

 

Fire:

class SatchelCharge_Remote_Mag : Default
	{
		recipe[] = {{"HandGrenade",2}, {"ItemSilverBar",1}, {"ItemWatch",1}};
                //nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};    
	};

Water:

class SatchelCharge_Remote_Mag : Default
	{
		recipe[] = {{"HandGrenade",2}, {"ItemSilverBar",1}, {"ItemWatch",1}};
                //nearby[] = {{"noclass", {"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}, 3, 1, "Water Source","water"}};
	};

All classnames can be found either through google, or through the cfgPricing.hpp!

 

Good luck!

Link to comment
Share on other sites

  • 4 weeks later...
Is it possible to craft an item and keep one of the items required for the crafting?
 
//Yes this will basically use the the Kilo of Hemp as Medical Mary-Jane
class FAK : Default
{
recipe[] = { {"ItemKiloHemp",1}, {"lighter_epoch",1} };
};
class lighter_epoch : Default
{
usedIn[] = {"ItemKiloHemp", "FAK"};
};
 
In this example I would like to keep the Lighter from being consumed in the crafting process, as a lighter is something I feel can be used multiple times (especially if it's an Epoch_Zippo lighter).
I remember setting up custom craftables in A2 and basicly the items got used, but then item was readded to invantory. Such as a toolbox that made the craftable bike was consumed, but was then a fresh toolbox was added to invantory further down the script. 
 
Would it be as simple as (but probably not):
 
class {"FAK", "lighter_epoch"} : Default
{
recipe[] = { {"ItemKiloHemp",1}, {"lighter_epoch",1} };
};
Link to comment
Share on other sites

Somebody tried out an recipe for jerrycans?

 

I tried to add a crafting recipe for jerrycans, but somehow it isnt working. I tried 2 Whiskeynoodle, 1 Pumpkin, and 1 salvagemetal for it. But when I trie to craft them ingame it says something like wrong item count... I'm loosing the whiskey and pumpkin but not the salvagemetal and I get NO jerrycan.

I've checked the entry in the sqf again and again but couldn't find any errors. May be its not possible to add such recipe!? I've added a lot more recipes on our sever which are all working fine. But these one won't work.

 

These are the entries in the cfgCrafting.hpp:

 

class jerrycan_epoch : Default
{
usedIn[] = { "CSGAS" };
nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
recipe[] = {{"WhiskeyNoodle",2}, {"Pumpkin",1}, {"ItemCorrugated",1} };
};
class WhiskeyNoodle : Default
{
usedIn[] = {"FAK", "jerrycan_epoch"};
};
class Pumpkin : Default
{
usedIn[] = {"jerrycan_epoch"};
};
class ItemCorrugated : Default
{
usedIn[] = {"KitShelf","ItemCorrugatedLg", "V_39_EPOCH", "jerrycan_epoch"};
nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
recipe[] = { { "ItemScraps", 2 } };
};
Link to comment
Share on other sites

Is it possible to use the large rusty fuel tanks at gas stations and farms as a nearby item or can I define that somehow? I want to use this to fill empty jerry cans like in A2 DayZ and not have the fuel stations autofuel.

Link to comment
Share on other sites

Our recipe for jerrycans as posted above is now working fine. I think the problem was that some letters have to be written BIG letters not in small if you know what I mean. (Sorry I don't know the translation of "Gross- & Kleinschreibung" ^^) 

 

Another issue....

 

Since the 0.3.1.0 Update it seems that the configuration files (incl. the CfgCrafting.hpp) where moved out of the a3_epoch_config.pbo.

Our custom recipes are still working after the update, but the new recipe for crafting energypacks is not available. I think we have to add this manually in the modified CfgCrafting.hpp which is located in mpmission/Mapname.pbo. 

Don't know the classname for the clear water which is needed. Does anybody know it or does anybody know where the new new configs are located now? 

Link to comment
Share on other sites

  • vbawol unpinned this topic

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
  • Discord

×
×
  • Create New...