Download latest: https://files.adrian.kousz.ch/ (Tested with Mono 4.5)
Go to file
Adrian d2960720bd Update command line app
* bmp2map: Assign unit IDs
* bmp2map: Check bitmap dimensions
* bmp2map, convert: Change random tree frame code
* convert: Insert values from src to ref, instead of vice-versa (more robust)
* convert: Move buildings is better
* convert: Small API changes
* convert/dumpunits: Correct rounding for tile position underneath a unit
* dumpunits: List player number for each unit
2016-04-26 15:17:34 +02:00
doc Update documentation 2016-02-22 17:11:48 +01:00
files Update documentation 2016-02-18 17:14:46 +01:00
src Update command line app 2016-04-26 15:17:34 +02:00
.gitignore Adapt command line program to API changes, add JSON conversion 2016-02-18 16:50:10 +01:00
README.md Update documentation 2016-02-22 17:11:48 +01:00

README.md

Age of Empires Scenario Editor

Command line application and library to edit Scenario and Campaign files of games powered by the Genie Engine. This includes the Age of Empires series and Star Wars: Galactic Battlegrounds.

Beta version

Command Line Application

Features

  • Create maps from bitmaps
  • Convert AOE1 Scenario to AOE2 Scenario
  • Convert a Scenario file to JSON and vice-versa
  • Decompress and recompress compressed Scenario part for hex editing
  • Dump unit information to easily gather Unit IDs
  • Full Campaign file editing

Planned Features

  • Trigger implementation
  • Full conversion between all Scenario versions (mapping of Unit IDs are needed for this, see Section Contributing)

Examples

Map Generation

Generated Map

The above map is generated using:

$ GenieEdit.exe bmp2map files/examples/aoe2x-Empty.scx Europe.scx /tmp/terrain.png /tmp/elevation.png

The images are taken from NASA's Blue Marble imagery.

Scenario Conversion

OpeningMoves-AOE2.scx is a fully automated conversion of a Scenario file from the AOE1 demo version:

$ GenieEdit.exe convert "files/examples/aoe1demo-Reigno_1-Opening Moves.scn" files/OpeningMoves-AOE2.scx files/examples/aoe2x-Empty.scx

(Stone are set to 100 to be able to build a town center from the beginning.)

A unit dump looks like the following:

$ GenieEdit.exe dumpunits Debug2.scx
Scenario Editor

ID       UnitID   TileID   Position

Units of player 0:
0        69       23       (   1,5,  11,5)
1        69       23       (   2,5,  11,5)
...

Library

The namespace AdrianKousz.GenieEngine contains classes to read, write, and manipulate Scenario and Campaign files.

Scenario contains all data structures related to a Scenario file. They are easily understandable.

The map is stored in linear order. This way, it is easier to process seperate tiles. The code below gets the map tile at (10,5). The map origin (0,0) is in the left corner of the map:

Map coordinate system

Scenario scn;
int x = 10;
int y = 5;
Scenario.ScnMap.Tile tile = scn.Map.LinearTiles[scn.Map.SizeX * y + x];

GenieFile is the starting point for reading and writing:

Scenario scn = GenieFile.Deserialize<Scenario>(filestream);

ScnDefaultFactory is a class that is able to produce an empty Scenario file. Eventually, it should be able to create a Scenario that is usable without any modifications.

Build

Clone the projects MainUtil.cs, ExUtil.cs, and this one, and build src/GenieEdit.sln.

Contributing

Contributions are very welcome. ☺ Keep in mind that the API is still very unstable.

Suggestions:

  1. Gather UnitIDs of AOE1
  2. Much help is appreciated to figure out Unit ID mappings for the conversion process.
  3. Ideas how to configure the converter (mapping tables). There are some notes in German: AOE1, AOE2
  4. Feedback about the API.