Jump to content

Synchronising Gisaia no Kajitsu saves with your dropbox


DJNightchild

Recommended Posts

Hi guys,

 

I found a way to synchronise your save games to make sure that, as long as dropbox is installed, you can use your savegames without the need of constantly transfer them over.

 

 

Prerequirements:

 

- Grisaia no Kajitsu is installed (in case of linux https://forums.fuwanovel.net/index.php?/topic/3675-grisaia-no-kajitsu-on-linux-using-wine/)

- Dropbox is installed

- PlayOnLinux is installed (linux only)

 

In windows:

 

1). Create a folder called "games" with a subfolder called "grisaia no kajitsu" in your dropbox folder.

 

2). Move all files from "C:\users\your name\AppData\Roaming\Frontwing\Grisaia no Kajitsu" (in windows ) to your grisaia folder in dropbox.

 

3). Remove "C:\users\your name\Application Data\Frontwing\Grisaia no Kajitsu"

 

4). Open "Command (cmd)"

 

5) Move to the Frontwing folder with "cd C:\users\your name\Application Data\Frontwing\"

 

6) Issue the following command: mklink /J "C:\users\your name\AppData\Roaming\Frontwing\Grisaia no Kajitsu" "C:\users\your name\Dropbox\games\grisaia no kajitsu"

 

This will make sure that everything done to your saves, will be done in dropbox as well

*WARNING* This is by no means a backup, So always make sure you have one. For example if you delete the link you automaticly delete the folder in your dropbox as well *WARNING*

 

In Linux:

 

This is a bit more difficult because in some cases you have multiple config files. For example in my case, if I don't play on fullscreen, my graphics messes up (driver problem). Also movies will be disabled (see install tutorial above). So what we want is that the Windows version syncs his configuration file, but the Linux version doesn't. This tutorial expects you to know how to handle hidden folders and how to create a script file.

 

1). Just like the windows version, create the folders in dropbox (if you haven't already)

 

2). Make sure your saves are in the dropbox folder.

 

3). Clear everything but the info.txt and setup.xml in the original folder. If you don't have the .txt file, create a empty one with a windows line ending (gedit allows you to do that).

 

4). Create a folder called ".Grisaia no Kajitsu". This will be a hidden folder

 

5). Create a script file in your ".Grisaia no Kajitsu" folder and make it executable

 

6). Put this code in your script file (for the explanation of the script, please scroll down to the end of the tutorial):

#!/bin/bash

cd ~/
cp -n ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/*.dat ~/Dropbox/games/grisaia\ no\ kajitsu/
rm ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/*.dat
ln -s ~/Dropbox/games/grisaia\ no\ kajitsu/* ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/
wait 2
/usr/share/playonlinux/playonlinux --run "Grisaia No Kajitsu" %F
wait $!
diff <(cd ~/Dropbox/games/grisaia\ no\ kajitsu/ && find | sort) <(cd ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/ diff ~/Dropbox/games/grisaia\ no\ kajitsu/ && find | sort) >> ~/.Grisaia\ no\ Kajitsu/Grisaia.log
wait 1
sed '1d' ~/.Grisaia\ no\ Kajitsu/Grisaia.log >> ~/.Grisaia\ no\ Kajitsu/no.log
wait 1
sed 's/^.\{,4\}//' ~/.Grisaia\ no\ Kajitsu/no.log >> ~/.Grisaia\ no\ Kajitsu/Kajitsu.log
wait 1
GRISAIA=`sed ':a;N;$!ba;s/\n/\t/g' ~/.Grisaia\ no\ Kajitsu/Kajitsu.log`
cd ~/Dropbox/games/grisaia\ no\ kajitsu/
wait 1
rm $GRISAIA
rm ~/.Grisaia\ no\ Kajitsu/*.log
cd ~/
cp -n ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/*.dat ~/Dropbox/games/grisaia\ no\ kajitsu/
rm ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/*.dat
ln -s ~/Dropbox/games/grisaia\ no\ kajitsu/* ~/.PlayOnLinux/wineprefix/GrisaiaNoKajitsu/drive_c/users/$USER/Application\ Data/Frontwing/Grisaia\ no\ Kajitsu/


7). Now open your shortcut to the game (your .desktop file). It will look like this:

[Desktop Entry]
Encoding=UTF-8
Name=Grisaia Bootmenu
Comment=PlayOnLinux
Type=Application
Exec=/usr/share/playonlinux/playonlinux --run "Grisaia no Kajitsu" %F
Icon=/home/yourname/.PlayOnLinux//icones/full_size/Grisaia no Kajitsu
Name[fr_FR]=Grisaia Bootmenu
StartupWMClass=bootmenu.exe
Categories=

8). Change everything behind "Exec=" to "/home/yourname/.Grisaia\ no\ Kajitsu/Grisaia\ no\ Kajitsu"

9). Change evertyhing behind "StartupWMClass=" to "Grisaia.exe"

 

 

You are done, now for the explanation of the script.

First it copies all the saves from your original folder to the dropbox folder.

It then removes all saves (and links to the saves) from the original folder.

After that it creates links in the original folder to the saves in your dropbox.

Then it startups Grisaia no Kajitsu.

When Grisaia no Kajitsu is closed, it checks if there is or are multiple saves in your dropbox that doesn't exist in the original folder (for example "save0002.dat" is in your dropbox, but the link from the original folder is gone because you deleted a save file).
It then deletes all saves in the dropbox folder that doesn't have a link int the original folder.

Then it copies all the saves from your original folder to the dropbox folder.

It then removes all saves (and links to the saves) from the original folder again and creates links in the original folder to the saves in your dropbox.

This will work flawlessly, however be sure to give dropbox some time to upload the save files before you shutdown the computer/laptop ;)

This concludes the end of my tutorial, if you have any question please post them in the comments below.

Edited by DJNightchild
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...