N340 Posted May 20, 2014 Report Share Posted May 20, 2014 This idea was taken from Base Building. I wanted to get a working zombie shield to work that I could build without using the whole Base Building GUI. I got it working fully today very easily but it did require some decent modifications so I thought I would post it for others to use. I personally made it so that others had to build parts to the shield and combine them to make it. This is just a script for you to use as you wish that makes it so that an item (default: CDF_WarfareBUAVterminal) will have scroll options to turn on and off the zombie shield. Configurable in he variables settings. If you want any help making it work in a different way, just ask. I am happy to help. 1. First Download the following: https://www.dropbox.com/s/9b0mwstlfz0g7k0/Zedshield.rar 2. Put the shield folder in your mission pbo root folder 3. Open your custom fn_selfactions.sqf and find: if(_player_deleteBuild) then { if (s_player_deleteBuild < 0) then { s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",_cursorTarget, 1, true, true, "", ""]; }; } else { player removeAction s_player_deleteBuild; s_player_deleteBuild = -1; }; Then past this under it: _lever = cursorTarget; //Zombie Shield if (_cursorTarget isKindof TypeOfZShield) then { if (EnableZShield == 1) then { if (s_player_ZombieShield_on < 0) then { s_player_ZombieShield_on = player addAction [format[("<t color=""#FFF700"">" + ("Zombie Shield On") +"</t>"),_adminText], "shield\ZombieShield.sqf", [_lever, true], 6, true, true, "", ""]; }; if (s_player_ZombieShield_off < 0) then { s_player_ZombieShield_off = player addAction [format[("<t color=""#FFF700"">" + ("Zombie Shield Off") +"</t>"),_adminText], "shield\ZombieShield.sqf", [_lever, false], 6, false, true, "", ""]; }; } else { if (s_player_ZombieShield_on < 0) then { s_player_ZombieShield_on = player addAction [format[("<t color=""#FFF700"">" + ("Zombie Shields are disabled on this server") +"</t>"),_adminText], "", [], 6, false, true, "", ""]; }; player removeAction s_player_ZombieShield_off; s_player_ZombieShield_off = -1; }; } else { player removeAction s_player_ZombieShield_on; s_player_ZombieShield_on = -1; player removeAction s_player_ZombieShield_off; s_player_ZombieShield_off = -1; }; //End Shield 4. Then find this line in fn_selfactions.sqf if(DZE_AllowForceSave) then { //Allow player to force save if((_isVehicle or _isTent) and !_isMan) then { if (s_player_forceSave < 0) then { s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",_cursorTarget, 1, true, true, "", ""]; }; } else { ***************Replace STUFF IN HERE }; }; Where I put *******************Replace STUFF IN HERE, delete everything there and add this in its place: s_player_ZombieShield_on = -1; player removeAction s_player_ZombieShield_off; s_player_ZombieShield_off = -1; player removeAction s_player_forceSave; s_player_forceSave = -1; 5. Open your custom variable.sqf and paste this at the bottom, this is also where you can customize all your settings. /**************************************************** Zombie Shield Generator Settings ****************************************************/ EnableZShield = 1; //Enable toggleable zombie shield generator/ 1 = Enabled // 0 = Disabled (If disabled, players can still build shield generators, they just wont do anything) TypeOfZShield = "CDF_WarfareBUAVterminal"; //Type of object used for Zombie Shield, included this only in case some maps have this object banned AllZShieldTypes = ["CDF_WarfareBUAVterminal"]; //DO NOT REMOVE ITEMS FROM THIS ARRAY, you can ADD an object class if you want a different building to be used as a Zombie Shield Generator! MaxZShields = 1; //Maximum number of zombie shield generators a player can be added to, default is 1 ZShieldRadius = 50; //Radius for zombie shield generator, default is 50 ZShieldClean = 0; //Delete Zombies when they enter active shield radius/ 1 = Enabled // 0 = Disabled (If disabled, zombies will be killed but not deleted, could lead to zombie loot farming) Close up, repack and done. Then any object CDF_WarfareBUAVterminal or anything you replace it with will then have a scroll option to turn a shield on and off. I have tested this on my servers and works fine. If you have any complications please let me know and ill be happy to help. Here is a pre compiled Cherno mission PBO with a working zombie shield and the extra_RC.hpp included. You can build it with an Engine and 2 poles like you would any other object https://www.dropbox.com/s/gmibobakfec80za/ZHIELD.pbo Credit for the original code goes to the guys from original BB 1.2. Cinjun, Ghostrider-GRG, rgr and 1 other 4 Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 I like this :) , now how to get a suitable object as either craftable or purchase and then deploy so this can be used by players other than having the object inserted into the map which is how i am assuming it will currently be done? Link to comment Share on other sites More sharing options...
insertcoins Posted May 20, 2014 Report Share Posted May 20, 2014 you could potentially use a combination of items to be craftable to like a lightpost or whatever (or a pole with loudspeakers, wich would kinda make sense), like 3 timber and 2 scrap metal and right click option. But this would be more like the zombie perimiter mod Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 Yeh good plan - just got to figure out how to add in a craftable item so i can assign it to this antized function Link to comment Share on other sites More sharing options...
N340 Posted May 20, 2014 Author Report Share Posted May 20, 2014 I have it so that you require an Engine, Wheels and metal panels as well as a gem from my traders to be able to build these items. But I just used the extra_rc.hpp script found here http://epochservers.com/viewtopic.php?f=14&t=13 My apologies, it was about 3am when I decided to post this. Once you install the script to allow more crafted items, simply open the extra_rc.hpp file and make/edit a class to include the CDF_WarfareBUAVterminal as a craft able item. So for instance if you want to make it so clicking on an Engine would give the option to craft the Zombie Shield, you would need to have this in your extra_rc.hpp class PartEngine { class Zshield { text = "Zombie Shield"; script = "[""CDF_WarfareBUAVterminal"",[""ItemToolbox"",""ItemEtool"],[[""PartEngine"", 1],[""bulk_ItemSandbag"", 1],[""forest_net_kit"", 1]],[0,6.5,2.5]] execVM "" LOCATION OF YOUR PLAYER_BUILD.SQF FILE "" }; }; Hope that helps a bit. insertcoins 1 Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 No Prbs - glad of the addition! I think i need to take timeout to readup on that script, make sure i have my head around the process before i begin ;) Link to comment Share on other sites More sharing options...
N340 Posted May 20, 2014 Author Report Share Posted May 20, 2014 If you would like I can create a mission pbo with the extra_RC and zshield included for you. Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 Yeh that would be good thankyou ! Link to comment Share on other sites More sharing options...
N340 Posted May 20, 2014 Author Report Share Posted May 20, 2014 I have posted a working PBO and updated the files a bit to include sounds so you know when its on and off. It will make an electrical sound, no extra files needed. I was also missing a variable in the zedshield.sqf, sorry about that. No battleye filters are needed on my servers and should not be needed on yours. Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 I started having a go at it as its the best way to learn, got the extra_rc working fine and iv now got as far as this line: script = "[""CDF_WarfareBUAVterminal"",[""ItemToolbox"",""ItemEtool"],[[""PartEngine"", 1],[""bulk_ItemSandbag"", 1],[""forest_net_kit"", 1]],[0,6.5,2.5]] execVM "" LOCATION OF YOUR PLAYER_BUILD.SQF FILE "" Sorry and this may sound somewhat dumb, but where do you suppose the most common location would be for my PLAYER_BUILD.SQF file ? Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 20, 2014 Report Share Posted May 20, 2014 ahh nevermind, ill figure it out from your pbo :) Cheers Link to comment Share on other sites More sharing options...
N340 Posted May 20, 2014 Author Report Share Posted May 20, 2014 Sorry, I seem to assume people have custom files already, shouldn't assume anything really. Yes a custom player_build.sqf is needed, I use the one that comes in snapping anyways. That is included in my zshield pbo file that is compiled up top. Link to comment Share on other sites More sharing options...
N340 Posted May 20, 2014 Author Report Share Posted May 20, 2014 Again, new files with a quick fix to make it so you can turn off the shield. LOL Updated PBO and rar Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 21, 2014 Report Share Posted May 21, 2014 Great! Thanks again for the update - ive got it installed but having some teething issues, i right click on the Engine, get the menu up to build the Zombie shield, but as i didnt have all the mats at the time, it didnt do anything - not even a tooltip to say im missing xxx components - i tried again once i had the mats, but it said "building already in progress" so it was still thinking its consutructing it - ive prb missed something silly like a ; off somewhere dont suppose you have any ideas? I took a look at your pbo, but i didnt use it as i wanted clean files like the player_build.sqf Link to comment Share on other sites More sharing options...
N340 Posted May 21, 2014 Author Report Share Posted May 21, 2014 First look in init.sqf and make sure the the variables and compiles sqf files pointing to your custom ones. (refer to my init in pbo to see this) Second make sure your custom compiles is pointing to your custom player_build and fn_selfactions that you have as well. (again see the compiles in my pbo) Third make sure that in your extra_rc.hpp file that at the end of your building items that it shows the proper location for you custom player_build file (again refer to my pbo) If you are still having issues I can have a look at your pbo for you. Link to comment Share on other sites More sharing options...
BeansOnToast Posted May 21, 2014 Report Share Posted May 21, 2014 Thanks - i did try but other than screwing up my pbo through "fine tuning it" - not much else was achieved, :D if you can take a peek and spot the problem with the build process on the zed shield, great! Ive sent you a pm with a link to the current pbo file. Link to comment Share on other sites More sharing options...
Hazard Posted May 25, 2014 Report Share Posted May 25, 2014 I have the zombie shields on our server but when the shield is turned on, nothing happens. I checked the variables to enable the correct settings but nothing kills or cleansup the zombies. Im running infistar on the server so im guessing it's probably that. Link to comment Share on other sites More sharing options...
rgr Posted May 26, 2014 Report Share Posted May 26, 2014 Can we get a new link please :) Garett1169 1 Link to comment Share on other sites More sharing options...
Garett1169 Posted May 26, 2014 Report Share Posted May 26, 2014 Link DEAD. Link to comment Share on other sites More sharing options...
N340 Posted May 29, 2014 Author Report Share Posted May 29, 2014 Link updated, Not sure why its not working on some servers, I had this tested again today on a vanilla fresh server and works fine Link to comment Share on other sites More sharing options...
rgr Posted May 29, 2014 Report Share Posted May 29, 2014 Thanks a lot sir! Got it working already, good stuff thanks again. N340 1 Link to comment Share on other sites More sharing options...
N340 Posted May 30, 2014 Author Report Share Posted May 30, 2014 No problem at all, :) Link to comment Share on other sites More sharing options...
Logan Posted July 8, 2014 Report Share Posted July 8, 2014 Anyone have this working with 1.0.5.1/112555? Server crashes few seconds after I join. Link to comment Share on other sites More sharing options...
redcloud78 Posted July 13, 2014 Report Share Posted July 13, 2014 how is it possible if i wanted to add a.i. shield to this Link to comment Share on other sites More sharing options...
calamity Posted July 18, 2014 Report Share Posted July 18, 2014 Thankz for this new version I used the original over a year ago ( I had forgot about it) working great with 1.0.5.1.1 and 1.6312555 should give some credits to the original zombie-shield, Freaking Fred, I "believe" its his work that was used in the base building http://opendayz.net/threads/release-freds-anti-zombie-frequency-emitter-aka-zombie-shield.12340/ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now