Re-Enable Achievements...
-
- Manual Inserter
- Posts: 3
- Joined: Fri Dec 17, 2021 4:30 am
- Contact:
Re: Re-Enable Achievements...
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.
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.
Last edited by grapereader on Fri Dec 17, 2021 5:12 am, edited 2 times in total.
Re: Re-Enable Achievements...
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:
On an otherwise fresh save:
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:
On an otherwise fresh save:
Re: Re-Enable Achievements...
@pawelzwronek Thank you so much for the program you made great work 10/10, and @keht your post gave me the answer of wich 00 01 00 because i had like 5 or 6 there an i didnt want to figured out through trial and error thanks.
Re: Re-Enable Achievements...
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
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
- Attachments
-
- Unlimited.zip
- (6.89 MiB) Downloaded 100 times
Re: Re-Enable Achievements...
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.
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.
Pony/Furfag avatar? Opinion discarded.
-
- Manual Inserter
- Posts: 1
- Joined: Tue May 30, 2023 8:06 pm
- Contact:
Re: Re-Enable Achievements...
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.
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.
- Attachments
-
- gamesave(1).zip
- (7.86 MiB) Downloaded 74 times
Re: Re-Enable Achievements...
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 )
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...
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.
- Attachments
-
- SCR-20241022-pzzj.png (13.39 KiB) Viewed 2022 times
Re: Re-Enable Achievements...
Thanks for the new instructions!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.
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...
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...
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.
- Attachments
-
- SpaceAge_Ach.zip
- (4.95 MiB) Downloaded 26 times
Re: Re-Enable Achievements...
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...
Hello! I've changed this highlighted byte before 32 Fs and it worked just fine, now my achievements are enabled again!Itay wrote: ↑Wed Oct 23, 2024 7:55 pmNothing 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.
Red square is my "flag" for searching chat history in .dat file
Last edited by DBmain on Fri Oct 25, 2024 9:21 pm, edited 1 time in total.
Re: Re-Enable Achievements...
Thank you so much! That did the trickDBmain wrote: ↑Fri Oct 25, 2024 9:15 pmHello! I've changed this highlighted byte before 32 Fs and it worked just fine, now my achievements are enabled again!Itay wrote: ↑Wed Oct 23, 2024 7:55 pmNothing 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.
Red square is my "flag" for searching chat history in .dat file
Re: Re-Enable Achievements...
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
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...
Would you be so kind as to upload a compiled version too?
-
- Manual Inserter
- Posts: 4
- Joined: Sat Oct 30, 2021 7:42 pm
- Contact:
Re: Re-Enable Achievements...
Mind if i add your feature to my save manager? <3
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...
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?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
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...
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.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
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?