Parsed stats on units, buildings and technologies from Age of Empires 4 in a developer friendly format.
[ GitHub ]
This project hosts data on all units, buildings, technologies, upgrades and other AoE4 game objects in an opinionated json format ready for developers to use in any project. The data is parsed from game files and reflects what players can read on in-game tooltips.
All units, buildings and technologies are individually available for each civilization that has access to them. Additionally, there’s an ‘unified’ format, that groups together variations of the same item in one file.
|The English horseman available in Feudal Age
|All horsemen from all civilizations and all ages
|All units from all civilizations and all ages in one list
|All units from all civilizations and all ages, grouped by unit
|Buildings and landmarks
|Technologies, like blacksmith upgrades, uniqiue improvments, etc
|Unit upgrades, i.e. veteran horseman to elite horseman
The logic to parse game files and output them in our desired format resides in
Requirements: Node, .Net Core
Feel free to open PRs or issues for data that is incorrect or missing, if possible please provide a rationale or source. One-off corrections to data are encoded in src/attrib/workarounds.ts and technology effects in src/attrib/technologies.ts
You will need raw parsed game files to build and update the data. Those files are not included in the repository due to licensing and copyright issues (you will need your own copy of AoE4). First we unpack the so called Archives (SGA) and then parse them using scripts we wrote to JSON files.
C:\Program Files\Steam\steamapps\common\Age of Empires IV\. When you play the gam through XBox, the process is a bit more involved as the game is installed in the hidden and secure
cardinal\archices\Attrib.sga for all stats and attributes
cardinal\archives\UIArt.sga for the icons (optional if you want to update icons)
cardinal\archives\LocaleEnglish.sga for the names and descriptions
dotnet AOEMods.Essence.CLI.dll sga-unpack ./source/Attrib.sga ./source/attrib-raw
dotnet AOEMods.Essence.CLI.dll rgd-decode ./source/attrib-raw ./source/ -b -f json
dotnet AOEMods.Essence.CLI.dll sga-unpack ./source/LocaleEnglish.sga ../source/locale`
dotnet AOEMods.Essence.CLI.dll sga-unpack ./source/UIArt.sga ./source/art`
dotnet AOEMods.Essence.CLI.dll rrtex-decode ./source/art/ui/icons/races ./source/icons -b
If this step isn’t giving you the desired results consider using Coh3-Image-Extractor instead. It works with similar commands
python scripts/main.py --src "./source/art" --format png
│ ├── instances
│ ├── templates
│ └── etc...
│ └── races
│ ├── abbasid
│ ├── chinese
│ └── etc...
yarn install && yarn parse --essence to update the data.
yarn build to update the optimzed json files and library.
--essenceflag instructs our code to use formatting from the Essence format, rather than the (now deprecated) Attrib xml files that are packed with the game in the root cardinal folder.
Parsing can be relatively slow due to the total amount of files involved. If you’re just working on data for a specific civ you can add an additional flag to the the parse command to only parse a specific civ. I.e.
yarn parse --essence --civ japanese
All of this data is open source, you may use it in your projects, websites and apps. However, Microsoft owns the Copyright on the game, and for this reason you can’t use this data in commercial contexts, excepts as described in Microsoft’s Game Content Usage Rules. Whenever you are using the data in this repository or other media from Age of Empires 4, please make sure to abide by the rules.
Age Of Empires 4 © Microsoft Corporation. Aoe4world/data was created under Microsoft’s “Game Content Usage Rules” using assets from Age Of Empires 4, and it is not endorsed by or affiliated with Microsoft.