0x796935 / factorio-achievement-restore

Restores the achievements after running commands which disable them
GNU General Public License v3.0
22 stars 5 forks source link

Achievements stay disabled. #6

Open nihumi opened 3 weeks ago

nihumi commented 3 weeks ago
  1. Edited map settings via /editor to increase biter attacks
  2. Saved game with new name
  3. Used factorio-achievement-restore:

Console output: [+] Found 65 .dat files [!] Found command in level.dat57 [+] Removed cheat flag from offset 501576 [+] Removed cheat flag from offset 501834 [+] Removed cheat flag from offset 550850 [+] Removed cheat flag from offset 550979 [+] Wrote level.dat57 to ./output/level.dat57 [+] Copied level.dat57 to savegame

  1. Started game with the newly created savegame to check achievements -> achievements are still disabled.

Should this work with the Space Age Update?

William0216 commented 3 weeks ago

I also ran it, it indicated that it worked, but achievements are still disabled. I also noticed that the new save was 2mb smaller, but maybe that has to do with how the saves were compressed? This was the first attempt I've had on any save file btw. This is the command I ran that ruined my achievements all because I wanted deconstruction orders to stay persistent. /c game.player.force.deconstruction_time_to_live = 4294967295 image

mai1015 commented 2 weeks ago

Yep after the merge still broken, but im using command like /editor maybe thats the problem. Was trying to revert the research for Rush to Space

0x796935 commented 2 weeks ago

It's probably that yeah. I only tested with /c. It's probably a different hex string you'd have to look for

Eario commented 2 weeks ago

can confirm that with /editor the achievements stay disabled. from what i could find elsewhere, the difference is purely that a single bit nearby the one for general achievement disabling from other commands is flipped instead, but couldn't find any details beyond that. hope that this can be improved!

mai1015 commented 2 weeks ago

Original save with achviment disabled server1.zip

I test /c with /c game.player.force.technologies["production-science-pack"].researched = false or /c game.forces.player.technologies["utility-science-pack"].researched = false

and now it detect the flag

Logs ``` starting to read file level.dat23 [!] Found command in level.dat23 [+] Removed cheat flag from offset 854318 [+] Removed cheat flag from offset 854355 [+] Removed cheat flag from offset 854471 [+] Removed cheat flag from offset 854560 [+] Removed cheat flag from offset 855170 [+] Removed cheat flag from offset 855221 [+] Removed cheat flag from offset 863838 [+] Removed cheat flag from offset 863962 [+] Removed cheat flag from offset 881286 [+] Removed cheat flag from offset 881403 [+] Wrote level.dat23 to ./output/level.dat23 ```

But achievement still disabled XD.

Zenhang commented 2 weeks ago

Seems it only work when u use /c command. i had try to enable my save which used /cheat or /editor,it doesnt work,then i create a new save and only use /c ,it work.after then i read the changed save and try /editor and /cheat, and use this tool again, this save is broke

jongdetim commented 1 week ago

Can confirm it does work after using /c commands. Was tricky to get working through WSL (ubuntu) with the game installed on windows due to lack of file/directory permissions, but that's my own bad decision.

For reference, I used nodeJS 16 on ubuntu 18.04 through WSL 1 on Windows 10.