UNITAI_ATTACK, at least that's the default AI for the units I experienced this with; and I experienced it so much that I felt it was completely safe to move into the same plot as barbarians as long as he didn't have a friend in an adjacent plot that would attack.
Ok... I'll look into it.
BTW, I suppose you're probably wondering why animals set to spawn inside borders aren't doing so even when not playing the Animals Stay Out option (ASO option).
I probably forgot to mention that I have implemented a few things in the code for this. First of all, I changed bAnimalIgnoresBorders and bAnimalIgnoresBordersChange tags to iAnimalIgnoresBorders and iAnimalIgnoresBordersChange tags. From a boolean to an integer.
The way it currently works is that if the ASO option is off, and the spawn is 0 on bNeutralOnly, then there's a third check to validate an animal spawning within borders.
This also applies to where animals can move within civilization borders so it's applicable to BOTH spawns AND general movement rules. However, consider, when reading the rule change I'm about to explain, that promotions only add to an animals ability to encroach on human territory after the animal has been spawned. Even free promotions cannot factor into the spawning rules for the animal, only the base iAnimalIgnoresBorders tag on the unit info and any of the animal's unitcombats that have further iAnimalIgnoresBordersChange tag usage will total to establish the capability of an animal to spawn.
So the rule is this:
- If an animal's total AnimalIgnoresBorders tags sum up to 3 or more, the animal can enter cities (if they have this from unitcombats and base info alone they can spawn in cities.) This also means the animal automatically qualifies to be considered capable of blending into cities harmlessly and therefore only assassination can target them there.
- If an animal's total AnimalIgnoresBorders tags sum up to 2 or more, the animal can enter owned and improved tiles (but not cities.) They can spawn on such tiles if from unitcombats and base info total this high.
- If an animal's total AnimalIgnoresBorders tags sum up to 1 or more, the animal can enter owned territory but not if the tile is improved. They can spawn on such tiles if from unitcombats and base info total this high.
This rule has gone into effect in the code already and I'm sorry I've been so foggy headed here as to forget to mention this earlier.
If you follow me on what I've explained here, feel free to set animals however you feel will be correct with these tags.