Opened 12 years ago
Last modified 4 years ago
#1192 new enhancement
[PATCH] Improve animal UnitAI behavior
Reported by: | Zaggy1024 | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
Currently, the feeding code in UnitAI makes the deer (and any other animals set up to use this code), when they're idle, constantly feed, and when they're walking, never feed at all. The way the gazelle is set up, it randomly begins eating while idling or walking with no continuity to the previous animation that was playing.
Attachments (1)
Change History (12)
by , 12 years ago
Attachment: | public.diff added |
---|
comment:2 by , 12 years ago
Keywords: | review added |
---|---|
Summary: | Improve animal UnitAI behavior → [PATCH] Improve animal UnitAI behavior |
comment:3 by , 12 years ago
what about a DRINKING state ? Deer, elephants and other fauna very occasionally move to a river or water hole (in group?) for water ( needs new animation).
This is not only realistic, it makes hunting around water holes and rivers much more rewarding. In that way, you could see the water hole or river as an indirect resource 'an sich'. Also: wouldnt mind seeing a deer pulled in the water by a croc :D
comment:4 by , 12 years ago
It might be nice to have some sort of setup where the random movement code makes animals tend towards lower altitude (maybe), but making a new DRINKING state would probably be unnecessary since, when animals walk towards water (and therefore into a position where they could be drinking), they would be pointing towards the water (most likely) and so the FEEDING state would look just as fine as a DRINKING state.
About deer getting pulled in the water by a croc, I think that's detail that would take too long to make to be worth it (if it's even possible the with the set of functions exposed to JS).
comment:5 by , 12 years ago
Milestone: | Alpha 9 → Alpha 10 |
---|
comment:6 by , 12 years ago
Keywords: | patch added |
---|
comment:7 by , 12 years ago
Alternatively: extend or rewrite the animation system to support interpolation between animations, with hand-crafted transition animations as an option. UnitAI isn't really intended for fine control of animations.
comment:8 by , 12 years ago
Keywords: | patch, review → patch review |
---|---|
Milestone: | Alpha 10 → Alpha 11 |
comment:9 by , 12 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 11 → Backlog |
comment:10 by , 10 years ago
Owner: | removed |
---|
The modified UnitAI.js in the diff makes animals have the following states:
Added a <Feeds> boolean element to the <UnitAI> element in entity templates.