• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

XML edit to make zombies act as boars? (AI)

MaxTunnerX

New member
I'm looking for a way to make zombies act like boars, that means being passive until hit by the player. Can anyone help?

 
I'm guessing but try using xpath to add/remove AI Task properties from zombieTemplateMale so that they match animalTemplateHostile in the entityclasses.xml

 
The bear looks like this:

Code:
	<property name="AITask-1" value="Swim"/>
<property name="AITask-2" value="BreakBlock"/>
<property name="AITask-3" value="DestroyArea"/>
<property name="AITask-4" value="Territorial"/>
<property name="AITask-5" value="ApproachAndAttackTarget" param1="EntityAnimalStag,40,EntityPlayer,25,EntityZombie,30"/>
<property name="AITask-6" value="ApproachSpot"/>
<property name="AITask-7" value="Look"/>
<property name="AITask-8" value="Wander"/>
<property name="AITask-9" value=""/>
<property name="AITarget-1" value="SetAsTargetIfHurt"/>
<property name="AITarget-2" value="BlockingTargetTask"/>
<property name="AITarget-3" value="SetNearestEntityAsTarget" param1="EntityPlayer,8,EntityAnimalStag,0,EntityZombie,0"/>
<property name="AITarget-4" value=""/>
The boar doesn't have these ai tasks.

You can TRY to delete those ai tasks, but it might break other ♥♥♥♥. Good luck :)

 
What's xpath?
The way to make mods in A17 (sorry, I overlooked the part where you were requesting a mod. I assumed you were asking for help making the mod yourself)

Anyway, if you want to have a go at making the mod there are some great tutorials about how to make mods and sphereii has done an excellent job detailing the xpath stuff in this forum post -> https://7daystodie.com/forums/showthread.php?93816-XPath-Modding-Explanation-Thread&p=868113&viewfull=1#post868113

I would try first using the

<remove ...

tag to remove all of the AI-Task properties from zombieTemplateMale and then using the

<append ...

<property name="AITask-1 ...

</append

tags to add the AI task tags from animalTemplateHostile (except for swim, because zombies shouldn't do that)

If you do it as a mod, rather than editing the xml directly then your changes don't get deleted when TFP release an update etc

 
Back
Top