Jump to content
  • 0

DZGM and Bike Deployment colliding. Right-click option gone.


bFe

Question

I've used DZGM for a long time, but ever since I added a new bike deployment system I can't right click items added in the extra_rc anymore.
I don't remember where I found the bike thingy but the config looks like this:

//  **FORMAT** -- (note no comma after last array entry)
//
//  DZE_DEPLOYABLES_CONFIG = [
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [...more stuff here...]
//  ];
//    
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _clickItem    | class name of the item to click on                                  | string | "ItemToolbox"
// _deployOffset | [_side,_front,_up] array to offset the deployable when buiding      | array  | [0,2,1]
// _packDistance | how close does the packer need to be to pack the object?            | number | 5
// _damageLimit  | item can't be repacked if damage is > this. (-1 = no re-packing)    | number | 0.1
// _packAny      | can anyone repack the deployable?                                   | bool   | false
// _cargo        | clear the cargo of the deployable?                                  | bool   | false
// _ammo         | should vehicle ammo be cleared? (does not persist through restart)  | bool   | true
// _hive         | write deployable to database?                                       | bool   | false
// _plot         | require a plot from the owner to build the deployable?              | bool   | false
// _simulation   | enable simulation (movement/damage) for the object? (true for cars) | bool   | true
// _road         | enable road building for this object?                               | bool   | true
// _deployables  | array of class names that can be deployed with this method          | array  | ["MMT_Civ"]
// _near         | array of items required nearby to build (workshop/fire/fueltank)    | array  | []
// _parts        | array of parts required to build (will be taken from player)        | array  | ["ItemToolbox"]
// _condition    | string of code to evaluate to determine whether action is shown     | string | "!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"

DZE_DEPLOYABLES_CONFIG = [
    // deploy a non-permanent bike from a toolbox right in front of the player that can be re-packed by the owner as long as it's under 50% damage
    ["ItemToolbox",[0,7,1],5,0.5,false,false,false,false,false,true,true,["MMT_Civ"],[],["ItemToolbox"],"true"]
];

// **DZE_DEPLOYABLE_NAME_MAP format
//  
//  DZE_DEPLOYABLE_NAME_MAP = [
//      [_class,_name],
//      [_class,_name],
//      [... more ...]
//  ];
//
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _class        | class name of the item you want to replace the name of              | string | "Notebook"
// _name         | new name to display when right clicking                             | string | "Macbook Pro"
//
DZE_DEPLOYABLE_NAME_MAP = [
    ["Notebook","Macbook Pro"]
    ["MMT_Civ","Bicycle"]
];

DZE_DEPLOYABLE_ADMINS = [];

Does anyone know how I can fix this?

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Hi!

Thanks for getting back to me. Sadly I added the MMT part after I had already tried it a couple of times.
I'll try re-adding some things and see if it works then.

Edit: didn't help. Is there a way to add the right click radio-> exec dzgm\init.sqf to the Bike thingy?

Edited by bFe
Link to comment
Share on other sites

  • 0

Are you using the Bike script (deploy anything i believe is the name) for the bike only?  If so you can add it into extra_rc and call an external bike script. Doesnt explain why they wont work together tho. racking my brain atm  to try and remember what i did to make them both work together, worst case ill post my files for both on dropbox and post ya the link and you can go from there.

Link to comment
Share on other sites

  • 0

In the  add ons\bike\init.sqf file   line #53  check your file location and change as needed i had to change mine from:

 call compile preprocessFileLineNumbers "overwrites\click_actions\init.sqf";

to

    call compile preprocessFileLineNumbers "scripts\click_actions\init.sqf";

 

Same with click_actions\init.sqf  check the file locations.  im looking through any other related files looking for differences

Link to comment
Share on other sites

  • 0

Well apparently I called two ui_selectSlot. One was being called in the click_actions\init and one in another folder I have.
When I called just one of them, DZGM worked but the bike didn't. When I called the other one, the bike thingy worked but DZGM did not.

Here are the two files:

click_actions: http://pastebin.com/S9mSdgSb
other one: http://pastebin.com/y5522jqh

How can I merge them without f***ing things up?

Link to comment
Share on other sites

  • 0

how i have mine setup:

in mission root

folders:

1)add_ons\bike  has config.sqf staring with

 //  **FORMAT** -- (note no comma after last array entry)
//
//  DZE_DEPLOYABLES_CONFIG = [
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [...more stuff here...]
//  ];

also has deploy, pack, init,functions and wrapper.sqf's in it

AddOns Folder

2) scripts\click_actions  

has config, init, and ui_selectslot in it

click_actions folder

Personally i commented out the deploy bike in the deploy anything script as it was buggy and use an external bike script

spawnbike folder

my mission Init.sqf has

call compile preprocessFileLineNumbers "addons\bike\init.sqf";

 

NOTE!!!:  go through the click_actions config.sqf and remove any un needed code for other scripts.  if you dont feel comfortable just let me know and ill thin it out for you

 

Or use your files and use my setup as a template  any which way!

Edited by SideShowFreak
spelling :)
Link to comment
Share on other sites

  • 0
6 minutes ago, mrjingles14 said:

Hi i have the same problem sorry what was the fix for this, for some reason cant open your links

 

take a look in your ui_selectslot.sqf  ... if ure using dzgm and rightclick actions..... found this part and compare


    //### BEGIN MODIFIED CODE: extra click actions
    {
        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
	 
	 //GROUP MANAGEMENT
	
	_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];
      };
   };
	//GROUP MANAGEMENT
   

 

Link to comment
Share on other sites

  • 0
1 hour ago, mrjingles14 said:

I added that bit of code to the end but still no joy right click works on tool box but not the radio.

not in the end... se my whole file:

ui_select_Slot.sqf

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 ((time - dayzClickTime) < 1) exitWith {};
if (!DZE_SelfTransfuse && ((gearSlotData _control) == "ItemBloodBag")) exitWith {};
if (_button == 1) then {
    //dayzClickTime = time;
    _group = _parent displayCtrl 6902;
    
    _pos =      ctrlPosition _group;
    _pos set [0,((_this select 2) + 0.48)];
    _pos set [1,((_this select 3) + 0.07)];
    
    _item = gearSlotData _control;
    
    _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
                && 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
    {
        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
    
     //GROUP MANAGEMENT
    
    _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];
      };
   };
    //GROUP MANAGEMENT

   

    _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

  • 0

and to get it working on radio.. you need a extra_Rc.hpp file:

Spoiler

class ExtraRc {
  class ItemRadio {
     class GroupManagement {
        text = "Group Management";
        script = "execVM 'dzgm\loadGroupManagement.sqf'";
     };
  };
  };

and at very top of description.ext

#include "custom\extra_rc.hpp"

Link to comment
Share on other sites

  • 0

@juandayz  This worked for me, but no I cant switch off and on my radio or change view distance anymore because I was using deploy bike mod for my click actions...

The Deploy Bike mod I use that has its own rightclick(no extra_rc.hpp : https://github.com/mudzereli/DayZEpochDeployableBike/tree/dev

in this spoiler is my config.sqf for click_actions with the deploy bike mod. what would I enter to have the group management work with this insted of extra_rc.hpp ?

Spoiler

DZE_CLICK_ACTIONS = [
    ["ItemGPS","Scan Nearby","if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]); DZE_CLICK_ACTIONS_MAN_COUNT = count ((position player) nearEntities ['CAManBase',DZE_CLICK_ACTIONS_GPS_RANGE]);cutText[format['Within %1 Meters: %2 AI/players, %3 zombies, %4 vehicles',DZE_CLICK_ACTIONS_GPS_RANGE,DZE_CLICK_ACTIONS_MAN_COUNT - DZE_CLICK_ACTIONS_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',DZE_CLICK_ACTIONS_GPS_RANGE]) - DZE_CLICK_ACTIONS_MAN_COUNT],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Up"   ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE + 100) min 2500; cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    ["ItemGPS","Range Down" ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE - 100) max 1000;  cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
    //["ItemGPS","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
    //["ItemMap","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
    ["Binocular_Vector","View Distance:","systemChat('Change View Distance Locally. Click on one of the distance options');","true"],
    ["Binocular_Vector","500 Meters","setViewDistance 500; systemChat('ViewDistance: 500'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","1000 Meters","setViewDistance 1000; systemChat('ViewDistance: 1000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","1500 Meters","setViewDistance 1500; systemChat('ViewDistance: 1500'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","2000 Meters","setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","3000 Meters","setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","4000 Meters","setViewDistance 4000; systemChat('ViewDistance: 4000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binocular_Vector","5000 Meters","setViewDistance 5000; systemChat('ViewDistance: 5000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","View Distance:","systemChat('Change View Distance Locally. Click on one of the distance options');","true"],
    ["Binoculars","500 Meters","setViewDistance 500; systemChat('ViewDistance: 500'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","1000 Meters","setViewDistance 1000; systemChat('ViewDistance: 1000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","1500 Meters","setViewDistance 1500; systemChat('ViewDistance: 1500'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","2000 Meters","setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","3000 Meters","setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","4000 Meters","setViewDistance 4000; systemChat('ViewDistance: 4000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["Binoculars","5000 Meters","setViewDistance 5000; systemChat('ViewDistance: 5000'); systemChat('Warning: Higher the view distance Lower the FPS');","true"],
    ["ItemRadio","Switch ON/OFF","execVM 'custom\remote\switch_on_off.sqf';","true"]
    
];

 

On 2016-11-29 at 10:50 AM, juandayz said:

and to get it working on radio.. you need a extra_Rc.hpp file:

  Hide contents

class ExtraRc {
  class ItemRadio {
     class GroupManagement {
        text = "Group Management";
        script = "execVM 'dzgm\loadGroupManagement.sqf'";
     };
  };
  };

and at very top of description.ext

#include "custom\extra_rc.hpp"

 

Link to comment
Share on other sites

  • 0

never mind.... haha. found it...

it was already posted by the script author...

 

Spoiler

How do I make this work with DZE_CLICK_ACTIONS script?

 
Skip step #6 in the OP and instead add this to your click_actions config.sqf:
Code:

["ItemRadio","Group Management","execVM 'dzgm\loadGroupManagement.sqf';","true"]

 

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...