fulano
Warlord
I've searched for a while and can't find a list that actually explains what each UnitAI does, so I decided to start a thread and make a guess so more experienced people can correct me and there will be a list for others to use.
I made my guesses from looking at CvUnitAI.cpp (I barely understand C++myself) and from looking at the civ4 units themselves. Please post any corrections that might help me and future users looking for help on this.
UNITAI_ANIMAL: Animal, explores and attacks, avoids culture
UNITAI_SETTLE: Settler, use this to create settlements
UNITAI_WORKER: Worker, use this to improve terrain
UNITAI_ATTACK: Use this to attack other units
UNITAI_ATTACK_CITY: Use this to attack cities
UNITAI_COLLATERAL: Use this to cause collateral to wear down stronger units
UNITAI_PILLAGE: Use this to destroy improvements
UNITAI_RESERVE: Build this unit when nothing else is immediately needed (build lots of them)
UNITAI_COUNTER: Use this unit to protect against specific units
UNITAI_PARADROP: This unit can paradrop (when does the AI use this?)
UNITAI_CITY_DEFENSE: Use this to defend cities
UNITAI_CITY_COUNTER: Units with bonuses against others that are to defend cities.
UNITAI_CITY_SPECIAL: Leave this unit in cities (like machine guns)
UNITAI_EXPLORE: Use this for exploring
UNITAI_MISSIONARY: Used to spread religion
UNITAI_ATTACK_AIR: Air unit used for attacking
UNITAI_DEFENSE_AIR: Air unit for defending against air units
UNITAI_CARRIER_AIR: Use to fill carriers
UNITAI_MISSILE_AIR: AI for missiles
UNITAI_ATTACK_CITY_LEMMING: Use to attack cities, ignoring combat odds. (Used for barbarian revolt events)
UNITAI_ICBM: Use for nukes
UNITAI_SPY: Use as a spy.
Great people AIs: Mostly self explanitory.
UNITAI_PROPHET:
UNITAI_ARTIST:
UNITAI_SCIENTIST:
UNITAI_GENERAL:
UNITAI_MERCHANT:
UNITAI_ENGINEER:
Same as above except for water use. Doesn't really need descriptions I think.
UNITAI_WORKER_SEA:
UNITAI_ATTACK_SEA:
UNITAI_RESERVE_SEA:
UNITAI_ESCORT_SEA:
UNITAI_EXPLORE_SEA:
UNITAI_ASSAULT_SEA:
UNITAI_SETTLER_SEA:
UNITAI_MISSIONARY_SEA:
UNITAI_SPY_SEA:
UNITAI_CARRIER_SEA:
UNITAI_MISSILE_CARRIER_SEA:
UNITAI_PIRATE_SEA:
phungus420's info for BAI. I'm sure it's very similar to the vanilla AI.
This is based on BBAI, so default BtS may be slightly different:
UNITAI_ATTACK: General purpose; unit prioritizes joining an attack stack, but also may wander off on search and destroy/explore, sit in a city and defend it, etc.
UNITAI_ATTACK_CITY: Join an attack stack -> If in an attack stack, lead assault on a city once the AI decides the stack should attack a city
UNITAI_COLLATERAL: Similar to UNITAI_ATTACK_CITY, but may also attack enemy stacks in the field
UNITAI_PILLAGE: Causes unit to wander off by itself into enemy territory and pillage stuff
UNITAI_RESERVE: Primary use - Floating defenders to shuffle around between threatened cities. Also is a priority UNITAI type for the AI to change if it needs units of another type (the AI will frequently change reserve units to attack units once it starts warplans, for instance)
UNITAI_COUNTER: Join an attack stack -> if in stack may leave stack to attack adjacent tiles with enemy units
UNITAI_CITY_COUNTER: Same as UNITAI_COUNTER, but for cities instead of stacks
UNITAI_PARADROP: Hold in reserve and drop into enemy territory; very similar to UNITAI_PILLAGE, except units drop deep into enemy territory
UNITAI_CITY_DEFENSE: Defend a city, never leave the city
UNITAI_CITY_SPECIAL: Basically the same as UNITAI_CITY_DEFENSE, except the AI deprioritizes this type if a city already has a defender of this AI type, meaning that the AI in unmodded BtS, the AI only ever builds a single machine gun in it's cities
UNITAI_EXPLORE: Wander around prioritizing terrain that hasn't been revealed until unit is killed
UNITAI_ATTACK_AIR: Air Unit used for bombing
UNITAI_CARRIER_AIR: Similar to UNITAI_ATTACK_AIR, but prioritizes filling up carriers
UNITAI_ATTACK_CITY_LEMMING: beeline enemy cities and Suicide against enemy units
UNITAI_ICBM: Hold unit, and then launch when at war
UNITAI_SPY: Basic spy AI (prioritize going into enemy territory and running spy missions - In base BtS this is purely random, with the spys basically wandering around and rolling dice, in BBAI the spys prioritize high value missions and improvements)
UNITAI_WORKER_SEA: Build sea improvement, if none is available explore
UNITAI_ATTACK_SEA: Basic sea AI, wander around the oceans in search and destroy mode, join a stack, etc
UNITAI_RESERVE_SEA: Similar to UNITAI_RESERVE except for sea units
UNITAI_ESCORT_SEA: Join a stack
UNITAI_EXPLORE_SEA: Wander around the oceans prioritizing moving into unexplored territory until unit dies
UNITAI_ASSAULT_SEA: Transport land units for sea assault, launch when a sufficient assault stack is ready; forms core of water domain stacks
UNITAI_SETTLER_SEA: Ferry settlers and workers over water tiles
UNITAI_MISSIONARY_SEA: Ferry missionaries over water tiles
UNITAI_SPY_SEA: Ferry spys over water tiles
UNITAI_CARRIER_SEA: Be a mobile air base for UNITAI_CARRIER_AIR units
UNITAI_MISSILE_CARRIER_SEA: similar to UNITAI_CARRIER_SEA but for missiles
UNITAI_PIRATE_SEA: Wander around pointlessly, sometimes run a blockade if the die roll tells you to and you are in enemy territory
Great people AIs:
UNITAI_PROPHET: Prioritize Building a Shrine and prioritize the religion of which there are the most cities of if multiple shrines can be built; if no shrine can be built, roll dice to decide whether to start a golden age or settle in a high value city (probably the capital)
UNITAI_ARTIST: Not sure what the behavior of this type is actually
UNITAI_SCIENTIST: Build an academy in a high priority city (most likely capital); if no good cities are available for this mission, roll dice to decide whether to settle in a high priority city or start a golden age
UNITAI_GENERAL: Roll dice to decide whether to join a unit or not, if not (most likely scenario), Build a military academy in a high priority city; if no acceptable city is available to build an MA in, join a high priority city (almost always the capital)
UNITAI_MERCHANT: Roll dice to decide if unit should Find best city to conduct trade mission in and do so, or start a golden age, or join a high priority city
UNITAI_ENGINEER: Build an available wonder. If no wonder is available to rush, roll dice to decide whether to start a golden age, or join high priority city
I made my guesses from looking at CvUnitAI.cpp (I barely understand C++myself) and from looking at the civ4 units themselves. Please post any corrections that might help me and future users looking for help on this.
UNITAI_ANIMAL: Animal, explores and attacks, avoids culture
UNITAI_SETTLE: Settler, use this to create settlements
UNITAI_WORKER: Worker, use this to improve terrain
UNITAI_ATTACK: Use this to attack other units
UNITAI_ATTACK_CITY: Use this to attack cities
UNITAI_COLLATERAL: Use this to cause collateral to wear down stronger units
UNITAI_PILLAGE: Use this to destroy improvements
UNITAI_RESERVE: Build this unit when nothing else is immediately needed (build lots of them)
UNITAI_COUNTER: Use this unit to protect against specific units
UNITAI_PARADROP: This unit can paradrop (when does the AI use this?)
UNITAI_CITY_DEFENSE: Use this to defend cities
UNITAI_CITY_COUNTER: Units with bonuses against others that are to defend cities.
UNITAI_CITY_SPECIAL: Leave this unit in cities (like machine guns)
UNITAI_EXPLORE: Use this for exploring
UNITAI_MISSIONARY: Used to spread religion
UNITAI_ATTACK_AIR: Air unit used for attacking
UNITAI_DEFENSE_AIR: Air unit for defending against air units
UNITAI_CARRIER_AIR: Use to fill carriers
UNITAI_MISSILE_AIR: AI for missiles
UNITAI_ATTACK_CITY_LEMMING: Use to attack cities, ignoring combat odds. (Used for barbarian revolt events)
UNITAI_ICBM: Use for nukes
UNITAI_SPY: Use as a spy.
Great people AIs: Mostly self explanitory.
UNITAI_PROPHET:
UNITAI_ARTIST:
UNITAI_SCIENTIST:
UNITAI_GENERAL:
UNITAI_MERCHANT:
UNITAI_ENGINEER:
Same as above except for water use. Doesn't really need descriptions I think.
UNITAI_WORKER_SEA:
UNITAI_ATTACK_SEA:
UNITAI_RESERVE_SEA:
UNITAI_ESCORT_SEA:
UNITAI_EXPLORE_SEA:
UNITAI_ASSAULT_SEA:
UNITAI_SETTLER_SEA:
UNITAI_MISSIONARY_SEA:
UNITAI_SPY_SEA:
UNITAI_CARRIER_SEA:
UNITAI_MISSILE_CARRIER_SEA:
UNITAI_PIRATE_SEA:
phungus420's info for BAI. I'm sure it's very similar to the vanilla AI.
This is based on BBAI, so default BtS may be slightly different:
UNITAI_ATTACK: General purpose; unit prioritizes joining an attack stack, but also may wander off on search and destroy/explore, sit in a city and defend it, etc.
UNITAI_ATTACK_CITY: Join an attack stack -> If in an attack stack, lead assault on a city once the AI decides the stack should attack a city
UNITAI_COLLATERAL: Similar to UNITAI_ATTACK_CITY, but may also attack enemy stacks in the field
UNITAI_PILLAGE: Causes unit to wander off by itself into enemy territory and pillage stuff
UNITAI_RESERVE: Primary use - Floating defenders to shuffle around between threatened cities. Also is a priority UNITAI type for the AI to change if it needs units of another type (the AI will frequently change reserve units to attack units once it starts warplans, for instance)
UNITAI_COUNTER: Join an attack stack -> if in stack may leave stack to attack adjacent tiles with enemy units
UNITAI_CITY_COUNTER: Same as UNITAI_COUNTER, but for cities instead of stacks
UNITAI_PARADROP: Hold in reserve and drop into enemy territory; very similar to UNITAI_PILLAGE, except units drop deep into enemy territory
UNITAI_CITY_DEFENSE: Defend a city, never leave the city
UNITAI_CITY_SPECIAL: Basically the same as UNITAI_CITY_DEFENSE, except the AI deprioritizes this type if a city already has a defender of this AI type, meaning that the AI in unmodded BtS, the AI only ever builds a single machine gun in it's cities
UNITAI_EXPLORE: Wander around prioritizing terrain that hasn't been revealed until unit is killed
UNITAI_ATTACK_AIR: Air Unit used for bombing
UNITAI_CARRIER_AIR: Similar to UNITAI_ATTACK_AIR, but prioritizes filling up carriers
UNITAI_ATTACK_CITY_LEMMING: beeline enemy cities and Suicide against enemy units
UNITAI_ICBM: Hold unit, and then launch when at war
UNITAI_SPY: Basic spy AI (prioritize going into enemy territory and running spy missions - In base BtS this is purely random, with the spys basically wandering around and rolling dice, in BBAI the spys prioritize high value missions and improvements)
UNITAI_WORKER_SEA: Build sea improvement, if none is available explore
UNITAI_ATTACK_SEA: Basic sea AI, wander around the oceans in search and destroy mode, join a stack, etc
UNITAI_RESERVE_SEA: Similar to UNITAI_RESERVE except for sea units
UNITAI_ESCORT_SEA: Join a stack
UNITAI_EXPLORE_SEA: Wander around the oceans prioritizing moving into unexplored territory until unit dies
UNITAI_ASSAULT_SEA: Transport land units for sea assault, launch when a sufficient assault stack is ready; forms core of water domain stacks
UNITAI_SETTLER_SEA: Ferry settlers and workers over water tiles
UNITAI_MISSIONARY_SEA: Ferry missionaries over water tiles
UNITAI_SPY_SEA: Ferry spys over water tiles
UNITAI_CARRIER_SEA: Be a mobile air base for UNITAI_CARRIER_AIR units
UNITAI_MISSILE_CARRIER_SEA: similar to UNITAI_CARRIER_SEA but for missiles
UNITAI_PIRATE_SEA: Wander around pointlessly, sometimes run a blockade if the die roll tells you to and you are in enemy territory
Great people AIs:
UNITAI_PROPHET: Prioritize Building a Shrine and prioritize the religion of which there are the most cities of if multiple shrines can be built; if no shrine can be built, roll dice to decide whether to start a golden age or settle in a high value city (probably the capital)
UNITAI_ARTIST: Not sure what the behavior of this type is actually
UNITAI_SCIENTIST: Build an academy in a high priority city (most likely capital); if no good cities are available for this mission, roll dice to decide whether to settle in a high priority city or start a golden age
UNITAI_GENERAL: Roll dice to decide whether to join a unit or not, if not (most likely scenario), Build a military academy in a high priority city; if no acceptable city is available to build an MA in, join a high priority city (almost always the capital)
UNITAI_MERCHANT: Roll dice to decide if unit should Find best city to conduct trade mission in and do so, or start a golden age, or join a high priority city
UNITAI_ENGINEER: Build an available wonder. If no wonder is available to rush, roll dice to decide whether to start a golden age, or join high priority city