Pirate AI for land unit

peter450

Prince
Joined
Sep 24, 2006
Messages
392
I am thinking of adding a Assasin/Ninja unit to my game

It's basically going to be a national unit, only with a low numbers limit

Basically it's going to be a privateer on land, as in it will have no nationality and be able to get attacked/attack anyone

Will the AI be able to work it, or is pirate AI for ships only? if so i'l just give it a counter unit AI or something, i'm sure the AI will fuddle through, but would prefer to use pirate AI if it will work?
 
there is currently no pirate AI for land units. :( dunno if this can be coded.
 
If i used a attack AI or counter AI would it work as in, run around and attack etc, even if the ai uses it rather shoddily?
 
No, will be used like any other normal unit. The AI won't attack without declaring war.
 
Is there a way for me to tell the AI not to build this unit at all?, no point in me handicapping it with a unit it cant use
 
There's no good UNITAI for a land pirate.

You could give it the UNITAI_EXPLORE ... they AI won't try to build many, but will occasionally send one out and would attack or pillage with it if it came across the right situation.

UNITAI_PILLAGE would almost be okay, except that it would group with other non-hidden nationality units sometimes.

The AI will lose these units very quickly though after the mid-game, when all other AIs have many units sitting around checking for any attacks they can make every turn.
 
Thats the problem, hence why i'm tending towards the tell it not to build it

<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI> is there a command i can put in here? or do i have to put every ai routine in the not unit ai field?

<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
 
Look at the privateer for your answer.

You will need to set the default to UNITAI_EXPLORE and the unitAIs field with a single type, ie the same UNITAI_EXPLORE, and you'll need to set the notunitAI field with all unitAI types that could be relevant (basically everything pertaining to ground units except missionary, spy and merchant)
 
Thanks, this may sound like a silly question but i take it the unitai_explore also needs to go in the no unit ai list, or will that cause a conflict?
 
Thanks, this may sound like a silly question but i take it the unitai_explore also needs to go in the no unit ai list, or will that cause a conflict?
That will cause a conflict, you can't tell it to give it that and only that UnitAI and then tell it it can't use it :lol:

Like I said, look at the privateer, it should be self explanitory if you use the privateer as a model (just substitute UNITAI_PIRATE for UNITAI_EXPLORE, and for all the notUnitAis fill it with all relevant ground UnitAI types, like I said, pretty much everything except UNITAI_MISSIONARY, UNITAI_SPY, and UNITAI_MERCHANT --you don't need to exclude these three because the AI will never consider a combat unit able to use them anyway)
 
I think i finally get it, thanks took me a while to get me head around all this AI stuff
 
Back
Top Bottom