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.
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:UsersUSERDocumentsProjectsMyProject"
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:UsersUSERDocumentsProjectsMyProject" --modfile="C:UsersUSERDocumentsMy GamesTabletop SimulatorModsWorkshopexistingMod.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:UsersUSERDocumentsProjectsMyProject" --modfile="C:UsersUSERDocumentsMy GamesTabletop SimulatorModsWorkshopexistingMod.json"
$moddir = directory to read from
TTSModManager.exe --moddir="C:UsersUSERDocumentsProjectsMyProject"
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:UsersUSERDocumentsProjectsMyProject"
--objin="C:UsersUSERDocumentsProjectsMyProjectdownloadablecontentfoo.json"
--objout="C:UsersUSERDocumentsProjectsMyProjectto_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:UsersUSERDocumentsProjectsMyProject"
--reverse
--objin="C:UsersUSERDocumentsProjectsMyProjectready_to_download.json"
--objout="C:UsersUSERDocumentsProjectsMyProjectdownloadablecontent"
If you are developing a feature and would like to run the tool, use this instead of TTSModManager.exe
go run main.go --moddir="..."