Jump to content
  • 0

0.3.0.1 cfgCrafting! WOOT WOOT


DirtySanchez

Question

So just like you changed the cfgPricing.hpp file to be mission side, you will do the same for the cfgCrafting.hpp file.

Currently playing around with basic crafts and trying to include the EPOCHMOD's newest members, the MeleeMAUL and CrudeHatchet.

So far I have added in crafting for 4 items and yes they play in perfect with my pricing scheme :)

 

Nightstalker
Item Scraps x3, NVG, MeleeMaul and be by the fire and (possibly adding water barrel for metal cooldown!)

LRPS
Item Scraps x3, Rangefinder, MeleeMaul and be by the fire

Hatchet
Item Scraps x3, CrudeHatchet and be by the fire

Sledgehammer
Item Scraps x3, MeleeMaul and be by the fire
In order to accomplish your recipes you will need to create and edit in order to accomplish it. Do some quick reading in your cfgCrafting file and I am sure you will be able to see the pattern and how it works.

EDIT:

New crafts since morning:

L85A2_Pink_Epoch
L85A2 + PaintBase + PaintRed

to encourage more water missions:
SpearGun
Rope + MetalScraps x2 + SpearRound and by a fire

and to further my work on optics, now comes silencers
Pop(Specific Pops based on price) + ScrapPelt and by a fire
Link to comment
Share on other sites

Recommended Posts

  • 0

SO QUICK and EASY.

Get your cfgPricing.hpp and your cfgCrafting.hpp by dePBO the epoch_config.pbo in the client side epoch files. Add both files to your mission folder, make your edits and add these to your description.ext

#include "cfgPricing.hpp"
#include "cfgCrafting.hpp" 
Link to comment
Share on other sites

  • 0

Nice!

 

 

@DirtySanchez

 

cfgCrafting.hpp? please an example

 

Thx

 

That file is in your a3_epoch_config.pbo which is in the client files for epoch.......

 

Craft an ebike!

I don't think that will work, we do not have enough space in our inventory for a vehicle...

That would require a setPOS in the server and all that jazz, that's more script material than crafting :( sorry would have been nice though.

Sort of like my original idea to let everything break down in their respective buildto recipes. ie. breaking down Large Corrugated into the 3 small Corrugated, but so far I have not made any progress on making multiple items from one craft.

Link to comment
Share on other sites

  • 0

I've managed to figure out the preconfigs from mission to epoch client files, however have you been able to figure out how to call to a UI template for the crafting menu similar to how maca has done on CCG? He uses a variation of the Altis Life menu template and just adds in the crafting config hpp file to it's context, and has it call right from the action bar on inventory menu. It's a rather crafty way to do it (yes, pun intended), we've been trying to set up something similar and can't seem to get the UI to call to the crafting hpp properly. rpt says its missing.

 

 

This would be an awesome script share if someone pulls it off, since maca doesn't share shit that he makes anymore, despite taking everyone elses work all willy nilly...

Link to comment
Share on other sites

  • 0

Is the crafting limited to items ? I can craft items just fine, I can't craft weapons or magazines :unsure: or did i miss something bleeding obvious ?

 

looks like it.... i tryed world objekts like a waterbarrel and vehicles :D  but dont work :(

 

works only with items, but it is a good start :D

Link to comment
Share on other sites

  • 0

Is the crafting limited to items ? I can craft items just fine, I can't craft weapons or magazines :unsure: or did i miss something bleeding obvious ?

 

ok, i test it again, mags and guns are working... here an example (working)

    class ItemScraps : Default

    {

        usedIn[] = { "ItemCorrugated", "7Rnd_408_Mag", "m107_EPOCH" };

        nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };

        recipe[] = { { "PartOre", 2 } };

    };

 

    class 7Rnd_408_Mag : Default

    {

        recipe[] = { "ItemScraps" };

    };

    class m107_EPOCH : Default

    {

        recipe[] = { "ItemScraps" };

    };

 

this works :D

so... happy crafting :D

 

 

you can actually add vehicles to inventory

No, unfortunately not, but would be nice if it would just fall out, inventory is full, so fall out :D  then we could also add water-barrels and wind turbines(solar for energie) himself :D :D  would be great...

the first two parts which I have tested that were ebike and a water-barrel :P

 

Link to comment
Share on other sites

  • 0

Your on to something ;). CfgPricing/CfgCrafting configs can be edited and modifications can be released to the public. Please test and report any bugs or feedback you have. If all is well with this method we will start using it for more configs. Just keep in mind we will be updating these configs with future patches and possibly even with community additions.

 

Also, I will soon be reworking the crafting UI as currently we are limited to 6 uses per item. With the reworked UI we will be able to support nearly an unlimited amount of options.

 

Richie, you should be able to use any existing magazines, items or weapons.

Link to comment
Share on other sites

  • 0

Your on to something ;). CfgPricing/CfgCrafting configs can be edited and modifications can be released to the public. Please test and report any bugs or feedback you have. If all is well with this method we will start using it for more configs. Just keep in mind we will be updating these configs with future patches and possibly even with community additions.

 

Also, I will soon be reworking the crafting UI as currently we are limited to 6 uses per item. With the reworked UI we will be able to support nearly an unlimited amount of options.

 

Richie, you should be able to use any existing magazines, items or weapons.

So far so good and they are loving the new optional crafting.

I plan to add many more.

I also have removed the LRPS from the loot tables, sort of forcing a crafting.

Plus trying to add in crafts that utilize the new items and tools.

Hope we can push this far enough that you do decide to further your work with it.

Link to comment
Share on other sites

  • 0

ok, i test it again, mags and guns are working... here an example (working)

    class ItemScraps : Default

    {

        usedIn[] = { "ItemCorrugated", "7Rnd_408_Mag", "m107_EPOCH" };

        nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };

        recipe[] = { { "PartOre", 2 } };

    };

 

    class 7Rnd_408_Mag : Default

    {

        recipe[] = { "ItemScraps" };

    };

    class m107_EPOCH : Default

    {

        recipe[] = { "ItemScraps" };

    };

 

this works :D

so... happy crafting :D

 

 

No, unfortunately not, but would be nice if it would just fall out, inventory is full, so fall out :D  then we could also add water-barrels and wind turbines(solar for energie) himself :D :D  would be great...

the first two parts which I have tested that were ebike and a water-barrel :P

Hope that's just an example cause crafting metalscraps straight into ammo is crazy!

At least add the fire requirement like the first one or add in need for meleemaul for forming the metal and maybe more scraps

Link to comment
Share on other sites

  • 0

Hope that's just an example cause crafting metalscraps straight into ammo is crazy!

At least add the fire requirement like the first one or add in need for meleemaul for forming the metal and maybe more scraps

 

yes, this was only an example, to crazy for a real server.

 

aktiv on server are:

Craftlist:

Nightvision =    ItemScraps 1 + Binocular 1 + CircuitParts 1 + near Fire

Longrangescope = ItemScraps 2 + Binocular 1 + near Fire

 

but this is only the start :D i will add more :D

 

Link to comment
Share on other sites

  • 0

Can anyone tell me if im doing it right please

 

class CfgCrafting


{
class Default
{
usedIn[] = {};
recipe[] = {};
nearby[] = {};
};

class ItemCorrugated : Default
{
usedIn[] = {"KitShelf","ItemCorrugatedLg","optic_Nightstalker","optic_LRPS"};
nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
recipe[] = { { "ItemScraps", 2 } };
};

class NVG_EPOCH : Default
{
usedIn[] = {"optic_Nightstalker"};
};

class Rangefinder : Default
{
usedIn[] = {"optic_Nightstalker"};
};

class optic_Nightstalker : Default
{
nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
recipe[] = { { "NVG_EPOCH", 1 }, { "CircuitParts", 1 }, { "Rangefinder", 1 }, { "ItemCorrugated", 1 } };
};

class Binocular : Default
{
usedin[] = {"optic_LRPS"}
};

class optic_LRPS : Default
{
nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
recipe[] = { { "Binocular", 1 }, { "ItemCorrugated", 1 } };
}
};

Link to comment
Share on other sites

  • 0

FYI the 0301 crafting file has an error: The vehiclerepairlg calls for itemcorrugated while itemcorrugatedlg says it's used in vehiclerepairlg

ääähhhmmm, no. you understand that false or doing something wrong.

 

Link to comment
Share on other sites

  • 0

So just like you changed the cfgPricing.hpp file to be mission side, you will do the same for the cfgCrafting.hpp file.

Currently playing around with basic crafts and trying to include the EPOCHMOD's newest members, the MeleeMAUL and CrudeHatchet.

So far I have added in crafting for 4 items and yes they play in perfect with my pricing scheme :)

Nightstalker
Item Scraps x3, NVG, MeleeMaul and be by the fire and (possibly adding water barrel for metal cooldown!)

LRPS
Item Scraps x3, Rangefinder, MeleeMaul and be by the fire

Hatchet
Item Scraps x3, CrudeHatchet and be by the fire

Sledgehammer
Item Scraps x3, MeleeMaul and be by the fire
In order to accomplish your recipes you will need to create and edit in order to accomplish it. Do some quick reading in your cfgCrafting file and I am sure you will be able to see the pattern and how it works.

EDIT:

New crafts since morning:

L85A2_Pink_Epoch
L85A2 + PaintBase + PaintRed

to encourage more water missions:
SpearGun
Rope + MetalScraps x2 + SpearRound and by a fire

and to further my work on optics, now comes silencers
Pop(Specific Pops based on price) + ScrapPelt and by a fire

Are the tools consumed when you use them to craft items? Like say you've already made a maul and then used it to make a LRPS. Does the maul disappear and you have to make another one to craft the next recipe or does it remain in your weapon inventory?

Link to comment
Share on other sites

  • 0

Hey Darth,

All items used in crafting are removed from inventory to create the new item.

I have only seen the Nearby code but that's only the fire and water barrels.

We could also set up possibly a specific building or unit type for recipe's with the nearby array.

Hope we get some documents on all this good stuff we have configurable now.

So yes you will need the tools in your backpack and it will remove it upon crafting the new item.

Link to comment
Share on other sites

  • 0

Well I understand the logic behind it, and normally yes, you want to consume all items needed to craft a larger, more complex item.  But in the case of tools like an improvised axe or maul, I think they should remain in inventory at least for a few uses.  Maybe that's something that can be developed down the road - have tools that are good for a limited number of uses, after which time they have to be re-crafted.  Having to redo them every time you make something is a bit harsh I think.  

Link to comment
Share on other sites

  • 0

agreed but I have not found any documentation on what the array is made up of for the Nearby in the cfgcrafting.

I feel that we should be able to require you have the maul.

Lets try to replace

nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };

With

nearby[] = { { "MeleeMaul", { "ALL" }, 3, 1, "MeleeMaul", "MeleeMaul" } };

or maybe replace this

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

with this

nearby[] = {{"CfgWeapons", {"meleemaul"}, 3, 1, "meleemaul","meleemaul"}};

Hopefully this will spark some explanation from the devs or someone thats had the time to pick it apart.

Link to comment
Share on other sites

  • 0

Well if need be they could add a new field to it where you can define "Required Tools" in the cfgCrafting file.  Then the crafting script knows that a certain tool is required in order to make item 'xyz', but it does not get consumed in the crafting process.  

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

×
×
  • Create New...