animals on water

By "animals" you mean units with the unit AI type "UNITAI_ANIMAL"? Because the unit type itself isn't restricting you to spawn the animal type units anywhere.

Have you simple tried spawning the units with a different AI setting? Like "UNITAI_EXPLORE".
 
hi,

yes i know the unitai does not affect the restriction,

im talking about the <banimal/>, basically - animals are just barbarian units spawned on land terrain without a barbarian city, and they cannot enter cultoral borders,

what i wish to achieve is that those animal units will - be able to be spawn on ocean and coast - using <terrainnative> and that they will be able to enter to cultural borders of any civ and attack/pillage.
 
So its the other way around then? The unit AI setting doesn't restrict the animal type units from entering cultural borders? (I think I'll have to test the behavior of "animal" units.)
 
yeah im pretty sure the unitai just controls what the ai will do with that unit, i think the banimal affects the units properties.
Since controlling AI behavior is so difficult I'm always experimenting with unit AI settings. Like using UNITAI_SETTLER or UNITAI_UNKNOWN actually has its uses in some cases. (These settings will make units find a "good spot" and then stay there - and to stay put, respectively. Very handy for scenario making, as you don't want the AI to wander off with the units you're spawning for it!)

but i think making the animals spawned on water will be trickier right?
I don't know. Are you talking about the default settings for barbarian spawns in the game, or about creating your own spawns with CyPlayer.initUnit()? Because I've been able to spawn any type of unit on any type of plot with the latter... (Its restricting these spawns to the right type of plot that is the tricky part!)

so i hope you can help me in any way,
Oh, I'm not your man. I realize I shouldn't have answered at all in the first place. I'll just have to remind myself not to try help anyone out on this particular board, as there are very qualified programmers doing the helping here! And I'm not very qualified for much of anything. :p
 
Oh, I'm not your man. I realize I shouldn't have answered at all in the first place. I'll just have to remind myself not to try help anyone out on this particular board, as there are very qualified programmers doing the helping here! And I'm not very qualified for much of anything.

oh no no if you cant help that's ok, its also nice that someone shows interest.

UNITAI_UNKNOWN - what does that do??



and im talking abut like you have lions spawned in early game- i want other animals - to be also spawned during the game in water plots, thats all.
 
oh no no if you cant help that's ok, its also nice that someone shows interest.
I do wanna help out, but I'm clearly out-knowledged on this board. :lol:

UNITAI_UNKNOWN - what does that do??
I think I wasn't being clear. AFAIK the unit will do absolutely nothing. Useful for stationary units, like native tribes occupying select tiles or sentry units that doesn't just wander off...

But I like to spawn tribal type units with UNITAI_SETTLE and have them find good city locations - and guard them. That way your exploring units aren't gonna be attacked by these peaceful savages - you will need to relocate these tribal warriors if you wanna build cities on these sweet spots! :D

and im talking abut like you have lions spawned in early game- i want other animals - to be also spawned during the game in water plots, thats all.
Yeah, but are you gonna use the built in feature in CivIV to spawn your barbarians, or are you open to using your own Python code to spawn these units? I can't see why you can't just spawn those units yourself, on random turns and on random tiles. The trick, as I said before, would be to restrict these spawns to ocean/coastal plots.

As an example, Rhye has disabled barbarian spawns (the built-in type) entirely in the RFC mod. Instead, he has included a Barbs Python module that will spawn barbarian units - both on land (also animals) and on sea (pirates). This way he has been able to use the barbarian Civ for historical spawns instead of random ones.
 
smeagolheart,

hi! i know this one yeah, but i wasnt aware theres version 0.4, plus im not so sure ill be able to merge the python - but i will try, thank you so much!

Baldyr, the thing is i dont know python or sdk, im just a merger,

thanks anyway ill use what smeagolheart was kind enough to link me with.
 
AFAIK the only point of the bAnimal flag is to prevent entering cultural borders. If you don't want that behavior, can you take off bAnimal? This is what I did in Fury Road to allow animals to enter. If you need bAnimal for something else, you may need to have somebody do an sdk mod to split the one flag into two flags.
 
It is as davdlallen said, the bAnimal tag prevents you from entering owned tiles but UNITAI_ANIMAL is used to spawn animals. There is also a check if the plot is not water in CvGame::createAnimals().

Oh, thanks :).

But seriously: It would make a lot more sense if it was right in the other way.
 
Not exactly relevant, but animals also have a limit on XP from them so you can't get more if you are over the limit and it is separate from the barbarian limit (controlled by ANIMAL_MAX_XP_VALUE in GlobalDefines.xml). This is also triggered by the bAnimal value in CvUnit::maxXPValue().
 
Back
Top Bottom