| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Warlord
Join Date: Dec 2009
Location: Western USA
Posts: 211
|
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 Last edited by fulano; Feb 18, 2010 at 08:39 AM. Reason: Updating list |
|
|
|
|
|
#2 |
|
Warlord
Join Date: Dec 2009
Location: Western USA
Posts: 211
|
Mostly, if someone could clarify the ones I have wrong and the ones with a "??" I would greatly appreciate it and I'm sure future people will too.
Unless I just haven't found a resource somebody already made, if that's the case please direct me to it. |
|
|
|
|
|
#3 |
|
Deity
![]() Join Date: Apr 2006
Location: New York State
Posts: 4,859
|
UNITAI_ATTACK_CITY_LEMMING is for a unit to attack a city no matter what (ie, it ignores combat odds and anything else that would normally cause a unit to do something else); it's used for the barbarian revolt events.
__________________
Mods: Convert Production to Espionage, FinalFronterFlat, The Road to War Ultimate Edition for BtS 3.19, Star Trek |
|
|
|
|
|
#4 |
|
Immortal
Join Date: Mar 2007
Location: Indianapolis
Posts: 2,320
|
UNITAI_CITY_SPECIAL is also on machine gun. Yea its for units that should stay in cities basically.
__________________
"Know thy self, know thy enemy. A thousand battles, a thousand victories. " - Sun Tzu Shiggs Earth - A ciV map and mod CivEarth.com - a fanatics site for multi-player Earth Scenario's for cIV & ciV |
|
|
|
|
|
#5 |
|
Warlord
Join Date: Dec 2009
Location: Western USA
Posts: 211
|
Thanks! I updated the list so far.
Could a person add this to a guided missile and cause the AI to use guided missiles to attack cities more often than just UNITAI_ATTACK_CITY? |
|
|
|
|
|
#6 |
|
Warlord
Join Date: Dec 2007
Posts: 259
|
AI_RESERVE is used to designate a unit the AI should build a lot of, in other words, to build up a reserve of such units. In case of war, break out the reserve units.
Well, that's somewhat close. It's basically used to designate units you can't have to many of. When in doubt and with no pressing need, build something from the reserve list.
__________________
"The glory of friendship is not the outstretched hand, nor the kindly smile nor the joy of companionship; it is the spiritual inspiration that comes to one when he discovers that someone else believes in him and is willing to trust him." -Ralph Waldo Emerson Contrary to popular belief, not all games are about death, violence and brutality. Some are about ponies too. |
|
|
|
|
|
#7 |
|
Immortal
Join Date: Mar 2007
Location: Indianapolis
Posts: 2,320
|
yea many units that have AI_RESERVE also have AI_CITY_COUNTER, I didn't look but I'd imagine those AI's are on units such as riflemen, grenadiers, or infantry.
__________________
"Know thy self, know thy enemy. A thousand battles, a thousand victories. " - Sun Tzu Shiggs Earth - A ciV map and mod CivEarth.com - a fanatics site for multi-player Earth Scenario's for cIV & ciV |
|
|
|
|
|
#8 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
UNITAI_CITY_COUNTER are units that should stay in cities to counter specific attacking units. Like cavalry that stay in a city to be able to do flanking attacks on enemy catapults. Or crossbows that stay in cities to attack melee units.
EDIT: Upon actually reading the vanilla unitinfo.xml, it's clear that this UNITAI_CITY_COUNTER is for units that have a native combat bonus against other unit classes/types. So it has nothing to do with flanking. But you are right that they should stay in cities when using that UNITAI.
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
Last edited by Ninja2; Feb 18, 2010 at 07:13 AM. Reason: Clarification |
|
|
|
|
|
#9 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
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 For unit AIs that are correct in the OP, I didn't write anything. Last edited by phungus420; Feb 18, 2010 at 07:44 AM. |
|
|
|
|
|
#10 |
|
Warlord
Join Date: Dec 2009
Location: Western USA
Posts: 211
|
You guys are awesome! Thanks for helping out!!
I just have a few more questions if somebody could clarify for me it would be great!: -Do the _SEA ai's have to be for water units? Can a land carrier use the CARRIER_SEA units? -What's the difference between UNITAI_MISSILE_AIR and UNITAI_ICBM? -Can you give something like UNITAI_ATTACK_CITY to bombers to encourage the AI to use bombers against cities? |
|
|
|
|
|
#11 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
Setting a UnitAI type that is designed for a certain domain for a unit not of that domain type almost never works. In general the unit will just stay frozen in one spot. You can of course test any of those specific questions pretty easily. Just enable debug mode, and go into WB and manually set the unit's AI type to what you want to test, and see what the AI does.
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| <iAsset>, <iPower> and <bIgnoreIrrigation> tags in TechInfo.xml | FatWalker | Civ4 - Creation & Customization | 3 | Dec 26, 2008 05:03 PM |
| The <civName> people from the city of <cityName> have seen their homes burned! | Ericino | Civ4 - General Discussions | 9 | Nov 10, 2008 10:00 PM |
| Where are the xml files that set <description> & <ShortDescription>? | Lonkut | Civ4 - Creation & Customization | 2 | Jan 05, 2007 05:58 PM |
| << BLITZKRIEG 1942 - Last chapter in the BK-trilogy released!>> | Eivind IV | Civ2 - Scenario Creation | 9 | Dec 02, 2004 08:55 AM |