Crafting System

Help & discussion for Crafting System takes place here...

how do i add this to the init:
Note: You'll need to add the global variable crafting_menu_open = false;, i.e. within your init.sqf

just add it as the last line:
crafting_menu_open = false;
or if you're using a custom variables.sqf, you can add it to a long list of already predefined variables.
 
Hello, guys. Your script is awesome! But it does not work with my antihack (monky). Players can see the inscription "Crafting Menu" and "Opened Crafting Menu. Scroll your mouse to access it". Further, nothing happens. Here is the exceptions in the system:
in _cMenuDefault = [] I added a variables ""manatee_craft_menu"",""manatee_craft_menu_ind"",""manatee_craft_menu_wea"",
""manatee_craft_menu_sur"",
in _dayzActions = I added a variable - s_player_smeltItems. The server can't start, and there are errors in the rpt logs "Wrong text element 'null'".
What do you think?
 
You'l need to merge some menu actions differently. Some are "Arrays" similar to the repair option, and some are singular Actions, here is an example:

_dayzActions = s_player_repairActions + s_player_removeActions + manatee_craft_menu + manatee_craft_menu_wea + manatee_craft_menu_sur + manatee_craft_menu_ind +
[s_player_grabflare, s_player_removeflare, s_player_deleteBuild, s_player_forceSave,
s_player_flipveh, s_player_fillfuel, s_player_dropflare, s_player_butcher, s_player_cook,
s_player_boil, s_player_fireout, null, s_player_packtent, s_player_sleep, s_player_studybody,
s_player_tamedog, s_player_feeddog, s_player_waterdog, s_player_staydog, s_player_trackdog,
s_player_barkdog, s_player_warndog, s_player_followdog, s_player_movedog, s_player_speeddog,
s_player_calldog, NORRN_dropAction, s_player_selfBloodbag, s_player_recipeMenu, s_player_deleteCamoNet,
s_player_gateActions, s_player_deleteBuild, s_player_enterCode, s_player_codeObject, s_player_codeRemove,
s_player_smeltItems, s_player_smeltRecipes];

I know the above isn't exactly the solution to you, but Maybe you can sort it out.
The main point I'm trying to make is the s_player_smeltItems goes into an "array within the array" and the manatee_craft_menu et all (Action Arrays) are added outside that inner array, along with default actions such as s_player_repairActions.

Let me know if that help or if you need some more guidance. Maybe you can PM me your override arrays if you can't get it to work.
 
I'll be attempting this later after finishing my other additions to this script. I use blur's AH and the issue will be the same. I'll report back with how I get on.
 
You'l need to merge some menu actions differently. Some are "Arrays" similar to the repair option, and some are singular Actions, here is an example...
Sorry, your method does not work..
I just deleted the lines with array _cMenuDefault = [] and it worked.
I know it's a hole in the antihack but so far this is the only solution found me.
 
Sorry, i'm not familiar with the anti-hacks your using, but you get the point I was trying to make?
The action menu was added to an array within that array, where as the actual crafting menus were added outside the inner array.
 
Sorry, your method does not work..
I just deleted the lines with array _cMenuDefault = [] and it worked.
I know it's a hole in the antihack but so far this is the only solution found me.


Removing that makes a huge hole!
 
I followed your instructions step by step and I'm happy to announce it works absolutely perfect. My only issue was with crafting an Old Camping Tent, we don't have a Sniper3_DZC skin, is that something that's from another map/mod. I know I can just edit that to a regular ghillie, which I have, I'm just asking for curiousity's sake.

Other than that, works fantastically, no issues whatsoever, Kudos to you good sir.

For those having issues, I recommend re-reading his post from the beginning and tracing your steps there. You may have missed something. Personally, I almost missed the addition to the init.sqf. Start from there and you should be able to find a mistake you made.

I'm not sure what the OP's schedule is for helping people but I'm always willing to help. I'm on my TS, ts.gsc-clan.org, pretty much anytime after 1030pm EST.
 
so where in the init. do i put the crafting menu Variable?
i dont see a line existing, and im not sure where exactly i have to add the line to.
anyhelp would be great thanks.

also willing to help others come on teamspeak:
ts60.gameservers.com:9150
 
OK GOT IT GOING>. AWESOME>>>>> THANKS MAN>. only 1 thing , i guesss im gonna have to add grenades somehow.. .. how can i make my own custom items on this.. ?? is it possible or do i have to tell you my ideas and you can try ? i would like to do it myself if you can tell me how..
GREAT MOD>>>>> FUCKING AWESOME SHIT>>>
 
Just want to announce I have this working on my server as well.

Just follow the directions and it's EASY.

If you have Anti-Hack, you will need to whitelist THESE actions

manatee_craft_menu,
manatee_craft_menu_ind,
s_player_smeltItems,
manatee_craft_menu_sur,
manatee_craft_menu_wea,


Thank you for this Allen, I shall have fun changing things around ;)
 
Hi, the items are 100% customization to your hearts content, you can even add more "Categories" and follow the structure just like adding industrial, or survival, or weapons. And within each category, you can customize each menu addition/add or remove them as well.

Essentially, you need to know the required items class names and the class name of the final item.
I find the easiest way to do this is to spawn

If you want to create a Wire Fence Kit for example, and lets make an example that you want to make it out of 1 trash tin can
So find the class name for the wire fense, ItemWire - and trash soda cans: TrashTinCan

you just add a menu item (or modify if that item already exists from my example) and follow this array structure.
// PARAMETER STRUCTURE VERY IMPORTANT
// type = 0 for magazine, 1 for weapon/toolbelt
// [ [ type, "Finished Readable Item Name","FinishedItemClassName","FinishedQty" ] , [ [type, "RequiredClassName","RequiredQty"] , [type, "RequiredClassName2","RequiredQty"] ... ]]

So we can have 2 types, wither weapons or magazines - ItemWire is a magazine, its real reading name is "Wire Fense Kit", and class name is "ItemWire" and we're going to make only 1 per 1 tin can.
so the first part of the array compiles to [0,"Wire Fense Kit","ItemWire",1]

now we build an array of required items as follows: [[item1Details],[item2Details] and so on...]
For this example, we only need [[item1Details]] so the item1Details can be compiled as follows:

The type, 0 for magazine, "itemClass", "quantity" = [0,"TrashTinCan","1"]

So the parameter that is passed to the over for the above example is [[[0,"Wire Fense Kit","ItemWire",1]],[ [0,"TrashTinCan","1"]]]


You can do any combination you want as long as the input/output items fit inside the players main inventory (12 slots) and that those items exist within the map your adding this mod to. I.E. Panthera v2.9 doesn't have any of these new Trash items such as razors or toilet paper.

But you could in theory combine a Primary and Secondary weapon to make a better primary or better secondary weapon. I haven't tried this, but it should be possible [check the M24 conversion.]
 
Are
Crafting Menu opens, but when pressing Industrial/Survival/Weapons it does nothing else...
you runnning the blur anti-hax or another anti-hax maybe? You need to add the allowed action override along with the repair s_player_repairActions as mentioned in a previous post.


If thats not the case, please check that you have the proper directory structure and files linked together.
 
Heres a question that came up from my server. Most of my players have no experience with Scripting so they have no idea what PartGeneric is. Is it possible to change the text when it shows what parts they need to show a custom text, Scrap Metal instead of the class name?
 
I have run all anti-hacks that follow the same rule with add actions. I do the support for them

It does not matter what anti-hack you run, you must allow these add actions, or it WILL NOT RUN for your players.

There is one I have missed, I will edit it tomorrow, but if you whitelist the ones I have provided earlier on a post, it will work for your players.
 
Back
Top