Jump to content

Looking for help adding a new emotion state "warnHerdOnDamage"


Thalius

Recommended Posts

Greetings...

I've been working on a mod that modifies the ai of animals in the game to be more dynamic with regard to the way they relate to each other as well as to the player.  I was able to pretty much achieve what I was looking for, but it broke the taming mechanics in the process. If you don't care to tame sheep and pigs, then it works as intended, but is not a good fit for a multiplayer server.

I have no skill in understanding the core game code much less how to manipulate and patch it, so I'm putting this request up here to see if anyone is interested.

After a lot of thought, this is what I think would most easily provide what is needed to get the desired results and leave taming mechanics untouched:

I am looking for an emotion state called something along the lines of "warnHerdOnDamage".  This emotion state would cause the herd to be warned when a member of the herd was attacked, and the herd would flee.  This would be more in line with they way their natural behavior would work anyway, which is what I'm looking for. 

Basically I want to take the "alarmHerdOnDamage" emotion state and make "warnHerdOnDamge" do the opposite and make the herd flee rather than become aggressive.  I don't want to alter "alarmHerdOnDamage" because that emotion state is still needed and useful in various cases.

A patch file that would add this emotion state to the game and that I could include in the mod I'm working on would be very useful and much appreciated, if it can be done.

~TH~

  • Like 2
Link to comment
Share on other sites

Still looking for help with this, if anyone might be interested. I have no idea how hard it would be to add this, honestly. I would think it would be simple, since all that is basically needed is copying the "alarmherdondamage" code, changing the code name where needed, and changing the effect on the herd from making them aggressive to the player to making them flee the player, then patching that as an addition to the game.  I have no ability to understand where any of that is in the code though, much less how to make the changes, so it could be much more complicated than I think. Not nearly as straight forward as tinkering with .json files.

I'll bump this from time to time till an interested party comes along or until we have something like this added to the core ai emotion state options.

Link to comment
Share on other sites

Could also call the emotion state "startled" or something like that.
Honestly, when I first looked at the .json file for bighorn sheep, I thought "alarmherdondamage" was an emotion state that would cause the herd to flee. Did not take lot to figure out it was doing the opposite.

What I want to achieve is one emotion state that would, for instance, cause a pack of wolves or hyenas to turn and confront a threat with hostility, (which is what "alarmherdondamage" gives us), and another emotion state that will cause a herd of entities like sheep and pigs to flee when a herd member takes damage.  For that we need a new emotion state.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.