AoE2DEScenario
Attributes¶
Classes¶
AoE2DEScenario
¶
Bases: AoE2Scenario
Used to represent a scenario with version >= 1.36 (DE). It is the main class that is exposed to the user of the API.
Source code in AoE2ScenarioParser/scenarios/aoe2_de_scenario.py
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 |
|
Attributes¶
LATEST_VERSION: Tuple[int, int] = (1, 54)
class-attribute
instance-attribute
¶
Tuple[int, int]
Value:
(1, 54)
trigger_manager: TriggerManagerDE
property
¶
TriggerManagerDE
The trigger manager of the scenario
Functions¶
def from_default(...)
classmethod
¶
Creates and returns a default instance of the AoE2DEScenario class
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario_version |
Optional[Union[str, Tuple[int, int]]]
|
The scenario version to generate |
None
|
Returns:
Type | Description |
---|---|
S
|
An instance of the AoE2DEScenario class which is the object representation of the default scenario |
Source code in AoE2ScenarioParser/scenarios/aoe2_de_scenario.py
56 57 58 59 60 61 62 63 64 65 66 67 |
|
def from_file(...)
classmethod
¶
Creates and returns an instance of the AoE2DEScenario class from the given scenario file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to the scenario file to create the object from |
required |
game_version |
str
|
The version of the game to create the object for |
'DE'
|
name |
str
|
The name given to this scenario (defaults to the filename without extension) |
''
|
Returns:
Type | Description |
---|---|
S
|
An instance of the AoE2DEScenario class which is the object representation of the given scenario file |
Source code in AoE2ScenarioParser/scenarios/aoe2_de_scenario.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|