Jump to content

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


Swiftpaw

Recommended Posts

Hmmm, I figured there'd be a way. When I played Valmod in A16.4, I was able to play as zombie models. I didn't have to make them or anything, they popped up as defaults. And I know we're not considred blocks. Idk how they did any of that though, lol. Hmmmm. It may actually take going into Unity, making animations and all for a player, then adding it to the game somehow.

 

Well, if anything, can probably add it as a backpack of sorts? Or is that out since there is no more looting entities that you can't link opening inventory from an entity now?

 

That's because they commented out the zombie players for some reason from archetypes.xml in A17.

 

Regardless, the problem is that the assets referenced in archetypes.xml are all found in 7DtD/Data/Bundles/umaplayer.manifest. Unless they are mentioned in there, they aren't available for defining as part of a player character. There actually is some titled "wolf", but my guess is these were in preparation for them adding a "pet" to the game.

 

Bundles/umaplayer.manifest:- Assets/UMA/Content/Player/Slots/unisex_wolf_armor_Slot.asset
Bundles/umaplayer.manifest:- Assets/UMA/Content/Player/Slots/unisex_wolf_body_Slot.asset
Bundles/umaplayer.manifest:- Assets/UMA/Content/Player/Slots/unisex_wolf_saddle_Slot.asset
Bundles/umaplayer.manifest:- Assets/UMA/Content/Player/Overlays/unisex_wolf_body.asset

 

When applied to a player character, they make the player horizontal, but do not change the model or texture unless it didn't change because I didn't have the "overlay" which may be the actual texture.

 

[ATTACH=CONFIG]26189[/ATTACH]

 

You'd have to figure out how to apply the above to and replace this:

 

		<base_mesh_parts>
		<part slot="head" layer="base" mesh="male_base_face">
			<texture name="male_head" color="skin"/>
			<texture name="unisex_tattoo_tribal" color="15,20,25"/>
		</part>
		<part slot="head" layer="inner" mesh="unisex_viking_braid">
			<texture name="unisex_viking_braid" color="hair"/>
		</part>
		<part slot="eyes" layer="base" mesh="male_base_eyes">
			<texture name="unisex_eye_shaded" color="255,255,255"/>
			<texture name="unisex_iris" color="eye"/>
		</part>
		<part slot="hands" layer="base" mesh="male_base_hands">
			<texture name="male_hands" color="skin"/>
		</part>
		<part slot="chest" layer="base" mesh="male_base_chest">
			<texture name="male_torso" color="skin"/>
		</part>
		<part slot="legs" layer="base" mesh="male_base_legs">
			<texture name="male_legs" color="skin"/>
		</part>
		<part slot="feet" layer="base" mesh="male_base_feet">
			<texture name="male_feet" color="skin"/>
		</part>
	</base_mesh_parts>

 

The problem is, where do you apply them, since there isn't a "wolf" asset for head, eyes, hands, chest, legs, and feet. Maybe some of these could be left off, I don't know. I'll play around with it more.

 

Anyway, there is no "bear" asset for example, so umaplayer.manifest doesn't contain all the NPC models/textures in the game, and they have to be in that in order to utilize them. That's the problem. I also tried changing the playerMale entity from using "UMA" for modeltype to "standard" which is what wolves and bears use, and I couldn't get that to work right either.

stupidity.jpg.9488cc1695ce8aad4e80acca56ba9c39.jpg

Link to comment
Share on other sites

awesome mod! ..question.... does the zombie attack the animal back? or just focus on the player the whole time?

 

Glad you enjoy! ^n.n^

 

There is seek out and attack, and then there is attack only if attacked. Currently, only the non-human zombies attack non-zombies, both seek and attack and also attack if attacked. I think in the A16.4 version of the mod, I had it set to all zombies would attack other non-zombies only if they were attacked. It should be the same for all zombies at the very least, so I need to change this for version 2.5. Either:

 

1. All zombies will seek out and attack all non-zombies.

 

2. All zombies will only attack non-zombies once they are attacked.

 

3. All zombies will only attack the player.

 

#3 means they will only focus on the player which means non-zombies will just attack them as they walk or run towards the player. I kind of like this since it means ultimately the player still needs to worry about the zombies coming for them.

 

I also like #2 because the zombies hitting back once they are hit looks a little more "realistic" (do zombies actually care though? lol).

 

#1 is more "realistic", that zombies should go after all non-zombies, but I kind of like the player always being the main focus of zombies, and like the other non-zombie animals being invisible and just stealthier helpers, so I tend to favor #2 or #3.

 

I could make a script, or multiple mod versions, for different configurations, so that everyone can pick the configuration they prefer.

Link to comment
Share on other sites

Glad you like it! <3

 

As for making them follow you, I'd have to figure out what the best method for doing that would be. If you look in 7DtD/Data/Config/entityclasses.xml you'll see the entity_class property "AITask" of "ApproachDistraction". This makes entities investigate sounds, or at least sounds created by the player. What this does if given to wolves for example is make them run towards you as soon as they hear your footsteps, and since they can run fast, they stay right up against you the whole time (unless you sneak away somehow). One solution would be to make them walk slower, but if they were slower than zombies including zombie bears or zombie dogs then they wouldn't be able to help attack them unless they were standing still. Unfortunately, there are no places where "ApproachDistraction" is used with parameters that might help decrease the constant seeking of your footsteps other than making them not hear you from as far away (if that is even moddable, and I'm not entirely sure if it is at the moment). Unfortunately having them practically right on you at all times felt pretty game breaking, so I removed it, lol.

 

If there was a way to use a specific item to make a specific type or sound, or just a special trigger of some sort, then you could call them to you, but I'm not aware of how to do that (yet).

 

As for them wantering around, if you look you'll see some like these:

 

        	<property name="AITask-3" value="Territorial"/>
       	<property name="AITask-5" value="ApproachSpot"/>
       	<property name="AITask-6" value="Look"/>
       	<property name="AITask-7" value="Wander"/>

 

I assume "territorial" and "wander" means they wander around but stay in the same area generally, which is what they are set to currently, but could be slowly lured away somewhat by roaming zombies. I think this gives the mod a fairly nice and balanced gameplay. You just have to get lucky currently, or go seeking them out for help if you have a big horde you want help with. You have to get even luckier to have them help you out with a blood moon horde. But even if you were able to call them over for a blood moon horde, they wouldn't be helping you out a LOT, especially as the hordes got harder, but they're still definitely helpful!

 

This makes sense out of their behavior for me. I don't mind their meandering in my direction as they do now at all. It's not particularly intrusive and yet theyre not far off once you've found one. Its so nice having markers on the map too. really nice addition. i specifically go looking for them when i'm mining or cutting wood. Usually they see the zombies before i do so you have a "guard dog" effect. Love that. Who wouldn't want that in a zombie apocolypse? I am legend here we come :) I also like that the zombies keep coming after me currently and ignore them. I know it's a game and this is irrational but i would still feel terrible if i got them killed-lol!

Link to comment
Share on other sites

Glad you enjoy! ^n.n^

 

There is seek out and attack, and then there is attack only if attacked. Currently, only the non-human zombies attack non-zombies, both seek and attack and also attack if attacked. I think in the A16.4 version of the mod, I had it set to all zombies would attack other non-zombies only if they were attacked. It should be the same for all zombies at the very least, so I need to change this for version 2.5. Either:

 

1. All zombies will seek out and attack all non-zombies.

 

2. All zombies will only attack non-zombies once they are attacked.

 

3. All zombies will only attack the player.

 

#3 means they will only focus on the player which means non-zombies will just attack them as they walk or run towards the player. I kind of like this since it means ultimately the player still needs to worry about the zombies coming for them.

 

I also like #2 because the zombies hitting back once they are hit looks a little more "realistic" (do zombies actually care though? lol).

 

#1 is more "realistic", that zombies should go after all non-zombies, but I kind of like the player always being the main focus of zombies, and like the other non-zombie animals being invisible and just stealthier helpers, so I tend to favor #2 or #3.

 

I could make a script, or multiple mod versions, for different configurations, so that everyone can pick the configuration they prefer.

 

What about a combination of 1 and 3? That way if you see one attacking a wolf, you rush in to the rescue. Once you hit the zombie, he only focuses on you because you are a player, not NPC. So if you are fast enough, you save your buddy, if not, they die and that death is on your soul.

Link to comment
Share on other sites

Well, I'm closer! This is a detached camera view of my player character.

 

Chromewolf ACTIVATE!

 

[ATTACH=CONFIG]26192[/ATTACH]

 

omg, that made me laugh and hit my knee on my glass desk. What about making them anthropomorphic animals? That way they still easily function like normal players, but have an animal look? That may be easier for now than having to work out kinks with quadrupedal models. And being anthropomorphic animals means you can leave in the rest of the game (weapons, building, harvesting) since it'd be doable but not doable as a quadrupedal model.

Link to comment
Share on other sites

Glad you like it! <3

 

As for making them follow you, I'd have to figure out what the best method for doing that would be. If you look in 7DtD/Data/Config/entityclasses.xml you'll see the entity_class property "AITask" of "ApproachDistraction". This makes entities investigate sounds, or at least sounds created by the player. What this does if given to wolves for example is make them run towards you as soon as they hear your footsteps, and since they can run fast, they stay right up against you the whole time (unless you sneak away somehow). One solution would be to make them walk slower, but if they were slower than zombies including zombie bears or zombie dogs then they wouldn't be able to help attack them unless they were standing still. Unfortunately, there are no places where "ApproachDistraction" is used with parameters that might help decrease the constant seeking of your footsteps other than making them not hear you from as far away (if that is even moddable, and I'm not entirely sure if it is at the moment). Unfortunately having them practically right on you at all times felt pretty game breaking, so I removed it, lol.

 

Sort-of do-able. Look in items.xml and search for Distraction. I know resourceSmallRock has it.

 

And the only response so far is saying that it's impossible to even use the wolf and other existing models/meshes/textures in place of a player character model. If you can't even do that, I highly doubt it's possible to utilize the wolf model for "vehicles" either. In other words, it doesn't appear that there is a way to mix the models between different types of entities together.

 

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.

Link to comment
Share on other sites

This makes sense out of their behavior for me. I don't mind their meandering in my direction as they do now at all. It's not particularly intrusive and yet theyre not far off once you've found one. Its so nice having markers on the map too. really nice addition. i specifically go looking for them when i'm mining or cutting wood. Usually they see the zombies before i do so you have a "guard dog" effect. Love that. Who wouldn't want that in a zombie apocolypse? I am legend here we come :) I also like that the zombies keep coming after me currently and ignore them. I know it's a game and this is irrational but i would still feel terrible if i got them killed-lol!

 

No need to fear, they're basically invincible! Changing spawning behavior to make them a little more or less rare, and to make sure they are spawning across all biomes, is something that was in the A16.4 version that I still need to implement in the new A17 version.

 

Also yes, love the new map markers as well! A new feature in A17 I think. ^n.n^

Link to comment
Share on other sites

omg, that made me laugh and hit my knee on my glass desk. What about making them anthropomorphic animals? That way they still easily function like normal players, but have an animal look? That may be easier for now than having to work out kinks with quadrupedal models. And being anthropomorphic animals means you can leave in the rest of the game (weapons, building, harvesting) since it'd be doable but not doable as a quadrupedal model.

 

I was shocked my player character ended up bipedal as previously it made them horizontal/quadrupedal. Can only do as much as the one existing asset allows, though. Not even sure if there is a fur texture available, let alone making them be animated like other players. It's entirely dependent on those four wolf assets that are available until and unless someone figures out how to add or modify them, so it's possible there is no fur texture yet. Will have to spend more time playing around with things. ^n.n^

Link to comment
Share on other sites

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^

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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

 

        	<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

Link to comment
Share on other sites

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^

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

 

<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

 

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.

Link to comment
Share on other sites

You're welcome! *snuggleslurps back* ^n.n^

 

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

 

<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

 

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 ;)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! ;)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...