Adrian
d2960720bd
* 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 |
||
---|---|---|
doc | ||
files | ||
src | ||
.gitignore | ||
README.md |
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
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:
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: