Jump to content
salival

[Release] Bury and butcher body [Updated for 1.0.7]

Recommended Posts

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.

 

To download: https://github.com/oiad/buryBodies

 

**** For Epoch 1.0.6.2 only **** >> Download <<

Visit this link: https://github.com/oiad/buryBodies/tree/Epoch_1.0.6.2

Share this post


Link to post
Share on other sites

Salival, can you please give us the changes for fn_selfAction.sqf, variables.sqf and compiles.sqf? I have them allready in my mission folder and there are changed for other mods ........ so I need only the changes and implemend it to mine.

 

Share this post


Link to post
Share on other sites

 

Be sure to check your paths:

fn_selfAction.sqf

Spoiler

add

    if (!_isAlive && {!(_cursorTarget isKindOf "zZombie_base")} && {!(_cursorTarget isKindOf "Animal")} && {_canDo} && {_isMan}) then {
        _isButchered = _cursorTarget getVariable ["bodyButchered",false];
        if (!_isButchered) then {
            if ("ItemEtool" in _itemsPlayer) then {
                if (s_player_bury_human < 0) then {
                    s_player_bury_human = player addAction ["<t color='#0096ff'>Bury Human</t>","scripts\buryActions.sqf",[_cursorTarget,"bury"],0,false,true];
                }
            } else {
                player removeAction s_player_bury_human;
                s_player_bury_human = -1;
            };
            if ({_x in ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnifeBlunt"]} count _itemsPlayer > 0) then {
                if (s_player_butcher_human < 0) then {
                    s_player_butcher_human = player addAction ["<t color='#0096ff'>Butcher Human</t>","scripts\buryActions.sqf",[_cursorTarget,"butcher"],0,false,true];
                };
            } else {
                player removeAction s_player_butcher_human;
                s_player_butcher_human = -1;
            };
        };
    };

 

under

    //Towing with tow truck
    /*
    if(_typeOfCursorTarget == "TOW_DZE") then {
        if (s_player_towing < 0) then {
            if(!(_cursorTarget getVariable ["DZEinTow", false])) then {
                s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true];                
            } else {
                s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true];                
            };
        };
    } else {
        player removeAction s_player_towing;
        s_player_towing = -1;
    };
    */

 

add

    player removeAction s_player_bury_human;
    s_player_bury_human = -1;
    player removeAction s_player_butcher_human;
    s_player_butcher_human = -1;

 

under

    player removeAction s_player_manageDoor;
    s_player_manageDoor = -1;

variables.sqf

Spoiler

add

    s_player_butcher_human = -1;
    s_player_bury_human = -1;

under

    s_player_manageDoor = -1;

compiles just redirects to fn_selfAction.sqf, so if you already have a custom one then ignore that part

Share this post


Link to post
Share on other sites

@salival i just made a pull request/update (i think, sorry first time trying to use github to do anything other than download) on GitHub, check out some changes i made and see what you think.   Changes include 3 different crosses for the graves, gutting uses a bodybag instead of a grave, and added some text for gutting.  my personal version has some custom sounds as well for each action but has some more steps to install in description.ext so i left that out for now, but if you are interested i can upload those as well.  i am going to play with github a bit more and try to figure it out a bit. 

Share this post


Link to post
Share on other sites

I´m a little confused. I get kicked about scriptrestriction #7 while bury a corpse .....

20.03.2017 19:38:55: Anhor (93.213.117.15:2502) 677a5caf117a5927e21af5424ebef1e1 - #7 "ctions.sqf"
private ["_action","_backPackMag","_backPackWpn","_box","_corpse","_cross","_gain","_humanity","_humanityAmount","_i"

 

Share this post


Link to post
Share on other sites
2 hours ago, Anhor said:

I´m a little confused. I get kicked about scriptrestriction #7 while bury a corpse .....

20.03.2017 19:38:55: Anhor (93.213.117.15:2502) 677a5caf117a5927e21af5424ebef1e1 - #7 "ctions.sqf"
private ["_action","_backPackMag","_backPackWpn","_box","_corpse","_cross","_gain","_humanity","_humanityAmount","_i"

 

Hello,

I have pushed a fix for this. _box is banned in your infistar scripts.txt, see this commit: https://github.com/oiad/buryBodies/commit/1af86a442898a5d3252fb0b063b932fd32be2ca5

Share this post


Link to post
Share on other sites
7 minutes ago, Thug said:

On my Panthera server when I scroll on a body it only says Butcher Human. I have rechecked and compared the files 3 times. Need a little help here.:blink:

Need a knife to butcher and an etool to bury so make sure you have an Etool in your inventory

Share this post


Link to post
Share on other sites

Hey, Just wondering if anyone had noticed a Zed attraction with the bury body graves?

After completing WAI Missions, I take the time to loot and bury all the bodies, and after a couple of minutes, Zeds start spawning in on the graves in droves, and respawn nearly immediately when you kill them. Also if I leave the area, the instant I come back they all respawn.

Not really an issue, just wondering if others had noticed it

Share this post


Link to post
Share on other sites
6 hours ago, Voltan said:

Hey, Just wondering if anyone had noticed a Zed attraction with the bury body graves?

After completing WAI Missions, I take the time to loot and bury all the bodies, and after a couple of minutes, Zeds start spawning in on the graves in droves, and respawn nearly immediately when you kill them. Also if I leave the area, the instant I come back they all respawn.

Not really an issue, just wondering if others had noticed it

Per grave 3 zeds ....... normal.

Share this post


Link to post
Share on other sites
On 3/16/2017 at 5:51 AM, salival said:

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

 

To download: https://github.com/oiad/buryBodies

you can cancel the butcher/bury animation with typing stop in chat and u still get the humanity

Share this post


Link to post
Share on other sites

Also if you use Overpoch, the animations can also cancel the bury/butcher which will be exploited. The only thing I can think of is adding disableUserInput, that will keep people locked down until the script has finished. People will be more exposed while disableUserInput is true, because they will not be able to move their camera to sweep the area.

Quote
private ["_action","_backPackMag","_backPackWpn","_crate","_corpse","_cross","_gain","_humanity","_humanityAmount","_isBury","_grave","_name","_backPack","_position","_sound"];

if (dayz_actionInProgress) exitWith {"You are already performing an action, wait for the current action to finish." call dayz_rollingMessages;};
disableUserInput true;
dayz_actionInProgress = true;

_corpse = (_this select 3) select 0;
_action = (_this select 3) select 1;

player removeAction s_player_bury_human;
s_player_bury_human = -1;
player removeAction s_player_butcher_human;
s_player_butcher_human = -1;

if (isNull _corpse) exitWith {dayz_actionInProgress = false; disableUserInput false; systemChat "cursorTarget isNull!";};

_humanityAmount = 25; // Amount of humanity you will gain by buring a body and the amount you will lose if you butcher a body.

_corpse setVariable["isBuried",true,true];

_isBury = _action == "bury";
_position = getPosATL _corpse;
_backPack = typeOf (unitBackPack _corpse);

_crate = createVehicle ["USOrdnanceBox_EP1",_position,[],0,"CAN_COLLIDE"];
_crate setposATL [(_position select 0)+1,(_position select 1)+1.5,_position select 2];
_crate setVariable ["permaLoot",true,true];
_crate setVariable ["bury",true,true];

_grave = createVehicle ["Grave",_position,[],0,"CAN_COLLIDE"];
_grave setposATL [(_position select 0)+1,_position select 1,_position select 2];
_grave setVariable ["bury",true,true];

if (_isBury) then {
    _name = _corpse getVariable["bodyName","unknown"];
    _cross = createVehicle ["GraveCross1",_position,[],0,"CAN_COLLIDE"];
    _cross setposATL [(_position select 0)+1,(_position select 1)-1.2,_position select 2];
    _cross setVariable ["bury",true,true];
};

clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;

{_crate addWeaponCargoGlobal [_x, 1]} forEach weapons _corpse;
{_crate addMagazineCargoGlobal [_x ,1]} forEach magazines _corpse;

if (_backPack != "") then {
    _backPackWpn = getWeaponCargo unitBackpack _corpse;
    _backPackMag = getMagazineCargo unitBackpack _corpse;

    if (count _backPackWpn > 0) then {{_crate addWeaponCargoGlobal [_x,(_backPackWpn select 1) select _forEachIndex]} forEach (_backPackWpn select 0);};
    if (count _backPackMag > 0) then {{_crate addMagazineCargoGlobal [_x,(_backPackMag select 1) select _forEachIndex]} forEach (_backPackMag select 0);};

    _crate addBackpackCargoGlobal [_backPack,1];
};

_sound = _corpse getVariable ["sched_co_fliesSource",nil];
if (!isNil "_sound") then {
    detach _sound;
    deleteVehicle _sound;
};

deleteVehicle _corpse;

player playActionNow "Medic";
uiSleep 8;

if (_isBury) then {
    if (_name != "unknown") then {
        format["Rest in peace, %1...",_name] call dayz_rollingMessages;
    } else {
        "Rest in peace, unknown soldier...." call dayz_rollingMessages;
    };
};

_humanity = player getVariable ["humanity",0];
_gain = if (_isBury) then {+_humanityAmount} else {-_humanityAmount};
player setVariable ["humanity",(_humanity + _gain),true];

dayz_actionInProgress = false;
disableUserInput false;

 

Share this post


Link to post
Share on other sites

Hey,

I've pushed a commit that fixes this: https://github.com/oiad/buryBodies/commit/55952c1772b51473b1f7356991672518065a2e30

We can utilize the new epoch function fn_loopAction that @ebayShopperwrote: https://github.com/EpochModTeam/DayZ-Epoch/commit/48858b2e6c23ddf511723b48e13dcc85f9e1422c

You should only need to replace your buryActions.sqf with the latest one from the repo for it to work.

Cheers

 

Share this post


Link to post
Share on other sites

Lovin all the graves and body bags. More flavor!

 

EDIT: Will this work on zeds and AI? Tested on a zed and no option that I saw. Will go check an AI now...

Indeed I can bury my AI but have yet to see an option for butchering...

No errors in either of my .rpts

Share this post


Link to post
Share on other sites
56 minutes ago, ViktorReznov said:

Lovin all the graves and body bags. More flavor!

 

EDIT: Will this work on zeds and AI? Tested on a zed and no option that I saw. Will go check an AI now...

Indeed I can bury my AI but have yet to see an option for butchering...

No errors in either of my .rpts

It wont work on zombies since the line in fn_selfActions disables this.

If you're not seeing the option for burying or butchering you need an Etool for burying or a knife for butchering.

Share this post


Link to post
Share on other sites
2 minutes ago, salival said:

It wont work on zombies since the line in fn_selfActions disables this.

If you're not seeing the option for burying or butchering you need an Etool for burying or a knife for butchering.

indeed had both tools on me, and noticed this is directly flagged to not show up on zeds.

With all required tools on my person, only bury shows up. No option to butcher but bury works appropriately. Spawns grave, cross, box and removes flies.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Harkness
      Please consider joining our customised Epoch | DayZ | Expansion | Namalsk servers, we have 2 long term Admins on both UK/US continents and run our servers completely for charity and from 100% clean and renewable energy too!
      https://discord.gg/eyMymYv
      DayZSA Expansion Namalsk     |     DayZSA Expansion Takistan     |     A2 DayZ Epoch Namalsk (Stalker)
      86.10.6.13:2402                      |     86.10.6.13:2602                         |     86.10.6.13:2302
      CPU: Xeon-X5690 @ 3.46GHz
      RAM: 16GB
      Storage: SSD
      Stalker Exclusion Zone Time2Kill Epoch Namalsk (1.0.7/144629)
      Contents: 
      Epoch Content:
      - Single Currency Traders & Global Banking tied to your Player ID and NOT your character. (keeps rubles after death)
      - 200 new zombie models, over 100 new weapons and magazines with attachment support
      - New Vehicles and trucks, skins, backpacks, items, planes, helis even a submarine
      - New weapon sounds, Backpack Upgrades, Vehicle Upgrades, Tons of new clothing
      - Over 30 new base building items like a drawbridge, metal and wood gates, glass floors and many more
      - Epoch AntiHack, Trader SafeZones, Refundable Base Deconstruction!
      - Two Primaries, No Stamina Limit, One Step Building, No Plot, Self Bloodbag, Kill Feed, Group System(press F5)
      Namalsk Content:
      - Customized Harsh Weather System - Dynamic Snow/Blizzards and Storms! Warm Clothing at hero/bandit zones
      - Namalsk EVR Blowouts Events
      - Blood Sucker Monsters! (Note: Killing Strelok will destroy his "PSY" abilities and no more Bloodsuckers will spawn until mission restart)
      - APSI Masks and Mutant Heart Crystal Artefacts!
      Stalker Content:
      - STALKER Factions: Monolith = Bandit Duty = Hero
      - Stalker Faction Skins at Traders Hero/Bandit
      - Strelok - Bloodsucker PSY Leader | Search the exclusion zone for tips
      - Mutant Heart Artefact Crystal
      - Radioactive Exclusion Zone! (Must have Stalker Hazmat suit to survive here) AI faction Monolith patrols this island heavily
      Custom Content:
      - Navy Zone
      - Military Airfield Zone
      - LandBridge Zone
      - Intro Radio Broadcast Story and secret radio broadcasts in the exclusion zone
      - Roaming AI groups. 1 AI Helicopter Patrol and several Land/Sea Patrols, AI bandits, AI Heros
      - AI Mission system, AI Cash Wallets, AI Humanity/Cash Rewards System
      - Custom Player Skins
      - Vorkuta Hospital
      - ADDED: over 150 Base Building Kits to traders
      - Money on Zombies/AI  10-100 // Min/Max
      - Taking Clothes from the dead Added
      - Vehicle Towing added
      - Vehicle Service Stations Added. (Service for coins)
      - Spawn selection added - Choice Land/Air Spawn(c130 drop), Loadout Spawn Hero/Bandit lvl 1-3
      - Custom Server loadingScreen Added - Stalker of course
      - Craft Bicycle | Craft Mozzi (Press TAB)
      - Set Custom View Distances (TAB)
       
      Server is password protected and will remain so due to the low price of CD keys for this game.
      To access the server please join the discord "Server Announcements Channel" will have all the info you need to connect.
      Your admins for this server are "DarkIQ" and "Harkness"
    • By Harkness
      From what I see this was made by user matt-d-rat about 6 years ago. All i did was light up a few smokes and update all the old variable names to get it running on our 1062 + 107 servers from which we use a lot of scripts from here so here is a contribution back from me. I only added Epoch Vehicles in there.
      Original Instructions
      Original Thread
      All you need to do is follow matt-d-rats Original Instructions above, But instead of using the old files he made use my edited versions below
      mf-tow\init.sqf
      mf-tow\tow_AttachTow.sqf
      mf-tow\tow_DetachTow.sqf
       
    • By A Man
      Deploy Anything in version 3.0.1 updated for Epoch 1.0.7.
      https://github.com/oiad/deployAnything
    • By A Man
      This is the official Epoch 1.0.7 Release. Thanks to everbody who took part on this especially helion4.
       
      Changelog: https://github.com/EpochModTeam/DayZ-Epoch/blob/Release_1.0.7/CHANGE LOG 1.0.7.txt
      Report bugs: https://github.com/EpochModTeam/DayZ-Epoch/issues/2123
      Download via Google Drive at the moment: https://drive.google.com/drive/folders/1z94OU_-yz8SGz14Se2txNbcIYu8sEV-p
      The password for the Server Files is: 123456
       
      Edit: Epoch 1.0.7 is now in the DayZ Launcher. Unfortunately Epoch 1.0.6.2 got completely removed. Server Admins have to update to Epoch 1.0.7 now.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...