Skip to main content

This is a project for editing parts of an 'aoe2scenario' file from Age of Empires 2 Definitive Edition

Project description

AoE2ScenarioParser

This is a project for editing parts of an aoe2scenario file from Age of Empires 2 Definitive Edition outside of the in-game editor.

Progress

Current up-to-date progress can be found on the Trello board.

Features:

View Add Edit Remove
Triggers :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Conditions :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Effects :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Units :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:

Bugs:

Support:

ScenarioFiles Read Write Reference
1.36 :heavy_check_mark: :heavy_check_mark: -
1.37 :heavy_check_mark: :heavy_check_mark: From game update: 35584

Installation

Run the following pip command for installation:

pip install AoE2ScenarioParser

Dependencies:

This project is made in Python but does not support any versions below Python 3.6.

The project uses bidict for bidirectional mapping.
Note: All these dependencies should install automatically when using the above command.

Usage

Getting Started

To start, import the main AoE2Scenario class from the module:

from AoE2ScenarioParser.aoe2_scenario import AoE2Scenario

Define the file you will be reading and the path you will be writing to.
Note: Creating folders isn't supported at this time. Please use an existing folder.

# It is recommended to not overwrite your file. This way you can keep a backup!
input_path = "File/Path/To/Your/Input/File"
output_path = "File/Path/To/Your/Output/File"

Now create the Scenario object with the filename as parameter.

scenario = AoE2Scenario(input_path)

Editing a Scenario

You can edit your scenario in many ways. Not every part of the scenario can be edited with this project yet (without diving into the source code). Below you can find cheatsheets of the parts that are supported.

As we all now, AoE2 has a lot of data involved. From Terrain types and Units to Effects and Conditions. All this data is impossible to remember. For that reason there are a number of datasets to help you out. You can find the cheatsheet here:

Saving the Edited Scenario

When you are done, you can write all your progress to a file like so:

scenario.write_to_file(output_path)

Please remember to use a different path (filename) than your input file. This way you have a backup file incase you encounter a bug.


 

Authors

  • Kerwin Sneijders (Main Author)

License

Code

GNU General Public License v3.0: Please see the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for AoE2ScenarioParser, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size AoE2ScenarioParser-0.0.7-py3-none-any.whl (96.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size AoE2ScenarioParser-0.0.7.tar.gz (58.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page