Jump to content

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


Swiftpaw

Recommended Posts

Is there any way to make them not jump? I've been looking through the code, but animals don't seem to have the jump strength stuff that zombies and players do.

 

No clue. Are they actually jumping or do they just have high block climbing/scaling capability when they walk? Because if so it might be called something else besides "jumping" in the code.

Link to comment
Share on other sites

No clue. Are they actually jumping or do they just have high block climbing/scaling capability when they walk? Because if so it might be called something else besides "jumping" in the code.

 

It might be a block scaling thing, yeah. Might not be as much of an issue now they're not trying to get away from us, though.

Link to comment
Share on other sites

  • 3 weeks later...
When do you plan 2.8. ? :)

 

I don't have any changes implemented yet aside from rolling back the Darkness Falls setting which currently isn't impacting anyway to my knowledge. I haven't gotten to play with any of the new ideas yet to see how or if they can be implemented. Here's my list so far:

 

1. Make friendlies spawn with a spawner that won't remove them upon game stop/starts, or getting too far away.

 

2. Buffs for being in proximity to friendlies.

 

3. Noise or call to summon friendlies to your position.

 

4. Add map markers for timid animals? Might get too cluttery but could be an optional feature.

 

5. Make friendlies appear on your compass as well as your map like air drops can.

 

That's what I have so far. Sorry if I missed someone's neat idea!

Link to comment
Share on other sites

  • 3 months later...
  • 4 weeks later...

Friendly Animals 2.9 released!

 

Change Log:

2.9:

* Added Darkness Falls compatibility version. Tested with Darkness Falls v2.11 but may work with other versions.

* Fixed buggy health.

* Fixed general mod compatibility version.

Link to comment
Share on other sites

  • 3 months later...
Friendly Animals 3.0 released!

 

Change Log:

3.0:

* Initial A18E Compatibility. Lost map compass markers for friendly animals, but they will return as soon as I figure out how to bring them back.

 

Look in the buffs file. There's a buff for tracking animals.

Link to comment
Share on other sites

Look in the buffs file. There's a buff for tracking animals.

 

Thanks! Yeah with what I read in entityclasses I assumed as much, but don't know how the system works yet and need to play with it. After looking in buffs, I realize what perkAT1 means! :D

 

I wonder if I should make a new separate buff just for friendly animals that is either learnable like perkAT or isn't and is always permanently on, or a way of just flipping map markers permanently on. While it could be cool to have separate learnable skills (if perkAT is a learnable skill) it's also more useful to know about friendly animal whereabouts early-game so perma-on might be better.

Link to comment
Share on other sites

Neat! Yep this code definitely got me excited:

 

	<property name="Tags" value="entity,animal,hostile,mountainlion,perkAT5"/>
<property name="MapIcon" value="ui_game_symbol_tracking_mountain_lion"/>
<property name="TrackerIcon" value="ui_game_symbol_tracking_mountain_lion"/>

 

I envision having friendlies being blue/green map markers, timids being green/yellow/white, and zombies being red. Something like that might be pretty cool! Although did they implement a mini-map? Because a mini-map or the ability to put them on your compass would be useful. I'll have to read about the AT perk because maybe they're already doing that since checking your big map constantly would be annoying!

Link to comment
Share on other sites

Sweet. Though I'm curious, I thought TFP patch notes say that the zombies now fight back against the animals, but they don't seem to do so with this mod? Is that intended?

 

I'm trying to fix animaltemplatehostile zombies so that they will seek out and attack the player. Right now in 3.0 it's broken. So here's the scoop on that. I'm trying to figure out this code:

 

	<property name="AITarget-2" value="BlockIf" data="condition=alert e 0"/>
<property name="AITarget-3" value="BlockingTargetTask"/>

 

I'm playing with it now to try to figure it out. What I think the behaviour should be is zombies don't seek to attack non-zombies, but will attack once attacked. My reasoning is:

 

  1. One non-zombie could stop a whole horde of zombies that seek them rather than continuing on towards the player, and that would be too game-breaking and powerful I think.
  2. It looks silly if zombies never fight back once attacked though, so I figure having them at least respond is fine. This way, single zombies in a horde will turn around and attack the non-zombie, but the rest of the zombie horde will continue forward possibly towards the player.

 

So I want zombies to seek the player, not other non-zombies, but respond to attacks (SetAsTargetIfHurt). It looks like the above code is the problem and is indeed causing some task/behaviours to be blocked such as making them not fight back when attacked, and preventing them from ever seeking out the player.

 

Once I got that corrected, I'll release 3.1.

Link to comment
Share on other sites

I couldn't get

 

	<property name="AITarget-2" value="BlockIf" data="condition=alert e 0"/>

 

to stop throwing the error "Specified cast is not valid" so I gave up and removed that code, so now it's just:

 

		<property name="AITask-1" value="BreakBlock"/>
	<property name="AITask-2" value="DestroyArea"/>
	<property name="AITask-3" value="Territorial"/>
	<property name="AITask-4" value="ApproachDistraction"/>
	<property name="AITask-5" value="ApproachAndAttackTarget" data="class=EntityPlayer,0,EntityNPC,0"/>
	<property name="AITask-6" value="ApproachSpot"/>
	<property name="AITask-7" value="Look"/>
	<property name="AITask-8" value="Wander"/>
	<property name="AITarget-1" value="SetAsTargetIfHurt" data="class=EntityPlayer,EntityNPC,EntityAnimalStag"/>
	<property name="AITarget-2" value="BlockingTargetTask"/>
	<property name="AITarget-3" value="SetNearestEntityAsTarget" data="class=EntityPlayer,18,13,EntityAnimalStag,0,0"/>

 

The only problem is that I can't get zombies to attack back when being attacked by non-zombies. Even though "SetAsTargetIfHurt" contains "EntityAnimalStag" which is the class that non-zombies are, zombies won't fight back. If they're set in "ApproachAndAttackTarget" then, as THAT one suggests, zombies will approach and attack EntityAnimalStags. So there's no happy medium. Either zombies all-out attack non-zombies, or they completely ignore non-zombies even when non-zombies are attacking them which makes no sense. Maybe "SetAsTargetIfHurt" is bugged.

 

Regardless, this code fixes the bug where EntityEnemyAnimals won't attack the player like normal which is kind of game breaking, so I'm releasing it.

Link to comment
Share on other sites

Friendly Animals 3.1 released!

 

Change Log:

3.1:

* Fixed bug preventing zombie bears, zombie vultures, and zombie dogs from attacking players.

* Zombies still not attacking back after being attacked by non-zombies other than the player as "SetAsTargetIfHurt" won't behave, but once that is figured out, that feature will return.

Link to comment
Share on other sites

  • 2 weeks later...
It looks like they have a new code type since a17. Attackifhurt-animals,30,30 or something like that in the entityclasses.xml

 

There is no "attackif" in the latest entityclasses.xml, and instead this exists:

 

	<property name="AITarget-1" value="SetAsTargetIfHurt"/>

 

or

 

	<property name="AITarget-1" value="SetAsTargetIfHurt" data="class=EntityNPC,EntityPlayer"/>

 

FriendlyAnimals does this for all zombies:

 

	<property name="AITask-1" value="BreakBlock" />
<property name="AITask-2" value="DestroyArea" />
<property name="AITask-3" value="Territorial" />
<property name="AITask-4" value="ApproachDistraction" />
<property name="AITask-5" value="ApproachAndAttackTarget" data="class=[b][color="#FF0000"]EntityPlayer,0,EntityNPC,0[/color][/b]"><!--Attribute "data" replaced by: "Friendly Animals"--></property> <!-- class,maxChaseTime (return home) -->
<property name="AITask-6" value="ApproachSpot" />
<property name="AITask-7" value="Look" />
<property name="AITask-8" value="Wander" />
<property name="AITarget-1" value="SetAsTargetIfHurt" data="class=[b][color="#FF0000"]EntityPlayer,EntityNPC,EntityAnimalStag[/color][/b]"><!--Attribute "data" replaced by: "Friendly Animals"--></property>
<property name="AITarget-2" value="BlockingTargetTask" />
<property name="AITarget-3" value="SetNearestCorpseAsTarget" data="class=EntityPlayer" />
<property name="AITarget-4" value="SetNearestEntityAsTarget" data="class=[b][color="#FF0000"]EntityPlayer,0,0,EntityNPC,0,0,EntityAnimalStag,0,0[/color][/b]"><!--Attribute "data" replaced by: "Friendly Animals"--></property> <!-- class, hear distance, see dist (checked left to right, 0 dist uses entity default) -->

 

instead of the default:

 

	<property name="AITask-1" value="BreakBlock"/>
<property name="AITask-2" value="DestroyArea"/>
<property name="AITask-3" value="Territorial"/>
<property name="AITask-4" value="ApproachDistraction"/>
<property name="AITask-5" value="ApproachAndAttackTarget" data="class=[b][color="#FF0000"]EntityNPC,0,EntityEnemyAnimal,0,EntityPlayer,0[/color][/b]"/> <!-- class,maxChaseTime (return home) -->
<property name="AITask-6" value="ApproachSpot"/>
<property name="AITask-7" value="Look"/>
<property name="AITask-8" value="Wander"/>
<property name="AITarget-1" value="SetAsTargetIfHurt" data="class=[b][color="#FF0000"]EntityNPC,EntityEnemyAnimal,EntityPlayer[/color][/b]"/>
<property name="AITarget-2" value="BlockingTargetTask"/>
<property name="AITarget-3" value="SetNearestCorpseAsTarget" data="class=EntityPlayer"/>
<property name="AITarget-4" value="SetNearestEntityAsTarget" data="class=[b][color="#FF0000"]EntityPlayer,0,0,EntityNPC,0,0[/color][/b]"/> <!-- class, hear distance, see dist (checked left to right, 0 dist uses entity default) -->

 

This way, zombies won't attack "EntityEnemyAnimal" because they are zombies too, and this mod isn't zombie vs. zombie, it's zombie vs. living.

 

If I put "EntityAnimalStag" for "ApproachAndAttackTarget" too, then the zombies always will attack friendlies which isn't what I want since that means one coyote can attract and hold off an entire horde of zombies instead of only stopping one of the zombies by them turning and hitting back once attacked like I'm wanting. Not stopping any of them until this gets fixed is fine too though, but I just wish I knew if this was a bug in the game or a bug in my code!

Link to comment
Share on other sites

Hmmm, that's interesting. Seems odd that if you are trying to make it "stag" that it seems to mean "anything", lol. I would assume that it's a bug on their end, especially if they are still having issues with zombies fighting back if attacked by wildlife.

 

Currently working on this to only have wolves and dire wolves friendly, everything else still hostile. More of wolves/humans vs everything (basically the same idea when wolves were first animal to be partners with humans to survive).

 

Also, I found a mod that allows you to summon huskies as well, so got me thinking on if it's possible to make it as a perk, and essentially turn that into being a pet. This way you can summon your own wolf to follow and fight with you, or maybe just be able to summon it like any other item that's static (campfire, forge, etc) and have it guard say a 10x10 block area where placed. Possibly both? One schematic for "war" wolf and one for "guard" wolf? I have a lot more that I want to do with it, but that alone would be cool and a starting point for full-blown pets.

 

Sadly I now have less time than I did at the beginning of the year, so less free time and rather play than research this atm :p

Link to comment
Share on other sites

I could easily add more species to the game such as huskies if there is a mod out there which contains a husky entity. If that mod also had them spawning under special situations I could add that feature too if it fit properly with FA, but making them spawn randomly just like all other friendlies should be easy enough.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...