Amanita Design forum

Machinarium => Lost Saved Games? => Topic started by: Oldes on December 21, 2009, 07:59:10 pm



Title: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: Oldes on December 21, 2009, 07:59:10 pm
Some people using Windows reported that they lost their game positions when used clean up tool's like CCleaner. The game is storing it's game states in a file which is on Windows located under %APPDATA% folder which is being cleaned by the tools like the one above (if you don't add exceptions).

Because we were asked if it's possible to provide some way how to backup (store/restore) this file, I have written this tool:
http://machinarium.net/download/saves.exe (http://machinarium.net/download/saves.exe)

Just copy it to directory where you have your Machinarium.exe file and run it. You will be asked if you want to store the remote game's file to local dir and or restore this file from the local dir to the place which is used by the game.


The tool is made in REBOL (which I used to program the game as well) and it's source is:

Code:
REBOL [
title: "Machinarium save's tool"
purpose: "Stores/restores Machinarium's save file (local shared object)"
]

saves: context [
verbose: true

store: func[
"Gets Machinarium's save file and stores it in the current dir"
][
write/binary %Machinarium.sol read/binary get-machinarium.sol-file
end-message "Machinarium.sol file found and stored."
]

restore: func[
"Gets Machinarium's save file from the current dir and restores it"
][
write/binary get-machinarium.sol-file read/binary %Machinarium.sol
end-message "Machinarium.sol file found and restored."
]

get-current-dir-path: func[
"Returns absolute path to current dir without a drive letter"
/local current-dir
][
current-dir: what-dir
unless exists? current-dir/Machinarium.exe [
end-message "ERROR: Cannot find Machinarium.exe file!"
]
find/tail next current-dir #"/"
]

get-machinarium.sol-file: func[
"Returns Machinarium.sol file or quits"
/local app-dir sol-dirs sol-file
][
app-dir:  to-rebol-file get-env "APPDATA"
sol-dirs: join app-dir %/Macromedia/Flash%20Player/#SharedObjects/
foreach id read sol-dirs [
sol-file: rejoin [
sol-dirs
id
%localhost/
get-current-dir-path
%Machinarium.exe/Machinarium.sol
]
if exists? sol-file [
if verbose [
print join "^/SOL file:^/" to-local-file sol-file
]
return sol-file
]
]
end-message "ERROR: machinarium.sol file not found!"
]

end-message: func[msg][
if any [
verbose
find msg "ERROR"
][
print join "^/" msg
ask "(Press enter to continue) "
]
]

switch/default system/script/args [
;command line version:
"store"   [verbose: false store  ]    
"restore" [verbose: false restore]
][
;interactive version:
forever [
prin  "^(1B)[J" ;clears screen
print "== Machinarium's saves (local shared object) ================================="
print "=============================================================================="
print "1) store   (Gets Machinarium's save file and stores it in the current dir)"
print "2) restore (Gets Machinarium's save file from the current dir and restores it)"
print "3) quit"
print "------------------------------------------------------------------------------"
switch ask "What do you want? [1,2,3] " [
"1" [store]
"2" [restore]
"3" [quit]
]
]
]
]


If you want to run the script instead of the exe you must download REBOL interpreter which you can find at this link: http://www.rebol.com/download.html (http://www.rebol.com/download.html)
The CORE (http://www.rebol.com/platforms.html) version is enough as the script is using no visuals.



Title: Re: saves.exe = Machinarium's simple save file tool
Post by: moku1234 on December 22, 2009, 07:29:29 pm
Hey... I also faced same problem!
I done a very simple thing....

1. Go to CCleaner
2. Click on "Applications"
3. Uncheck Flash Player application i.e. "Adobe Flash Player" from Multimedia Group
Now run cleaner ....
Ur saved game will not be cleaned!!
smart way.....! ;)


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: solt87 on January 09, 2010, 10:55:59 pm
 I tried to use saves.exe, but I got the following error message ("Rendszergazda" is the name of the user):

 ** Access Error: Cannot open /C/Documents and Settings/Rendszergazda/Application Data/Macromedia/Flash Player/#SharedObjects/
** Where: get-machinarium.sol-file
** Near: foreach id read sol-dirs [
    sol-file: rejoin [
        sol-dirs
        id
        %localhost/
        get-current...
** Press enter to quit...


I copied saves.exe to the folder where machinarium.exe is. Did I miss something?

edit: Problem solved. I inndeed missed something: it was Firefox's BetterPrivacy... Sorry for the "false alarm".


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: huf on January 22, 2010, 09:36:22 am
Thanks for taking this matter seriously.

The save file works just fine. :)


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: Multik on September 04, 2010, 11:49:56 am
Great work!
All is fine. Thanx :-*


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: davecrockett on December 13, 2010, 09:34:30 pm
The link that you gave to "saves.exe" does not work! Would love to download the fix.  Thanks. JAD
What's a CCleaner?


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: librainian on December 15, 2010, 11:57:24 pm
CCleaner is a popular tool from PiriForm which can remove hidden temporary files from many default locations on Windows based computers. It has a number of other built in tools like a registry cleaner and some other handy things.


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: davecrockett on December 16, 2010, 05:32:14 pm
OK, I moved the SOL file to the Machinarium game directory and used the savedgames tool,tested it in game and it works. But after I close the game and return to pick up where I saved it's gone.


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: davecrockett on December 17, 2010, 06:30:58 pm
Look here: http://www.adobe.com/support/security/bulletins/apsb07-12.html
Just had the urge to check it out.


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: ABoretz on December 18, 2010, 08:52:50 pm
OK, I moved the SOL file to the Machinarium game directory and used the savedgames tool,tested it in game and it works. But after I close the game and return to pick up where I saved it's gone.

By right-clicking on the screen you get to the Adobe Flash Player Settings Tabs, select the little folder icon.
"How much information can local store on your computer?" Make sure the slider is NOT set to none! At least 100 KB or more are needed!

Source: http://forum.amanita-design.net/index.php?topic=463.msg2228#msg2228 (http://forum.amanita-design.net/index.php?topic=463.msg2228#msg2228)


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: jenso942 on December 25, 2010, 11:37:09 pm
Hey... I also faced same problem!
I done a very simple thing....

1. Go to CCleaner
2. Click on "Applications"
3. Uncheck Flash Player application i.e. "Adobe Flash Player" from Multimedia Group
Now run cleaner ....
Ur saved game will not be cleaned!!
smart way.....! ;)
ouuuh, thats why... i was really wondering why all my save games was deleted the other day, and then now i know its because of that im using ccleaner all the time ;S, thanks! :D


Title: Re: saves.exe = Machinarium's simple save file tool
Post by: peter tron on March 28, 2012, 03:55:35 am
hi!

i'm having the same problem, but i've read through the thread.

i have vista 32
i use firefox 11.0

i have made about three save slots, and whenever i quit and go back into the game, it gives me the option to 'resume game'.

i am only on the beginning screen, but i have used the rope and magnet to retrieve my missing arm.

i decided to 'save'.

i reloaded, but it starts right back at the beginning!

is this correct?

i have downloaded the saves.exe and it resides in the same dir folder.
i have run it and typed 1, and it says:

ERROR: machinarium.sol file not found!
(Press enter to continue)

i press enter, then get this:

** Script Error: read expected source argument of type: file url object block
** Where: store
** Near: write/binary %Machinarium.sol read/binary get-machinarium.sol-file
end-message
** Press enter to quit...

i have manually searched and located the sol file since playing this, but do i leave it where it is, or move it somewhere?
the file is on my pc, but saves.exe says that it isn't.

edit update:

because i had just begun the game, i was not sure how the save function worked.
i have now worked out that you cannot save half-way through one screen!
when i reached the point where you slip on the oil and land in a room below, i saved.

i quit, went back in, loaded that last save and it worked!

so far so good!

baz.



Mod Comment: Glad you're doing okay, baz.  ( hope you don't mind, but i deleted your duplicate post... )  ~A


Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: evergreen on January 16, 2013, 05:41:13 pm
I'm having a problem with this program.
I copied the saves.exe to "C:\Users\Username\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\K8GF2W75\localhost\Program Files (x86)\Steam\steamapps\common\Machinarium" which is where Machinarium.exe is located. Machinarium.exe is a folder though, not an executable file, and in it is the Mechanarium.sol. When I run saves.exe there, it gives me this:

What do you want? [1,2,3] 1

ERROR: machinarium.sol file not found!
(Press enter to continue)
** Script Error: read expected source argument of type: file url object block
** Where: store
** Near: write/binary %Machinarium.sol read/binary get-machinarium.sol-file
end-message
** Press enter to quit...

When I copy it into the Mechanarium.exe folder and run it I get this:

What do you want? [1,2,3] 1

ERROR: Cannot find Machinarium.exe file!
(Press enter to continue)

ERROR: machinarium.sol file not found!
(Press enter to continue)
** Script Error: read expected source argument of type: file url object block
** Where: store
** Near: write/binary %Machinarium.sol read/binary get-machinarium.sol-file
end-message
** Press enter to quit...

Now I don't know if I'm in the right place to run saves.exe in the first place, but I tried following the instructions from a different thread to get there, don't know what/if I'm doing something wrong.

Oh yea, Windows 7 64bits.


Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: Alex on January 16, 2013, 06:59:35 pm

@evergreen,
Sorry to sound dense, but are you saying that you're playing Machinarium via Steam and are losing your saved games WITHOUT resorting to saves.exe?



Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: evergreen on January 16, 2013, 07:45:48 pm
Yes, I'm playing via Steam, actually my brother is on his computer.
He rebooted his computer today and the saved games were gone, he asked me for help so I came here.
I just saw that he has CCleaner on his machine as well, so I'm going to ask him if he ran that lately when he comes home.
Should the saved games usually not disappear when playing via Steam?


Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: Alex on January 16, 2013, 07:54:54 pm
Quote from: evergreen
I'm playing via Steam, actually my brother is on his computer... I just saw that he has CCleaner on his machine as well

That's probably what deleted your saved games.  Otherwise your saved games should NOT be disappearing when playing via Steam.

Have a look at the Warning to all Privacy Sweep tools (CCleaner, ASC, etc...) users! (http://forum.amanita-design.net/index.php?topic=359.0.html) thread for instructions on how to configure CCleaner to leave Machinarium saved games alone.



Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: skidpro on January 21, 2013, 08:22:47 pm
god there is no way of previewing then submitting arrgghhhh!

win 7

the path and tool doesnt work on my machine ERROR cannot find Machinarium.exe

C:/Program Files(x86)/Machinarium/etc all there on PC!inc a save folder which is empty

any help please? And why make a good game where people have this save problem????

also my Collectors I got of amazon was missing Concept art book and A3 poster so I am not a happy camper:(

No replacement but they let me keep the game! But the game doesnt save,so what is the point? I would love to play it and save and use CCleaner as no other game does this!

The save path u state is not on my machine, it stops at Flash Player/Ramdom Number/empty

skidpro


Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: aaron on August 19, 2013, 10:33:09 pm
How can a Grandma like me get this "fix" in the right place?  I'm running Windows 7.
thanks


Title: Re: saves.exe = Machinarium's simple save file tool [ for Microsoft Windows ONLY ]
Post by: Alex on August 23, 2013, 05:10:41 pm
Quote from: aaron
How can a Grandma like me get this "fix" in the right place?  I'm running Windows 7.
thanks

Hi aaron.  I'm thinking that maybe a "Grandma" such as yourself will find a conversation I had with a "Grandpa" about how to use the saves.exe program helpful...   ;D
Look here (http://forum.amanita-design.net/index.php?topic=3631.msg10666#msg10666)