Jump to content
salival

[Release] Bury and butcher body for 1.0.6.1

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

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
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 FG_Trap
      Made this in my free time awhile ago thought id make it public.
      Right Alt is the key to open the menu.
      Install instructions are inside the download.
      https://github.com/NWDZ-Trapxxgods/traps-menu
       
       
      here is a picture of the server menu
       
    • By lordacus
      so i have been making a server between trying to get my provider to update their mods section. after getting this don i found the server with epoch and infistar were conflicting each other such as: when joining i can use infistar but when i press f9 or i to enter my inventory or f10 for the mobile pad it then conflicts (i think) infistar and i can no longer use it. any ideas on how to stop this
       
    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By Achef
      Greetings!
      So I recently started up in a new host and haven't gotten to make the server run, found that a ca/modules bis_fnc issue is recurring but doesn't affect players when running coop missions like the default arma 2 oa ones, but when trying with Epoch hive won't connect/start despite being configured.
      Hive error
      Meanwhile at line 23...
       
      I'm still bad with Pastebin, sorry.
       
      This error has been chasing me for 2 days now
    • By WeepiestLem0n
      So I've been wanting to create a private ArmA 2 DayZ Epoch server for a bunch of my mates to play on, however I dont have a dedicated machine and want to run it on my PC. So I looked at the server download files on the GitHub page and followed the ReadMe, however I absolutely cannot figure out how to get the MySQL server and DB set up. I have downloaded MySQL Server on my PC and created the admin role, root passwords and ran it as a windows service. I now have no clue how to create the database and am wondering if anyone can help me set this up or let me know if I've done anything wrong. 

      I can add on Steam or Discord if need be for convenience.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...