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

[MOD] Friendly Animals - Friendly animals united against the zombie hordes!

Sort-of do-able. Look in items.xml and search for Distraction. I know resourceSmallRock has it.
Interesting, thank you! I'll take a look at this later. If there was a way to, say, turn down or off their hearing perception but turn up the distraction level of a specific object(s) so that you could call them from a distance, that'd be cool!

Yes you can.
You have to rip the animal model out of the assets file, take it into blender, "rig" it with the appropriate bones that the game looks for on a vehicle, take it into unity so it can be exported as a file the game can read, and then you can load it back in as a vehicle.

Buuuuuut... it probably won't animate properly.
Lol, a bit of work, but that would be really cool! I have and have played with both Blender and Unity3D so I might dig into this over holiday break. Thanks for all the ideas! ^n.n^

 
I don't think you can turn up/down the distraction level of an object, but I'm pretty sure you CAN prioritise ApproachDistraction as an AI task and increase the amount of time it is effective.

Might be wrong on the first bit.

EDIT: Also, there was a wolf with armour and bags model in A16...

 
just tested this out with the new patch. They are still friendly but they no longer seem to gravitate towards you or stay in the vicinity if you spawn one in

edit: ahaha! i was playing with the xml and replaced "breakblock' (they kept breaking my stuff. Last game a bear blew up my jeep!) with "ApproachDistraction". i had been trying different things n then spawning in a wolf to see what happened so when i restarted the game and made a noise-they ALL came running from everywhere they'd wandered. Awesome ( i don't know wth i'm doing so will prob'ly break something n then will have to re-validate and wait for you to fix it :) )

 
Last edited by a moderator:
just tested this out with the new patch. They are still friendly but they no longer seem to gravitate towards you or stay in the vicinity if you spawn one in
edit: ahaha! i was playing with the xml and replaced "breakblock' (they kept breaking my stuff. Last game a bear blew up my jeep!) with "ApproachDistraction". i had been trying different things n then spawning in a wolf to see what happened so when i restarted the game and made a noise-they ALL came running from everywhere they'd wandered. Awesome ( i don't know wth i'm doing so will prob'ly break something n then will have to re-validate and wait for you to fix it :) )
Lol. That'd be scarier than a BM horde.

 
Lol. That'd be scarier than a BM horde.
lol-it kinda was cuz they also "dash" everywhere they go. so it was a little intimidating to see all these wolves rushing at me from every direction. i was REALLY hoping i hadn't messed up their friendliness :p

 
just tested this out with the new patch. They are still friendly but they no longer seem to gravitate towards you or stay in the vicinity if you spawn one in
edit: ahaha! i was playing with the xml and replaced "breakblock' (they kept breaking my stuff. Last game a bear blew up my jeep!) with "ApproachDistraction". i had been trying different things n then spawning in a wolf to see what happened so when i restarted the game and made a noise-they ALL came running from everywhere they'd wandered. Awesome ( i don't know wth i'm doing so will prob'ly break something n then will have to re-validate and wait for you to fix it :) )
Had you re-validated before using the new 2.4 modlet/xpath version? Just to make sure you're applying 2.4 to a clean game config.

But wow, thanks for mentioning that...

Code:
        	<property name="AITask-1" value="Swim"/>
       	<property name="AITask-2" value="BreakBlock"/>
       	<property name="AITask-3" value="Territorial"/>
       	<property name="AITask-4" value="ApproachAndAttackTarget" param1="EntityZombie,40,EntityVulture,40,EntityZombieDog,40,EntityEnemyAnimal,40"/> <!-- class,maxChaseTime (return home) -->
       	<property name="AITask-5" value="ApproachSpot"/>
       	<property name="AITask-6" value="Look"/>
       	<property name="AITask-7" value="Wander"/>
       	<property name="AITask-8" value=""/>
       	<property name="AITarget-1" value="SetAsTargetIfHurt" param1="EntityZombie,EntityVulture,EntityZombieDog,EntityEnemyAnimal"/>
       	<property name="AITarget-2" value="BlockingTargetTask"/>
       	<property name="AITarget-3" value="SetNearestEntityAsTarget" param1="EntityZombie,40,EntityVulture,40,EntityZombieDog,40,EntityEnemyAnimal,40"/> <!-- class,distance (checked left to right, 0 dist uses entity default) -->
       	<property name="AITarget-4" value=""/>
Oops! Yeah, I think I'll remove "BreakBlock", lol. Zombies breaking stuff, fine, but non-zombies, probably not a good idea!

 
Had you re-validated before using the new 2.4 modlet/xpath version? Just to make sure you're applying 2.4 to a clean game config.
But wow, thanks for mentioning that...

Code:
        	<property name="AITask-1" value="Swim"/>
       	<property name="AITask-2" value="BreakBlock"/>
       	<property name="AITask-3" value="Territorial"/>
       	<property name="AITask-4" value="ApproachAndAttackTarget" param1="EntityZombie,40,EntityVulture,40,EntityZombieDog,40,EntityEnemyAnimal,40"/> <!-- class,maxChaseTime (return home) -->
       	<property name="AITask-5" value="ApproachSpot"/>
       	<property name="AITask-6" value="Look"/>
       	<property name="AITask-7" value="Wander"/>
       	<property name="AITask-8" value=""/>
       	<property name="AITarget-1" value="SetAsTargetIfHurt" param1="EntityZombie,EntityVulture,EntityZombieDog,EntityEnemyAnimal"/>
       	<property name="AITarget-2" value="BlockingTargetTask"/>
       	<property name="AITarget-3" value="SetNearestEntityAsTarget" param1="EntityZombie,40,EntityVulture,40,EntityZombieDog,40,EntityEnemyAnimal,40"/> <!-- class,distance (checked left to right, 0 dist uses entity default) -->
       	<property name="AITarget-4" value=""/>
Oops! Yeah, I think I'll remove "BreakBlock", lol. Zombies breaking stuff, fine, but non-zombies, probably not a good idea!
yeah-it was a completely clean game and i re-validated multiple times. i am clueless as to why they run all over helter skelter now. they no longer walk-they run. and they no longer wander in your general direction. They ran towards me when i put in approachdistraction but then took off again. All the ones i spawned trying differnent things ended up in a big cluster in the lake o.O and never moved again. i'm really sad about them not hangin' out with me anymore-lol

oh yeah-i tried taking out 'swim" to see if that would keep them from going in the lake and getting stuck. i think one out of 4 ended up in there. That was better than all of them anyways :p

 
Last edited by a moderator:
yeah-it was a completely clean game and i re-validated multiple times. i am clueless as to why they run all over helter skelter now. they no longer walk-they run. and they no longer wander in your general direction. They ran towards me when i put in approachdistraction but then took off again. All the ones i spawned trying differnent things ended up in a big cluster in the lake o.O and never moved again. i'm really sad about them not hangin' out with me anymore-lol
oh yeah-i tried taking out 'swim" to see if that would keep them from going in the lake and getting stuck. i think one out of 4 ended up in there. That was better than all of them anyways :p
If you just updated to A17 b221, then that's the reason why they're running all over! I'm releasing version 2.5 tomorrow to fix it, don't worry! ^n.n^

 
If you just updated to A17 b221, then that's the reason why they're running all over! I'm releasing version 2.5 tomorrow to fix it, don't worry! ^n.n^
Ah, I figure it has to do with something they changed that even for an xpath, it didn't line up right somehow?

 
If you just updated to A17 b221, then that's the reason why they're running all over! I'm releasing version 2.5 tomorrow to fix it, don't worry! ^n.n^
THANK YOU! (((hugs))) for serious-lol

While i'm not a modder (i think) i'm able to translate to some extent whats in the xml's. i spent all day yesterday comparing the old ones to the new one-trying to find what could have changed to cause the changed behavior and couldn't find it. What is it exactly that changed in there?

 
FA 2.5 released!

Just replace the mod folder and you're good to go!

<<< REQUIREMENTS >>>

FA version 2.5 requires 7DtD A17 b221 or newer

FA version 2.4 requires 7DtD A17 b208 or older

FA version 1.x requires 7DtD A16.4

Change log:

2.5:

* Map marker names of friendlies now more...friendly!

* BreakBlock task removed from non-zombies to avoid them destroying anything important.

* Updated for A17 b221 which changed some values.

* Misc fixes

 
Last edited by a moderator:
Ah, I figure it has to do with something they changed that even for an xpath, it didn't line up right somehow?

THANK YOU! (((hugs))) for serious-lol
While i'm not a modder (i think) i'm able to translate to some extent whats in the xml's. i spent all day yesterday comparing the old ones to the new one-trying to find what could have changed to cause the changed behavior and couldn't find it. What is it exactly that changed in there?
You're welcome! *snuggleslurps back* ^n.n^

So what changed was the following, which I've commented in the xml:

Code:
<property name="MoveSpeed" value="0.4"/> <!-- Value represents previous variable "WanderSpeed" -->
<property name="MoveSpeedNight" value="0.4"/> <!-- Value represents previous variable "NightWanderSpeed" -->
<property name="MoveSpeedAggro" value="1.3, 1.5"/> <!-- Value represents previous variables ("ApproachSpeed", "NightApproachSpeed") -->
<property name="MoveSpeedPanic" value="2.0"/> <!-- Value represents previous variable "PanicSpeed" -->
Now they walk properly again when wandering, and run when attacking a zombie.

I played around with code to make it so non-zombies will stop zombies in their tracks as the zombies turn to fight once attacked (#2 in my behavior possibility list from earlier) but haven't managed to quite get it for some reason. I had problems with this before too for A16.4. Maybe it's a bug, but most likely there's just some config somewhere that I'm getting wrong.

If you're curious, and what helps with xpaths, is to check the status of the complete xml code after it gets modified by the xpath/modlet code when you start a game. To do this, you go into dm in the console (I just always do dm+cm) and run

Code:
exportcurrentconfigs
Then look in your 7DtD saves folder, and you'll see a config folder for your particular world appear which contains all the xml files dumped out after being modified by your mods.

 
Last edited by a moderator:
You're welcome! *snuggleslurps back* ^n.n^
So what changed was the following, which I've commented in the xml:

Code:
<property name="MoveSpeed" value="0.4"/> <!-- Value represents previous variable "WanderSpeed" -->
<property name="MoveSpeedNight" value="0.4"/> <!-- Value represents previous variable "NightWanderSpeed" -->
<property name="MoveSpeedAggro" value="1.3, 1.5"/> <!-- Value represents previous variables ("ApproachSpeed", "NightApproachSpeed") -->
<property name="MoveSpeedPanic" value="2.0"/> <!-- Value represents previous variable "PanicSpeed" -->
Now they walk properly again when wandering, and run when attacking a zombie.

I played around with code to make it so non-zombies will stop zombies in their tracks as the zombies turn to fight once attacked (#2 in my behavior possibility list from earlier) but haven't managed to quite get it for some reason. I had problems with this before too for A16.4. Maybe it's a bug, but most likely there's just some config somewhere that I'm getting wrong.

If you're curious, and what helps with xpaths, is to check the status of the complete xml code after it gets modified by the xpath/modlet code when you start a game. To do this, you go into dm in the console (I just always do dm+cm) and run

Code:
exportcurrentconfigs
Then look in your 7DtD saves folder, and you'll see a config folder for your particular world appear which contains all the xml files dumped out after being modified by your mods.
oh wow-this is good to know. Thank you for the info! i had tried fiddling with the movement speed but nothing i did changed it. i tried to be very careful not to mess up formatting but still no go. so just gave up and decided to wait for the pros ;)

 
oh wow-this is good to know. Thank you for the info! i had tried fiddling with the movement speed but nothing i did changed it. i tried to be very careful not to mess up formatting but still no go. so just gave up and decided to wait for the pros ;)
Yeah, because the value wasn't even being recognized anymore! They also changed zombie movement and gave you the ability to specify walk, jog, run, sprint, and nightmare I think it is, for different kinds of zombies at different times of day, so them changing those variables had to do with that.

Probably next I'm going to look at spawning and making sure friendlies will spawn in every biome, so even if you're in a desert, burnt, etc there will still be at least a chance for them to spawn, even if they're more or less rare depending on biome difficulty.

 
Yeah, because the value wasn't even being recognized anymore! They also changed zombie movement and gave you the ability to specify walk, jog, run, sprint, and nightmare I think it is, for different kinds of zombies at different times of day, so them changing those variables had to do with that.
Probably next I'm going to look at spawning and making sure friendlies will spawn in every biome, so even if you're in a desert, burnt, etc there will still be at least a chance for them to spawn, even if they're more or less rare depending on biome difficulty.
i wondered if that had to do with it. But it looked like there were different rules for zombies than for animals so dismissed it.But that is what caused it? huh! Anyways-you rock. Not only are they back to normal but all the borked ones got deleted. The console said they were "empty entities"-lol! Exactly! ;)

 
i wondered if that had to do with it. But it looked like there were different rules for zombies than for animals so dismissed it.But that is what caused it? huh! Anyways-you rock. Not only are they back to normal but all the borked ones got deleted. The console said they were "empty entities"-lol! Exactly! ;)
Yep! If you look at zombieTemplateMale in 7DtD/Data/Config/entityclasses.xml, you'll see

Code:
<property name="MoveSpeed" value="0.08"/> <!-- just shambling around -->
<property name="MoveSpeedAggro" value="0.2, 1.25"/> <!-- chasing a target min/max (like day or night)-->
<property name="MoveSpeedPanic" value="0.55"/>
so using the same system as all entities use. "MoveSpeedNight" is only used by one entity, zombiedogs, to make them slower at night. I haven't tested whether or not the zombie walk/jog/run/etc settings for worlds is only being done on human zombies or all zombies. It should be a setting for all you'd think.

Thanks! Lol, glad it's working better for you! ^n.n^

 
yeah, time for me to get the mod. wolves are crazy in A17. Been ambushed so many times, lol.

---update---

Done. Also, what do you mean by:

* Map marker names of friendlies now more...friendly!

?? lol

 
Last edited by a moderator:
yeah, time for me to get the mod. wolves are crazy in A17. Been ambushed so many times, lol.
---update---

Done. Also, what do you mean by:

* Map marker names of friendlies now more...friendly!

?? lol
Check your map when they're near, and you'll see! :3

 
Check your map when they're near, and you'll see! :3
lol, I've used it once to bring a zombie to it. Um, is there a way to make it to where friendlys are part of your "party", but really not. That way you don't lose xp if they end up killing the zombie? Lost a lot of xp that way so far, heh. Was fighting a group that I was good with, wolf came over and got final shots on them x.x

 
lol, I've used it once to bring a zombie to it. Um, is there a way to make it to where friendlys are part of your "party", but really not. That way you don't lose xp if they end up killing the zombie? Lost a lot of xp that way so far, heh. Was fighting a group that I was good with, wolf came over and got final shots on them x.x
Not that I know of, but yeah the "downside" about them helping you kill zombies is that they're going to kill some zombies. Sure, you don't always need their help, but there are always more zombies to kill and if you do need their help it's nice to have! How rare they are is another matter that I'll have to take up in spawning.xml modification. As of right now, I think they're usually fairly rare.

But yes, if there was a way to have NPC's "teamed" with you for XP, that would be neat!

 
Back
Top