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.
Example File | Description |
---|---|
/units/english/horseman-2.json |
The English horseman available in Feudal Age |
/units/unified/horseman.json |
All horsemen from all civilizations and all ages |
/units/all.json |
All units from all civilizations and all ages in one list |
/units/all-unified.json |
All units from all civilizations and all ages, grouped by unit |
/buildings/** |
Buildings and landmarks |
/technologies/** |
Technologies, like blacksmith upgrades, uniqiue improvments, etc |
/upgrade/** |
Unit upgrades, i.e. veteran horseman to elite horseman |
The logic to parse game files and output them in our desired format resides in src/attrib
.
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 windowsapps
folder./source
cardinal\archives\Attrib.sga
for all stats and attributescardinal\archives\UIArt.sga
for the icons (optional if you want to update icons)cardinal\archives\LocaleEnglish.sga
for the names and descriptionsdotnet 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
source
├── attrib
│ ├── instances
│ ├── templates
│ └── etc...
├── icons
│ └── races
│ ├── abbasid
│ ├── chinese
│ └── etc...
└── locale
└── en
└── cardinal.en.ucs
yarn install && yarn parse --essence
to update the data.effect.ts
.yarn build
to update the optimzed json files and library.Note: The
--essence
flag 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
Created and maintained by Robert van Hoesel from AoE4 World
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.