https://github.com/esno/rda
extractor for rda file archives used in anno games
https://github.com/esno/rda
anno anno-117 anno-1404 anno-1800 anno-2070 anno-2205 gamemodding modding-games modding-tools rda
Last synced: 8 months ago
JSON representation
extractor for rda file archives used in anno games
- Host: GitHub
- URL: https://github.com/esno/rda
- Owner: esno
- License: agpl-3.0
- Created: 2025-09-04T17:11:37.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-09-05T17:41:08.000Z (9 months ago)
- Last Synced: 2025-09-17T01:16:08.827Z (9 months ago)
- Topics: anno, anno-117, anno-1404, anno-1800, anno-2070, anno-2205, gamemodding, modding-games, modding-tools, rda
- Language: C
- Homepage: https://en.wikipedia.org/wiki/Anno_(video_game_series)
- Size: 244 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Anno Resource Files (.rda)
Anno is one of the greatest city builder and economy simulators out there.
this tool shall extract its game data to allow game modifications
on linux-based systems.
> be aware that it is in a very early stage
## compile from source
make
## usage

## format
there are two known versions out there
| Version | Used in |
| ------- | --------------- |
| 2.0 | 1404, 2070 |
| 2.2 | 117, 1800, 2205 |
the file structure is as follow
| Section | Fields |
| ---------- | ------------- |
| rda header | magic |
| | reserved |
| | block pointer |
| rda data | file data |
| | file data |
| | file data |
| | ... |
| | file header |
| | file header |
| | file header |
| | ... |
| | block header |
| | file data |
| | file data |
| | ... |
| | file header |
| | file header |
| | ... |
| | block header |
| | ... |
the `magic` field describes the archive version.
the `block pointer` locates the first block header and works as entrypoint
to a linked list of block headers to access the block data.
### rda header
| Field | Version | Offset | Size |
| ------------- | ------- | ------ | ---- |
| magic | 2.0 | 0 | 36 |
| | 2.2 | 0 | 18 |
| reserved | 2.0 | 36 | 1008 |
| | 2.2 | 18 | 766 |
| block pointer | 2.0 | 1008 | 4 |
| | 2.2 | 784 | 8 |
#### magic
* UTF-16 representation of the string `Resource File V2.0`
* UTF-8 representation of the string `Resource File V2.2`
### block header
| Field | Version | Offset | Size |
| ----------------- | ------- | ------ | ---- |
| flags | | 0 | 4 |
| files | | 4 | 4 |
| size compressed | 2.0 | 8 | 4 |
| | 2.2 | 8 | 8 |
| size uncompressed | 2.0 | 12 | 4 |
| | 2.2 | 16 | 8 |
| block pointer | 2.0 | 16 | 4 |
| | 2.2 | 24 | 8 |
#### flags
| Flag | Description |
| -------- | --------------- |
| `0x0001` | compressed |
| `0x0010` | encrypted |
| `0x0100` | memory-resident |
| `0x1000` | deleted |
#### block pointer
the end of the linked list is indicated by an empty block with pointer value of `0`.
### file header
| Field | Version | Offset | Size |
| ----------------- | ------- | ------ | ---- |
| path | | 0 | 520 |
| data pointer | 2.0 | 520 | 4 |
| | 2.2 | 520 | 8 |
| size compressed | 2.0 | 524 | 4 |
| | 2.2 | 528 | 8 |
| size uncompressed | 2.0 | 528 | 4 |
| | 2.2 | 536 | 8 |
| mtime | 2.0 | 532 | 4 |
| | 2.2 | 544 | 8 |
| reserved | 2.0 | 536 | 4 |
| | 2.2 | 552 | 8 |
the location of the first `file header` is right before the `block header`.
> file header offset = block header offset - size compressed
since one block can contain many files one has to traverse all `file header`
starting from the first.
> file header offset = block header offset - size compressed + (file header size * n)
### path
the file path and name (e.g. `data/fonts/31df-udmarugothic-w4.ttc`).
it is an array of null-terminated characters (`d\0a\0t\0`...).