This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
ttsbackup with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
This tool backs up Tabletop Simulator Mods by downloading and storing the mod file and all associated assets locally. Then, it lets you change all the URLs in the mod file to point to your copied files, hosted on dropbox or wherever else. Why would you want to do this? A few reasons.
npm install -g ttsbackup
After installation, run
ttsbackup. Follow the on-screen prompts. Open up Tabletop Simulator, and your mod will appear as
<Original Mod Name> Backup.
To find out which mods you have installed, we need to read WorkshopFileInfos.json in your TabletopSimulator mods directory WorkshopFileInfos.json path: (/Users/stefankendall/My Games/Tabletop Simulator/Mods/Workshop/WorkshopFileInfos.json)
Since that's correct, I hit
[ENTER] to use the default selection. Next, I see all the mods I have installed:
... : Secret Hitler : Cool Custom Game Mod number:
57 and hit
[ENTER]. I'd like to make a full copy of all assets of
Cool Custom Game Mod and host it on my public dropbox folder, so it can't go down because a few files go missing. I get the following prompt:
Where would you like to save downloaded files? directory: (/Users/stefankendall/Dropbox/public/games)
This is where I'd like to copy the game, so I hit
[ENTER] and accept the default.
What url should be used to prefix mod files? e.g. https://dl.dropboxusercontent.com/u/<userid>/games url:
This is the tricky part. You need to find out your dropbox public folder url. I put in my url and hit enter:
public folder, I have a
games directory where I want my backups to go. And that's it! The rest is automatic:
downloading: http://... downloading: https://... downloading: https://... All files downloaded. Mod file copied to: /Users/stefankendall/Dropbox/public/games/Cool Custom Game Mod/Workshop/Cool Custom Game Mod.json rewriting /Users/stefankendall/Dropbox/public/games/Cool Custom Game Mod/Workshop/Cool Custom Game Mod.json with base url: https://dl.dropboxusercontent.com/u/1234EXAMPLE/games Mod rewrite finished Copying (installing) /Users/stefankendall/Dropbox/public/games/TTS Racing!/Workshop/TTS Racing!.json to /Users/stefankendall/My Games/Tabletop Simulator/Mods/Workshop/TTS Racing!.json Installed! Mod will appear as "Cool Custom Game Mod Backup" When all should be available on the public internet (i.e. synced via dropbox), run this command: ttsbackup validate "/Users/stefankendall/Dropbox/public/games/Cool Custom Game Mod/Workshop/Cool Custom Game Mod.json"
I need to wait a few seconds for the files to sync on dropbox, and when all files are done syncing, I can validate the mod:
ttsbackup validate "/Users/stefankendall/Dropbox/public/games/Cool Custom Game Mod/Workshop/Cool Custom Game Mod.json" [OK] https://dl.dropboxusercontent.com/... [OK] https://dl.dropboxusercontent.com/... CHECKED: 24 PASSED: 24 FAILED: 0
Sweet! My mod is now fully backed up. When I play
Cool Custom Game Mod Backup in Tabletop Simulator, I'm playing 100% from my own hosted files on dropbox.
All of the paths that are entered will save for the next time I run
ttsbackup, making the next backup much simpler.
Sometimes, mods get pulled before you can back them up. But that's okay! So long as you have all the mod resources locally, you should be able to recover the mod.
To recover a mod that has been taken off the store, run
ttsbackup recover. The process is similar to the main
ttsbackup command documented above.
It's my hope that this tool helps keep mods alive. If you like ttsbackup and want to say thanks, I always appreciate tips.