Jump to content

[RELEASE] Advanced Alchemical Crafting v3.3 UPDATED for 1.0.6.1


theduke

Recommended Posts

Basically all i did was go through the variables and classnames of items that have changed from 1051 to 1061.

Its been tested and works.

Follow the original thread for install instructions ONLY.

Download the updated pack.

This is my personal pack also, i've added fuel pumps and static m2s as part of the craftable items.

ALL CREDIT GOES TO THE ORIGINAL AUTHORS Raymix and Hogscraper

https://github.com/theduke77/Advanced-Gem-crafting

 

UPDATE 05/19/2017

Fix for Plot 4 Life users - Friends cannot build even if added to plot. Thx to @SryImAnooB
The fix is now included in the github download.

Link to comment
Share on other sites

I've got this working with Deploy Anything

Spoiler
1.   install
Install as usual as old install instructions.
in 2.b, you need not add
Quote

#include "custom\Buildables\extra_rc.hpp"

in description.ext as it's not used.

2. Custom\Buildables\Crafting_Compiles.sqf

remove or comment out the line

Quote

player_selectSlot = compile preprocessFileLineNumbers "custom\Buildables\ui_selectSlot.sqf";

 

3. overwrites\click_actions\config.sqf

in DZE_CLICK_ACTIONS array in overwrites\click_actions\config.sqfadd below

Quote

 ["ItemAmethyst","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Amethyst.sqf';","true"],
 ["ItemCitrine","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Citrine.sqf';","true"],
 ["ItemEmerald","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Emerald.sqf';","true"],
 ["ItemObsidian","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Obsidian.sqf';","true"],
 ["ItemRuby","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Ruby.sqf';","true"],
 ["ItemSapphire","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Sapphire.sqf';","true"],
 ["ItemTopaz","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Topaz.sqf';","true"],
 ["ItemLightbulb","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Lights.sqf';","true"],

4. in case of error

I needed to uncomment RscButton and RscFrame classes in Custom\Buildables\Crafting_Defines.hpp

 


 

 

Link to comment
Share on other sites

56 minutes ago, Schalldampfer said:

I've got this working with Deploy Anything

  Reveal hidden contents
1.   install
Install as usual as old install instructions.
in 2.b, you need not add

in description.ext as it's not used.

2. Custom\Buildables\Crafting_Compiles.sqf

remove or comment out the line

 

3. overwrites\click_actions\config.sqf

in DZE_CLICK_ACTIONS array in overwrites\click_actions\config.sqfadd below

4. in case of error

I needed to uncomment RscButton and RscFrame classes in Custom\Buildables\Crafting_Defines.hpp

 


 

 

ah yes i should of mentioned the deploy anything overwrites the right click from maca...  thanks

Link to comment
Share on other sites

14 hours ago, theduke said:

ah yes i should of mentioned the deploy anything overwrites the right click from maca...  thanks

you can merge this two in ui_selectslot.sqf

see lines in red for deploy any  and lines in blu for  right click

Spoiler

//private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType"];
disableSerialization;
_control = _this select 0;
_button = _this select 1;
_parent = findDisplay 106;

if (carryClick) then {carryClick = false;};

if (_button == 1) then {
    private ["_conf","_name","_compile","_height","_item"];
    _group = _parent displayCtrl 6902;

    _pos = ctrlPosition _group;

    _item = gearSlotData _control;    
    if ( //No right click action
        (!DZE_SelfTransfuse && _item in ["ItemBloodbag","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]) or
        (!dayz_groupSystem && _item == "ItemRadio")
    ) exitWith {};
    if (mouseOverCarry) then {
        _item = DayZ_onBack;
        carryClick = true;
    };

    _pos set [0,((_this select 2) + 0.46)];
    _pos set [1,((_this select 3) + 0.07)];

    _conf = configFile >> "cfgMagazines" >> _item;
    if (!isClass _conf) then {
        _conf = configFile >> "cfgWeapons" >> _item;
    };
    _name = getText(_conf >> "displayName");

    _cfgActions = _conf >> "ItemActions";
    _numActions = (count _cfgActions);
    _height = 0;

    //Populate Menu
    for "_i" from 0 to (_numActions - 1) do
    {
        _menu = _parent displayCtrl (1600 + _i);
        _menu ctrlShow true;
        _config = (_cfgActions select _i);
        _type = getText (_config >> "text");
        _script = getText (_config >> "script");
        _outputOriented = getNumber (_config >> "outputOriented") == 1;
        _height = _height + (0.025 * safezoneH);
        _compile = format["_id = '%2' %1;",_script,_item];
        uiNamespace setVariable ['uiControl', _control];
        if (_outputOriented) then {
            /*
                This flag means that the action is output oriented
                the output class will then be transferred to the script
                and the type used for the name
            */
            _array = getArray (_config >> "output");
            _outputClass = _array select 0;
            _outputType = _array select 1;
            _name = getText (configFile >> _outputType >> _outputClass >> "displayName");
            _compile = format["_id = ['%2',%3] %1;",_script,_item,_array];
        };

        _menu ctrlSetText format[_type,_name];
        _menu ctrlSetEventHandler ["ButtonClick",_compile];
    };
    
     //### BEGIN MODIFIED CODE: extra click actions DEPLOY ANY
    {
        private["_classname","_text","_execute","_condition"];
        _classname   = _x select 0;
        _text        = _x select 1;
        _execute     = _x select 2;
        _condition   = _x select 3;
        // if the clicked item matches, then assign the script call and display text
        if(_item == _classname && (call compile _condition)) then {
            _menu = _parent displayCtrl (1600 + _numActions);
            _menu ctrlShow true;
            _height = _height + (0.025 * safezoneH);
            uiNamespace setVariable ['uiControl', _control];
            _menu ctrlSetText _text;
            _menu ctrlSetEventHandler ["ButtonClick",_execute];
            _numActions = _numActions + 1;
        };
    } forEach DZE_CLICK_ACTIONS;
     //### END MODIFIED CODE: extra click actions DEPLOY ANY

    
    //EXTRA_RC
    
    _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
    _erc_numActions = (count _erc_cfgActions);
    if (isClass _erc_cfgActions) then {
     for "_j" from 0 to (_erc_numActions - 1) do
     {
       _menu =  _parent displayCtrl (1600 + _j + _numActions);
       _menu ctrlShow true;
       _config =  (_erc_cfgActions select _j);
       _text =  getText (_config >> "text");
       _script =  getText (_config >> "script");
       _height = _height + (0.025 * safezoneH);
       uiNamespace setVariable ['uiControl', _control];
       _menu ctrlSetText _text;
       _menu ctrlSetEventHandler ["ButtonClick",_script];
      };
   };
    //EXTRA_RC

    
    
    
    _pos set [3,_height];

    //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos];

    _group ctrlShow true;
    ctrlSetFocus _group;
    _group ctrlSetPosition _pos;
    _group ctrlCommit 0;
};

 

Link to comment
Share on other sites

18 hours ago, SryImAnooB said:

Thx for the work, but i got 2 errors:

1. I can build without problems, but after restart the things are disapeared.

2. Only plotowner can build, Plotfriends cant.

 

Dunno if i fucked something up?!

@theduke not 100% sure about it  but i think as in workshop mod you need add the objets into server_monitor.sqf to get a db save.

here an example

Spoiler

find:


if( (count _inventory > 0) && !_isPlot && !_doorLocked) then {

change by:


if( (count _inventory > 0) && !_isPlot && !_doorLocked && {_type != "YOUR OBJET ID"}) then {

 

Link to comment
Share on other sites

4 hours ago, juandayz said:

@theduke not 100% sure about it  but i think as in workshop mod you need add the objets into server_monitor.sqf to get a db save.

here an example

  Hide contents

find:



if( (count _inventory > 0) && !_isPlot && !_doorLocked) then {

change by:



if( (count _inventory > 0) && !_isPlot && !_doorLocked && {_type != "YOUR OBJET ID"}) then {

 

Thx, ill try it out tomorrow!

Link to comment
Share on other sites

2 minutes ago, SryImAnooB said:

Thx, ill try it out tomorrow!

to get more clean syntax you can try in a custom variables.sqf add

above of:

DayZ_SafeObjects

for exmple this:

advalchemy = ["MAP_kulna","Land_Misc_Well_L_EP1","more objets ids"];

and now in server_monitor.sqf

Spoiler

find:


if( (count _inventory > 0) && !_isPlot && !_doorLocked) then {

change by:


if( (count _inventory > 0) && !_isPlot && !_doorLocked && !_isadvalchemy) then {

B-find:


_doorLocked = _type in DZE_DoorsLocked;
_isPlot = _type == "Plastic_Pole_EP1_DZ";

Bellow paste:



_isadvalchemy = _type in advalchemy;

 

 

Link to comment
Share on other sites

On 15.3.2017 at 9:04 PM, juandayz said:

to get more clean syntax you can try in a custom variables.sqf add

above of:


DayZ_SafeObjects

for exmple this:


advalchemy = ["MAP_kulna","Land_Misc_Well_L_EP1","more objets ids"];

and now in server_monitor.sqf

  Reveal hidden contents

find:



if( (count _inventory > 0) && !_isPlot && !_doorLocked) then {

change by:



if( (count _inventory > 0) && !_isPlot && !_doorLocked && !_isadvalchemy) then {

B-find:



_doorLocked = _type in DZE_DoorsLocked;
_isPlot = _type == "Plastic_Pole_EP1_DZ";

Bellow paste:




_isadvalchemy = _type in advalchemy;

 

 

It worked great!! Thank you for that!

I also fixed the problem that only Plot owner was able to build. Reason is i use P4L.

Fix:

In custom_builds.sqf search:

// check nearby plot's ownership and then for friend status
//if plot does not belong to player
_nearestPole = _findNearestPole select 0;
 
_ownerID = _nearestPole getVariable["ownerPUID","0"];
 
if(_playerUID == _ownerID) then {  //Keep ownership
        _canBuildOnPlot = true;
} else {
_friendlies     = player getVariable ["friendlyTo",[]];
if(_ownerID in _friendlies) then {
        _canBuildOnPlot = true;
        };
};

and change to:

// check nearby plot's ownership and then for friend status
//if plot does not belong to player
_nearestPole = _findNearestPole select 0;
 
_ownerID = _nearestPole getVariable["ownerPUID","0"];
 
if(_playerUID == _ownerID) then {  //Keep ownership
        _canBuildOnPlot = true;
} else {
_friendlies = _nearestPole getVariable ["plotfriends",[]];
_fuid  = [];
{
 _friendUID = _x select 0;
 _fuid  =  _fuid  + [_friendUID];
} forEach _friendlies;
_builder  = getPlayerUID player;
// check if friendly to owner
if(_builder in _fuid) then {
_canBuildOnPlot = true;
};
};

 

Link to comment
Share on other sites

Hello I have this problem  :

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\custom\Buildables\Crafting_Dialogs.hpp, line 16: /Advanced_Crafting/Controls.RequiredToolsFrame: Undefined base class 'RscFrame'

Crafting_dialogs.hpp

Spoiler

class Advanced_Crafting {
    idd = 10667;
    movingenable = true;
    onload = "uiNamespace setVariable ['Advanced_CraftingV', _this select 0]";
    onUnload = "GlobalCraftingVariable=0;uiNamespace setVariable ['Advanced_CraftingV', nil]";
    class Controls
    {

class AAC_Background: RscBackground
{
    idc = 1800;
    x = 0;
    y = 0.02;
    w = 1;
    h = 0.9;
};
class RequiredToolsFrame: RscFrame
{
    idc = 1801;
    x = 0.7125;
    y = 0.08;
    w = 0.275;
    h = 0.18;
};
class RequiredMaterialsFrame: RscFrame
{
    idc = 1802;
    x = 0.7125;
    y = 0.32;
    w = 0.275;
    h = 0.5;
};
class AAC_Label: RscText
{
    idc = 1000;
    text = "Advanced Alchemical Crafting:"; 
    x = 0.0375;
    y = 0.06;
    w = 0.37;
    h = 0.04;
};
class Gem_Used_Label: RscText
{
    idc = 1001;
    x = 0.4875;
    y = 0.06;
    w = 0.1625;
    h = 0.04;
    text = "";
    };
class Choose_Catagory_Label: RscText
{
    idc = 1002;
    text = "<< Choose a category!"; 
    x = 0.425;
    y = 0.12;
    w = 0.2625;
    h = 0.04;
};
class Required_Materials_Label: RscText
{
    idc = 1003;
    text = "Required Materials"; 
    x = 0.75;
    y = 0.28;
    w = 0.215;
    h = 0.04;
};
class Required_Tools_Label: RscText
{
    idc = 1004;
    text = "Required Tools"; 
    x = 0.75;
    y = 0.04;
    w = 0.215;
    h = 0.04;
};
class RscText_1105: RscText
{
    idc = 1105;
    text = "CAMERA CONTROLS";
    x = 0.4;
    y = 0.94;
    w = 0.2375;
    h = 0.04;
};
class Catagory_Combo: RscCombo
{
    idc = 3900;
    text = "Catagory"; 
    x = 0.0375;
    y = 0.12;
    w = 0.375;
    h = 0.04;
    onLBSelChanged = "GlobalComboboxVariable = _this select 1;";    
};

class Items_Listbox: RscListBox
{
    idc = 3901;
    text = "Items"; 
    x = 0.0375;
    y = 0.18;
    w = 0.5875;
    h = 0.58;
    onLBSelChanged = "call fnc_Load_Mats_and_Tools";
};
class Exit_Button: RscButton
{
    idc = 4900;
    text = "Exit"; 
    x = 0.625;
    y = 0.84;
    w = 0.125;
    h = 0.04;
    action = "GlobalCraftingVariable=0";
};
class Craft_Button: RscButton
{
    idc = 4901;
    text = "Craft"; 
    x = 0.25;
    y = 0.84;
    w = 0.125;
    h = 0.04;
    action = "execVM ""custom\Buildables\custom_builds.sqf""";
};
class Preview_Button: RscButton
{
    idc = 4902;
    text = "Preview"; 
    x = 0.4375;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    action = "execVM ""custom\Buildables\preview_item.sqf""";    
};
class Zoom_Minus_Button: RscButton
{
    idc = 4903;
    text = "Zoom -"; 
    x = 0.075;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Radius = Crafting_Object_Radius + 1";    
    };
class Zoom_Plus_Button: RscButton
{
    idc = 4904;
    text = "Zoom +"; 
    x = 0.7875;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Radius = Crafting_Object_Radius - 1";    
    };
class MoveUp_Button: RscButton
{
    idc = 4905;
    text = "Camera Up"; 
    x = 0.325;
    y = 0.78;
    w = 0.1625;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Height = Crafting_Object_Height + 1";    
    };
class MoveDown_Button: RscButton
{
    idc = 4906;
    text = "Camera Down"; 
    x = 0.525;
    y = 0.78;
    w = 0.1625;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Height = Crafting_Object_Height - 1";    
    };    
class SpinCameraLeft_Button: RscButton
{
    idc = 4907;
    text = "<<SPIN"; 
    x = 0.25;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Direction = Crafting_Object_Direction + 0.5";    
    };    
class SpinCameraRight_Button: RscButton
{
    idc = 4908;
    text = "SPIN>>"; 
    x = 0.625;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Direction = Crafting_Object_Direction - 0.5";    
    };    
class Return_Button: RscButton
{
    idc = 4909;
    text = "Return"; 
    x = 0.4375;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "GlobalPreviewVariable = 1";    
    };        
class Required_Tools_01: RscText
{
    idc = 5900;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.08;
    w = 0.275;
    h = 0.04;
};

class Required_Tools_02: RscText
{
    idc = 5901;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.12;
    w = 0.275;
    h = 0.04;
};
class Required_Tools_03: RscText
{
    idc = 5902;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.16;
    w = 0.275;
    h = 0.04;
};
class Required_Tools_04: RscText
{
    idc = 5903;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.2;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_01: RscText
{
    idc = 6900;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.32;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_02: RscText
{
    idc = 6901;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.36;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_03: RscText
{
    idc = 6902;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.4;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_04: RscText
{
    idc = 6903;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.44;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_05: RscText
{
    idc = 6904;
    text = "";
     colorText[] = {1,1,1,1};
    x = 0.7125;
    y = 0.48;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_06: RscText
{
    idc = 6905; 
    colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.52;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_07: RscText
{
    idc = 6906;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.56;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_08: RscText
{
    idc = 6907;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.6;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_09: RscText
{
    idc = 6908;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.64;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_10: RscText
{
    idc = 6909;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.68;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_11: RscText
{
    idc = 6910;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.72;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_12: RscText
{
    idc = 6911;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.76;
    w = 0.275;
    h = 0.04;
};
};

};

Got it worked now thanks all :)

Link to comment
Share on other sites

@Michal.esl94 check if u already add the includes at bottom of description.ext

2.b   DESCRIPTION.EXT
 
add these lines to the very bottom of the file
 
#include "custom\Buildables\extra_rc.hpp"
#include "custom\Buildables\MT_Defines.hpp"
#include "custom\Buildables\Crafting_Defines.hpp"
#include "custom\Buildables\Crafting_Dialogs.hpp"

 

Link to comment
Share on other sites

Anyone having issue where you get kicked for createvehicle restriction #0 when trying to build anything? No matter what I try to build I get kicked with that restriction. Never had this problem with 1.0.5.1. Also I'm running infiSTAR and I did add the required stuff to it like the instructions said. 

Only solution I've come up with is to add everything to the createvehicle filter but that is a lot of filters to add. 

Link to comment
Share on other sites

  • 2 weeks later...

I installed like the instructions, but ingame i allways become the massage that i can´t build because i am infight. but i´m not infight.

What could be the problem

i don´t get any errors in the server or player log

Edited by Kimarik
Link to comment
Share on other sites

On 25/3/2017 at 0:45 PM, Michal.esl94 said:

Hello I have this problem  :

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\custom\Buildables\Crafting_Dialogs.hpp, line 16: /Advanced_Crafting/Controls.RequiredToolsFrame: Undefined base class 'RscFrame'

Crafting_dialogs.hpp

  Reveal hidden contents

class Advanced_Crafting {
    idd = 10667;
    movingenable = true;
    onload = "uiNamespace setVariable ['Advanced_CraftingV', _this select 0]";
    onUnload = "GlobalCraftingVariable=0;uiNamespace setVariable ['Advanced_CraftingV', nil]";
    class Controls
    {

class AAC_Background: RscBackground
{
    idc = 1800;
    x = 0;
    y = 0.02;
    w = 1;
    h = 0.9;
};
class RequiredToolsFrame: RscFrame
{
    idc = 1801;
    x = 0.7125;
    y = 0.08;
    w = 0.275;
    h = 0.18;
};
class RequiredMaterialsFrame: RscFrame
{
    idc = 1802;
    x = 0.7125;
    y = 0.32;
    w = 0.275;
    h = 0.5;
};
class AAC_Label: RscText
{
    idc = 1000;
    text = "Advanced Alchemical Crafting:"; 
    x = 0.0375;
    y = 0.06;
    w = 0.37;
    h = 0.04;
};
class Gem_Used_Label: RscText
{
    idc = 1001;
    x = 0.4875;
    y = 0.06;
    w = 0.1625;
    h = 0.04;
    text = "";
    };
class Choose_Catagory_Label: RscText
{
    idc = 1002;
    text = "<< Choose a category!"; 
    x = 0.425;
    y = 0.12;
    w = 0.2625;
    h = 0.04;
};
class Required_Materials_Label: RscText
{
    idc = 1003;
    text = "Required Materials"; 
    x = 0.75;
    y = 0.28;
    w = 0.215;
    h = 0.04;
};
class Required_Tools_Label: RscText
{
    idc = 1004;
    text = "Required Tools"; 
    x = 0.75;
    y = 0.04;
    w = 0.215;
    h = 0.04;
};
class RscText_1105: RscText
{
    idc = 1105;
    text = "CAMERA CONTROLS";
    x = 0.4;
    y = 0.94;
    w = 0.2375;
    h = 0.04;
};
class Catagory_Combo: RscCombo
{
    idc = 3900;
    text = "Catagory"; 
    x = 0.0375;
    y = 0.12;
    w = 0.375;
    h = 0.04;
    onLBSelChanged = "GlobalComboboxVariable = _this select 1;";    
};

class Items_Listbox: RscListBox
{
    idc = 3901;
    text = "Items"; 
    x = 0.0375;
    y = 0.18;
    w = 0.5875;
    h = 0.58;
    onLBSelChanged = "call fnc_Load_Mats_and_Tools";
};
class Exit_Button: RscButton
{
    idc = 4900;
    text = "Exit"; 
    x = 0.625;
    y = 0.84;
    w = 0.125;
    h = 0.04;
    action = "GlobalCraftingVariable=0";
};
class Craft_Button: RscButton
{
    idc = 4901;
    text = "Craft"; 
    x = 0.25;
    y = 0.84;
    w = 0.125;
    h = 0.04;
    action = "execVM ""custom\Buildables\custom_builds.sqf""";
};
class Preview_Button: RscButton
{
    idc = 4902;
    text = "Preview"; 
    x = 0.4375;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    action = "execVM ""custom\Buildables\preview_item.sqf""";    
};
class Zoom_Minus_Button: RscButton
{
    idc = 4903;
    text = "Zoom -"; 
    x = 0.075;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Radius = Crafting_Object_Radius + 1";    
    };
class Zoom_Plus_Button: RscButton
{
    idc = 4904;
    text = "Zoom +"; 
    x = 0.7875;
    y = 0.84;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Radius = Crafting_Object_Radius - 1";    
    };
class MoveUp_Button: RscButton
{
    idc = 4905;
    text = "Camera Up"; 
    x = 0.325;
    y = 0.78;
    w = 0.1625;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Height = Crafting_Object_Height + 1";    
    };
class MoveDown_Button: RscButton
{
    idc = 4906;
    text = "Camera Down"; 
    x = 0.525;
    y = 0.78;
    w = 0.1625;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Height = Crafting_Object_Height - 1";    
    };    
class SpinCameraLeft_Button: RscButton
{
    idc = 4907;
    text = "<<SPIN"; 
    x = 0.25;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Direction = Crafting_Object_Direction + 0.5";    
    };    
class SpinCameraRight_Button: RscButton
{
    idc = 4908;
    text = "SPIN>>"; 
    x = 0.625;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "Crafting_Object_Direction = Crafting_Object_Direction - 0.5";    
    };    
class Return_Button: RscButton
{
    idc = 4909;
    text = "Return"; 
    x = 0.4375;
    y = 0.9;
    w = 0.1375;
    h = 0.04;
    onload = "ctrlShow [_this,false]";
    action = "GlobalPreviewVariable = 1";    
    };        
class Required_Tools_01: RscText
{
    idc = 5900;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.08;
    w = 0.275;
    h = 0.04;
};

class Required_Tools_02: RscText
{
    idc = 5901;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.12;
    w = 0.275;
    h = 0.04;
};
class Required_Tools_03: RscText
{
    idc = 5902;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.16;
    w = 0.275;
    h = 0.04;
};
class Required_Tools_04: RscText
{
    idc = 5903;
     colorText[] = {1,1,1,1};
    text = ""; 
    x = 0.7125;
    y = 0.2;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_01: RscText
{
    idc = 6900;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.32;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_02: RscText
{
    idc = 6901;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.36;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_03: RscText
{
    idc = 6902;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.4;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_04: RscText
{
    idc = 6903;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.44;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_05: RscText
{
    idc = 6904;
    text = "";
     colorText[] = {1,1,1,1};
    x = 0.7125;
    y = 0.48;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_06: RscText
{
    idc = 6905; 
    colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.52;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_07: RscText
{
    idc = 6906;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.56;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_08: RscText
{
    idc = 6907;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.6;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_09: RscText
{
    idc = 6908;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.64;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_10: RscText
{
    idc = 6909;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.68;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_11: RscText
{
    idc = 6910;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.72;
    w = 0.275;
    h = 0.04;
};
class Required_Materials_12: RscText
{
    idc = 6911;
     colorText[] = {1,1,1,1};
    text = "";
    x = 0.7125;
    y = 0.76;
    w = 0.275;
    h = 0.04;
};
};

};

Got it worked now thanks all :)

I have this problem !!

Link to comment
Share on other sites

6 hours ago, Voltan said:

I have installed this script and my players are having issues/glitches with previewing items in the crafting menus.

Is anyone else having this problem?

yes, if they preview and hit ESC, they are forced to soft log.  In 1051 I had found a fix for this using a smal part of code from the dayzspaceinterrupt.sqf.  But now it is called keybord.sqf, and i've yet to figure it out.

Basically the "fix", allowed you to hit ESC a second time and it actually exited you from the preview.

Now in 1061, RL has taken over for the moment as im super busy and have not had the time to figure it out. If someone wants to, the last page of the orginal thread, i posted the fix. Compare that to the new keyboard.sqf.

Duke

Link to comment
Share on other sites

On ‎2017‎年‎5‎月‎8‎日 at 7:40 PM, theduke said:

yes, if they preview and hit ESC, they are forced to soft log.  In 1051 I had found a fix for this using a smal part of code from the dayzspaceinterrupt.sqf.  But now it is called keybord.sqf, and i've yet to figure it out.

Basically the "fix", allowed you to hit ESC a second time and it actually exited you from the preview.

Now in 1061, RL has taken over for the moment as im super busy and have not had the time to figure it out. If someone wants to, the last page of the orginal thread, i posted the fix. Compare that to the new keyboard.sqf.

Duke

If you push ESC, a variable DZE_cancelBuilding  is set true;
My solution to the bug is to put
if (DZE_cancelBuilding) then {GlobalPreviewVariable = 1;};
in While {GlobalPreviewVariable==0} do { *** }; section. You'd better reset DZE_cancelBuilding to false  on early this script.

Now, preview_item.sqf is :

Spoiler
GlobalPreviewVariable=0;
private ["_dikCode","_handle"];
_handled = false;
// ESC
if (_dikCode == 0x01) then {
 _handled = true;
};
DZE_cancelBuilding = false;
_lbIndex=lbCurSel 3901;
_lbText=lbText [3901,_lbIndex];
if(_lbText!="") then {
 {ctrlShow [_x,false];} forEach [1800, 1801, 1802, 1000, 1001, 1002, 1003, 1004, 3900, 3901, 4900, 4901, 4902, 5900, 5901, 5902, 5903, 6900, 6901, 6902, 6903, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911];
 {ctrlShow [_x,true];} forEach [1105,4903,4904,4905,4906,4907,4908,4909];
 
 _dir=0;
 _objPos=getPos player;
 _objPos set [2,6000];
 _object = createVehicle [_lbText, _objPos, [], 0, "CAN_COLLIDE"];
 _object setDir _dir;
 cutText ["","BLACK IN",0.2];
 
 _camera = "camera" camCreate [10,10,5000];
 _camera cameraEffect ["INTERNAL","BACK"];
 showCinemaBorder false;
 Crafting_Object_Direction = -0.5;
 Crafting_Object_Radius = 7;
 Crafting_Object_Height = 0;
 if(ComboBoxResult=="Forts") then {
 Crafting_Object_Radius = 20;
 };
 _ang = 360;
 _coords = [[_objPos select 0, _objPos select 1,(_objPos select 2) + Crafting_Object_Height], Crafting_Object_Radius, _ang] call BIS_fnc_relPos;
 _camera camPrepareTarget _object;
 _camera camPreparePos _coords;
 _camera camPrepareFOV 0.700;
 _camera camCommitPrepared 0;
   while {GlobalPreviewVariable==0} do {
    _ang = _ang + Crafting_Object_Direction;
    _coords = [[_objPos select 0, _objPos select 1,(_objPos select 2) + Crafting_Object_Height], Crafting_Object_Radius, _ang] call BIS_fnc_relPos;
    _camera camPreparePos _coords;
    _camera camCommitPrepared 0.3;
    waitUntil {camCommitted _camera};
    if (DZE_cancelBuilding) then {GlobalPreviewVariable = 1;};
   };
 
 cutText ["","BLACK OUT",0.1];
 _camera cameraEffect ["TERMINATE","BACK"];
 camDestroy _camera;
 deleteVehicle _object;
 _object=objNull;
 
 Crafting_Object_Direction = -0.5;
 {ctrlShow [_x,true];} forEach [1800, 1801, 1802, 1000, 1001, 1002, 1003, 1004, 3900, 3901, 4900, 4901, 4902, 5900, 5901, 5902, 5903, 6900, 6901, 6902, 6903, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911];
 {ctrlShow [_x,false];} forEach [1105,4903,4904,4905,4906,4907,4908,4909];
 cutText ["","BLACK IN",0.6];
};

 

I don't know whether 

// ESC
if (_dikCode == 0x01) then {
_handled = true
};

is necessary, so I left it as it is. I feel it's not necessary

Link to comment
Share on other sites

11 hours ago, Schalldampfer said:

If you push ESC, a variable DZE_cancelBuilding  is set true;
My solution to the bug is to put
if (DZE_cancelBuilding) then {GlobalPreviewVariable = 1;};
in While {GlobalPreviewVariable==0} do { *** }; section. You'd better reset DZE_cancelBuilding to false  on early this script.

Now, preview_item.sqf is :

  Reveal hidden contents
GlobalPreviewVariable=0;
private ["_dikCode","_handle"];
_handled = false;
// ESC
if (_dikCode == 0x01) then {
 _handled = true;
};
DZE_cancelBuilding = false;
_lbIndex=lbCurSel 3901;
_lbText=lbText [3901,_lbIndex];
if(_lbText!="") then {
 {ctrlShow [_x,false];} forEach [1800, 1801, 1802, 1000, 1001, 1002, 1003, 1004, 3900, 3901, 4900, 4901, 4902, 5900, 5901, 5902, 5903, 6900, 6901, 6902, 6903, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911];
 {ctrlShow [_x,true];} forEach [1105,4903,4904,4905,4906,4907,4908,4909];
 
 _dir=0;
 _objPos=getPos player;
 _objPos set [2,6000];
 _object = createVehicle [_lbText, _objPos, [], 0, "CAN_COLLIDE"];
 _object setDir _dir;
 cutText ["","BLACK IN",0.2];
 
 _camera = "camera" camCreate [10,10,5000];
 _camera cameraEffect ["INTERNAL","BACK"];
 showCinemaBorder false;
 Crafting_Object_Direction = -0.5;
 Crafting_Object_Radius = 7;
 Crafting_Object_Height = 0;
 if(ComboBoxResult=="Forts") then {
 Crafting_Object_Radius = 20;
 };
 _ang = 360;
 _coords = [[_objPos select 0, _objPos select 1,(_objPos select 2) + Crafting_Object_Height], Crafting_Object_Radius, _ang] call BIS_fnc_relPos;
 _camera camPrepareTarget _object;
 _camera camPreparePos _coords;
 _camera camPrepareFOV 0.700;
 _camera camCommitPrepared 0;
   while {GlobalPreviewVariable==0} do {
    _ang = _ang + Crafting_Object_Direction;
    _coords = [[_objPos select 0, _objPos select 1,(_objPos select 2) + Crafting_Object_Height], Crafting_Object_Radius, _ang] call BIS_fnc_relPos;
    _camera camPreparePos _coords;
    _camera camCommitPrepared 0.3;
    waitUntil {camCommitted _camera};
    if (DZE_cancelBuilding) then {GlobalPreviewVariable = 1;};
   };
 
 cutText ["","BLACK OUT",0.1];
 _camera cameraEffect ["TERMINATE","BACK"];
 camDestroy _camera;
 deleteVehicle _object;
 _object=objNull;
 
 Crafting_Object_Direction = -0.5;
 {ctrlShow [_x,true];} forEach [1800, 1801, 1802, 1000, 1001, 1002, 1003, 1004, 3900, 3901, 4900, 4901, 4902, 5900, 5901, 5902, 5903, 6900, 6901, 6902, 6903, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911];
 {ctrlShow [_x,false];} forEach [1105,4903,4904,4905,4906,4907,4908,4909];
 cutText ["","BLACK IN",0.6];
};

 

I don't know whether 

// ESC
if (_dikCode == 0x01) then {
_handled = true
};

is necessary, so I left it as it is. I feel it's not necessary

been trying to figure this out for a bit...will update it thx and no the other part isnt needed :)

Link to comment
Share on other sites

This script has been updated.

The custom_builds.sqf was still outdated and throwing client RPT errors.

Would be a good idea to re-download the pack.

The garages are also included as a buildable now (for the virtual garage)

And the preview_item.sqf has been fixed also. If you accidently hit ESC while in preview, hit ESC again and it will exit you out. no more alt F4. thx @Schalldampfer

and last but not least, removed it from dropbox and now on the github

Link to comment
Share on other sites

  • 1 month later...

I removed the craft for each of the gems and added it to the category in a nice menu from Zupa zCraft. Call the menu right click on itemtoolbox

17819121.jpg

1.  download files here

2.  copy my description.hpp and zCraft.hpp in scripts folder

3.  in description.hpp very bottom add:

#include "scripts\description.hpp"
#include "scripts\zCraft.hpp"

4. in deploy Deploy Anything in right click option add:

["ItemToolbox","Меню крафта","closeDialog 0;createDialog ""ZCraft"";","true"]

 

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
×
×
  • Create New...