This golang library is intended to be able to convert source-controllable config and luascript into a functioning json file that can be loaded into TTS as a workshop mod.
- Handles Lua bundling!
- Handles XML bundling!
- Automatically builds on any incoming PR
The binary is built by slsa-framework/slsa-github-generator and can be found attached to the latest release, for example: https://github.com/argonui/TTSModManager/releases/tag/v0.2.4/TTSModManager.exe for windows. In the examples i'll refer to the exe, but you can use the TTSModManager-Liunux with the same expected behavior.
See https://github.com/argonui/TTSModManager.action for automated building of the mod on every PR / release.
$moddir = directory to read from
TTSModManager.exe --moddir="C:\Users\USER\Documents\Projects\MyProject"
The finished json file is found in $moddir/output.json by default. if you'd like
to specify the output file you can use the modfile
argument.
$moddir = directory to write to $modfile = existing tts mod file to read from
TTSModManager.exe --reverse --moddir="C:\Users\USER\Documents\Projects\MyProject" --modfile="C:\Users\USER\Documents\My Games\Tabletop Simulator\Mods\Workshop\existingMod.json"
If you'd like the bundled lua requirements to be written to the src/
folder, pass --writesrc
.
$ttsmodfile = existing tts mod file to read from
$moddir = directory to write to
TTSModManager.exe --reverse --moddir="C:\Users\USER\Documents\Projects\MyProject" --modfile="C:\Users\USER\Documents\My Games\Tabletop Simulator\Mods\Workshop\existingMod.json"
$moddir = directory to read from
TTSModManager.exe --moddir="C:\Users\USER\Documents\Projects\MyProject"
TTS allows you to download content into a active game. This content must be a json file in the form of a single object. In order to accomodate storing these downloadable json files, TTSModManager can assemble and reverse these files.
In this example foo.json the root of a partial mod object you'd like to represent as a downloadable json.
TTSModManager.exe --moddir="C:\Users\USER\Documents\Projects\MyProject"
--objin="C:\Users\USER\Documents\Projects\MyProject\downloadable\content\foo.json"
--objout="C:\Users\USER\Documents\Projects\MyProject\to_be_downloaded.json"
This process assumes you already have your file you are used to downloading, and want to decompose it into sub-objects and luascript etc.
Please note that objout is a directory and the trailing slash is needed.
TTSModManager.exe --moddir="C:\Users\USER\Documents\Projects\MyProject"
--reverse
--objin="C:\Users\USER\Documents\Projects\MyProject\ready_to_download.json"
--objout="C:\Users\USER\Documents\Projects\MyProject\downloadable\content\"
If you are developing a feature and would like to run the tool, use this instead of TTSModManager.exe
go run main.go --moddir="..."