Zombie hits

Microb

Member
Hello.

I wanted to make dealing with zombies more problematic.
I've managed to make them headshoot only via damageHandlerZ,
but does anybody know how to modify zombie crit chance?

As zombies are infected I wanted to make 75% bleeding and if bleeding then 100% infection
(or just increase bleeding and infection chanced at least)
+ increase chance of fracture.

P.S. I've tried to increase chances via damageHandler but it seems to increase chances also for bullet wounds (infectious bullets, huh)
 
which mod?
Assumed Dayz mod, the others shouldnt be much different ... in this file line 306 it uses ammo==zombie
https://github.com/DayZMod/DayZ/blo...58/SQF/dayz_code/compile/fn_damageHandler.sqf
edit this code
Code:
//HitInfection from zombies
if ((!r_player_infected) and !(r_player_Sepsis select 0)) then {
if (_ammo == "zombie") then {
_rndSepsis = floor(random 100);
_sepsisChance = getNumber (configFile >> "CfgVehicles" >> (typeOf _source) >> "sepsisChance");
//_hitInfection = (_rndInfection < _infectionChance);
if (_rndSepsis < _sepsisChance) then {
r_player_Sepsis = [true, diag_tickTime];
player setVariable["USEC_Sepsis",true,true];
change it to
Code:
//HitInfection from zombies
if ((!r_player_infected) and !(r_player_Sepsis select 0)) then {
if (_ammo == "zombie") then {
_rndSepsis = floor(random 100);
_sepsisChance = getNumber (configFile >> "CfgVehicles" >> (typeOf _source) >> "sepsisChance");
//----------------set sepsischance to 100 if bleeding------------------
if (( _unit getVariable["USEC_injured",false]) == true) then{_sepsisChance = 100;};
//_hitInfection = (_rndInfection < _infectionChance);
if (_rndSepsis < _sepsisChance) then {
r_player_Sepsis = [true, diag_tickTime];
player setVariable["USEC_Sepsis",true,true];
 
Seems clear for vanilla, but problem is with epoch...
And bleeding/infection chance seems to be global (no different scales for source of damage)
 
Last edited:
infection is appearing only in this block... zombies have chances for headshot??

Code:
if (_unitIsPlayer) then {
        _rndPain =         (random 10);
        _rndInfection = (random 500);
        _hitPain =         (_rndPain < _damage);
        if ((_isHeadHit) || (_damage > 1.2 && _hitPain)) then {
            _hitPain = true;
        };
        _hitInfection = (_rndInfection < 1);
        //player sidechat format["HitPain: %1, HitInfection %2 (Damage: %3)",_rndPain,_rndInfection,_damage]; //r_player_infected
        if (_isHit) then {
            //Make hit worse
            if (_unitIsPlayer) then {
                r_player_blood = r_player_blood - 50;
            };
        };
        if (_hitInfection) then {
            //Set Infection if not already
            if (_unitIsPlayer && !_isPZombie) then {
                r_player_infected = true;
                player setVariable["USEC_infected",true,true];
            };

        };
        if (_hitPain) then {
            //Set Pain if not already
            if (_unitIsPlayer) then {
                r_player_inpain = true;
                player setVariable["USEC_inPain",true,true];
            };
        };
        if ((_damage > 1.5) && _isHeadHit) then {
            [_source,"shothead"] spawn player_death;
        };
    };
 
try this, it should work. if you are hit by a zombie we change the infection chance to 50% and if the player is already hit we change it to 100%.
Here is the full file http://pastebin.com/0Kc6VXyn
Code:
if (_unitIsPlayer) then {
        _rndPain =         (random 10);
        _rndInfection = (random 500);
        _hitPain =         (_rndPain < _damage);
        if ((_isHeadHit) || (_damage > 1.2 && _hitPain)) then {
            _hitPain = true;
        };
        if (_ammo == "zombie") then {
            _rndInfection = (random 2);
            if (_ishit) then{__rndInfection = 1;};
            };
        _hitInfection = (_rndInfection < 1);
        //player sidechat format["HitPain: %1, HitInfection %2 (Damage: %3)",_rndPain,_rndInfection,_damage]; //r_player_infected
        if (_isHit) then {
            //Make hit worse
            if (_unitIsPlayer) then {
                r_player_blood = r_player_blood - 50;
            };
        };
        if (_hitInfection) then {
            //Set Infection if not already
            if (_unitIsPlayer && !_isPZombie) then {
                r_player_infected = true;
 
Seems to be working thanks! ))

What about bone breaking chance? Is it configured somewhere else?
There is no
r_fracture_legs
r_fracture_arms (possible in dayz?)
in damageHandler
 
I can look into this. You cant break an arm, just legs, although it never really says legs I dont think .. just says broken bones and we assume its legs.
I would bet this is set in the medical functions when you set the is injured variable.
 
Back
Top