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.exeJust 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
here:
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.htmlThe
CORE version is enough as the script is using no visuals.