InfoDatasetBase
Bases: Enum
This enum class is the base class for the UnitInfo, BuildingInfo, HeroInfo and OtherInfo datasets. It provides the properties and functions common to all the mentioned classes
Methods
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.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 |
|
Attributes¶
DEAD_ID: int
property
¶
int
Returns:
Type | Description |
---|---|
int
|
The Dead Unit ID of the specified unit |
HOTKEY_ID: int
property
¶
int
Returns:
Type | Description |
---|---|
int
|
The HotKey ID of the specified unit |
IS_GAIA_ONLY: bool
property
¶
bool
Returns:
Type | Description |
---|---|
bool
|
A boolean value indicating if the specified unit is a gaia only unit (e.g. Deer) |
Functions¶
def from_dead_id(...)
classmethod
¶
Finds and returns the unit with the given dead unit ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dead_id |
int
|
the dead unit ID to search for |
required |
Returns:
Type | Description |
---|---|
InfoDatasetBase
|
A unit with the given dead unit ID |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
132 133 134 135 136 137 138 139 140 141 142 143 |
|
def from_hotkey_id(...)
classmethod
¶
Finds and returns the unit with the given hotkey ID. Note that there may be multiple units that use the same hotkey ID, currently only one is returned!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hotkey_id |
int
|
the hotkey ID to search for |
required |
Returns:
Type | Description |
---|---|
InfoDatasetBase
|
A unit with the given hotkey ID |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
def from_icon_id(...)
classmethod
¶
Finds and returns the unit with the given icon ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
icon_id |
int
|
the icon ID to search for |
required |
Returns:
Type | Description |
---|---|
InfoDatasetBase
|
A unit with the given icon ID |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
119 120 121 122 123 124 125 126 127 128 129 130 |
|
def from_id(...)
classmethod
¶
Finds and returns the unit with the given unit ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
unit_id |
int
|
the unit ID to search for |
required |
Returns:
Type | Description |
---|---|
InfoDatasetBase
|
A unit with the given unit I |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
106 107 108 109 110 111 112 113 114 115 116 117 |
|
def gaia_only(...)
classmethod
¶
Returns:
Type | Description |
---|---|
List[InfoDatasetBase]
|
A list of all the gaia only units (e.g. Deer) |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
159 160 161 162 163 164 165 |
|
def non_gaia(...)
classmethod
¶
Returns:
Type | Description |
---|---|
List[InfoDatasetBase]
|
A list of all the units excluding gaia only units (e.g. militia) |
Source code in AoE2ScenarioParser/datasets/support/info_dataset_base.py
167 168 169 170 171 172 173 |
|