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

der whaaaaaa how did i miss the obvious zombie related missions ... this is like a whole new group of missions that can be added clean out zombies from a building get loot , wipe out horde , sneak in avoid getting eaten , etc .... i am into this seems like a whole new thread or add on to missions for Zed Missions ...

 

still wish we could get just simple (classic) walking zeds though... that act and look right ....

Link to comment
Share on other sites

  • 0

You don't should edit the dayz_code so easily, dayz_code has to be on server and client side, and you can run in untraceable errors.

 

If you want to edit the behavior of zombies you should look at the "zombie_agent.fsm" in "dayz_code\system".

 

If you have to edit something that has to be on client and server side, without write a new addon/mod, then you have to share it with your mission.

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