Day Z 1.8 Animal Harvest Bug Fix Ideas

SmokeyMeadow

Well-Known Member
Hi everyone. I just noticed a problem that I could really use your help with. The current Day Z mod release 1.8 has a reported bug where you don't get the gear option after you gut an animal. I'm currently experiencing this on my server. Sucks because hunting is one of my favorite Day Z pastimes.

From what I see the mod team is well aware of the problem, but I don't want to postpone my hunting trip until the next release comes out. I'll be trying to make a temporary stopgap for use until they fix this issue, so I made this thread in case anyone has ideas or wants to help. Because I could do something real simple, but I have a feeling some of the pros around here might have their own ideas or fixes brewing. So speak up if you do, please.
 
I looked threw the code myself and I could not see the problem, but I am having this issue with my server too.
 
Could you code block the old sqf?
Sure. This is from 1.7.7.1
Code:
private["_item","_hasKnife","_hasKnifeBlunt","_type","_hasHarvested","_config","_isListed","_text","_dis","_sfx","_qty","_array","_string"];
_item = _this select 3;
_hasKnife = "ItemKnife" in items player;
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
_type = typeOf _item;
_hasHarvested = _item getVariable["meatHarvested",false];
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
 
player removeAction s_player_butcher;
s_player_butcher = -1;
 
 
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
    //Get Animal Type
    _isListed = isClass (_config);
    _text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
 
    player playActionNow "Medic";
 
    _dis=10;
    _sfx = "gut";
    [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
    [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
 
    _item setVariable ["meatHarvested",true,true];
 
    _qty = 2;
    if (_isListed) then {
        _qty = getNumber (_config >> "yield");
    };
 
    if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
 
    _array = [_item,_qty];
 
    if (local _item) then {
        _array spawn local_gutObject;
    } else {
        PVDZ_obj_GutBody = _array;
        publicVariable "PVDZ_obj_GutBody";
    };
 
    sleep 6;
    _string = format[localize "str_success_gutted_animal",_text,_qty];
    cutText [_string, "PLAIN DOWN"];
};

The part about
Code:
        PVDZ_obj_GutBody = _array;
        publicVariable "PVDZ_obj_GutBody";
is the only difference, that I see. In 1.8 it says
Code:
        PVDZ_send = [_item,"GutBody",[_item,_qty]];
        publicVariableServer "PVDZ_send";
 
Also a change
Code:
[player,_dis,true,(getPosATL player)] call player_alertZombies;
to
Code:
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
 
Good eye. I'm trying to figure out what goes wrong. From what I can see the script detects the animal type, and consults the dayz code about what meat type it gives, and how many. Seems simple enough.
 
Another thing I noticed, I have Takistan goats on my server. In previous versions of Day Z, they would sink into the ground immediately after gutting, no chance to get the meat. But I just shot one in 1.8, and it let me gut it without sinking. It just acts like any other animal, I get no gear option. I'm wondering if localgutobject got changed.

*Edit: Boy, has it ever. How much you want to bet that's where the problem is? I don't even know how to sub out the localgutobject.
 
1.) Follow this tutorial [Tutorial] Custom Loot Tables and Adjusting Spawn Rates (this dose work on 1.8)
2.) Move "dayz_code\compile\local_gutObject.sqf" into the Fixes folder.
3.) Replace this in the Fixes\compiles.sqf:
Code:
local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf";
with this:
Code:
local_gutObject = compile preprocessFileLineNumbers "Fixes\local_gutObject.sqf";

Now you can mess with the local_gutObject.sqf
 
Thanks, man. I loaded up the old localgutobject and gather_meat.sqf, but I still get no gear option. I'm trying to figure out which other files I need to substitute.
 
Back
Top