mudzereli Posted July 1, 2014 Report Share Posted July 1, 2014 Outdated, does not work with Epoch 1.0.7 DEPLOYABLE BIKE 2.8.2 all of this information is available in an easier-to-read format on github pages>> 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 download the files extract the addons and overwrites folder from the downloaded zip file into your mission file root 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!) call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; place this line directly after the line you found call compile preprocessFileLineNumbers "addons\bike\init.sqf"; edit addons\bike\config.sqf to change some options or add different deployables (see configuration section for more info) 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). Adding Your Own Custom Actions 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. * note: before attempting to troubleshoot issues with adding your own actions, make sure you are using the most recent version of the addon. Configuration This addon is highly configurable, you can deploy just about anything, not just bikes. open addons\bike\config.sqf and edit the array to add your own deployables. 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! .:rmc:., Ghostrider-GRG, Max and 20 others 23 Link to comment Share on other sites More sharing options...
speaR Posted July 1, 2014 Report Share Posted July 1, 2014 well, its nice that you are making this post :-), but the old ones from 1042 are still working for me :-). Link to comment Share on other sites More sharing options...
mudzereli Posted July 1, 2014 Author Report Share Posted July 1, 2014 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 :) Link to comment Share on other sites More sharing options...
Friendly Posted July 1, 2014 Report Share Posted July 1, 2014 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. Link to comment Share on other sites More sharing options...
speaR Posted July 1, 2014 Report Share Posted July 1, 2014 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) Link to comment Share on other sites More sharing options...
speaR Posted July 1, 2014 Report Share Posted July 1, 2014 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 ! Link to comment Share on other sites More sharing options...
mudzereli Posted July 1, 2014 Author Report Share Posted July 1, 2014 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: speaR 1 Link to comment Share on other sites More sharing options...
mudzereli Posted July 3, 2014 Author Report Share Posted July 3, 2014 Hi all. I've updated the scripts to be highly configurable. You can deploy much more than just a bike. Enjoy :) Bricktop 1 Link to comment Share on other sites More sharing options...
dodgitech10 Posted July 3, 2014 Report Share Posted July 3, 2014 This and with this mod = profit mgm 1 Link to comment Share on other sites More sharing options...
Cameltoe Posted July 3, 2014 Report Share Posted July 3, 2014 Can i add this to the rightcklick menu from Maca? Link If yes, how? Link to comment Share on other sites More sharing options...
Dave Posted July 3, 2014 Report Share Posted July 3, 2014 Does this script remove the required items from the inventory? and does it put them back when your repack it? Link to comment Share on other sites More sharing options...
mgm Posted July 3, 2014 Report Share Posted July 3, 2014 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! Link to comment Share on other sites More sharing options...
speaR Posted July 3, 2014 Report Share Posted July 3, 2014 It sometimes just packs an ural or even a wall near the player.. Link to comment Share on other sites More sharing options...
glen Posted July 3, 2014 Report Share Posted July 3, 2014 Great work nice and easy to add Link to comment Share on other sites More sharing options...
mudzereli Posted July 3, 2014 Author Report Share Posted July 3, 2014 Can i add this to the rightcklick menu from Maca? Link 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 3) can reverse/ignore the 3rd step about adding code into description.ext 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 { // elitist array adding method 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';"]]; }; Cameltoe 1 Link to comment Share on other sites More sharing options...
mudzereli Posted July 3, 2014 Author Report Share Posted July 3, 2014 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 Dave 1 Link to comment Share on other sites More sharing options...
mudzereli Posted July 3, 2014 Author Report Share Posted July 3, 2014 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). Link to comment Share on other sites More sharing options...
Cameltoe Posted July 3, 2014 Report Share Posted July 3, 2014 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! Link to comment Share on other sites More sharing options...
babylonstew Posted July 3, 2014 Report Share Posted July 3, 2014 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 Link to comment Share on other sites More sharing options...
mudzereli Posted July 3, 2014 Author Report Share Posted July 3, 2014 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. Link to comment Share on other sites More sharing options...
PryMary Posted July 3, 2014 Report Share Posted July 3, 2014 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 Link to comment Share on other sites More sharing options...
Bossreaper Posted July 4, 2014 Report Share Posted July 4, 2014 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. Link to comment Share on other sites More sharing options...
mudzereli Posted July 4, 2014 Author Report Share Posted July 4, 2014 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. Link to comment Share on other sites More sharing options...
mudzereli Posted July 4, 2014 Author Report Share Posted July 4, 2014 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. Link to comment Share on other sites More sharing options...
Bossreaper Posted July 4, 2014 Report Share Posted July 4, 2014 Thanks for the quick reply Link to comment Share on other sites More sharing options...
Recommended Posts