Jump to content
  • 0

re-working zombies with no need to download aditional @mod


ka3ant1p

Question

So have an idea how to rework zombies with no need to make additional mode for players to download, it means that everything will be done in your mission file.
Need some help to collect relations of some files to make them custom.
The Idea appeared after adding custom loot tables.

It is not as easy as installing simple scripts, so the thread will be clear only for experienced who knows the locations of the files and are able to read scripts a bit

So to make this work without downloading editional @mod first you need to make custom variables.sqf and compiles.sqf, just copy them from your dayz_code to your mission folder and change paths to these files in your init. After that you will make custom files from dayz_code in a same way but paths would be changes in variables.sqf and compiles.sqf, sometimes description.ext will be also needed

So here is some reworking I have already found out (also with a help of some tutorials) and some working on:

1)Zombie attack (how much damage does zombie deals to player):

So there are to files which can be editted: fn_damageHandler.sqf and player_zombieAttack.sqf
in fn_damageHandler.sqf we have lines after: //PVP Damage
we have the main line for us is _scale = 200
It is the constant damage which used in futher calculations of dealing damage to player.
I'm not shure that this line is used only by zeds, so be carefull changing it.
Bellow those line you will see calculations when hitting any part of the player, I mean the damage will increase\decrease depending on hich part was hit.

 

in player_zombieAttack.sqf tou will find 2 similar lines: _damage = 0.1 + random (1.2);
It means that player will get damage  from 0.1*200 (_scale from fn_damageHandler.sqf) to 1.3 * 200  (_scale from fn_damageHandler.sqf) + bonus damage increase\decrease depending on which part was hit (from fn_damageHandler.sqf)
It is not clear for me why the files has 2 similar lines, I realize that thay are used in different cases but don't know in what cases which line is used.

So I think the best way is to change _damage = 0.1 + random (1.2); so it will 100% increase\decrease damage only from zombies.

If someone knows if fn_damageHandler.sqf _scale = 200 used in Player vs Player damage dealing or Player vs Bots damage dealing you are welcome to share =)

2)Zombie Loot
To edit zombie loot you should first unBin your config.bin in dayz_code (for Epoch mode)

Than grab piece of code CfgLoot, CfgLootSmall, CfgBuildingLoot and make your custom file loottables.hpp in your mission folder.
Then you call it in your descriptions.ext at the very top like this: #include "custom\config\loottables.hpp"

In CfgLoot you have clases for zombies:

policeman
civilian
office
office2
militarypilot
worker
medical
hunter
military
 
There are items listed and chance of spawning. So you can edit it however you want.
The only thing that medical, hunter and military are also used for many types of building loot, so I advise to copy those lines and rename like medicalBuildings and so on for loot spawning in buildings, and then find those clases in CfgBuildingLoot and change them to new clases you added.

3)Number, chance and scins of zombies spawning:
In CfgBuildingLoot you will find: 
zombieChance = 0.2; - chance of cpawning zombies (from 0 to 1)
minRoaming = 0; - minimum qty of spawning zombies
maxRoaming = 2; - maximum qty of spawning zombies
zombieClass[] = - types of spawning zombies

Also you should edit dayz_maxLocalZombies; dayz_maxGlobalZombiesInit; dayz_maxGlobalZombiesIncrease; dayz_maxZeds in your init or variables.sqf

 

4)Working on how to edit zombie speed, in Origins it was editing in CfgMovesZombie, but failed to find it in Epoch mod, there is no such line in config, also found zombie speed in control_zombieAgent.sqf but it seems it is not enough to change it only in there, and seemd some lines in Zombie_agent.fsm. But the main ting is to find CfgMovesZombie, because there can change animations for runing zombie with animation for walking zeds so they will not seem so dummy when slowly running. Or can change for an other animation which will be called from mission folder.
CfgMovesZombie is called in CfgVehicles in lines move =
So also need to find relations with the file where CfgMovesZombie is present to make it custom, and to see wether CfgMovesZombie is called in other files to mke them also custom for changing "getText (configFile >>" to getText (MissionconfigFile >>

5)Have an idea of how to force zeds attack bots but the problem is we will have to make custom CfgVehicles, it has to many relations, think there is a way to make custom only a part of it, but then we should to make custom all files descripting zombies which call CfgVehicles

I realized that It could sem for more experienced that I have writen some fullish things, but that is why I'm here asking for your help =)

Link to comment
Share on other sites

Recommended Posts

  • 0

This has already been created by mmmyum if I remember well..

Not 100% sure either.

https://github.com/vbawol/yum_zedMods

Yes I know, a lot of things I learned from his mod, but see the differnece, first of all his mod was not finished, and it is an aditional mod which you have to download and then give to your players either it win't work, I am triyng to make the same but with no need to download any additional mods, and even if I take his mod and make all files custom and wreright all paths in them it won't work cause it has other relations with other files which were not configured in his mod.

So I'm trying to learn it deeper and male an addon istead of Mod

Link to comment
Share on other sites

  • 0

When read his thread, some people wrote then zeds seem very stupidwhen moving slowly with running animation, but if I make it in my way I can edit in a custom file wich animation to use, so I will use standart animations but change the path to the running animation so it will use walking animation. Or I will add yum's animation to my mission folder and use it instead of standart animation, so will get the same effect but without making a new @mod.

Link to comment
Share on other sites

  • 0

So finaly found it in dayz.pbo
What you think if I add something like this:
Variables.sqf:

if(isNil "DZE_MissionMoveAnim") then {
DZE_MissionMoveAnim = true;
};
if(!isDedicated) then {
if (DZE_MissionMoveAnim) then {
		dayz_baseTypes = 		getArray (missionConfigFile >> "CfgVehicles" >> "zZombie_Base" >> "vehicleClass");
	} else {
		dayz_baseTypes = 		getArray (configFile >> "CfgVehicles" >> "zZombie_Base" >> "vehicleClass");
	};

And for example in zombie_generate.sqf will change:

if (_rnd > 0.3) then {
_lootType =  configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {
to
 
if (_rnd > 0.3) then {
if (DZE_MissionMoveAnim) then {
_lootType =  missionConfigFile >> "CfgVehicles" >> _type >> "zombieLoot";
} else {
_lootType =  configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {

will it use custom CfgVehicles?

Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0

hate to be that guy but.. video proof?

Will install bandicam, and make a video, so wait for an hour.

Worked i meant that i have made custom CfgVehicle, so now have more abilities to change zeds, tried only to change "zombieloot" line and it worked

Link to comment
Share on other sites

  • 0

Found out a strange thing.... both dayz_code/config.bin and dayz/config.bin has CfgVehicles and a lot of things there have the same lines but different values. For example:
dayz_code/config.bin >> CfgVehicles >> zZombie_Base:
 

class zZombie_Base: Citizen1 {
		scope = 2;
		glassesEnabled = 0;
		vehicleClass = "Zombie";
		displayName = "Zombie";
		fsmDanger = "";
		fsmFormation = "";
		zombieLoot = "civilian";
		moves = "CfgMovesZombie";
		isMan = 0;
		weapons[] = {};
		magazines[] = {};
		sensitivity = 4;
		sensitivityEar = 2;
		faceType = "ZFaces";
		identityTypes[] = {"zombie1","zombie2"};

dayz/config.bin >> CfgVehicles >> zZombie_Base:

class zZombie_Base : Citizen1 {
		scope = public;
		glassesEnabled = 0;
		vehicleClass = "Zombie";
		displayName = "Zombie";
		fsmDanger = "";
		fsmFormation = "";
		zombieLoot = "civilian";
		moves = "CfgMovesZombie";
		isMan = false;
		weapons[] = {};
		magazines[] = {};
		sensitivity = 4;	// sensor sensitivity
		sensitivityEar = 2;
		identityTypes[] = {"zombie1", "zombie2"};

So when I grabed CfgVehicles from dayz_code and made it custom, i succeeded to change "zombieloot line" but if i change "moves" line in my custom CfgVehicles mothing has changed.
Don't really understand how it knows the location of the config file. I mean that in files i saw only this line "ConigFile >> CfgVehicles" but haven't seen where the config file is included. And how it nows from which config file take the class, because in dayz_code/config.bin >> CfgVehicles >> moves the value is CfgMovesZombie but theris no such class in this file, it is located in dayz/config.bin so I think thats why when editing moves line - nothing happens.
But haven't seen any relations beetween dayz_code or mission file with dayz.pbo, so have no idea how to make it custom. Also if i am right so CfgMovesZombie uses CfgVehicles from dayz/config instead ofdayz_code/config as far as they are in the same config file, but what for doth of the CfgVehicles have the same lines??? I mean if so, there is no need to have a "moves" line in dayz_code >> CfgVehicles and no need in zombie_loot in dayz >> CfgVehicles

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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:
 

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:

_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:  _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  _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:
 

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

//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:

_min = 			getNumber (((_config >> "minRoaming") max 5) * 5)

or 

_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

 

	_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

	_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
 

	_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 =)

Link to comment
Share on other sites

  • 0

did some tinkering, got pretty fun results.

 

The weird talking zeds are herplederplezeds from namalsk.

I tried it with the regular zed skinds, too, same results. They attack AI and people, aswell as other zeds.

 

So as i understood you changed your bot skins to zed skins as I advised?

Link to comment
Share on other sites

  • 0

thanks, probably will try it today with WAI bots.
Continue trying to make config - custom.
Tried to make CfgVehicles from dayz_code addon, the only thing i sucseeded is "zombieloot" line.
When trying to change classes of all zeds to zombie policmen, nothing changes, I think it is because of CfgVehicles in dayz addon. So also tried to remake dayz addon but also no changes =(
In both cases I have spwning only different classes of zeds, i mean that dayz_code >> CfgVehicles also has zNewZombieBase and it is applied to zombie villagers, so when changing dayz addon non of villagers are spawning. 
Here are the RPT errors:
 

15:51:57 bin\config.bin/CfgMovesZombie/States/AmovPercMrunSnonWnonDfr.InterpolateTo: item count not multiple of 2 (is 17)
15:51:57   bin\config.bin/CfgMovesZombie/States/AmovPercMrunSnonWnonDfr.InterpolateTo: Bad move 
15:51:57 bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDl.InterpolateTo: item count not multiple of 2 (is 9)
15:51:57   bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDl.InterpolateTo: Bad move 
15:51:57 bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDb.InterpolateTo: item count not multiple of 2 (is 9)
15:51:57   bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDb.InterpolateTo: Bad move 
15:51:57 bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDbr.InterpolateTo: item count not multiple of 2 (is 9)
15:51:57   bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDbr.InterpolateTo: Bad move 
15:51:57 bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDfr.InterpolateTo: item count not multiple of 2 (is 11)
15:51:57   bin\config.bin/CfgMovesZombie/States/AmovPpneMrunSnonWnonDfr.InterpolateTo: Bad move 
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medicEnd
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic0S
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic0
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic1
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic2
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic3
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic3
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic4
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic5
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic4
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDnon_medic5
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic0S
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic0
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic1
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.ConnectTo: Bad move AinvPknlMstpSnonWnonDr_medic2
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.InterpolateTo: Bad move AinvPknlMstpSnonWnonDnon_medic0S
15:51:57   bin\config.bin/CfgMovesZombie/States/AinvPknlMstpSnonWnonDnon_medic.InterpolateTo: Bad move AinvPknlMstpSnonWnonDr_medic0S

So it seems that both of the files should be changed, and have no idea how to make it work.Will try to add this and make changes in description.ext
 

Link to comment
Share on other sites

  • 0

Still trying to understand the relations of config files from different addons. Already spent aprox 40 hours and low results =(

Have took attention to class CfgPatches and CfgAddons
It seems that the main addon is dayz_code then it loads addons from dayz_code and in CfgPatches it seems to be told to change values of simillar classes in addons listed in it.
Something like this:
mission.sqm loads some addons including dayz_code
dayz_code loads addons: dayz, dayz_equip, dayz_addons, dayz_code
also it changes values of some clases of addons wich are listed in CfgPatches
So that is why some addons can have similar classes.
But dayz addon doesn't patch dayz_code.... because if it did, i would have seen changes when changed day addon

Link to comment
Share on other sites

  • 0

these were DZAI bots.

 

I'm gonna try another method, will report back

DZAI is also interesting but it doesn't have it's own mission system.

So to make zeds mission we will have tomake zedDZAI and zedEMS

And WAI has it's own missio system, less configs and easy configable custom spawn points. So I will start with it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...