Page 6 of 7
Re: Re-Enable Achievements...
Posted: Fri Dec 17, 2021 4:57 am
by grapereader
Does this work for achievements that were disabled by converting a freeplay game to a scenario?
I did the "convert to scenario" trick to enable replays on my save and am now getting burned by even my local achievements not working.
Edit: Just tested. It does not.
Edit2:
Spent the rest of my evening trying to sort this out. No luck. Tried changing the file header for level-init.dat which appears to have the 'scenario' in it to be identical to my original freeplay save. But the game still classifies it as 'scenario-derived'. Also spent an hour searching through the game's Lua API to see if there is a way to modify the scenario flag, but doesn't look like it.
Don't want to play it anymore since it no longer feels like a "real" game. But I don't want to restart from before the replay trick as I've done so much grinding since then. Not worth it for the replays, which aren't even working anymore after updating my mod list. Feelsbadman.

Re: Re-Enable Achievements...
Posted: Mon Feb 14, 2022 3:07 pm
by MilV
If anyone is still having trouble with this:
Im on Version
1.1.53 build
59373
I did everything JacobC1921 mentioned and ran into problems on step 4 -> "FF FF 00 01 00" was not present in my file.
To solve the issue I searched for the "command"-string entry and scrolled to the top of the message block (it seems all chat messages are one after the other in one chunk).
After finding it, it was just trial and error with switching out 01 for 00, repacking the file and starting the game.
The sixth try was successful in my case.
In my save file:

- Bit.PNG (65.85 KiB) Viewed 12451 times
On an otherwise fresh save:

- TheBit.PNG (19.46 KiB) Viewed 12451 times
Re: Re-Enable Achievements...
Posted: Sat Jun 18, 2022 11:29 am
by Onion
Re: Re-Enable Achievements...
Posted: Thu Aug 11, 2022 9:19 am
by Deadshot
Hey all,
does this still work with version 1.1.61?
I tried everything but I can't Re-Enable Achievements. I don't find the "command-ran" line in my dat-files, but i found a lot of FF FF 00 01 00 and I replaced the 1 with a 0 but it didn't work.
Maybe someone can help me. I also attached my savegame.
For your information I use only this mod:
https://mods.factorio.com/mod/sonaxaton ... -resources
Thanks a lot and sorry for my bad english.
Have a great day

Re: Re-Enable Achievements...
Posted: Mon Dec 26, 2022 2:41 pm
by aka13
Just had (hopefully) success on version 1.1.74.
The last few posts in this thread were really confusing, and have cost me a couple of hours, but I think in the end I succeeded.
I had about 200 level.datx files, so it was a rather painful experience.
First, I looked for FF FF 00 01 00 without decoding, no success.
I then decoded every and each of the files with the help of Pawels decoder, and looked again, with a huge lot of matches.
That did not look right to me, since even if I used the console, it was once by accident. No matches for "command" in both cases.
So then I read what Pawel wrote closely, and started going through the last files, looking for "horizontal_flow". I found it in one of the more recent files.
I then proceeded to look for the closest location of FF FF 00 01 00 before that.
Found it, as MPeti1 explained, and set the 01 to 00.
I compressed it with Pawels software, loaded the save, and seemingly it worked. Achievements for the save were reset, and started counting again.
I backed up the save just in case, and will write again, if anything out of the ordinary happens. I hope that this marks the end of my achievement adventures.
Re: Re-Enable Achievements...
Posted: Tue May 30, 2023 8:10 pm
by orokanamame
Well, unfortunately, Factorio 1.1.80 (build 60618, win 64) rejects the save modified using these instructions
Tried both the old and new ones, yet, the issue still persists, and the game shows it as "corrupted" with "level.dat" missing
Any ideas? Added my save file, if anyone is interested.
BTW, it's only level.dat21 that is affected, AFAIK. The command was ran very recently.
Re: Re-Enable Achievements...
Posted: Mon Sep 18, 2023 7:42 pm
by yi5
Hey, I made a small script which can "unbotch" your save game. The current limitations are that it only works once (don't ask me why I have no clue

)
You can either try
https://0x796935.github.io/ or if you want to download it and run it using NodeJS:
https://github.com/0x796935/factorio-ac ... nt-restore
Method used is from:
https://www.reddit.com/r/factorio/comme ... nts_after/
Which is basically the same as @pawelzwronek explained with the, find command-ran, then replace 0xFFFF000100 with 0xFFFF000000
Feel free to fork my code and upgrade it (please make pull requests also

)
Re: Re-Enable Achievements...
Posted: Wed Oct 23, 2024 1:23 am
by zhy3213
2.0 and Space Age update: Pawelzwroneks' tool still useful, and the bit is still near and before chat history. Other than that, nothing apply to new saves. To re-enable achievements, type some random thing into the chat, then save the game. unpack every level.datX like previous instructions(or write your own tool) and search for the string you've typed into chat previously. If found, look for two groups of 16 consecutive F before the chat history, the 01 before the first group of F is the bit we want to set to 0. Then pack the save back and you're good to go. There might be multiple occurrences of chat history, make sure you go over each of them.
Re: Re-Enable Achievements...
Posted: Wed Oct 23, 2024 3:29 pm
by Itay
zhy3213 wrote: Wed Oct 23, 2024 1:23 am
2.0 and Space Age update: Pawelzwroneks' tool still useful, and the bit is still near and before chat history. Other than that, nothing apply to new saves. To re-enable achievements, type some random thing into the chat, then save the game. unpack every level.datX like previous instructions(or write your own tool) and search for the string you've typed into chat previously. If found, look for two groups of 16 consecutive F before the chat history, the 01 before the first group of F is the bit we want to set to 0. Then pack the save back and you're good to go. There might be multiple occurrences of chat history, make sure you go over each of them.
Thanks for the new instructions!
However there is no 01 before the first group of 16 FFs, do you have any idea what else I should look for?

Re: Re-Enable Achievements...
Posted: Wed Oct 23, 2024 5:10 pm
by zhy3213
Itay wrote: Wed Oct 23, 2024 3:29 pm
Thanks for the new instructions!
However there is no 01 before the first group of 16 FFs, do you have any idea what else I should look for?
Do you have more context before your 32 F? In my experience two groups of F are separated, having an 8 bytes thing between them. Is this the only occurrence of the chat history among all datX?
Re: Re-Enable Achievements...
Posted: Wed Oct 23, 2024 7:55 pm
by Itay
zhy3213 wrote: Wed Oct 23, 2024 5:10 pm
Itay wrote: Wed Oct 23, 2024 3:29 pm
Thanks for the new instructions!
However there is no 01 before the first group of 16 FFs, do you have any idea what else I should look for?
Do you have more context before your 32 F? In my experience two groups of F are separated, having an 8 bytes thing between them. Is this the only occurrence of the chat history among all datX?
Nothing that I can see, I've attached the save if you're interested in taking a look. The command-ran texts as well as the "Testboy" string I sent in the chat are all in level.dat8
Weird thing is there should be more command-ran than there are but I can't find any more.
Re: Re-Enable Achievements...
Posted: Thu Oct 24, 2024 7:35 am
by bobwobbob
Hey, I've got a few questions. I managed to get the file open using pawzelzwronek's utility and began changing the FF FF 00 01 00 strings. In my save I have 11 dat files and I changed all of the ones for the last file. However, as I moved on to the other ones I noticed there were a lot of Instances of that string. In the next file alone there 250. Do I really need to go through each DAT file and change that string or will it work as is. If I do need to change each one is there a faster way than one by one. The Hex utility I am using is a plugin for Notepad++. I just wanted to turn on biter expansion because I forgot it's not on railworlds by default and didn't want to have to restart.

.
Re: Re-Enable Achievements...
Posted: Fri Oct 25, 2024 9:15 pm
by DBmain
Itay wrote: Wed Oct 23, 2024 7:55 pm
zhy3213 wrote: Wed Oct 23, 2024 5:10 pm
Itay wrote: Wed Oct 23, 2024 3:29 pm
Thanks for the new instructions!
However there is no 01 before the first group of 16 FFs, do you have any idea what else I should look for?
Do you have more context before your 32 F? In my experience two groups of F are separated, having an 8 bytes thing between them. Is this the only occurrence of the chat history among all datX?
Nothing that I can see, I've attached the save if you're interested in taking a look. The command-ran texts as well as the "Testboy" string I sent in the chat are all in level.dat8
Weird thing is there should be more command-ran than there are but I can't find any more.
Hello! I've changed this highlighted byte before 32 Fs and it worked just fine, now my achievements are enabled again!
Red square is my "flag" for searching chat history in .dat file

Re: Re-Enable Achievements...
Posted: Sun Oct 27, 2024 3:56 pm
by Itay
DBmain wrote: Fri Oct 25, 2024 9:15 pm
Itay wrote: Wed Oct 23, 2024 7:55 pm
zhy3213 wrote: Wed Oct 23, 2024 5:10 pm
Itay wrote: Wed Oct 23, 2024 3:29 pm
Thanks for the new instructions!
However there is no 01 before the first group of 16 FFs, do you have any idea what else I should look for?
Do you have more context before your 32 F? In my experience two groups of F are separated, having an 8 bytes thing between them. Is this the only occurrence of the chat history among all datX?
Nothing that I can see, I've attached the save if you're interested in taking a look. The command-ran texts as well as the "Testboy" string I sent in the chat are all in level.dat8
Weird thing is there should be more command-ran than there are but I can't find any more.
Hello! I've changed this highlighted byte before 32 Fs and it worked just fine, now my achievements are enabled again!
Red square is my "flag" for searching chat history in .dat file
Thank you so much! That did the trick

Re: Re-Enable Achievements...
Posted: Thu Oct 31, 2024 5:22 pm
by Pain12345
I wrote a small Console application to patch the save game:
https://github.com/Rainson12/FactorioSa ... hievements
It will
1. unzip the savegame
2. decompress all .dat files
3. screen the unzipped files for occurrence of "command-ran"
4. patch the 01 closest to the found occurrence by searching for "00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF" binary pattern
5. pack the dat file again
6. Backing up original save file
7. Creating new save file by zipping everything again
8. Cleaning up the temporary folder
Re: Re-Enable Achievements...
Posted: Thu Oct 31, 2024 11:12 pm
by Veni
Would you be so kind as to upload a compiled version too?
Re: Re-Enable Achievements...
Posted: Sat Nov 02, 2024 12:52 pm
by Pain12345
Re: Re-Enable Achievements...
Posted: Sat Nov 02, 2024 8:32 pm
by Coolshrimp
Mind if i add your feature to my save manager? <3

- Factorio Server Tool.png (75.03 KiB) Viewed 6721 times
Pain12345 wrote: Thu Oct 31, 2024 5:22 pm
I wrote a small Console application to patch the save game:
https://github.com/Rainson12/FactorioSa ... hievements
It will
1. unzip the savegame
2. decompress all .dat files
3. screen the unzipped files for occurrence of "command-ran"
4. patch the 01 closest to the found occurrence by searching for "00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF" binary pattern
5. pack the dat file again
6. Backing up original save file
7. Creating new save file by zipping everything again
8. Cleaning up the temporary folder
Re: Re-Enable Achievements...
Posted: Sun Nov 03, 2024 8:22 pm
by jakeroxs
Pain12345 wrote: Thu Oct 31, 2024 5:22 pm
I wrote a small Console application to patch the save game:
https://github.com/Rainson12/FactorioSa ... hievements
It will
1. unzip the savegame
2. decompress all .dat files
3. screen the unzipped files for occurrence of "command-ran"
4. patch the 01 closest to the found occurrence by searching for "00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF" binary pattern
5. pack the dat file again
6. Backing up original save file
7. Creating new save file by zipping everything again
8. Cleaning up the temporary folder
This doesn't seem to work for me, still shows achievements are disabled when I load back into the save, is there anything else that has to be done to make it function?
Enter the path to the save file:
redacted\AppData\Roaming\Factorio\saves\moo.zip
Extracting save file to: redacted\Roaming\Factorio\saves\moo
Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at FactorioSaveGameEnableAchivements.Program.Main(String[] args) in C:\develop\FactorioSaveGameEnableAchivements\FactorioSaveGameEnableAchievements\Program.cs:line 27
Edit:
Ended up trying again after playing a bit longer, it didn't error out and said it was successful, however achievements still appear to be disabled in the achievements list
Re: Re-Enable Achievements...
Posted: Mon Nov 04, 2024 2:01 am
by xrobau
This doesn't appear to work when purely enabling the editor. There is no 'command-ran' when simply starting a new game and then /editor.
There IS 'editor-will-disable-achievements', which has '00000001000100000000000a0a00000000ffffffffffff' a fair way back from it, but that's not the 6/7 byte offset you have in your script. Where did you get those numbers from, out of curiosity?