XsManager
Classes¶
XsManagerDE
¶
Bases: AoE2Object
Manager of everything XS related.
Source code in AoE2ScenarioParser/objects/managers/de/xs_manager_de.py
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 |
|
Attributes¶
Functions¶
def __init__(...)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
script_name |
str
|
- | required |
kwargs |
? | - |
{}
|
Source code in AoE2ScenarioParser/objects/managers/de/xs_manager_de.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
def add_script(...)
¶
Add a script to the script call effect in the XS trigger
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xs_file_path |
str
|
Path to an XS file |
''
|
xs_string |
str
|
Raw XS |
''
|
Source code in AoE2ScenarioParser/objects/managers/de/xs_manager_de.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
def initialise_xs_trigger(...)
¶
Creates the XS trigger on a desired location. If you don't care about the location, the add_script()
function
adds the trigger when calling it the first time too.
If you want the trigger to be (almost) at the top of the list, and you're reading a scenario with barely any to no triggers, it is recommended to call this somewhere at the start of the script.
Insert index is used to move this trigger to a desired index. Keep in mind that moving triggers like this might take some time when you have a lot of triggers (thousands).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
insert_index |
int
|
The index where the xs trigger is added. Will be added at the end of the list if left empty |
-1
|
Source code in AoE2ScenarioParser/objects/managers/de/xs_manager_de.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 |
|