Aoe2scenarioparser

Latest version: v0.2.15

Safety actively analyzes 703159 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 17 of 18

0.0.13

Fixed

- Issue introduced in `0.0.12`

---

0.0.12

**Support for the new update!**

**Important notice:** This version does not support older versions of the scenario files. This is temporary due to the amount of changes from the newest version (Update: 42848), sorry for the inconvience.
When loading a map from an older version, instructions will be provided for downgrading this library or updating the scenario to the newest version.

Added

- `create_hill` function to the map_manager (Credits: pvallet)
- **[Update 42848]** `script_name` (xs file) to the MapManager
- **[Update 42848]** The new effects!!
- `Set Building Gather Point`
- `Script Call`
- `Change Object Player Color`
- `Change Object Civilization Name`
- `Change Object Player Name`
- `Disable Unit Targeting`
- `Enable Unit Targeting`
- `Change Technology Cost`
- `Change Technology Research Time`
- `Change Technology Name`
- `Change Technology Description`
- `Enable Technology Stacking`
- `Disable Technology Stacking`
- `Acknowledge Multiplayer AI Signal`
- `Disable Object Selection`
- `Enable Object Selection`
- **[Update 42848]** The new conditions!!
- `Script Call`
- `Object Visible (Multiplayer)`
- `Object Selected (Multiplayer)`
- `Object has Action`
- `OR`
- `Multiplayer AI Signal`
- **[Update 42848]** `UnitAIAction` dataset
- `AttackStance` dataset

Discovered (in byte structure)

- **[Update 42848]** The new architecture set feature
- **[Update 42848]** script (xs) file path at the end of the file

Improved

- Defaults for the `create_default()` function when dealing with inconsistent structs

Fixed

- Adding a trigger with extra arguments will now work properly (Example: `.add_trigger("name", description="desc")`)
- Adding a condition with extra arguments will now work properly (Example: `.add_condition(Cond.TIMER, timer=20)`)
- The 'Fix' in version `0.0.11` for the lazy loading of effect and condition display orders wasn't working properly. Now it is.

Removed

- `number_of_units_selected` as an attribute for effects. This is now dealt with internally.

---

0.0.11

Added

- Optional arguments for `create_trigger` function (all trigger parameters except for it's internal ID)
- Optional arguments for `add_condition` function (all condition parameters)
- Optional arguments for `add_effect` function (all effect parameters)

Improved

- Performance:
- Writing the file, combining strings using `str.join(list)` instead of `str += str`
- Reusing structs when reconstructing where possible, instead of overwriting all of them.
- Not initialising RetrieverDependencies for every retriever. Using references instead.
- Reworked the eval functions to direct code, huge performance boost
- Removed unnecessary DependencyAction objects creation (From ~500.000 to ~100)
- Changed trigger display order, condition display order, effect display order attribute to lazy load

Fixed

- The `AoE2Scenario.create_default()` function. (Incorrect defaults caused the file to corrupt)

---

0.0.10

Changed

- The effect attribute `selected_object_id` to `selected_object_ids` to indicate the use of a list.

Discovered (in byte structure)

- The `location_object_reference` property for effects. Used for targeting an object as location. For example in the `TaskObject` effect.

Fixed

- The `AoE2Scenario.create_default()` function. (Defaults from structs weren't actually used in the parent Pieces)

---

0.0.9

Fixed

- All `copy_trigger` related functions take very long to copy per player.

---

0.0.8

**Important notice:** The way you read your main file changed. It is now:

AoE2Scenario.from_file(filename) Just add ".from_file". Nothing else changed :)

Also, there has been a massive change to the 'back' portion of the project. If you used this directly, you might need to change quite some code. Sorry :(. If you've got any questions, feel free to reach out. Also, if you encounter any bugs, especially in the new system, please report them! Thanks in advance! <3

Added

- `remove_condition()` and `remove_effect()` to TriggerObject
- `get_condition()` and `get_effect()` to TriggerObject
- The index and display index to the `trigger.get_content_as_string()`
- Four very powerful trigger features! Please check the readthedocs [Documentation API], or the function docstrings for the how-to.
- `copy_trigger`
- `copy_trigger_per_player`
- `copy_trigger_tree`
- `copy_trigger_tree_per_player`
- `replace_player`
- `commit()` function to objects. This will commit the changes to the piece structure. This is also done for all objects automatically when writing the file.
- Every object now has `RetrieverObjectLink` objects to represent how to retrieve and commit their data. (These objects also have a commit function, which are called using the objects commit function)
- The possibility to create a scenario from SCRATCH due to all pieces having default values now! No need for a 'base' scenario file from the game itself! You can achieve this like so: `AoE2Scenario.create_default()`!
- A `TriggerSelect` object. Used to identify a trigger in the trigger_manager functions. Alias: `TS`. Use Alias + class methods (factory methods) for ease of access: `TS.index(3)`, `TS.display(1)` and `TS.trigger(trigger)`.
- A `TriggerCELock` object. Used to define which (or all) conditions and effects should be locked while copying/changing players.
- A `GroupBy` Enum. For selecting the way triggers are grouped after creating them via `copy_trigger_tree_per_player`. You can choose from `NONE` (default), `TRIGGERS` and `PLAYERS`.
- **A Very much WIP** [Documentation API]

[documentation api]: https://aoe2scenarioparser.readthedocs.io/en/master/

Discovered (in byte structure)

- the `layer` property for terrain tiles. Used for layering terrain types.

Changed

- **The way a file is read is now done using:** `AoE2Scenario.from_file(filename)`. Nothing changed - just add "_.from_file_" between the class and the brackets :)
- Within the library the use of `\x00` character for line endings is no longer a necessity.
- This mainly affects checking names: (e.g. `trigger.name == "name\x00"`) (Credits: Alian713)
- The parameter `trigger_id` has been renamed to `trigger_index` in all functions in TriggersObject (trigger_manager)
- Renamend `Operator` to `Operation`.
- Managers can now be accessed directly from the scenario. Eg: `scenario.trigger_manager`.
- Renamed `player` attribute in the `Condition` object to `source_player`
- Renamed `player_source` attribute in the `Effect` object to `source_player`
- Renamed `player_target` attribute in the `Effect` object to `target_player`
- Renamed `find_retriever` function to `get_retriever_by_name`
- Renamed all retriever names to be lowercase underscored (Credits: pvallet)
- Progress print statements now replace their current line. So instead of using 2 lines per piece it's now 1.
- Most trigger_manager functions now require the new `TriggerSelect` object instead of 3 parameters for trigger selection. Read the docstring for more detail.

Fixed

- Bug causing the local `trigger_id` attributes to be out of sync when removing triggers.
- Bug causing the `ValueError` to not get raised when trying to construct a piece with invalid data length.
- Bug causing `Conditions` and `Effects` not to show in 'get_as_string' functions when set directly using: `trigger.effects = [...]`
- Bug causing a crash when `selected_object_id` in `Effects` held a single ID.
- Bug causing a crash when setting `selected_object_id` to an uniterable object. (Like an int instead of List[int])
- Bug causing Variables to not show up when no triggers were present when using the `get_summary_as_string` in the trigger_manager.
- Bug making it impossible to set unit IDs negative. (Supported by the game)
- Typo in Condition dataset "OWH" to "OWN" in `OWH_FEWER_OBJECTS`.
- Typo in Terrain dataset "MAGROVE" to "MANGROVE" in `FOREST_MAGROVE`.

Removed

- Outdated examples

---

Page 17 of 18

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.