Jump to content

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


Suppe

Recommended Posts

This is just an example, not a HowTo !!!

What is cfgCrafting ?
- Players can craft Items, Magazines, Vest or Guns.

Download:
- cfgCraftinglist by GBR Suppe (Custom Part is marked in the cfgCrafting.hpp)
https://github.com/GBR-Suppe/cfgCrafting-Master

Install:
- Add the cfgCrafting.hpp in your epoch.Mission
- Add to your description.ext: #include "cfgCrafting.hpp"

 

Install optional:

- Add to your briefing:

player createDiarySubject ["menu88","Custom Crafting"];

player createDiaryRecord ["menu88",
["Custom Crafting","<br/>

On our Servers you have the possibility to craft more Objects or Items.<br/>

Example: Double click on ItemScrap or ElectronicComponent.<br/><br/>

Craftlist:<br/>
NVGs =    ItemScraps 1 + Binocular 1 + ElectronicComponent 1 + near Fire<br/><br/>

optic_LRPS = ItemScraps 2 + Binocular 1 + near Fire<br/>
optic_tws = ItemScraps 2 + Rangefinder 1 + ElectronicComponent 1 + near Fire<br/><br/>

Vest 10 = Pelt_EPOCH 1 + ItemRope 1<br/>
Vest 30 = Pelt_EPOCH 2 + ItemRope 2 + ItemScraps 1 + near Fire<br/>
Vest 39 = Pelt_EPOCH 2 + ItemRope 2 + ItemCorrugated 1 + near Fire<br/><br/>

Binoculars and Rangefinder must be in the inventory, not equipped.<br/><br/>

It is only the beginning, we will add more.<br/><br/>
"]];

 

Info:
- Craft a Backpack, Vehicle or Objekt dont work ! Only Items,Guns,Vests or Magazines are craftable !
- For an example ingame: Double click on ItemScrap or ElectronicComponent.

In this Craftlist are:
NVGs =    ItemScraps 1 + Binocular 1 + ElectronicComponent 1 + near Fire

optic_LRPS = ItemScraps 2 + Binocular 1 + near Fire
optic_tws = ItemScraps 2 + Rangefinder 1 + ElectronicComponent 1 + near Fire

Vest 10 = Pelt_EPOCH 1 + ItemRope 1
Vest 30 = Pelt_EPOCH 2 + ItemRope 2 + ItemScraps 1 + near Fire
Vest 39 = Pelt_EPOCH 2 + ItemRope 2 + ItemCorrugated 1 + near Fire

- Binoculars and Rangefinder must be in the inventory, not equipped.

 

Ingame:

tGp64wB.jpg

 

Tutorial by Tactical Anders:

 

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!

Thanks to Tactial Anders :D

 

 

 

GBR Suppe

Link to comment
Share on other sites

This is just an example, not a HowTo...

I can not explain everything ! 99 % of the server hoster are full noobs, here is nothing to explain, two files and very easy !!!!!!!!!!!!.....just look in the file, there is all u need (custom part is marked)..... who is too lazy to do a bit of themselves should not use costum crafting.

Link to comment
Share on other sites

Suppe, 

 

Again excellent work as stated above, was curious about bags and vehicle creation.

 

Would it work if I added a recipe for a bag or a vehicle?

 

R.

 

no, bags or vehivels dont work.... a backpack or a vehicle is to big for your inventory !

 

Link to comment
Share on other sites

Is it possible to take a large item and break it down into two smaller items?  Like say you wanted to take a Large Sheet Metal (ItemCorrugatedLg) and break it down into two Small Sheet Metal (ItemCorrugated).  What would the cfgCrafting entry have to look like?  I don't think it's possible, as you have to define the target item class, and there is no target item class for 2 small sheet metal as a single item.  

Link to comment
Share on other sites

Hi, loving your script releases, however I am a complete novice, only had the server for a week, we have your briefing script already, excellent work, however embarrasingly I must ask the following.

 

Install:
- Add the cfgCrafting.hpp in your epoch.Mission
- Add to your description.ext: #include "cfgCrafting.hpp"

 

I am assuming that these go into MPMissions/epoch.altis.pbo 

 

Just wanted to ask before i break anything, I am slowly learning :)

 

Many thanks

 

Simon.

Link to comment
Share on other sites

  • 3 weeks later...

Is it possible to take a large item and break it down into two smaller items?  Like say you wanted to take a Large Sheet Metal (ItemCorrugatedLg) and break it down into two Small Sheet Metal (ItemCorrugated).  What would the cfgCrafting entry have to look like?  I don't think it's possible, as you have to define the target item class, and there is no target item class for 2 small sheet metal as a single item.  

 

I have the same questions. Interested in taking a belt of ammo and some scrap and making multiple magazines as well.

Link to comment
Share on other sites

Suppe, Just wanted to say great script again. So far you are coming out with some really good ones. I'm still running your AI sector script and it is still working great, love the update you did and just added the crafting one to the server. Really nice work. We just purchased our own dedicated server so just got everything switched over and all the scripts are running error free and fast now. Great work again.

Link to comment
Share on other sites

Is this possible? Not having any luck with it.

 

class IEDUrbanBig_Remote_Mag : Default
{
usedIn[] = { "HandGrenade", "EpochRadio0" };
recipe[] = { { "HandGrenade", 4 }, { "EpochRadio0", 1}, { "ItemCorrugated", 1}, { "CircuitParts", 1 } };
};
class IEDUrbanSmall_Remote_Mag : Default
{
usedIn[] = { "MiniGrenade", "EpochRadio0" };
recipe[] = { { "MiniGrenade", 2 }, { "EpochRadio0", 1}, { "ItemCorrugated", 1}, { "CircuitParts", 1 } };
};
 
FOUND THE PROBLEM. WORKING NOW!
Link to comment
Share on other sites

so more than 30 recipes has been added and only 3 of them looks squeezed

Anyway I want to fix them. I think it might be possible to find those images somewhere in server files, unpack, convert file type, edit with Photoshop, pack edited copy into my mpmission file.

Right after I need to make some changes in my cfgCrafting.hpp file. There is a kind of example, craft bottle filled with a water standing next to water barrel:

nearby[] = {{"noclass", {"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}, 3, 1, "Water Source","water"}};

it's an unique ingame action and that is why they print here every single used image.

Probably I need to initialize array recipe[] with images, but I am not sure how. 

Link to comment
Share on other sites

  • 3 weeks later...
  • 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...