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

## Recommended Posts

Outdated, does not work with Epoch 1.0.7

DEPLOYABLE BIKE 2.8.2

version 2.8.2 updates the code to work with Epoch Mod 1.0.6. Thanks @ebaydayz!

version 2.8.1 should hopefully fix the long-standing non-moving-bike problem! Thanks @SchwEde!

FYI: 2.8.0 adds the _condition and _ammo parameters to the config array so you will need to add a value for these parameter in each record of the DZE_DEPLOYABLES_CONFIG array in the appropriate spot if you are upgrading from 2.6

Out of the box, it adds a deployable bike with a right click action on a toolbox and a couple other neat deployables.

Really, it can be used to deploy just about anything. See the configuration section below.

For some samples of what it can do, check out this gallery on imgur

Installation

3. find this line in your mission file init.sqf (warning: if you have a custom compiles file, find that line instead of the one below!)
4. place this line directly after the line you found

Warning:

• due to the way the way arma handles numbers and the way addon is coded, using the save-to-database option may not allow you to re-pack some objects if you have Character ID's over 500,000 (which I don't think will be an issue for 99.99% of people).

If you use another right click method like extra_rc.hpp and want to switch to my method, see my click actions configuration github page.

The click actions script is included in the deploy script as part of the core, so you don't need to download anything, just follow the instructions for adding your own actions.

Configuration

This addon is highly configurable, you can deploy just about anything, not just bikes.

DZE_DEPLOYABLES_CONFIG format -- (note no comma after last array entry)

DZE_DEPLOYABLES_CONFIG = [
[_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_hive,_plot,_simulation,_deployables,_near,_parts],
[_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_hive,_plot,_simulation,_deployables,_near,_parts],
[...more stuff here...]
];

DZE_DEPLOYABLES_CONFIG array values (view on github to read easier):

 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_DEPLOYABLE_NAME_MAP array -- allows you to rename the deployable (on the right click/messages)

format (note no comma after last array entry)

 DZE_DEPLOYABLE_NAME_MAP = [
[_class,_name],
[_class,_name],
[... more ...]
];

array parameters

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"

Change Log

version | change
--------|-------
2.8.2  | updates for 1.0.6! Thanks @ebaydayz!
2.8.1  | fix from SchwEde that should fix bike not moving. Thanks @SchwEde!
2.8.0  | option to clear vehicle ammo
2.7.1  | better exit reasons
2.7.0  | option to add condition for showing action in config
2.6.1  | fix for unrideable bikes
2.6.0  | road building options, deployable name mapping
2.5.1  | fix a bug where preview items would sometimes disappear
2.5.0  | now uses a modified epoch building system to deploy the objects
2.4.3  | better click actions build conflict detection
2.4.2  | updated for new click actions handler build
2.4.1  | fixed deployables spawning in locked after restart
2.4.0  | multi-part deployables. yay!
2.3.1  | big fix on packing temp objects
2.3.0  | optional saving to database with post-restart memory of deployed items (see warning below about this)
| configurable damage limits on re-packing
| admin list for packing/deploying instantly & being able to remove all deployables
2.2.1  | positioning fix for deployed items
2.2.0  | option for clearing cargo of spawned items
2.1.0  | change way dependency call is made, only one line needed in init.sqf now for setup
2.0.0  | major update, allow multiple deployables, pretty much any class
1.1.0  | configuration options / code optimization
1.0.0  | release

Issues/FAQ

1) people are getting kicked for createvehicle restriction when building a stone wall

open your battleye filter createvehicle.txt and change this line

5 "Fort_" !="Fort_RazorWire" !="Fort_RazorWirePreview"

to this:

5 "Fort_" !="Fort_RazorWire" !="Fort_RazorWirePreview" != "Fort_StoneWall_EP1"

2) I am using "A Plot For Life" and this is not working!

##### Share on other sites

well, its nice that you are making this post :-), but the old ones from 1042 are still working for me :-).

##### Share on other sites

I did not see any others that are still maintained that use right click on toolbox.

Also, the ones that do are messy in that they make use of hpp files which must be included in the description.ext file when you can easily use a sqf file and store the called scripts in an array, avoiding another include.

Why does this matter? multiple addons can use my click actions script (which is also extremely lightweight and easy to plug in itself) to register a script to an item, so less conflicts, and less code to maintain.

My script also adds the spawned bike to the DZE_Safevehicle array on its own whereas the other deployable bike scripts tell/require you to create a custom variables.sqf which means more code that goes bad when updates come out.

Also, my script makes use of structured text in the notifications so it looks nicer, and the code is easier to install than most other deployable bike mods.

You should check out the screenshots. You might like it :)

##### Share on other sites

It is easier and just makes the pbo a lot cleaner with a extra_rc.hpp file that way people can keep all their right clicks in one file.

##### Share on other sites

oh ! they look really nice ! the message you've built a bike ! good work :-) I'll test it on my server. (Before i'll try it out on the test server :D)

##### Share on other sites

It is easier and just makes the pbo a lot cleaner with a extra_rc.hpp file that way people can keep all their right clicks in one file.

Well, i also thought so.. all right click options in extra_rc .. but watch the screens ! The look really nice !

##### Share on other sites

It is easier and just makes the pbo a lot cleaner with a extra_rc.hpp file that way people can keep all their right clicks in one file.

Are you saying the extra_rc.hpp method is cleaner? I don't think that's true.

Look at it this way:

lets say you are installing 2 addons that modify ui_selectSlot.sqf

- deployable bikes

- self bloodbag (i know these are in 1.0.5.1 but i am using these for the sake of argument)

typical method of installing above 2 addons with extra_rc.hpp:

- the server admin copies/pastes ui_selectSlot.sqf from dayz_code into their mission file

- the server admin copies/pastes code from deployable bike into extra_rc.hpp

- the server admin copies/pastes code from self bloodbag into into extra_rc.hpp

- the server admin copies/pastes usually 1 line from deployable bike into init.sqf to call the sqf code

- the server admin copies/pastes usually 1 line from self bloodbag into init.sqf to call the sqf code

typical method of installing above 2 addons using sqf only:

- server admin installs my Click Actions sqf file to overwrite ui_selectSlot, this script also allows other addons to register actions by simply pushing them into the array

- the server admin copies/pastes usually 1 line from self bloodbag into init.sqf to call the sqf code.

- the server admin copies/pastes usually 1 line from deployable bike into init.sqf to call the sqf code

The key is the addons push their action into the Click Actions array through code, so server admin never has to make this link anywhere

compare the 5 steps in typical hpp use vs the 3 for my method. it's not just easier, but it's cleaner and makes more sense.

I think the only reason people use the hpp method is because the original code in the ui_selectSlot.sqf file uses the hpp structure.

The hpp method is basically a copy/paste injection of the existing code where mine is a sqf-based rewrite of this code:

##### Share on other sites

Hi all. I've updated the scripts to be highly configurable. You can deploy much more than just a bike. Enjoy :)

##### Share on other sites

This and with this mod = profit

If yes, how?

##### Share on other sites

Does this script remove the required items from the inventory?  and does it put them back when your repack it?

##### Share on other sites

Hi all,

I've been working on a better deployable bike script for a few days and here are the results.

<snip>

I have been using EVD - Enhanced Vehicle Deployment which is working on my fresh 1.0.5.1 installation without any issues.

However I congratulate you for enrichening & improving existing options for vehicle deployers.

<snip>

Look at it this way:

<snip>

The hpp method is basically a copy/paste injection of the existing code where mine is a sqf-based rewrite of this code:

From what I understand your method is clearly superior, hence I will be switching to yours but having just completed a several day long reinstallation & improvement bonanza, I'm just adding this to the queue of my next improvement cycle.

Thanks!

and with this mod = profit

Great idea, will look into this!

##### Share on other sites

It sometimes just packs an ural or even a wall near the player..

##### Share on other sites

Great work nice and easy to add

##### Share on other sites

If yes, how?

Yes,

you can easily do this - Looking at maca's instructions -- here is what you can do to convert to usage of my action handler.

(the ultra lazy admin can ignore steps 1-3 as my code ultimately overwrites everything maca's method adds anyways)

1) can reverse/ignore the 1st step about custom compiles.sqf

2) can reverse/ignore the 2nd step about replacing ui_selectSlot.sqf

4) once you have my addon loaded, you simply need to push an array into DZE_CLICK_ACTIONS at the bottom of init.sqf:

- format:  [CLASS_NAME,TEXT,SCRIPT]

* CLASS_NAME: the class of the item that was clicked

* TEXT: text displayed on right click

* SCRIPT: script to run when clicked

sample:

if(!isDedicated) then {
DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["30m_plot_kit","Click Me","hint ""I'm a plot!"";"]];
// also acceptable
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["30m_plot_kit","Click Me too!","hint ""I'm a plot also!"";"]];
// should work for scripts etc as well of course
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["ItemBloodbag","Self Bloodbag lol","execVM 'path\to\my\script.sqf';"]];
};

##### Share on other sites

Does this script remove the required items from the inventory?  and does it put them back when your repack it?

yes, it does remove the items. also, the code prevents players from trying to trick the system by dropping the item as they are crafting etc

##### Share on other sites

It sometimes just packs an ural or even a wall near the player..

I tested the protection against cursorTarget changing pretty thoroughly and improved it in the 2.0.0 release.

Do you have any more details you can give me, such as how to recreate this problem or what version you are using?

You will want to update to the newest version (2.0.0) if you haven't yet (I released it last night).

##### Share on other sites

Yes,

Thank you so much! works like a charm and it is more like a pretty easy to use righclick menu with the bike option on top.

Really nice work!

##### Share on other sites

looks loike a great script, but, a quick look at ti i cant see if its possible to have it require multiple ityems ot craft something?

maybe i missed it but if so, where and how

thanks

##### Share on other sites

looks loike a great script, but, a quick look at ti i cant see if its possible to have it require multiple ityems ot craft something?

maybe i missed it but if so, where and how

thanks

It can only do a 1 for 1 trade right now, I could work on something like this if there's enough interest.

##### Share on other sites

It can only do a 1 for 1 trade right now, I could work on something like this if there's enough interest.

I too would like to have it so that players require items as well as the right click object to deploy a bike. For instance the scrap metal and toolbox for a push bike. 2 wheels / engine parts / toolbox for motorbike etc.

I am most definitely going to carry on using this. Great work and thank you ever so much for releasing.

Regards,

Pry

##### Share on other sites

Love this version of the script, just curious though some of the vehicles that spawn in have gear any idea where what to add to clear the vehicles gear as it spawns in.

##### Share on other sites

Love this version of the script, just curious though some of the vehicles that spawn in have gear any idea where what to add to clear the vehicles gear as it spawns in.

This is a good idea. Right now it just spawns the vehicle in. I could add something into the config for allowing admins to enable or disable gear spawning for each item.

##### Share on other sites

Love this version of the script, just curious though some of the vehicles that spawn in have gear any idea where what to add to clear the vehicles gear as it spawns in.

Hey, I already coded it in and briefly checked it out, seems to work. You can get the files from my development branch if you want. Otherwise I'll release it once I test it further and work on a couple other things.

##### Share on other sites
This topic is now closed to further replies.

• ### Similar Content

• By A Man
Deploy Anything in version 3.0.1 updated for Epoch 1.0.7.
• By salival
Hi,
Here's my version of  @OtterNas3 vehicle key changer.  It was subsequently modified by @Grahame for epoch 1.0.6. Updated for 1.0.7.
This adds support for briefcases, gems and coins as well as using the epoch vehicle upgrade system to do the key changing/claiming.
* original discussion url: https://epochmod.com/forum/topic/5972-release-vehicle-key-changer-for-making-masterkey-v-14-updated-06152014/
* updated discussion url: https://epochmod.com/forum/topic/43048-release-vehicle-key-changer-for-making-masterkey-v-141-updated-for-epoch-106/
**EDIT* Link to a working locate Vehicle script that is able to find multiple vehicles per key:

• By salival
Hi guys,
Here's my version of the bury/butcher body script. Focus'd on optimization and cleanliness.
* Tested as working on a blank Epoch 1.0.7 server
* Contains a server side scheduler module to clean up old weapon crates, graves and crosses after 25 minutes.
* Removes the flies sound when body is buried for performance.

• By salival
Hi,
Since Zabn is MIA I have updated his Take Clothes script to 1.0.7 compatible.