DayZ
PvZmoD_CustomisableZombies
Liven  [developer] Aug 27, 2020 @ 10:36am
Prevent Wolves and Zombies fighting each other
WARNING!

Doen't not work with v1.12+ and prevent the server to start!
Delete this custom config.cpp file to not be stuck.

-------------------------------------------------------------------------------------
Texte
By default with my mod, the white wolves don't fight with the zombies and the grey ones do fight with the zombies (and wolves / dogs from other mods should fight with the zombies).

It is not possible to modify that with the xml files of the mod.
To modify that you have to add a custom config.cpp file to your server.
This code just need to be server side (but no problem if it is player side too).

You can add this file in your custom server mod if you have one or use the “addon building” include in “dayz tools” to create your own pbo.

Here is the code to include in the config.cpp

class CfgPatches { class DZ_Animals_canis_lupus_PvzCZmodified { units[]= { "Animal_CanisLupus_Grey" }; weapons[]={}; requiredVersion=0.1; requiredAddons[]= { "DZ_Animals" }; }; }; class CfgVehicles { class Animal_CanisLupus; class Animal_CanisLupus_Grey: Animal_CanisLupus { aiAgentTemplate="Predators_Wolf_Friendly"; }; };

If contrary you want to make white wolves fight with zombies, remplace “Animal_CanisLupus_Grey” by “Animal_CanisLupus_White” and "Predators_Wolf_Friendly" by "Predators_Wolf".

This method should work to change animals from other mods (based on wolf), just use the appropriate class name instead of “Animal_CanisLupus_Grey”.
Last edited by Liven; May 19, 2021 @ 11:29am
< >
Showing 1-3 of 3 comments
DrunkenWarrior Mar 18, 2021 @ 11:34pm 
so i need to make this file and put it into a PBO with dayz tools? im not familiar with this area of making mods but id love to stop my zombies hitting my infected bears and wolves
DrunkenWarrior Mar 18, 2021 @ 11:46pm 
so for example what i need is...

class CfgPatches
{
class DZ_Animals_canis_lupus
{
units[]=
{
"Animal_CanisLupus_Grey"
};
weapons[]={};
requiredVersion=0.1;
requiredAddons[]=
{
"DZ_Animals"
};
};
class DZ_Animal_InfectedBear
{
units[]=
{
"Animal_InfectedBear"
};
weapons[]={};
requiredVersion=0.1;
requiredAddons[]=
{
"DZ_Animals"
};
};
class DZ_Animal_InfectedWolf
{
units[]=
{
"Animal_InfectedWolf"
};
weapons[]={};
requiredVersion=0.1;
requiredAddons[]=
{
"DZ_Animals"
};
};
};
class CfgVehicles
{
class Animal_CanisLupus;
class Animal_CanisLupus_Grey: Animal_CanisLupus
{
aiAgentTemplate="Predators_Wolf_Friendly";
};
};

for MoreWolves mod
Liven  [developer] Mar 19, 2021 @ 1:09am 
More something like that :
class CfgPatches { class DZ_Animals_canis_lupus_PvzCZmodified { units[]= { "Animal_CanisLupus_Grey", "Animal_InfectedWolf" }; weapons[]={}; requiredVersion=0.1; requiredAddons[]= { "DZ_Animals" }; }; }; class CfgVehicles { class Animal_CanisLupus; class Animal_CanisLupus_Grey: Animal_CanisLupus { aiAgentTemplate="Predators_Wolf_Friendly"; }; class Animal_InfectedWolf: Animal_CanisLupus { aiAgentTemplate="Predators_Wolf_Friendly"; }; };

For the bears I know there is a problem, I can't disable them fighting zombie, I don't know why. I spending lot of time trying to find a solution but didn't succeed.

PS : when you need to show code, use [ code ] your code [ /code ] (without the spaces) it is lot more easy to read.
Last edited by Liven; May 19, 2021 @ 11:30am
< >
Showing 1-3 of 3 comments
Per page: 1530 50