How do I modify the contents of the achievement.dat file?
How do I modify the contents of the achievement.dat file?
I want to reset some achievements in Factorio and found the achievement.dat file. However, when I open it, there's the name of each achievement with some random characters and stuff, making it impossible for me to understand how it works. I went to the Wiki and it made me even more confused. How do I even open the file in order to at least understand what I'm looking at?
Re: How do I modify the contents of the achievement.dat file?
The "random characters" are the Data itself. The Factorio Wiki gives specific information on which achievements use integer/bool/double types etc, but it is out-of-date for 2.0.
You can use a Hex Editor to see (and modify) the raw Binary data. I use Notepad++ with the "HEX-Editor" plugin installed. Here, I have highlighted the "0b" value for the "visit-gleba" achievement (which I have Earned in-game). Achievements which are still Locked seem to have the Value "00".
Good Luck!
Good Luck!
Re: How do I modify the contents of the achievement.dat file?
THANK YOU SO SO MUCH!!! Ok, I might be able to understand now. Only one question, how do I open the code in Notepad++? I tried doing it with the "open with" option but got this EDIT: I also tried doing Plugins -> Converter -> ASCII to HEX but nothing happened ( It only works if I select text without the symbols)eugenekay wrote: Fri Dec 13, 2024 9:16 pm The "random characters" are the Data itself. The Factorio Wiki gives specific information on which achievements use integer/bool/double types etc, but it is out-of-date for 2.0.
Screenshot 2024-12-13 161319.png
You can use a Hex Editor to see (and modify) the raw Binary data. I use Notepad++ with the "HEX-Editor" plugin installed. Here, I have highlighted the "0b" value for the "visit-gleba" achievement (which I have Earned in-game). Achievements which are still Locked seem to have the Value "00".
Good Luck!
Last edited by alecika on Fri Dec 13, 2024 9:33 pm, edited 1 time in total.
Re: How do I modify the contents of the achievement.dat file?
You need to install the "HEX Editor" plugin.
Plugins Menu --> Plugins Admin, Search
After it is installed, enable it in the Plugins Menu --> HEX-Editor --> View in HEX
Plugins Menu --> Plugins Admin, Search
After it is installed, enable it in the Plugins Menu --> HEX-Editor --> View in HEX
Re: How do I modify the contents of the achievement.dat file?
okkk got it, thank you! Now how do I know which achievement I'm working on? What's the start of every achievement? Or is it just guessing? You highlighted the "visit gleba" achievement (with the 0b address). Does every achievement begin with 0b? Like the string begins at 0b and ends.. where? And how do I reset them?eugenekay wrote: Fri Dec 13, 2024 9:31 pm You need to install the "HEX Editor" plugin.
Plugins Menu --> Plugins Admin, Search
After it is installed, enable it in the Plugins Menu --> HEX-Editor --> View in HEX
Re: How do I modify the contents of the achievement.dat file?
The file format appears to be self-created by the Factorio dev team; it is a dump straight from the internal (binary) representation in the game.
"0b" is the entirety of the Value;
"00" is a NULL space
"0e" is the start of the next achivement, which is named "visit-vulcanus" (aka "76 69 73 69 74 2d 76 75...")
I think that changing the Value to "00" will clear the Achievement flag? This format is not exactly user-friendly, heh.
"0b" is the entirety of the Value;
"00" is a NULL space
"0e" is the start of the next achivement, which is named "visit-vulcanus" (aka "76 69 73 69 74 2d 76 75...")
I think that changing the Value to "00" will clear the Achievement flag? This format is not exactly user-friendly, heh.
Re: How do I modify the contents of the achievement.dat file?
You are so right about the user-friendly part.eugenekay wrote: Fri Dec 13, 2024 9:44 pm The file format appears to be self-created by the Factorio dev team; it is a dump straight from the internal (binary) representation in the game.
"0b" is the entirety of the Value;
"00" is a NULL space
"0e" is the start of the next achivement, which is named "visit-vulcanus" (aka "76 69 73 69 74 2d 76 75...")
I think that changing the Value to "00" will clear the Achievement flag? This format is not exactly user-friendly, heh.
Re: How do I modify the contents of the achievement.dat file?
Hey man I just wanted to let you know that I managed to kind-of work this out. I don't need to open the file in the Hex editor, I just need to know what to delete from that file. Deleting this will reset the circuit veteran achievement: But thank you so much for giving me hope, honestly if no one responded I don't think I would've waste my time figuring it out.eugenekay wrote: Fri Dec 13, 2024 9:44 pm The file format appears to be self-created by the Factorio dev team; it is a dump straight from the internal (binary) representation in the game.
"0b" is the entirety of the Value;
"00" is a NULL space
"0e" is the start of the next achivement, which is named "visit-vulcanus" (aka "76 69 73 69 74 2d 76 75...")
I think that changing the Value to "00" will clear the Achievement flag? This format is not exactly user-friendly, heh.
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: How do I modify the contents of the achievement.dat file?
For anyone who likes programming, here is my attempt at writing a Javascript converter to/from JSON.
I gave up as I couldn't work out the format & size of the data that is stored for each of the new achievement types (see https://wiki.factorio.com/Achievement_file_format for the known ones).
But if anyone can work that out, I can easily finish my converter.
Bassically the 'const achievement_types' in my linked file is incorrect.
I gave up as I couldn't work out the format & size of the data that is stored for each of the new achievement types (see https://wiki.factorio.com/Achievement_file_format for the known ones).
But if anyone can work that out, I can easily finish my converter.
Bassically the 'const achievement_types' in my linked file is incorrect.
- Attachments
-
- factorio.achievements.mjs.txt
- (12.31 KiB) Downloaded 9 times