Achievement file format: Difference between revisions
(Created page with "{{Languages}} Category:Technical This is a technical description of the achievement file format, used by Factorio to store player's achievement progress in the files "achi...") |
No edit summary |
||
Line 21: | Line 21: | ||
| [[Data_Types#array|array]]<bytes> | | [[Data_Types#array|array]]<bytes> | ||
| Achievement content info. Variable length. See the section for more information. | | Achievement content info. Variable length. See the section for more information. | ||
|- | |||
| [[Data_Types#short|short]] | |||
| Unknown. Always seems to equal zero. Perhaps padding? | |||
|- | |- | ||
| [[Data_Types#short|short]][*] | | [[Data_Types#short|short]][*] |
Revision as of 01:48, 12 August 2017
This is a technical description of the achievement file format, used by Factorio to store player's achievement progress in the files "achievements.dat" and "achievements-modded.dat".
Yes - this information can be used to "cheat" Factorio by simply writing to the achievement file(s) in such a way as if you had met all the achievement requirements, open up Factorio, and then suddenly have all achievements unlocked. If you've played Factorio at all you should know that this point is moot. The goal of this document is to share how to _read_ the achievement file(s) - so that third party applications can do do things with that information. Enjoy.
See the page on data types for an explanation of the different types of data used in this document.
File Format
The overall file format is as follows. Note that in this file, array length is stored as a short, not an int!
Type | Description |
---|---|
short[4] | The version string of Factorio that generated this string. |
array<bytes> | Achievement header info. Variable length. See the section for more information. |
array<bytes> | Achievement content info. Variable length. See the section for more information. |
short | Unknown. Always seems to equal zero. Perhaps padding? |
short[*] | Currently tracked achievements, given as a series of shorts up until the end of the file, with each representing the id of an achievement, in the order of which the player has them tracked in game. |
This format has been valid since at least version 0.14.x.