Jump to content
mudzereli

[Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing

Recommended Posts

We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection.

In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole?

Thanks

Share this post


Link to post
Share on other sites
Just now, ReDBaroN said:

We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection.

In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole?

Thanks

maybe a better idea is add a nearest wall restriction in player_deploy.sqf

Spoiler
FIND:
//### BEGIN MODIFIED CODE: player_deploy
//_classname =    getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
//_classnametmp = _classname;
//_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
//_text =         getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
//_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
_classname      = _index call getDeployableClass;
_classnametmp   = _classname;
_require        = [];
_text           = _index call getDeployableDisplay;
_ghost          = "";
//### END MODIFIED CODE: player_deploy

PASTE BELOW:



_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith {
dayz_actionInProgress = false;
systemChat("Bikes Not Allowed near of walls");
};

if ure using Two diferents bikes.. then add another check:

_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")or (_classname isKindOf "Old_bike_TK_INS_EP1")) exitWith {
dayz_actionInProgress = false;
systemChat("Bikes Not Allowed near of walls");
};

Share this post


Link to post
Share on other sites
12 minutes ago, juandayz said:

maybe better is add a nearest wall restriction in player_deploy.sqf

FIND:
//### BEGIN MODIFIED CODE: player_deploy
//_classname =    getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
//_classnametmp = _classname;
//_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
//_text =         getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
//_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
_classname      = _index call getDeployableClass;
_classnametmp   = _classname;
_require        = [];
_text           = _index call getDeployableDisplay;
_ghost          = "";
//### END MODIFIED CODE: player_deploy

PASTE BELOW:



_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith {
dayz_actionInProgress = false;
systemChat("This Object is Not Allowed near of a wall");
};

 

I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it

Share this post


Link to post
Share on other sites
1 minute ago, salival said:

I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it

Good point. Maybe if we increase the distance from walls? Same distance as the offset of the bike?

Share this post


Link to post
Share on other sites

This is the version I settled on:

in player_deploy.sqf find this line (or similar): 

	if (!(_index call getDeployableBuildOnRoad)) then {if (isOnRoad [_position select 0, _position select 1, 0]) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD";};};

Add this code block after it:

	if (_classname isKindOf "MotorCycle") then {
		if (count (nearestObjects [_position, ["Building","DZE_Housebase"], 5]) > 0) then {
			_cancel = true; 
			_reason = format ["%1 can not be built near a wall/door",_text];
		};
	};

 

Share this post


Link to post
Share on other sites

We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option.

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"]

As you can see above, we have the option "_packAny      | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die.

Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106?

Share this post


Link to post
Share on other sites
4 hours ago, ReDBaroN said:

We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option.

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"]

As you can see above, we have the option "_packAny      | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die.

Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106?

you could keep it as anyone can repack the deployable and then add it to the garage to restrict removal variable in your ConfigVariables.sqf. The restrict removal option keeps anyone from removing anything from your plot thats in that array without permission on the plot pole first.

Share this post


Link to post
Share on other sites

I'm using your script and it runs fine, works etc. However players are saying they don't get the option to pack or its very difficult to see (EG it only stays for half a second and then they have try and get it again). Whenever I look at the bike its very easy to pack, is there a reason why its hard for players to see the option?

Share this post


Link to post
Share on other sites

@Runewulv Thanks for that idea! :smile: 

@l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with

@Rust You need to add exceptions to your Allowed actions array in infistar:

/*  ALLOWED Actions "_dayzActions" are only used if you have "_CSA =  true;"  */
_dayzActions =
[
......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2"
];

So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2

Hope that makes sense... :) 

Share this post


Link to post
Share on other sites

are you an admin and gave yourself admin access to plot poles on your variables?

 

If you put your UID in the plot management array for plot poles in configvariables.sqf it will make every plot pole act as if you have permission on them.

 

 

Share this post


Link to post
Share on other sites
On 8/22/2017 at 2:10 PM, salival said:

I'm at work at the moment but I stopped using publish_vehicle2 or whatever it is and just used obj publish, there's other stuff to be done to fix it but that's the general thing.

I may look at releasing my fork at some point (there's lots of changes not on my repo 9of my fork) that fixes a lot more things and is designed for static guns/building deployables.s.

@l1nkrx7 This was posted by @salival and this is the fix. I'll show you what my player_deploy.sqf looks like: 

search for if (_proceed) then {

Spoiler

if (_proceed) then {
            if([player,_index] call getHasDeployableParts) then {
                [player,_index] call removeDeployableParts;
                [format[localize "str_build_01",_text],1] call dayz_rollingMessages;
                _tmpbuilt setVariable ["OEMPos",_location,true];
                if (_index call getPermanent) then {
                    _tmpbuilt call fnc_set_temp_deployable_id;
                    if(_index call getDeployableSimulation) then {
                        PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)];
                        publicVariableServer "PVDZ_obj_Publish";
                    } else {
                        PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)];
                        publicVariableServer "PVDZ_obj_Publish";
                    };
                } else {
                    _tmpbuilt call fnc_set_temp_deployable_id;
                };
                if . . . . . ... . . . .. . 

so if you just have it save as object as @salival said then it will work as intended.

Share this post


Link to post
Share on other sites
Spoiler

 

On 11/30/2017 at 9:58 PM, ReDBaroN said:

@Runewulv Thanks for that idea! :smile: 

@l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with

@Rust You need to add exceptions to your Allowed actions array in infistar:


/*  ALLOWED Actions "_dayzActions" are only used if you have "_CSA =  true;"  */
_dayzActions =
[
......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2"
];

So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2

Hope that makes sense... :) 

Thanks for that, worked perfect 

Share this post


Link to post
Share on other sites

Hi all !

When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!".

But after restart a helipad disappears. I using this line in config:

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"]

And one more question:

Where can I change the width of buttons? Screenshot.

Share this post


Link to post
Share on other sites
I have the same problem
8 hours ago, WLF said:

Hi all !

When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!".

But after restart a helipad disappears. I using this line in config:

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"]

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By looter809
      craftAnything for DayZ Epoch 1.0.7.1+
      A script I originally wrote for TLF servers, but with their permission I am releasing to the public to celebrate getting the A2 Community Dev role in the Epoch Discord. This script allows you to add a ton of craftable items to your server. It is super modular, and takes up very little space. It is also very easy to configure. You can add as many configs as you want. TLF has come up with about 40 custom crafting configs, I have included their turret configs in the example configVariables.sqf file.
      Installation & Setup
      Download the code as a zip file here https://github.com/ZzBombardierzZ/DayZ-Epoch-CraftAnything/archive/refs/heads/main.zip
      Copy the craftAnything.sqf file into your mission folder, inside of a "scripts" folder. Example: "ServerRoot\mpmissions\DayZ_Epoch_11.Chernarus\scripts\craftAnything.sqf"
      In configVariables.sqf, find the DZE_CLICK_ACTIONS array and add the desired configs to it. See the example configVariables.sqf file for more info.
      Go into the newly created craftAnything.sqf file and edit the "CONFIG SECTION" to your liking. Read the comments in the file for more info.

      Battleye Filters
      If you are using Battleye on your server, you will need to update your scripts.txt file to allow the script to run. I am not going to provide a list of filters unfortunately. It is fairly easy to do yourself. You can look at OpenDayz Guide to BattlEye to learn more about BattlEye filters and use eraser1's BE_AEG to generate scripts.txt filters automatically.
      Credits
      As mentioned before, I originally wrote this script for TLF servers. I would like to thank them for allowing me to release this to the public. I would also like to thank the Epoch Discord community for their help and support and for giving me the opportunity to become a Community Developer.
      License
      There is none. But please give credit where credit is due. If you do use this script, please let me know. I would love to see what you do with it.
      Contact
      If you have any questions, comments, or concerns, please feel free to contact me on Discord at ZzBombardierzZ#5945 or in the Epoch Discord server.
      Changelog
      v1.0.0 - Initial release
    • By Macintosh
      I didn't find any script for teleportation that I could implement for my players on my server,  so I made this script.   I made a short demonstration : 
       
      Install: 
      https://github.com/Marcusmoldev/Arma2_Dayz_Teleporter
      In its current state it is limited to two portals as I don't want my players to have portals everywhere, but this functionality is absolutely something one can implement in the future .. I don't plan on doing that for the moment though ..
      Also if you do end up installing the script, let me know if there are any typos in the readme and I'll try to correct them.
      Thanks and enjoy
       
    • By Restplay
      Hello, does anyone have Sector C files for the Napf map? On the island where is the Sürenfeld Observatory.
    • By Restplay
      Hello i created my server from this thread:
       
    • By salival
      Zabns Take Clothes is part of Epoch 1.0.7.1 now.
      Hi,
      Since Zabn is MIA I have updated his Take Clothes script to 1.0.7 compatible.
      Github with install instructions and download location: https://github.com/oiad/TakeClothes
       
       
      **** For Epoch 1.0.6.2 only **** >> Download <<
      Visit this link: https://github.com/oiad/TakeClothes/tree/Epoch_1.0.6.2
      (original install url: http://opendayz.net/threads/release-zabns-take-clothes-2-0.19290/)
      (original discussion url: http://opendayz.net/threads/help-discussion-zabns-take-clothes.13198/)
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...