Skip to content

UnitAIAction

Bases: _DataSetIntEnums

This enum class provides the integer values used to reference the unit AI actions in the game. Used in the 'Object Has Action' condition.

Examples

Source code in AoE2ScenarioParser/datasets/trigger_lists/unit_ai_action.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class UnitAIAction(_DataSetIntEnums):
    """
    This enum class provides the integer values used to reference the unit AI actions in the game. Used in the 'Object
    Has Action' condition.

    **Examples**



    """
    ANY = 0
    """Fires if the unit has any action"""
    ATTACK = 1
    """Fires when the unit is attacking any unit"""
    BUILD = 3
    """Unknown"""
    CONVERT = 5
    """Fires when a monk or missionary is converting any unit"""
    DEFEND = 2
    """Unknown"""
    ENTER = 18
    """Unknown"""
    EVADE = 17
    """Unknown"""
    EXPLORE = 6
    """Unknown"""
    FOLLOW = 13
    """Fires when a unit is following any unit"""
    GATHER = 10
    """Fires when a villager or fishing ship is gathering resources"""
    HEAL = 4
    """Fires when a monk or missionary is healing another unit"""
    HUNT = 14
    """
    Fires when a hunter is gathering from a corpse of a hunted animal. Does **NOT** fire when the hunter is chasing the
    animal
    """
    IDLE = 24
    """Fires when a unit is standing still"""
    MOVE = 11
    """Fires when a unit is moving"""
    PATROL = 12
    """Fires when a unit is patrolling"""
    RELIC = 23
    """Unknown"""
    REPAIR = 19
    """Fires when a villager is repairing any other unit"""
    RESEARCH = 21
    """Unknown"""
    RETREAT = 9
    """Unknown"""
    RUNAWAY = 8
    """Unknown"""
    STOP = 7
    """Unknown"""
    TRADE = 16
    """Fires when a trade cart is returning to any of its own player's markets"""
    TRAIN = 20
    """Unknown"""
    TRANSPORT = 15
    """Unknown"""
    UNLOAD = 22
    """Fires when a transport ship is tasked to unload objects. Note that the transport gets stuck in this state!"""

Attributes

ANY = 0 class-attribute instance-attribute

Value: 0

Fires if the unit has any action

ATTACK = 1 class-attribute instance-attribute

Value: 1

Fires when the unit is attacking any unit

BUILD = 3 class-attribute instance-attribute

Value: 3

Unknown

CONVERT = 5 class-attribute instance-attribute

Value: 5

Fires when a monk or missionary is converting any unit

DEFEND = 2 class-attribute instance-attribute

Value: 2

Unknown

ENTER = 18 class-attribute instance-attribute

Value: 18

Unknown

EVADE = 17 class-attribute instance-attribute

Value: 17

Unknown

EXPLORE = 6 class-attribute instance-attribute

Value: 6

Unknown

FOLLOW = 13 class-attribute instance-attribute

Value: 13

Fires when a unit is following any unit

GATHER = 10 class-attribute instance-attribute

Value: 10

Fires when a villager or fishing ship is gathering resources

HEAL = 4 class-attribute instance-attribute

Value: 4

Fires when a monk or missionary is healing another unit

HUNT = 14 class-attribute instance-attribute

Value: 14

Fires when a hunter is gathering from a corpse of a hunted animal. Does NOT fire when the hunter is chasing the animal

IDLE = 24 class-attribute instance-attribute

Value: 24

Fires when a unit is standing still

MOVE = 11 class-attribute instance-attribute

Value: 11

Fires when a unit is moving

PATROL = 12 class-attribute instance-attribute

Value: 12

Fires when a unit is patrolling

RELIC = 23 class-attribute instance-attribute

Value: 23

Unknown

REPAIR = 19 class-attribute instance-attribute

Value: 19

Fires when a villager is repairing any other unit

RESEARCH = 21 class-attribute instance-attribute

Value: 21

Unknown

RETREAT = 9 class-attribute instance-attribute

Value: 9

Unknown

RUNAWAY = 8 class-attribute instance-attribute

Value: 8

Unknown

STOP = 7 class-attribute instance-attribute

Value: 7

Unknown

TRADE = 16 class-attribute instance-attribute

Value: 16

Fires when a trade cart is returning to any of its own player's markets

TRAIN = 20 class-attribute instance-attribute

Value: 20

Unknown

TRANSPORT = 15 class-attribute instance-attribute

Value: 15

Unknown

UNLOAD = 22 class-attribute instance-attribute

Value: 22

Fires when a transport ship is tasked to unload objects. Note that the transport gets stuck in this state!