Euro Fishing

Euro Fishing

Not enough ratings
Euro Fishing profile backup script
By darkje
Since so many people lost their profile by the October update before the hotfix and on occasion at other times too, I've made a simple backup script that creates 10 backup slots in your windows user directory, so you can restore to a previous save if needed.
   
Award
Favorite
Favorited
Unfavorite
Intro
The script will launch the game and when you exit it will copy a backup of your profile to a "EuroFishing" folder your documents directory. It will keep backups of your last ten sessions, called "EF-profile-backup-0" to "EF-profile-backup-9". When all ten are used the oldest one will be replaced by the new one. Upon exit you will be presented with a restore option, if your profile was damaged you can press R. Then the last save will be deleted and the second newest profile will be restored. If you don't need to restore, just wait for a few seconds and the script will end itself.
So when you notice your profile is empty you can just exit the game as normal and use the restore option to go back to your previous save.
Be aware that these are only local backups, to be absolutely sure you have backups in case of an emergency, crash or broken disk, you should always make frequent backups of your important files on an other (external) disk or in the cloud.
What is it
It is a simple batch file, you have to put in "Your Steam directory\userdata\{UserID}". Your Steam directory is usually located in "C:\Program Files(x86)\Steam" or in "C:\Steam". If you purposely installed Steam in an other location you should know where it is. {UserID} is a number you should find in the 'userdata' folder.


- image showing c:\steam\userdata\userid directory, with the script in it.

Download or create the batchfile and make a shortcut to it on your desktop by dragging it there with the right mouse button held down, drop and select "create shortcut here".

It is important you start the game using that shortcut of course. Don't launch from steam or the original shortcut, as no backups will be made if you do.
Download
You can download the batchfile as a rar from my google drive, you have to unpack it in the location mentioned.
https://drive.google.com/file/d/1mh8q1xZXBv7A5N7h75Zt_NE9gvux4be5/view?usp=sharing
Restoring
If you notice your profile is gone or damaged, just exit the game and you will be asked if your profile was damaged and you want to restore your previous save. You can also manually restore from your documents folder, you should find a "EuroFishing" folder there, sort the contents of that by clicking 'date modified' and copy the "remote" folder from the save BEFORE the last one to Your Steam directory\userdata\{UserID}\314520 overwriting what is there. Now you can start the game up and you should have your last profile back.
The Script
You can also create the batchfile yourself with the code below.

Open a windows explorer window and go to "Your Steam directory\userdata\{UserID}". Your Steam directory is usually located in "C:\Program Files(x86)\Steam" or in "C:\Steam". If you purposely installed Steam in an other location you should know where it is. {UserID} is a number you should find in the 'userdata' folder.

In that location create a new txt file (right click on an empty spot/new/text document), open it with notepad and copy the code below into it and save it. You can close notepad now.
Rename that file to "EF.bat" or whatever name you like, and create a shortcut to it on your desktop by dragging it there with the right mouse button held down, drop and select "create shortcut here".

It is important you start the game using that shortcut of course. Don't launch from steam or the original shortcut, as no backups will be made if you do.

@echo off cls rem *** main script starts, set window title *** rem -------------------------------------------- title Euro Fishing profile backup script v0.31 by Darkje echo %~p0| find /i "\steam\userdata\" 1>nul if errorlevel 1 ( echo Script is not running from the right directory! goto :the-end ) if not exist 314520 ( echo Target directory not found! goto :the-end ) rem *** set backup filename *** set f="EF-profile-backup-" rem *** launch game *** echo Starting game, please leave this window open. start /d "..\..\" steam.exe -applaunch 314520 rem *** wait for game to start *** call :sleep 25 rem *** check if the game is running every 5 sec *** :start_test call :sleep 5 cls echo Game running. wmic process where name="FishingGame-Win64-Shipping.exe" get name 2>nul |find "FishingGame-Win64-Shipping.exe" >nul if %errorlevel%==0 goto :start_test rem *** the game has ended, make a backup of profile and exit script *** cls echo Detected game ending. echo. call :backups call :restore :the-end echo. echo Exiting now, goodbye! call :Sleep 5 exit 0 rem *** main script ends here *** rem *** sub routines, called from main script *** rem --------------------------------------------- rem *** sleep routine, use timeout for %1 seconds *** :sleep timeout /t %1 /nobreak >nul goto :eof rem *** backup routine *** :backups rem *** check if the eurofishing directory exists in the userprofile\documents folder, if not create it *** if not exist "%userprofile%\documents\EuroFishing" md "%userprofile%\documents\EuroFishing" rem *** start a 0-9 cycle of checking the backup slots for an empty slot *** for /L %%N in (0 1 9) do ( rem *** if the backupslot N does not yet exist, create it *** if not exist "%userprofile%\documents\EuroFishing\%f%%%N" ( md "%userprofile%\documents\EuroFishing\%f%%%N" rem *** and also create a 'remote' folder in there *** md "%userprofile%\documents\EuroFishing\%f%%%N\remote" rem *** now copy the profile to created directory *** xcopy 314520\remote "%userprofile%\documents\EuroFishing\%f%%%N\remote" /e /q >nul rem *** report in what slot it was stored, wait a bit and then exit. echo Saved backup in slot %%N. call :sleep 5 goto :eof ) ) rem *** if there is no empty backup slot, find the oldest one ... *** FOR /f "delims=" %%a in ('dir "%userprofile%\documents\EuroFishing\%f%*" /t:c /a:d /o:d /b') do ( rem *** and remove it *** rd /s /q "%userprofile%\documents\EuroFishing\%%a" goto :break ) :break rem *** now there is an empty slot, return to the backup routine *** goto :backups rem *** restore routine *** :restore rem *** count the number of backups *** set /a count=1 setlocal ENABLEDELAYEDEXPANSION FOR /f "delims=" %%a in ('dir "%userprofile%\documents\EuroFishing\%f%*" /t:c /a:d /o:-d /b') do ( set /a count=count+1 ) if !count! GTR 2 ( rem *** if there are 2 or more backups... *** cls rem *** ask if the current profile was damaged and user wants to restore the one before that *** choice /c rx /t 15 /d x /n /m "If your profile was damaged press 'R' within 15 sec. to restore previous save." if !errorlevel!==1 ( rem *** if so, find the second newest save slot... *** set /a nr=1 FOR /f "delims=" %%a in ('dir "%userprofile%\documents\EuroFishing\%f%*" /t:c /a:d /o:-d /b') do ( if !nr!==2 ( rem *** and ask for confirmation to restore that profile *** echo. choice /c yn /m "Are you sure you want to restore profile %%a?" if !errorlevel!==1 ( rem *** when the ok was given, copy the backup to the game's folder *** xcopy "%userprofile%\documents\EuroFishing\%%a" 314520 /e /q /y >nul echo. echo Profile restored! rem *** look for the newest save (the one that was damaged)... *** set /a rm=1 FOR /f "delims=" %%d in ('dir "%userprofile%\documents\EuroFishing\%f%*" /t:c /a:d /o:-d /b') do ( if !rm!==1 ( rem *** ... and delete that one *** rd /s /q "%userprofile%\documents\EuroFishing\%%d" ) set /a rm=rm+1 ) ) goto :skip ) set /a nr=nr+1 ) ) ) :skip endlocal goto :eof

If you need more help or want to know what exactly this script does, please ask.
Updates
I will update if needed, or maybe if I feel like extending the script a bit more. The history of edits will be shown below.
17-nov-2017, v0.31 I had left some of the old comments from 0.21 in 0.3. Those are removed.
10-nov-2017, v0.3 Added a restore option.
19-oct-2017, v0,21 There was a small mistake in 0.2's output to the screen, I fixed.
18-oct-2017, v0.2 Updated the script a bit to be more verbose.
09-oct-2017, v0.1 Initial version of the script.