aggressive animals + enter to cultural borders?

Isn't it sufficient just to not flag those units as "animals"? Then they behave just like any (barbarian) unit.
 
Well, I do believe it would be possible to catch any animal units created with a Python call-up and have a script manually change the UnitAIType. Because changing it from UnitAIType.UNITAI_ANIMAL to something else than the default setting should do the trick.
Spoiler :
CvEventManager.py:
Code:
	def onUnitCreated(self, argsList):
		'Unit Completed'
		unit = argsList[0]

[COLOR="Red"]		if gc.getUnitInfo(unit.getUnitType()).isAnimal():
			unit.setUnitAIType(UnitAITypes.UNITAI_ATTACK)[/COLOR]
 
What about it doesn't work? I know its possible to change the UnitAIType, and if I give UNITAI_ANIMAL to any unit, it will act like an animal unit. So I'd expect the opposite to be true, also. But I guess not, then. :dunno:
 
They don't behave like it. To ensure that "animals" also appear later in my mod, every turn later on some are spawned, but with the attack AI. They can't enter the civs territory, at least that's what i currently remember.
Might be worth again a try to find out what exactly might be needed to change there.
 
Glad to hear it worked out for you keldath, I used the same code for my own personal mod (wholly unreleased, done more as a learning thing way back)

IIRC, I changed it so that they wouldn't enter cities, it makes sense that they would kill an early settlement, but I just found it so annoying (<-IMHO, probably cause I like to wait a little before training combat units for city defense)
 
ahh nice, ah new mod from you,

thats good news!

well - i saw the result of the animals, i used in in two dlls i have,
with one it worked with the other - i did a quick test and didnt see animals get in borders,
but i think i need to give those animals a unitai attack, which i did in my first test.
 
While I am updating my mod, I never released the one I added the animal code from....

It was part of the first mod I did, I only did it for me and I never released it

I couldn't release it now even if I wanted to, I lost it 3 computers ago.....
 
Top Bottom