Jump to content

Advanced Crafting (without the alchemy)


ViktorReznov

Recommended Posts

This is my version of advanced alchemy with a touch less alchemy involved in it. It has removed the need for gems completely and solely relies on real materials to get the craft completed. Some of the parts you will need to code a way for them to be obtainable (one method is to download and install scrapper).

NEW!~ You can now build road/runways/bridges and their related structures!! 

NEW!~ You can now dismantle all these objects and have a chance to return the components used to construct them! Including roads!

DOWNLOAD https://github.com/Arstan13/Advanced-Gem-crafting/tree/master

CREDITS! @Raymiz and @Hogscraper for the Original code!
                  @theduke for updating Advanced Alchemical Crafting to 1.0.6.1
                  @Zupa for coding the zCraft menu itself
                  @Ghostis for bringing us the zCraft menu to advanced alchemical crafting

NOTE!~ Removal of roads/runways can be a bit tricky, you need to be within 5m of the CENTER of the MODEL. On runways that can be a bit hard to discern. Haven't come up with a way to fix this yet. You could change the search distance for a road but then you run the risk of being less precise in which road you actually remove.

NOTE!~ Road removal script is currently attached to right click pick axe. If this becomes bothersome due to the model center being hard to find, i recommend changing script execution from right click to key press. Doing so will change nothing about how the script executes, just makes it easier!.

Link to comment
Share on other sites

14 hours ago, Erzengelgames said:

how did you make them safe  to db? i added them to the safeObjects but they are not saveing for some reason

did you follow the original install instructions? In the buildables/variables.sqf near the bottom you should have lines of code like this

Spoiler

_CraftingArray = _Amethyst + _Citrine + _Emerald + _Lights + _Obsidian + _Ruby + _Sapphire + _Topaz + _Transportation;
DayZ_SafeObjects = DayZ_SafeObjects + _CraftingArray;
DZE_maintainClasses = DZE_maintainClasses + _CraftingArray;
Custom_Buildables = _CraftingArray; 

with that there shouldnt be anything special you need to do to get it to work. At least, i havent had to, feel free to pm me if the problem persists and we can start up a teamviewed to find the problem

Link to comment
Share on other sites

  • 2 months later...

Hello! I have a question. The script works and runs great,but annoying spam in RPT of the client(the Server RPT net)

Spoiler

if ((_typeOfCursorTarget in Custom_Buildables> 
Error position: <_typeOfCursorTarget in Custom_Buildables> 
Error Undefined variable in expression: _typeofcursortarget 
File mpmissions\__CUR_MP.Napf\dayz_code\compile\fn_selfActions.sqf, line 1245 
Error in expression <;
s_amplifier_dismantle = - 1;

Variables declared in variables

    s_custom_dismantle = -1;
    s_amplifier_dismantle = -1; 

fn_selfActions also, all declared properly

private ["_canPickLight",............."_typeOfCursorTarget",..............]; ,that is, the variable was

The code itself fn_selfActions causing spam

Spoiler

 if ((_typeOfCursorTarget in Custom_Buildables) && (player distance _cursorTarget <= 5) && {speed player <= 1} && (_canDo)) then {
        _hasAccess = [player, _cursorTarget] call FNC_check_access; //checks if player has rights to object
        _allowed = ((_hasAccess select 0) || (_hasAccess select 2) || (_hasAccess select 3) || (_hasAccess select 4)); //returns values from fn_checkAccess of [_player, _isOwner, _isFriendly, _isPlotOwner]
        if ((s_custom_dismantle < 0) && (_allowed || (_hasAccess select 1))) then {
            s_custom_dismantle = player addAction [("<t color=""#FF0000"">"+("Демонтаж объекта") + "</t>"), "scripts\zCraft\buildables\dismantle.sqf",_cursorTarget, 3, true, true];
        };
    } else {
        player removeAction s_custom_dismantle;
        s_custom_dismantle = -1;
    };
  
  if (_typeOfCursorTarget == "Plastic_Pole_EP1_DZ" && {speed player <= 1}) then {
        _hasAccess = [player, _cursorTarget] call FNC_check_access; //checks if player has rights to object
        _allowed = ((_hasAccess select 0) || (_hasAccess select 2) || (_hasAccess select 3) || (_hasAccess select 4)); //returns values from fn_checkAccess of [_player, _isOwner, _isFriendly, _isPlotOwner]
        if ((s_amplifier_dismantle < 0) && (_allowed || (_hasAccess select 1))) then {
            s_amplifier_dismantle = player addAction [("<t color=""#b7b7b5"">"+("Демонтаж") + "</t>"), "scripts\zCraft\buildables\ampDismantle.sqf",_cursorTarget, 3, true, true];
        };
    } else {
        player removeAction s_amplifier_dismantle;
        s_amplifier_dismantle = -1;
    };

All made,as taught by the author of the script,but why that much spam in the log of the client

Well, the file itself,if need be

fn_selfActions.sqf

If you can help,please. Thanks in advance

Link to comment
Share on other sites

hello guys I have installed this to my 1.0.6.2 server but I can't get a database save I get this error in the rpt when placing an object

"Server_PublishObj error: Wrong parameter format"

I tried using DayZ_SafeObjects = ["item class names"];  in custom variables what works in 1.0.6.1 but in 1.0.6.2 still no joy the mod works fine just that error and no database save.

Link to comment
Share on other sites

4 hours ago, Dr.Killmore said:

hello guys I have installed this to my 1.0.6.2 server but I can't get a database save I get this error in the rpt when placing an object

"Server_PublishObj error: Wrong parameter format"

I tried using DayZ_SafeObjects = ["item class names"];  in custom variables what works in 1.0.6.1 but in 1.0.6.2 still no joy the mod works fine just that error and no database save.

please try this . custom_builds.sqf must be updated.

21 hours ago, Schalldampfer said:

I think this script also do not work in 1.0.6.2, and I need update.
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];

would be replaced by

    if (DZE_permanentPlot) then {
        _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
        PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];

    } else {
        PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey];
    };

Link to comment
Share on other sites

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

×
×
  • Create New...