Increasing Zombie Damage in Epoch

Silver85

Member
Hello,

today i tried the epoch mod and i realized that the zeds are pretty lame..there is not the behavior and strength like in the normal version 1.8.0.3.
Now i decided to make them more stronger and i edited the "player_zombieattack.sqf", "fn_damagehandler.sqf" and the "control_zombieagent.sqf", ofc i editet the "compile preprocessFileLineNumbers..." -Lines in the compile file too but nothing really happen.

I like that mod but i want to make it a bit more survival..looting should not be a walk.
So if anybody has a ideo than let me know. Posts like
http://opendayz.net/threads/increasing-zombie-damage.7269/
http://dayzepoch.com/forum/index.php?/topic/2503-help-editing-zombie-damage-and-intelligence/
didnt helped a lot.

Thank You very much.
 
Hello Zeehond,
first u need to edit the fn_damagehandler.sqf, here is my:
Look for this part.

Code:
//PVP Damage
_scale = 800; //<<<<<<<<<<<<THIS LINE
if (_damage > 0.1) then {
    if (_ammo != "zombie") then {
        _scale = _scale * 7; //<<<<<<<<<<<<THIS LINE
    };
    if (_isHeadHit) then {
        _scale = _scale * 10; //<<<<<<<<<<<<THIS LINE
    };
    if ((isPlayer _source) and !(player == _source)) then {
        _scale = _scale + 800;
        if (_isHeadHit) then {
            _scale = _scale + 500;
        };
    };
    switch (_type) do {
        case 1: {_scale = _scale + 800};
        case 2: {_scale = _scale + 800};
    };
    if (_unitIsPlayer) then {
        //Cause blood loss
        //Log Damage
        diag_log ("DAMAGE: player hit by " + typeOf _source + " in " + _hit + " with " + _ammo + " for " + str(_damage) + " scaled " + str(_damage * _scale));
        r_player_blood = r_player_blood - (_damage * _scale);

I have increased the scale to 800. Its the basic number to calculate the bloodloss/damage.
Additionally i changed the calculation formula for headthit and bodyhit.

You also can edit the player_zombieAttack to defin the minimum damage which is transfered to fn_damaghaendler.
look for:

Code:
} else {
   //diag_log ("Animation state: " +(_currentAnim));
   _attackanimations = ["zombiestandingattack1","zombiestandingattack2","zombiestandingattack3","zombiestandingattack4","zombiestandingattack5","zombiestandingattack6","zombiestandingattack7","zombiestandingattack8","zombiestandingattack9","zombiestandingattack10","zombiefeed1","zombiefeed2","zombiefeed3","zombiefeed4","zombiefeed5"];
   if (((_unit distance player) <= dayz_areaAffect) and ((animationState _unit) in _attackanimations)) then {
      //check LOS
      _inAngle = [_zPos,(getdir _unit),50,_tPos] call fnc_inAngleSector;
      if (_inAngle) then {
         //LOS check
         _cantSee = [_unit,_vehicle] call dayz_losCheck;
         if (!_cantSee) then {
            if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
               _cnt = count (DAYZ_woundHit select 1);
               _index = floor (random _cnt);
               _index = (DAYZ_woundHit select 1) select _index;
               _wound = (DAYZ_woundHit select 0) select _index;
            } else {
               _cnt = count (DAYZ_woundHit_ok select 1);
               _index = floor (random _cnt);
               _index = (DAYZ_woundHit_ok select 1) select _index;
               _wound = (DAYZ_woundHit_ok select 0) select _index;
            };
            _damage = 0.5 + random (1.2);  //<<<<<<<<<<<<THIS LINE
 
            //diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
            [player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
            [_unit,"hit",2,false] call dayz_zombieSpeak;

I have increased _damge to 0.5 minimum + (a random number max 1.2)

If you are ready put all files in your mission. You will need the compile.sqf from code.pbo too.
Open your init and change

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compile.sqf";

to

call compile preprocessFileLineNumbers "yourmission\compile.sqf";

in Compile.sqf

fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
player_zombieAttack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieAttack.sqf";

to:

fnc_usec_damageHandler = compile preprocessFileLineNumbers "yourmission\fn_damageHandler.sqf";
player_zombieAttack = compile preprocessFileLineNumbers "yourmission\player_zombieAttack.sqf";

Hope it helps.
 
Grateful for this one but I can't seem to find how to make infection only happen when blood is drawn from a Zed hit.

Kinda going for Extreme Survival. Making Zombies more fierce and overwhelming in crowds. Thanks in advance if you or anyone can help.
 
this is what mine looks like

private["_zed","_selection","_damage","_hitter","_projectile","_headShots","_damageOrg"];

_zed = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
_hitter = _this select 3;
_projectile = _this select 4;

private ["_unit","_damage","_ammo","_gethit","_damMults"];

_ammo=_this select 4;

_damMults=[0.001,0.5,0.002,0.003,0.4];

if (isNil {_zed getVariable "gethit"}) then {_zed setVariable ["gethit",[0,0,0,0]]};
_gethit=_zed getVariable "gethit";

switch (_this select 1) do {
case "":{
_damage=damage _zed+_damage*(_damMults select 0)
};

case "head_hit":{
_damage=(_gethit select 0)+(_damage-(_gethit select 0))*(_damMults select 1);_gethit set [0,_damage]
};

case "body":{
_damage=(_gethit select 1)+(_damage-(_gethit select 1))*(_damMults select 2);_gethit set [1,_damage]
};

case "hands":{
_damage=(_gethit select 2)+(_damage-(_gethit select 2))*(_damMults select 3);_gethit set [2,_damage]
};

case "legs":{
_damage=(_gethit select 3)+(_damage-(_gethit select 3))*(_damMults select 4);_gethit set [3,_damage]
};
};

if (local _zed) then {
if (_damage > 1 && _projectile != "") then {
switch (_selection) do {
case "head_hit": {
if (!(_zed getVariable["hitRegistered",false])) then {
_headShots = _hitter getVariable["headShots",0];
_hitter setVariable["headShots",(_headShots + 1),true];
_zed setVariable["hitRegistered",true];
};
};
};
if (_projectile isKindOf "Bolt") then {
_damageOrg = _hitter getVariable["firedDamage",0];
if (_damageOrg < _damage) then {
_hitter setVariable["firedHit",[_zed,_selection],true];
_hitter setVariable["firedDamage",_damage,true];
};
};
};
};
_damage





i dont know what i need to change in my file to increase damage, they are walking zeds and they barely do any damage
 
That looks like the code that handles the amount of damage done TO zombies, not BY zombies which sounds like what you want. You want the fn_damagehandler.sqf and look for this code

Code:
//Record Damage to Minor parts (legs, arms)
if (_hit in USEC_MinorWounds) then {
    if (_ammo == "zombie") then {
        if (_hit == "legs") then {
            [_unit,_hit,(_damage / 6)] call object_processHit;
        } else {
            [_unit,_hit,(_damage / 4)] call object_processHit;
        };
    } else {
        [_unit,_hit,(_damage / 2)] call object_processHit;
    };
};

there is a separarte block for head hits but if you want more damage then alter the _damage / # parts
legs = _damage /6
arms = _damage /4
body = _damage /2

edit to your preference.

AND ... do not forget that this code is in dayz_code/compile/fn_damagehandler.sqf which means for it to be active for all players you have to copy the file into your mission and override the location in your compiles.sqf file.
 
im running a vilayer server, im new to it, and from what ive seen everything i change needs to be in the vilayercodecustom, im running a script for walking zombies and i think it over-rides the origional zombie files, that line of code i posted above is what is inside of my fn_damageHandlerZ.sqf, in my custom folder, and if i copy the file wouldnt that again over-ride my walking zombies?
 
The zombies are made to walk in zombie_agent.fsm

The way vilayerworks is this: When the server starts it goes to the vilayercustomcode folder and runs a PBO program to pack your custom code into a mission PBO and a server PBO and it moves those pbo's into the mpmissions folder and the dayz_server/addons folder. So yes, you are correct, all your changes must be made in the vilayercustomcode folder and they will be packed into the pbo next time the server restarts.
(or some method close to what i described)

What I am saying about overriding your files is that any file that is normally in your epoch/addons/dayz_code.pbo must be copied into your mission, in your case into vilayercustomcode (is there a mission subfolder?) and your compiles.sqf must be edited to point to the file within the mission rather than /z/dayz_code/
IF you have already made edits to a file and its in your vilayercustomcode, just edit that one some more.

BUT again, the fn_damagehandlerZ.sqf does not handle the damage that zombies cause to players ... I dont think. You want to copy fn_damagehandler.sqf into vilayercustomcode right next to the Z version, edit its function location in compiles.sqf

This is all very confusing for the new admin and IMHO the vilayercustomcode method makes it MORE confusing because its unique and all the normal instructions do not reference it ..
 
Back
Top