UnitAIType (Civ5 Type)
From Civilization Modding Wiki
Jump to navigationJump to search
This page is a part of the Lua and UI Reference (Civ5).
The UnitAIType pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!
|
XML: the UnitAIInfos table
Here are the ID and Type columns found in this table.
ID
Type
0
UNITAI_UNKNOWN
1
UNITAI_SETTLE
2
UNITAI_WORKER
3
UNITAI_ATTACK
4
UNITAI_CITY_BOMBARD
5
UNITAI_FAST_ATTACK
6
UNITAI_DEFENSE
7
UNITAI_COUNTER
8
UNITAI_RANGED
9
UNITAI_CITY_SPECIAL
10
UNITAI_EXPLORE
11
UNITAI_ARTIST
12
UNITAI_SCIENTIST
13
UNITAI_GENERAL
14
UNITAI_MERCHANT
15
UNITAI_ENGINEER
16
UNITAI_ICBM
17
UNITAI_WORKER_SEA
18
UNITAI_ATTACK_SEA
19
UNITAI_RESERVE_SEA
20
UNITAI_ESCORT_SEA
21
UNITAI_EXPLORE_SEA
22
UNITAI_ASSAULT_SEA
23
UNITAI_SETTLER_SEA
24
UNITAI_CARRIER_SEA
25
UNITAI_MISSILE_CARRIER_SEA
26
UNITAI_PIRATE_SEA
27
UNITAI_ATTACK_AIR
28
UNITAI_DEFENSE_AIR
29
UNITAI_CARRIER_AIR
30
UNITAI_MISSILE_AIR
31
UNITAI_PARADROP
32
UNITAI_SPACESHIP_PART
33
UNITAI_TREASURE
34
UNITAI_PROPHET
35
UNITAI_MISSIONARY
36
UNITAI_INQUISITOR
37
UNITAI_ADMIRAL
Examples
Used by
int
|
City:GetNumTrainUnitAI(UnitAIType unitAI)
|
UnitAIType
|
City:GetProductionUnitAI()
|
|
Player:AddFreeUnit(UnitType arg0, UnitAIType UNITAI_DEFENSE)
|
Unit
|
Player:InitUnit(UnitType unit, ResourceType x, ResourceType y, UnitAIType unitAI = NO_UNITAI, DirectionType facingDirection = NO_DIRECTION)
|
int
|
Unit:GetUnitAICargo(UnitAIType unitAI)
|
UnitAIType
|
Unit:GetUnitAIType()
|
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.