Skip to content

Commit

Permalink
Add instructions (and warnings) for managing non-Minecraft data
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenBagTwo committed Apr 29, 2024
1 parent 8a4bf76 commit e4f772a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
44 changes: 44 additions & 0 deletions docs/suggestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,50 @@ desktop also means you won't be able to easily schedule your sync operations to
coordinate with server restarts.


## Syncing Data for Other Games

While EnderChest was designed for Minecraft, there is absolutely nothing
stopping you from using it as a distributed and self-hosted
alternative to "cloud saves" for _all_ your games, as any and all files
and folders within your EnderChest folder can be synchronized across all
of the computers where you have EnderChest installed.

For example, let's say I want to share my
[2048](https://flathub.org/apps/org.gnome.TwentyFortyEight)
high scores across all of my machines. Those scores are stored at:
`~/.var/app/org.gnome.TwentyFortyEight/data/gnome-2048/scores`, so what
I could do is:

1. Create a folder inside EnderChest called "2048" (better: put that folder
inside my [Chest Monster](#chest-monster) or another folder called:
"_Non-Minecraft")
1. Move my game data from its current location into that folder:
```bash
mv ~/.var/app/org.gnome.TwentyFortyEight/data/gnome-2048/scores $MINECRAFT_ROOT/EnderChest/_Non-Minecraft/2048/.
```
1. Create the symlink:
```bash
ln -s ~/.var/app/org.gnome.TwentyFortyEight/data/gnome-2048/scores $MINECRAFT_ROOT/EnderChest/_Non-Minecraft/2048/.
```

Then, on every other computer where I have the game installed, I can just delete
the game data folder and replace it with a symlink:
```bash
rm -r ~/.var/app/org.gnome.TwentyFortyEight/data/gnome-2048/scores
ln -s ~/.var/app/org.gnome.TwentyFortyEight/data/gnome-2048/scores $MINECRAFT_ROOT/EnderChest/_Non-Minecraft/2048/.
```

and my save data will be automatically synchronized.

!!! danger
Only do this if you sync your EnderChests **religiously**—unlike with, say, Steam cloud saves,
there is nothing in EnderChest's sync routines that check to make sure the data being written
is newer than the data being _overwritten._

!!! danger "Note when uninstalling"
Note that these linked files ***will not*** be automatically copied to their original homes
if/when you ["break" your EnderChest](../usage/#uninstalling).

## Effective Syncing

### Passwordless SSH Authentication
Expand Down
13 changes: 11 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,17 @@ point into the EnderChest folder with hard copies of those resources.
then after breaking, your instances will simply contain _direct links_ to
those files and folders.

After that completes, you can safely delete your EnderChest folder and remove
the package via your Python package manager, _e.g._
After that completes, you can remove the package via your Python package manager,
_e.g._

```bash
pipx uninstall enderchest
```

and safely delete your EnderChest folder

!!! danger
Make sure before you delete your EnderChest folder to move or preserve
any files or folders you've been
[manually synchronizing for non-Minecraft games or applications](../suggestions/#syncing-data-for-other-games),
as those links are _not_ automatically replaced by the `break` command.

0 comments on commit e4f772a

Please sign in to comment.