Mission Sided Crafting Menu 1.8.1

Create install guide for crafting menu


  • Total voters
    6
  • Poll closed .

Inkko

Valued Member!
I've had the built in crafting menu that is in 1.8.1 mission sided to where I can add in my own crafting recipes. I've had it since 1.8.0.3 but have just kept it to myself for a while due to certain people wanting it and those certain people hacking my server repeatedly. If people would like me to make a guide on how to install it I will. I'll see how the poll goes and based on that I'll make a release.

Some of the recipes I have created just to show what can be done:
- Create bike.
- NVGs
- Rangefinders
- M9
- Ammo can be swapped between SD and standard

and several weapon variations can be upgraded to by having certain parts.

I know there is a scroll menu crafting system but I decided to go with the built in one.

Some of the bugs include animation getting stuck at end (walking or opening inventory fixes), Ammo swapping can refill magazines (haven't looked into seeing if its possible to check for partially used mags), and lastly creating your own recipes can be difficult if you're use similar items to another recipe.
 
What I really want to work on is the part where you can use items from a near-by loot pile. Can see the usage of 1 engine, 1 fuel tank, 4 wheels, hoses, clamps, connectors and a shitload of scrap or custom-named items etc to make your own hive vehicle. It works but the items array is always lost in transition between UI and checkRecipe and I kinda sidetracked to another thing.
 
What I really want to work on is the part where you can use items from a near-by loot pile. Can see the usage of 1 engine, 1 fuel tank, 4 wheels, hoses, clamps, connectors and a shitload of scrap or custom-named items etc to make your own hive vehicle. It works but the items array is always lost in transition between UI and checkRecipe and I kinda sidetracked to another thing.
Thats something I've been meaning to start working on. I've noticed sometimes if you drop everything then open the crafting menu it will show what you've dropped, but I'd like to get it to show anything that is dropped on the ground nearby, your inventory and backpack. Having all that I think would help with more complex recipes.
 
Thats something I've been meaning to start working on. I've noticed sometimes if you drop everything then open the crafting menu it will show what you've dropped, but I'd like to get it to show anything that is dropped on the ground nearby, your inventory and backpack. Having all that I think would help with more complex recipes.
It would be a cool thing to see the custom crafting you added. On another note, instead of the gear on the ground which would be harder, do the gear of a tent or vehicle for advanced crafting
 
It would be a cool thing to see the custom crafting you added. On another note, instead of the gear on the ground which would be harder, do the gear of a tent or vehicle for advanced crafting
That would most likely be an easier way then loot piles.

Just to expand on my first post...

Here is what I'm talking about if people didn't understand. I have this crafting system client sided and I'm able to change existing recipes and add in new ones. I have added a bunch of the crafting items in that aren't complete yet in dayz through custom loot tables as well which is how I've got certain things.

nlNutyz.jpg
 
That would most likely be an easier way then loot piles.

Just to expand on my first post...

Here is what I'm talking about if people didn't understand. I have this crafting system client sided and I'm able to change existing recipes and add in new ones. I have added a bunch of the crafting items in that aren't complete yet in dayz through custom loot tables as well which is how I've got certain things.

nlNutyz.jpg
So you technically made the crafting system all through the mission file, nothing through dayz_code etc, allowing you to make anything you want?
 
So you technically made the crafting system all through the mission file, nothing through dayz_code etc, allowing you to make anything you want?

I have the crafting system files from dayz_code moved to the mission pbo and redirected configs to allow recipes to be changed and new ones added.



Completely separate, but on top of that I just noted I have loot moved over to the mission pbo as well and I have added some of the not completed crafting materials in to spawn to make some of the recipes more realistic. The items normally look like the little ammo pouches on the ground, and in inventory their images aren't done but they still have their names.
 
Last edited:
I'll try to make a tutorial for this in the next day or two. I think just a handful of people wanting to know how is enough to share.
 
I'll try to make a tutorial for this in the next day or two. I think just a handful of people wanting to know how is enough to share.
Idk if its useful or not (don't really play normal DayZ 1.8.1/1.8.2) But... I managed to make your custom crafting menu thing detect gear that is in a tent.. so you can place items in your tent and then press i to craft and all those items will appear there..

Bit of problems though.. if I go to craft something when I am next to my tent then it only shows my tent inventory and not my gear.. so its a bit of a problem but not too bad (if you are 3+ meters from your tent it shows your main inv again)
 
Just a thought. Would it be possible to use a keydown hack to change the button used to open the menu rather than the default one like F12 for example?
 
Idk if its useful or not (don't really play normal DayZ 1.8.1/1.8.2) But... I managed to make your custom crafting menu thing detect gear that is in a tent.. so you can place items in your tent and then press i to craft and all those items will appear there..

Bit of problems though.. if I go to craft something when I am next to my tent then it only shows my tent inventory and not my gear.. so its a bit of a problem but not too bad (if you are 3+ meters from your tent it shows your main inv again)
I noticed that there is a chunk to look for crafting tables and was thinking of trying to add tents to that to see if it would work. How did you get the tents showing up?

Just a thought. Would it be possible to use a keydown hack to change the button used to open the menu rather than the default one like F12 for example?
I would have to look but I'd probably say there is a way to change the default key to open the menu.
 
I dunno about changing the key to open it, but you could probably add an additional key to open it in compiles.sqf in the dayz_interrupt section.
 
I noticed that there is a chunk to look for crafting tables and was thinking of trying to add tents to that to see if it would work. How did you get the tents showing up?


I would have to look but I'd probably say there is a way to change the default key to open the menu.


I also got backpacks working! (shows all items from your backpack) Its not 100% working yet(having some crafting errors, I am step 1 out of 3), I am still trying to fix some problems.. I will post all changes/fixes here when I have it fully working
 
Just a thought. Would it be possible to use a keydown hack to change the button used to open the menu rather than the default one like F12 for example?

Add something like this to the dayz_spaceInterrupt in compiles.sqf :
Code:
// F12 Opens Craft Menu (0x58 = F12) Also I advise using another key that's not the steam screenshot button.
if (_dikCode == 0x58) then {
// closes any dialog thats open and if no dialog is open then craft menu opens.
            if (dialog) then {closeDialog 0;} else { createDialog "RscDisplayCraftingMenu";};
        };

EX:
Code:
dayz_spaceInterrupt = {
        private "_handled";
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;

        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };

        switch (_dikCode) do {
            case 0x02: {
                ["rifle"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x03: {
                ["pistol"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x04: {
                ["melee"] spawn player_switchWeapon;
                _handled = true;
            };
            default {
                if (_dikCode in [0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05]) then {
                    _handled = true;
                };
            };
        };

        if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shiftState and !_ctrlState and !_altState && !dialog) then {
            createGearDialog [player, "RscDisplayGear"];
            _handled = true;
        };

        //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
        //Prevent exploit of drag body
        if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
        if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };

        if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
        if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
        if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,5,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "User20" or _dikCode in actionKeys "NetworkStats") then {
            if (!dayz_isSwimming and !dialog) then {
                [player,4,true,(getPosATL player)] call player_alertZombies;
                createDialog "horde_journal_front_cover";
            };
            _handled = true;
        };
        if ((_dikCode in [0x3E,0x0F,0xD3]) and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            call player_forceSave;
        };
        if (_dikCode in [0xB8,0x38,0x3E,0x2A,0x36,0x01]) then {
            _displayg = findDisplay 106;
            if (!isNull _displayg) then {
            call player_forceSave;
            } else {
                if (dialog) then {
                    call player_forceSave;
                };
            };
        };
        _object = player getVariable ["constructionObject", objNull];
        if (!isNull _object and _dikCode in actionKeys "LeanLeft") then {
            _dir = getDir _object - 3;
            _object setDir _dir;
            _handled = true;
        };
        if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        //Move Down NumPad 2
        if (!isNull _object and _dikCode == 0x50) then {
            _object setPos [ getPos _object select 0, getPos _object select 1, (getPos _object select 2) - 1];
            _handled = true;
        };
        //Move Up NumPad 8
        if (!isNull _object and _dikCode == 0x48) then {
            _object setPos [ getPos _object select 0, getPos _object select 1, (getPos _object select 2) + 1];
            _handled = true;
        };
        //Rotate Left NumPad 7
        if (!isNull _object and _dikCode == 0x47) then {
            _dir = getDir _object - 3;
            _object setDir _dir;
            _handled = true;
        };
        //Rotate Right NumPad 9
        if (!isNull _object and _dikCode == 0x49) then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        if ((_dikCode == 0xDB) or (_dikCode == 0xDC)) then {
                   if (tagname) then {tagname = false;} else {tagname = true;};
                };

        if (_dikCode == 0x9D) then {
        if (dialog) then {closeDialog 0;groupManagementActive = false;} else {createGearDialog [player, "RscDisplayGear"];[] execVM "dzgm\loadGroupManagement.sqf";};
        };

        // Craft Menu Button
       if (_dikCode == 0x58) then {
            if (dialog) then {closeDialog 0;} else { createDialog "RscDisplayCraftingMenu";};
        };
        _handled
    };
 
Add something like this to the dayz_spaceInterrupt in compiles.sqf :
Code:
// F12 Opens Craft Menu (0x58 = F12) Also I advise using another key that's not the steam screenshot button.
if (_dikCode == 0x58) then {
// closes any dialog thats open and if no dialog is open then craft menu opens.
            if (dialog) then {closeDialog 0;} else { createDialog "RscDisplayCraftingMenu";};
        };

EX:
Code:
dayz_spaceInterrupt = {
        private "_handled";
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;

        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };

        switch (_dikCode) do {
            case 0x02: {
                ["rifle"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x03: {
                ["pistol"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x04: {
                ["melee"] spawn player_switchWeapon;
                _handled = true;
            };
            default {
                if (_dikCode in [0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05]) then {
                    _handled = true;
                };
            };
        };

        if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shiftState and !_ctrlState and !_altState && !dialog) then {
            createGearDialog [player, "RscDisplayGear"];
            _handled = true;
        };

        //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
        //Prevent exploit of drag body
        if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
        if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };

        if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
        if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
        if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,5,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "User20" or _dikCode in actionKeys "NetworkStats") then {
            if (!dayz_isSwimming and !dialog) then {
                [player,4,true,(getPosATL player)] call player_alertZombies;
                createDialog "horde_journal_front_cover";
            };
            _handled = true;
        };
        if ((_dikCode in [0x3E,0x0F,0xD3]) and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            call player_forceSave;
        };
        if (_dikCode in [0xB8,0x38,0x3E,0x2A,0x36,0x01]) then {
            _displayg = findDisplay 106;
            if (!isNull _displayg) then {
            call player_forceSave;
            } else {
                if (dialog) then {
                    call player_forceSave;
                };
            };
        };
        _object = player getVariable ["constructionObject", objNull];
        if (!isNull _object and _dikCode in actionKeys "LeanLeft") then {
            _dir = getDir _object - 3;
            _object setDir _dir;
            _handled = true;
        };
        if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        //Move Down NumPad 2
        if (!isNull _object and _dikCode == 0x50) then {
            _object setPos [ getPos _object select 0, getPos _object select 1, (getPos _object select 2) - 1];
            _handled = true;
        };
        //Move Up NumPad 8
        if (!isNull _object and _dikCode == 0x48) then {
            _object setPos [ getPos _object select 0, getPos _object select 1, (getPos _object select 2) + 1];
            _handled = true;
        };
        //Rotate Left NumPad 7
        if (!isNull _object and _dikCode == 0x47) then {
            _dir = getDir _object - 3;
            _object setDir _dir;
            _handled = true;
        };
        //Rotate Right NumPad 9
        if (!isNull _object and _dikCode == 0x49) then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        if ((_dikCode == 0xDB) or (_dikCode == 0xDC)) then {
                   if (tagname) then {tagname = false;} else {tagname = true;};
                };

        if (_dikCode == 0x9D) then {
        if (dialog) then {closeDialog 0;groupManagementActive = false;} else {createGearDialog [player, "RscDisplayGear"];[] execVM "dzgm\loadGroupManagement.sqf";};
        };

        // Craft Menu Button
       if (_dikCode == 0x58) then {
            if (dialog) then {closeDialog 0;} else { createDialog "RscDisplayCraftingMenu";};
        };
        _handled
    };
That is exactly what i was wondering TYVM :)
 
That would most likely be an easier way then loot piles.

Just to expand on my first post...

Here is what I'm talking about if people didn't understand. I have this crafting system client sided and I'm able to change existing recipes and add in new ones. I have added a bunch of the crafting items in that aren't complete yet in dayz through custom loot tables as well which is how I've got certain things.

nlNutyz.jpg
excuse me I'm hurting explain.
I want to put the menu on my server, as in the picture.
I have the background image, but not the list of items
 
excuse me I'm hurting explain.
I want to put the menu on my server, as in the picture.
I have the background image, but not the list of items
Ahhh, so you have the menu but it is not functioning correctly? What all does it show for you?
 
Back
Top