Skip to content

TerrainId

Bases: IntEnum

This enum class provides information about most of the terrains in the game. Information about the following properties of a terrain is found in this class:

  • Terrain ID

Methods

Examples

Source code in AoE2ScenarioParser/datasets/terrains.py
  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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
class TerrainId(IntEnum):
    """
    This enum class provides information about most of the terrains in the game. Information about the
    following properties of a terrain is found in this class:

     - Terrain ID

    **Methods**





    **Examples**



    """

    @staticmethod
    def water_terrains() -> List[TerrainId]:
        """
        Returns:
            A list of all Water terrains
        """
        return [
            TerrainId.WATER_DEEP,
            TerrainId.WATER_AZURE,
            TerrainId.WATER_BROWN,
            TerrainId.WATER_GREEN,
            TerrainId.WATER_MEDIUM,
            TerrainId.WATER_2D_BRIDGE,
            TerrainId.WATER_2D_SHORELESS,
            TerrainId.WATER_DEEP_OCEAN,
            TerrainId.WATER_SHALLOW,
        ]

    @staticmethod
    def beach_terrains() -> List[TerrainId]:
        """
        Returns:
            A list of all Beach terrains
        """
        return [
            TerrainId.BEACH,
            TerrainId.BEACH_ICE,
            TerrainId.BEACH_VEGETATION,
            TerrainId.BEACH_WET,
            TerrainId.BEACH_WET_GRAVEL,
            TerrainId.BEACH_WET_ROCK,
            TerrainId.BEACH_WHITE,
            TerrainId.BEACH_WHITE_VEGETATION,
        ]

    @staticmethod
    def tree_terrains() -> List[TerrainId]:
        """
        Returns:
            A list of all Tree terrains
        """
        return [
            TerrainId.FOREST_ACACIA,
            TerrainId.FOREST_AUTUMN,
            TerrainId.FOREST_AUTUMN_SNOW,
            TerrainId.FOREST_BAMBOO,
            TerrainId.FOREST_BAOBAB,
            TerrainId.FOREST_BIRCH,
            TerrainId.FOREST_BUSH,
            TerrainId.FOREST_DEAD,
            TerrainId.FOREST_DRAGON_TREE,
            TerrainId.FOREST_JUNGLE,
            TerrainId.FOREST_MANGROVE,
            TerrainId.FOREST_MEDITERRANEAN,
            TerrainId.FOREST_OAK,
            TerrainId.FOREST_OAK_BUSH,
            TerrainId.FOREST_PALM_DESERT,
            TerrainId.FOREST_PINE,
            TerrainId.FOREST_PINE_SNOW,
            TerrainId.FOREST_RAINFOREST,
            TerrainId.FOREST_REEDS,
            TerrainId.FOREST_REEDS_BEACH,
            TerrainId.FOREST_REEDS_SHALLOWS,
        ]

    BEACH = 2
    BEACH_NON_NAVIGABLE = 79
    BEACH_NON_NAVIGABLE_WET_GRAVEL = 81
    BEACH_NON_NAVIGABLE_WET_ROCK = 82
    BEACH_NON_NAVIGABLE_WET_SAND = 80
    BEACH_ICE = 37
    BEACH_VEGETATION = 52
    BEACH_WET = 107
    BEACH_WET_GRAVEL = 108
    BEACH_WET_ROCK = 109
    BEACH_WHITE = 53
    BEACH_WHITE_VEGETATION = 51
    BLACK = 47
    DESERT_CRACKED = 45
    DESERT_QUICKSAND = 46
    DESERT_SAND = 14
    DIRT_1 = 6
    DIRT_2 = 11
    DIRT_3 = 3
    DIRT_4 = 42
    DIRT_MUD = 76
    DIRT_SAVANNAH = 41
    FARM = 7
    FARM_0 = 29
    FARM_33 = 30
    FARM_67 = 31
    FARM_DEAD = 8
    FOREST_ACACIA = 50
    FOREST_AUTUMN = 104
    FOREST_AUTUMN_SNOW = 105
    FOREST_BAMBOO = 18
    FOREST_BAOBAB = 49
    FOREST_BIRCH = 110
    FOREST_BUSH = 89
    FOREST_DEAD = 106
    FOREST_DRAGON_TREE = 48
    FOREST_JUNGLE = 17
    FOREST_MANGROVE = 55
    FOREST_MEDITERRANEAN = 88
    FOREST_OAK = 10
    FOREST_OAK_BUSH = 20
    FOREST_PALM_DESERT = 13
    FOREST_PINE = 19
    FOREST_PINE_SNOW = 21
    FOREST_RAINFOREST = 56
    FOREST_REEDS = 92
    FOREST_REEDS_BEACH = 91
    FOREST_REEDS_SHALLOWS = 90
    GRASS_1 = 0
    GRASS_2 = 12
    GRASS_3 = 9
    GRASS_DRY = 100
    GRASS_FOUNDATION = 27
    GRASS_JUNGLE = 60
    GRASS_JUNGLE_RAINFOREST = 83
    GRASS_OTHER = 16
    GRAVEL_DEFAULT = 70
    GRAVEL_DESERT = 102
    ICE = 35
    ICE_NAVIGABLE = 26
    MODDABLE_GRASS_1 = 84
    MODDABLE_GRASS_2 = 85
    MODDABLE_GRASS_3 = 86
    MODDABLE_GRASS_4 = 87
    MODDABLE_DEEP_WATER = 99
    MODDABLE_NORMAL_WATER_1 = 97
    MODDABLE_NORMAL_WATER_2 = 98
    MODDABLE_SHALLOWS_1 = 93
    MODDABLE_SHALLOWS_2 = 94
    OBSOLETE_LEAVES_JUNGLE = 62
    OBSOLETE_ROAD_DESERT = 43
    OBSOLETE_ROAD_FUNGUS = 39
    OBSOLETE_ROAD_GRAVEL = 103
    OBSOLETE_ROAD_JUNGLE = 61
    OBSOLETE_ROAD_SNOW = 38
    OBSOLETE_SNOW_DIRT = 33
    OBSOLETE_SNOW_GRASS = 34
    RESERVED = 68
    RICE_FARM = 63
    RICE_FARM_0 = 65
    RICE_FARM_33 = 66
    RICE_FARM_67 = 67
    RICE_FARM_DEAD = 64
    ROAD = 24
    ROAD_BROKEN = 25
    ROAD_FUNGUS = 75
    ROAD_GRAVEL = 78
    ROCK_1 = 40
    SHALLOWS = 4
    SHALLOWS_AZURE = 59
    SHALLOWS_MANGROVE = 54
    SNOW = 32
    SNOW_FOUNDATION = 36
    SNOW_LIGHT = 73
    SNOW_STRONG = 74
    SWAMP = 111
    SWAMP_BOGLAND = 101
    UNDERBUSH = 5
    UNDERBUSH_JUNGLE = 77
    UNDERBUSH_LEAVES = 71
    UNDERBUSH_SNOW = 72
    VERY_EVIL_FOG = 69
    WATER_2D_BRIDGE = 28
    WATER_2D_SHORELESS = 15
    WATER_AZURE = 58
    WATER_BROWN = 96
    WATER_DEEP = 22
    WATER_DEEP_OCEAN = 57
    WATER_GREEN = 95
    WATER_MEDIUM = 23
    WATER_SHALLOW = 1

Attributes

BEACH = 2 class-attribute instance-attribute

Value: 2

BEACH_ICE = 37 class-attribute instance-attribute

Value: 37

BEACH_NON_NAVIGABLE = 79 class-attribute instance-attribute

Value: 79

BEACH_NON_NAVIGABLE_WET_GRAVEL = 81 class-attribute instance-attribute

Value: 81

BEACH_NON_NAVIGABLE_WET_ROCK = 82 class-attribute instance-attribute

Value: 82

BEACH_NON_NAVIGABLE_WET_SAND = 80 class-attribute instance-attribute

Value: 80

BEACH_VEGETATION = 52 class-attribute instance-attribute

Value: 52

BEACH_WET = 107 class-attribute instance-attribute

Value: 107

BEACH_WET_GRAVEL = 108 class-attribute instance-attribute

Value: 108

BEACH_WET_ROCK = 109 class-attribute instance-attribute

Value: 109

BEACH_WHITE = 53 class-attribute instance-attribute

Value: 53

BEACH_WHITE_VEGETATION = 51 class-attribute instance-attribute

Value: 51

BLACK = 47 class-attribute instance-attribute

Value: 47

DESERT_CRACKED = 45 class-attribute instance-attribute

Value: 45

DESERT_QUICKSAND = 46 class-attribute instance-attribute

Value: 46

DESERT_SAND = 14 class-attribute instance-attribute

Value: 14

DIRT_1 = 6 class-attribute instance-attribute

Value: 6

DIRT_2 = 11 class-attribute instance-attribute

Value: 11

DIRT_3 = 3 class-attribute instance-attribute

Value: 3

DIRT_4 = 42 class-attribute instance-attribute

Value: 42

DIRT_MUD = 76 class-attribute instance-attribute

Value: 76

DIRT_SAVANNAH = 41 class-attribute instance-attribute

Value: 41

FARM = 7 class-attribute instance-attribute

Value: 7

FARM_0 = 29 class-attribute instance-attribute

Value: 29

FARM_33 = 30 class-attribute instance-attribute

Value: 30

FARM_67 = 31 class-attribute instance-attribute

Value: 31

FARM_DEAD = 8 class-attribute instance-attribute

Value: 8

FOREST_ACACIA = 50 class-attribute instance-attribute

Value: 50

FOREST_AUTUMN = 104 class-attribute instance-attribute

Value: 104

FOREST_AUTUMN_SNOW = 105 class-attribute instance-attribute

Value: 105

FOREST_BAMBOO = 18 class-attribute instance-attribute

Value: 18

FOREST_BAOBAB = 49 class-attribute instance-attribute

Value: 49

FOREST_BIRCH = 110 class-attribute instance-attribute

Value: 110

FOREST_BUSH = 89 class-attribute instance-attribute

Value: 89

FOREST_DEAD = 106 class-attribute instance-attribute

Value: 106

FOREST_DRAGON_TREE = 48 class-attribute instance-attribute

Value: 48

FOREST_JUNGLE = 17 class-attribute instance-attribute

Value: 17

FOREST_MANGROVE = 55 class-attribute instance-attribute

Value: 55

FOREST_MEDITERRANEAN = 88 class-attribute instance-attribute

Value: 88

FOREST_OAK = 10 class-attribute instance-attribute

Value: 10

FOREST_OAK_BUSH = 20 class-attribute instance-attribute

Value: 20

FOREST_PALM_DESERT = 13 class-attribute instance-attribute

Value: 13

FOREST_PINE = 19 class-attribute instance-attribute

Value: 19

FOREST_PINE_SNOW = 21 class-attribute instance-attribute

Value: 21

FOREST_RAINFOREST = 56 class-attribute instance-attribute

Value: 56

FOREST_REEDS = 92 class-attribute instance-attribute

Value: 92

FOREST_REEDS_BEACH = 91 class-attribute instance-attribute

Value: 91

FOREST_REEDS_SHALLOWS = 90 class-attribute instance-attribute

Value: 90

GRASS_1 = 0 class-attribute instance-attribute

Value: 0

GRASS_2 = 12 class-attribute instance-attribute

Value: 12

GRASS_3 = 9 class-attribute instance-attribute

Value: 9

GRASS_DRY = 100 class-attribute instance-attribute

Value: 100

GRASS_FOUNDATION = 27 class-attribute instance-attribute

Value: 27

GRASS_JUNGLE = 60 class-attribute instance-attribute

Value: 60

GRASS_JUNGLE_RAINFOREST = 83 class-attribute instance-attribute

Value: 83

GRASS_OTHER = 16 class-attribute instance-attribute

Value: 16

GRAVEL_DEFAULT = 70 class-attribute instance-attribute

Value: 70

GRAVEL_DESERT = 102 class-attribute instance-attribute

Value: 102

ICE = 35 class-attribute instance-attribute

Value: 35

ICE_NAVIGABLE = 26 class-attribute instance-attribute

Value: 26

MODDABLE_DEEP_WATER = 99 class-attribute instance-attribute

Value: 99

MODDABLE_GRASS_1 = 84 class-attribute instance-attribute

Value: 84

MODDABLE_GRASS_2 = 85 class-attribute instance-attribute

Value: 85

MODDABLE_GRASS_3 = 86 class-attribute instance-attribute

Value: 86

MODDABLE_GRASS_4 = 87 class-attribute instance-attribute

Value: 87

MODDABLE_NORMAL_WATER_1 = 97 class-attribute instance-attribute

Value: 97

MODDABLE_NORMAL_WATER_2 = 98 class-attribute instance-attribute

Value: 98

MODDABLE_SHALLOWS_1 = 93 class-attribute instance-attribute

Value: 93

MODDABLE_SHALLOWS_2 = 94 class-attribute instance-attribute

Value: 94

OBSOLETE_LEAVES_JUNGLE = 62 class-attribute instance-attribute

Value: 62

OBSOLETE_ROAD_DESERT = 43 class-attribute instance-attribute

Value: 43

OBSOLETE_ROAD_FUNGUS = 39 class-attribute instance-attribute

Value: 39

OBSOLETE_ROAD_GRAVEL = 103 class-attribute instance-attribute

Value: 103

OBSOLETE_ROAD_JUNGLE = 61 class-attribute instance-attribute

Value: 61

OBSOLETE_ROAD_SNOW = 38 class-attribute instance-attribute

Value: 38

OBSOLETE_SNOW_DIRT = 33 class-attribute instance-attribute

Value: 33

OBSOLETE_SNOW_GRASS = 34 class-attribute instance-attribute

Value: 34

RESERVED = 68 class-attribute instance-attribute

Value: 68

RICE_FARM = 63 class-attribute instance-attribute

Value: 63

RICE_FARM_0 = 65 class-attribute instance-attribute

Value: 65

RICE_FARM_33 = 66 class-attribute instance-attribute

Value: 66

RICE_FARM_67 = 67 class-attribute instance-attribute

Value: 67

RICE_FARM_DEAD = 64 class-attribute instance-attribute

Value: 64

ROAD = 24 class-attribute instance-attribute

Value: 24

ROAD_BROKEN = 25 class-attribute instance-attribute

Value: 25

ROAD_FUNGUS = 75 class-attribute instance-attribute

Value: 75

ROAD_GRAVEL = 78 class-attribute instance-attribute

Value: 78

ROCK_1 = 40 class-attribute instance-attribute

Value: 40

SHALLOWS = 4 class-attribute instance-attribute

Value: 4

SHALLOWS_AZURE = 59 class-attribute instance-attribute

Value: 59

SHALLOWS_MANGROVE = 54 class-attribute instance-attribute

Value: 54

SNOW = 32 class-attribute instance-attribute

Value: 32

SNOW_FOUNDATION = 36 class-attribute instance-attribute

Value: 36

SNOW_LIGHT = 73 class-attribute instance-attribute

Value: 73

SNOW_STRONG = 74 class-attribute instance-attribute

Value: 74

SWAMP = 111 class-attribute instance-attribute

Value: 111

SWAMP_BOGLAND = 101 class-attribute instance-attribute

Value: 101

UNDERBUSH = 5 class-attribute instance-attribute

Value: 5

UNDERBUSH_JUNGLE = 77 class-attribute instance-attribute

Value: 77

UNDERBUSH_LEAVES = 71 class-attribute instance-attribute

Value: 71

UNDERBUSH_SNOW = 72 class-attribute instance-attribute

Value: 72

VERY_EVIL_FOG = 69 class-attribute instance-attribute

Value: 69

WATER_2D_BRIDGE = 28 class-attribute instance-attribute

Value: 28

WATER_2D_SHORELESS = 15 class-attribute instance-attribute

Value: 15

WATER_AZURE = 58 class-attribute instance-attribute

Value: 58

WATER_BROWN = 96 class-attribute instance-attribute

Value: 96

WATER_DEEP = 22 class-attribute instance-attribute

Value: 22

WATER_DEEP_OCEAN = 57 class-attribute instance-attribute

Value: 57

WATER_GREEN = 95 class-attribute instance-attribute

Value: 95

WATER_MEDIUM = 23 class-attribute instance-attribute

Value: 23

WATER_SHALLOW = 1 class-attribute instance-attribute

Value: 1

Functions


def beach_terrains(...) staticmethod

Returns:

Type Description
List[TerrainId]

A list of all Beach terrains

Source code in AoE2ScenarioParser/datasets/terrains.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@staticmethod
def beach_terrains() -> List[TerrainId]:
    """
    Returns:
        A list of all Beach terrains
    """
    return [
        TerrainId.BEACH,
        TerrainId.BEACH_ICE,
        TerrainId.BEACH_VEGETATION,
        TerrainId.BEACH_WET,
        TerrainId.BEACH_WET_GRAVEL,
        TerrainId.BEACH_WET_ROCK,
        TerrainId.BEACH_WHITE,
        TerrainId.BEACH_WHITE_VEGETATION,
    ]

def tree_terrains(...) staticmethod

Returns:

Type Description
List[TerrainId]

A list of all Tree terrains

Source code in AoE2ScenarioParser/datasets/terrains.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@staticmethod
def tree_terrains() -> List[TerrainId]:
    """
    Returns:
        A list of all Tree terrains
    """
    return [
        TerrainId.FOREST_ACACIA,
        TerrainId.FOREST_AUTUMN,
        TerrainId.FOREST_AUTUMN_SNOW,
        TerrainId.FOREST_BAMBOO,
        TerrainId.FOREST_BAOBAB,
        TerrainId.FOREST_BIRCH,
        TerrainId.FOREST_BUSH,
        TerrainId.FOREST_DEAD,
        TerrainId.FOREST_DRAGON_TREE,
        TerrainId.FOREST_JUNGLE,
        TerrainId.FOREST_MANGROVE,
        TerrainId.FOREST_MEDITERRANEAN,
        TerrainId.FOREST_OAK,
        TerrainId.FOREST_OAK_BUSH,
        TerrainId.FOREST_PALM_DESERT,
        TerrainId.FOREST_PINE,
        TerrainId.FOREST_PINE_SNOW,
        TerrainId.FOREST_RAINFOREST,
        TerrainId.FOREST_REEDS,
        TerrainId.FOREST_REEDS_BEACH,
        TerrainId.FOREST_REEDS_SHALLOWS,
    ]

def water_terrains(...) staticmethod

Returns:

Type Description
List[TerrainId]

A list of all Water terrains

Source code in AoE2ScenarioParser/datasets/terrains.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@staticmethod
def water_terrains() -> List[TerrainId]:
    """
    Returns:
        A list of all Water terrains
    """
    return [
        TerrainId.WATER_DEEP,
        TerrainId.WATER_AZURE,
        TerrainId.WATER_BROWN,
        TerrainId.WATER_GREEN,
        TerrainId.WATER_MEDIUM,
        TerrainId.WATER_2D_BRIDGE,
        TerrainId.WATER_2D_SHORELESS,
        TerrainId.WATER_DEEP_OCEAN,
        TerrainId.WATER_SHALLOW,
    ]