Re-Enable Achievements...
-
- Inserter
- Posts: 21
- Joined: Wed Mar 04, 2015 9:38 pm
- Contact:
Re-Enable Achievements...
So, achievements are disabled in a map if ANY console command is used. I learned this the hard way.
I've got 50ish hours in a map and I use the console command to check the evolution rate. Little did I know this would ruin my whole game since I can no longer get the achievements I was working toward.
There was no warning and it doesn't even make sense for this command! (it's not cheating is it?)
Is there a way to clear this flag in the save-file so I can continue where I left off and get the achievements I've been working so hard for?
I've got 50ish hours in a map and I use the console command to check the evolution rate. Little did I know this would ruin my whole game since I can no longer get the achievements I was working toward.
There was no warning and it doesn't even make sense for this command! (it's not cheating is it?)
Is there a way to clear this flag in the save-file so I can continue where I left off and get the achievements I've been working so hard for?
-
- Filter Inserter
- Posts: 813
- Joined: Fri Apr 29, 2016 5:27 pm
- Contact:
Re: Re-Enable Achievements...
Technically it is cheating, you normally don't get to know what the evolution rate is (you can estimate it be looking at the distribution of biter types you're seeing). A warning message the first time you would do something that would disable achievements would be nice; with the option to not do that thing).
Re: Re-Enable Achievements...
Which command did you use? Using /evolution doesn't disable achievements for me.
-
- Inserter
- Posts: 21
- Joined: Wed Mar 04, 2015 9:38 pm
- Contact:
Re: Re-Enable Achievements...
From here:
https://wiki.factorio.com/index.php?title=Console
I got:
/c game.player.print(game.evolution_factor)
edit: just testing "/evolution". It worked. I wish I would've know about this command.
https://wiki.factorio.com/index.php?title=Console
I got:
/c game.player.print(game.evolution_factor)
edit: just testing "/evolution". It worked. I wish I would've know about this command.
Re: Re-Enable Achievements...
We had the same problem with the /color command, we didn't know it existed so used the console and botched a world/save. That wiki desperately needs reworking to stop other people falling into this trap for non-console commands.
-
- Inserter
- Posts: 21
- Joined: Wed Mar 04, 2015 9:38 pm
- Contact:
Re: Re-Enable Achievements...
My budy and I are both software engineers so we took a shot at editing the save ourselves... but concluded that factorio is extremely well optimized and moves memory around a lot. There was also a lot in the save file that didn't seem to make sense unless it was compressed. We were hoping it would just be an enum we could just toggle but apparently factorio dev team is way to good to do something silly like that.
We ended up just starting the map over. Learning the hard way is never fun. This time we will just not worry about checking the evolution rate.
We ended up just starting the map over. Learning the hard way is never fun. This time we will just not worry about checking the evolution rate.
-
- Burner Inserter
- Posts: 19
- Joined: Mon Jun 09, 2014 7:44 am
- Contact:
Re: Re-Enable Achievements...
Has anybody figured out yet how to do this? It's quite annoying, sigh.
- Phillip_Lynx
- Filter Inserter
- Posts: 541
- Joined: Mon Jul 21, 2014 6:00 pm
- Contact:
Re: Re-Enable Achievements...
Reenabling achivements is easy.
Just start a new vanilla game. The new factory will be way better than the old one .
Just start a new vanilla game. The new factory will be way better than the old one .
Re: Re-Enable Achievements...
If you have some experience with savegame manipulation and a decent hex editor it's possible to patch the savegame and re-enable achievements after console commands have been used. It took me about 1.5 hours to find out how to do it and i've been able to fix all of the 5 different savegames I tried it on.
The "console commands have been used" flag is actually only 1 byte (well, technically 1 bit) near the end of the file that is set to 0 if none have been used or 1 if some have been used. Finding that out was the easy part, the hard part was to find out where that value is stored in different savegames.
I'm not sure if I should post direct instructions on how to fix a savegame or give any more hints, since the devs put this limitation in for a good reason and if they had intended that savegames could be fixed by players they would have included that functionality or already mentioned a workaround/fix.
The "console commands have been used" flag is actually only 1 byte (well, technically 1 bit) near the end of the file that is set to 0 if none have been used or 1 if some have been used. Finding that out was the easy part, the hard part was to find out where that value is stored in different savegames.
I'm not sure if I should post direct instructions on how to fix a savegame or give any more hints, since the devs put this limitation in for a good reason and if they had intended that savegames could be fixed by players they would have included that functionality or already mentioned a workaround/fix.
Re: Re-Enable Achievements...
If you used a console command just recently there is still an autosave from before that you can turn back to.
-
- Burner Inserter
- Posts: 19
- Joined: Mon Jun 09, 2014 7:44 am
- Contact:
Re: Re-Enable Achievements...
daniel34, thank you for the information that it can be done and that it is as simple as a single bit being set near the end of the file. But I have one question since I have been unable to find where this bit is, does it have a general location that is always the same, I know you said that it's hard to find though. like below nauvis? or below the "2016-06-28_Factorio_0.13.0.lua"s. Or should I look between (what looks to me) like some chunk data above nauvis.
Re: Re-Enable Achievements...
You're close. It's after nauvis, but on most maps very close to it. For the first two maps I used nauvis + constant offset to find the correct location of the byte, but on the third map there was a lot of data after nauvis and before the byte, almost 2mb. I then used the earlier maps to find another hexadecimal string (3 bytes) with constant offset to the byte, on all 5 maps I've tested searching for that string and adding the offset leads to the correct byte.iame6162013 wrote:daniel34, thank you for the information that it can be done and that it is as simple as a single bit being set near the end of the file. But I have one question since I have been unable to find where this bit is, does it have a general location that is always the same, I know you said that it's hard to find though. like below nauvis? or below the "2016-06-28_Factorio_0.13.0.lua"s. Or should I look between (what looks to me) like some chunk data above nauvis.
-
- Burner Inserter
- Posts: 19
- Joined: Mon Jun 09, 2014 7:44 am
- Contact:
Re: Re-Enable Achievements...
I found the byte in my simple (vanilla) test case and also in my modded game. But sadly I haven't yet found the offset bytes just yet not that I needed them(although my modded save's achievement byte was far below nauvis). A really handy thing I found is that in both cases the achievements byte was followed by a 1 so it would really stand out as a "01 01" in the hexeditor(I don't know if that's true for all saves I only tried two).daniel34 wrote:You're close. It's after nauvis, but on most maps very close to it. For the first two maps I used nauvis + constant offset to find the correct location of the byte, but on the third map there was a lot of data after nauvis and before the byte, almost 2mb. I then used the earlier maps to find another hexadecimal string (3 bytes) with constant offset to the byte, on all 5 maps I've tested searching for that string and adding the offset leads to the correct byte.
Thank you, I didn't want my 100+ hour save to go to waste.
Re: Re-Enable Achievements...
Lol no. Mods can execute any commands without disabling achievements. Lua has loadstring so you can even make mods that take a string in an input field and then executes it exactly as if you wrote it in console but without disabling achievements.daniel34 wrote:I'm not sure if I should post direct instructions on how to fix a savegame or give any more hints, since the devs put this limitation in for a good reason and if they had intended that savegames could be fixed by players they would have included that functionality or already mentioned a workaround/fix.
And this is how easy achievements are to get with commands/mods (same thing really)./doc-html/LuaPlayer.html#LuaPlayer.unlock_achievement wrote:unlock_achievement(name)
Unlock the achievements of the given player. This has any effect only when this is the local player and the achievement isn't unlocked so far.
Parameters
name :: string: name of the achievement to unlock
Which means there is 0 penalty for mods, just load your save without mods and get them sent to steam if you want to.
Please make a detailed description or a program that re-enables achievements on a save. Otherwise I guess I'll have to make a mod that unlocks any achievements and gives you a console that doesn't break achievements so that the devs will understand... I really can't stand the inconsistensy in their achievement policy
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re-enable achivements?
merged with existing topic, see the discussion above --daniel34
So I and my friend have this pretty decent factory 40 hours in and I noticed that we were not getting any achievements because my friend wanted to change his color with /c and not with /color. So does anyone how to get the achievements on again?
Sorry if the English is crap.
So I and my friend have this pretty decent factory 40 hours in and I noticed that we were not getting any achievements because my friend wanted to change his color with /c and not with /color. So does anyone how to get the achievements on again?
Sorry if the English is crap.
Re: Re-Enable Achievements...
The limitation I mentioned is being unable to 'fix' a save to keep getting achievements (modded or not) after console commands already have been used in that save.Qon wrote:Lol no. Mods can execute any commands without disabling achievements. Lua has loadstring so you can even make mods that take a string in an input field and then executes it exactly as if you wrote it in console but without disabling achievements.daniel34 wrote:I'm not sure if I should post direct instructions on how to fix a savegame or give any more hints, since the devs put this limitation in for a good reason and if they had intended that savegames could be fixed by players they would have included that functionality or already mentioned a workaround/fix.
Achievement progress is stored in two files, achievements.dat (for vanilla) and achievements-modded.dat. Your way to get achievements (in vanilla and Steam) won't work because achievements are only counted when they are unlocked while no mods are loaded. Calling unlock_achievement in a mod will only unlock the achievement for modded games, it won't show up in vanilla games or on Steam even if you remove the mod afterwards.Qon wrote:And this is how easy achievements are to get with commands/mods (same thing really)./doc-html/LuaPlayer.html#LuaPlayer.unlock_achievement wrote:unlock_achievement(name)
Unlock the achievements of the given player. This has any effect only when this is the local player and the achievement isn't unlocked so far.
Parameters
name :: string: name of the achievement to unlock
[...]
Otherwise I guess I'll have to make a mod that unlocks any achievements and gives you a console that doesn't break achievements so that the devs will understand... I really can't stand the inconsistensy in their achievement policy
Most of us are aware of several ways to get/cheat achievements:
- Use of third-party tools (for Steam achievements)
- Use mods and remove them afterwards (there's even a Bug report, according to the devs it's not worth fixing)
- Modifying the freeplay scenario (another Bug not deemed worth fixing)
- Modifying the contents of achievements.lua
I believe that the majority of players who want to re-enable achievements want to do so because they accidentally used a console command (color change with /c for example) without realising this would disable achievements for that save. They probably didn't want to cheat (as there are easier options mentioned above) and only want to re-enable achievements to keep getting them legitimately.
Re: Re-Enable Achievements...
These are the steps to fix a save that has achievements disabled because of console commands, make sure you understand them before attempting them:
Make sure you understand the instructions above before attempting them and always make a backup. I am not responsible for any savegame corruption / data loss that may result from these instructions.
- Get a Hex editor if you don't have one yet (I recommend HxD, also has portable versions)
- Make a backup of the save file (.zip) somewhere else
- Extract the save (.zip-File) and delete the .zip file afterwards so only the extracted folder stays
- Open the level.dat file in the Hex editor
- Search for the hex string 6A D8 40 (in HxD go to Search --> Find, enter the string and select Hex-values as datatype)
- Starting from 6A select all hex bytes until the Length counter at the bottom says 81 (Note: this is a hexadecimal number, in decimal the length would be 129)
- The last byte you selected (circled red in the picture) is the byte for "achievements disabled because of console commands" and is set to 01, select it and overwrite it with 00
- Save the file and close the Hex editor
- Open Factorio and load the save
- Make sure achievements are actually enabled (click on the achievements icon on the top right, disabled achievements are marked red and you can't track them)
- Save the game under a new name
Make sure you understand the instructions above before attempting them and always make a backup. I am not responsible for any savegame corruption / data loss that may result from these instructions.
Re: Re-Enable Achievements...
daniel34 Thank you so much!
Re: Re-Enable Achievements...
According to the strings in the Crowdin translation system there will be warning, before using the command.
Re: Re-Enable Achievements...
It has already been implemented in 0.13.16:Cordylus wrote:According to the strings in the Crowdin translation system there will be warning, before using the command.
When entering a command for the first time this warning is displayed:FactorioBot wrote:
- Changes
- When the first LUA command is used, players are warned that it would disable achievements.
Using LUA console commands will disable achievements, please repeat the command to proceed.