reworking zombies with no need to make additional @mod

ka3ant1p

Member
I am trying to rework zombies like in yum's zed mode but with no need to download additional mode, it means we will have custom files wich will make the same effect. There are lots of relations so we will need a lot of custom files which will make the mission file much bigger but i think this way is better than to download additional mod.
So here what i want to change:
1)Make all zombies walking with a new animation
DONE 2)Make them much stronger
DONE 3)Spawn much more zeds
DONE 4)Cheange loot and chance spawning in zeds
in process 5)Make zeds attack bots
Code:
_lootType =  missionConfigFile >> "CfgVehicles" >> _type >> "zombieLoot";
6)make zeds only (not almost) head hit

so as you can see 2-4 point are already done, will try today to force zeds attack bots, as for only headhit, now i have them almost head hit but i think i know how to make them head hit only.
As for make them walk with new animation also havean some ideas but need help.

Zombie movement speed and animations are listed in dayz/config.cpp in CfgMovesZombie
so if change only speed in there they will look stupid moving slowly with running animation.
So we need to make custom CfgMovesZombie in the same way like we make custom loot tables and change the speed and change all runing animations with walking animations, or can use custom animations from mission folder. But I on't kmow from where CfgMovesZombie is called except dayz_code/config.bin >> CfgVehicle >> moves, so have no idea how to force it use custom CfgMovesZombie. So need help with this.

Also as for making them only head hit and add/change skins, all this is listed in dayz_code/config.bin >> CfgVehicle, so we should make a peace of it also custom. To make them head hit only can edit their armor and other lines in CfgVehicle but first need to make it custom.

I have tried to test it in the simpliest way:
Grabed peace of CfgVehicle and made a file zeds.hpp
included it with description.ext in this way: #include "custom\config\zeds.hpp"
In zeds.hpp >> CfgVehicle I changed all "zombieLoot =" lines to "zombieLoot = test" and aded "test" line to my custom loot tables.
After this I made these two files custom: zombie_generate.sqf and wild_spawnZombies.sqf changed paths in compiles and than edited this lines in it:
Code:
_lootType =  configFile >> "CfgVehicles" >> _type >> "zombieLoot";

to

Code:
_lootType =  missionConfigFile >> "CfgVehicles" >> _type >> "zombieLoot";

But after PBOing mission and server, I'm stuck at "waiting for server to start authentication"

So what could i miss?
 
Got it working =)
Had a problem with dayz_server, the config.bin was unbinaried so I had config.cpp instead of config.bin
So the result is I made CfgVehicles custom and it worked!!!
Will try to make it properly: add some lines to varibles and change "lootType = " so will have posibility to on\off usage of custom configs from the init
 
I need somebody to explain how it works.... I understand how such things work like in Variables.sqf, variables.sqf is linked up in init.sqf. The variables.sqf have some lines (don't know how it is called) like "dayz_tameDigs" and others which a then used in different scripts. The same thing is with compiles, it is also linked up in int.sqf have some lines which a linked with different scripts, so when some script uses the line from the compiles.sqf it really uses the scipt which is linked to that line. But have now idea how the config files are linked up. Explain me please, here we have ConfigFile >> CfgVehicles, how does the script knows that it ConfigFile means that it should go to the config.bin file??? Besides how it knows which of the ***.pbo to choose for linking to the congif file, as almost all of them have this file. So don't understand this relations and can't move foward
 
Discovered lots of interesting things while analyzing the files, but due to the lack of time need some help to test some things for futher full tutorial.
To test next things, the files should me made custom and change path in compiles.sqf or just call them from init in the same way as they are called from compiles.sqf
1)In files wild_spawnZombies.sqf and zombie_generate.sqf thera such lines:
Code:
if (isNull _agent) exitWith {
dayz_spawnZombies = dayz_spawnZombies - 1;
};
I think if delete "-1" it will prewent zombie despawn. The best way is testing this with any friend. One go to the city and spawn zeds and TP somewhere from there, the other one is watching if zeds are despawning from far from there.

2) In file building_spawnZombies.sqf there are such lines:
Code:
_canLoot = isClass (_config);
if (_canLoot) then {
//some script here
};
I think it causes zombie to spawn only in case if the location is lootable, so if delete this lines and leave only lines which are between if (_canLoot) then { and }; this can cause zeds to spawn even if location is not lootable, this could add some hardcore, so the players wouldn't know if the location is lootable or not only watching if zombies have spawned or not, so they will need to check it from now.

3) In file plyaer_zombieAttack.sqf there is a line where open-type vehicles are listed:
Code:
 _openVehicles = ["ATV_Base_EP1", "Motorcycle", "Bicycle"];
So i think if to add some vehicles in there, zeds will also attack while player is inside. For exaple an open-type Humvee could be add in there.
If it works, could think of adding some code that will cause vehicles with broken glass make like open-type vehicle, it will cause zeds to attack a player in any vehicle if the the glass is broken.

4)In player_spawnCheck.sqf there is a line
Code:
_maxWildZombies = 3;
I think if increase it's value it will cause more zeds to spawn while not near some object, in the forest for example.
Also don't forget to change valuse in variables, maxzeds, maxlocalzeds and so on, or if you have this line in init, just change in there

5)It seems I have found the easier way to make more zeds spawning at objects, instead of making custom CfgBuildingLoot and changing max/minRoaming
In file building_spawnZombies.sqf we have such lines:
Code:
//Get zombie class
    _unitTypes =     getArray (_config >> "zombieClass");
    _min =             getNumber (_config >> "minRoaming");
    _max =             getNumber (_config >> "maxRoaming");
   
    //Walking Zombies
    _num = (round(random _max)) max _min;
These lines calculate the number of zeds to spawn and there are a lot of ways to change this, will show some examples to increase the qty:

Example 1
Code:
//Get zombie class
    _unitTypes =     getArray (_config >> "zombieClass");
    _min =             getNumber ((_config >> "minRoaming") * 5);
    _max =             getNumber ((_config >> "maxRoaming") * 5);
   
    //Walking Zombies
    _num = (round(random _max)) max _min;
This will make the incoming numbers used in futher calculations 5 times higher, but as far as some objects have minimum "0" then 0*5=0, can make something like:
Code:
_min =             getNumber (((_config >> "minRoaming") max 5) * 5)
or
Code:
_min =             getNumber (((_config >> "minRoaming") * 5) max 5)
Not shure this works, but if yes, it will couse in the first case: if minRoaming < 5 then = 5 and then * 5, so this will cause min of 25 zeds to spawn
In the second case minRoaming * 5 but if the result is < 5 then = 5, this will cause to spawn at least 5 zeds

For futher explanation will think that after calculations made above we will have _min = 10 and _max = 20

Example 2
Code:
    _num = (round((random _max) * 5)) max _min;
Such calculation will be like this: random from 0 to 20 the result will be * 5 and the result will be not less then 10

Example 3
Code:
    _num = (round(random (_max * 5))) max _min;
Such calculation will be like this: random from 0 to 20* 5 and the result will be not less then 10


Example 4
Code:
    _num = ((round(random _max)) max _min) * 5;
Such calculation will be like this: random from 0 to 20 but at least 10 and the final result will be * 5

Hope anybody will check this out and report in here, so this could be added to the tutorial, cause as I already told I am lack of time and all free time is trying my best to make some configs custom to have a chance of changing every little thing connected with zeds.

Also If someone is experienced in bots, could try to remake them in such way that the script will spawn AI with zed skins and no weapons and other thing usual bots have. If it works, then can cooperate and make something like ZedAI and make missions with infected bases or even cities =))) Also can grab some ideas from DZAI or WAI and change the way zeds spawn, make them dynamic or custom spawning at mission start and with no despawning when no target and no random spawn near some player.
So it will look like in "Walking dead" have lots of ideas how to remake their AI if above writen have profit =)
 
So, I'm working on this a bit too again. I'm wondering where the movement is called from, like the actual walking and running and stuff. Any hint?
 
Back
Top