MrCrayfish / ImprovedWolves

Makes wolves smarter!
Other
18 stars 6 forks source link

Suggestion: Further "whistle" commands, more AI improvements #7

Open IdrisQe opened 4 years ago

IdrisQe commented 4 years ago

Whistling to get a wolf to move an item from your inventory is great, but it would be super cool to be able to get your wolf to do other things using the same "whistle and point" functionality.

Some ideas: -While pointing at a mob: Attack/Call off attack -While pointing at the ground: Walk here and sit -While pointing at dog: Long distance sit/follow toggle -While pointing at lever/button/pressure plate/door/trapdoor/etc: Activate/toggle/open/close this -While pointing at an item on the ground (including Tridents/Arrows lodged into blocks that would be retrievable): Fetch that and bring it to me -While pointing at a dog bowl: Enter a "patrol mode" around the bowl, not following, but not staying stationary either, while attacking hostile mobs that get too close. -While pointing to the air/at the side or bottom of non-commandable block: Tell the dog to switch between passive and aggressive modes (see below).

I also have some generic AI improvement suggestions: -Wolves would have two modes: Passive and Aggressive. In Passive, they would follow, but mostly just alert you to mobs, trying to avoid them, only getting involved and attacking if you're very injured and need the backup, as well as trying to maintain distance if you're fighting with melee weapons. In Aggressive mode, they'd act like usual. -While player is holding/charging a bow/crossbow, the dog will break away from combat and try to get out of the way. -When the dog is on low health it will turn to fleeing from mobs instead of continuing to attack until death if no food bowl is nearby. -If multiple dogs are following, they will form a sort of queue, so that if one is currently performing a command for you, the others will follow along but try not to get in the way of the "alpha" who is leading the queue. -If a mob gets close to you and you don't have a weapon equipped/aren't looking at the mob, the dog will bark a lot to alert you to the mob's presence (and attack if in aggressive mode), instead of just attacking.

No idea how feasible any of this is since AI code is pretty complex at times, but a lot of this is stuff I've not seen other wolf mods do before, which is honestly surprising.