Skip to content

TileShopCLI

Stephen Monaco edited this page Jun 20, 2021 · 2 revisions

TileShopCLI is a cross-platform command line interface utility that can import and export resources from TileShop projects. Commands and option flags are case-insensitive.

Currently, only arrangers can be imported and exported. The image format is PNG.

Portable vs x64

Documentation shown here is for the x64 Windows exe. If you are using the portable release, replace TileShopCLI with dotnet TileShopCLI.dll. You must have the .NET runtime available through your terminal to do this.

Commands

Export

Exports one or more project resources by resource key to the specified ExportDirectory. --overwrite will force an overwrite of existing files.

TileShopCLI Export [--overwrite] [--log logFileName] project.xml ExportDirectory ResourceKey1 ResourceKey2 ResourceKey3 ...

ExportAll

Exports all project resources to the specified ExportDirectory. --overwrite will force an overwrite of existing files.

TileShopCLI ExportAll [--overwrite] [--log logFileName] project.xml ExportDirectory

Import

Imports one or more project resources by relative resource location. This location must match the project resource key unless -r is present. Missing resource files are skipped unless -f is present.

TileShopCLI Import [-fr] [--log logFileName] project.xml ImportDirectory ResourceLocation1 ResourceLocation2 ResourceLocation3

ImportAll

Imports all project resources. Missing resource files are skipped unless -f is present.

TileShopCLI ImportAll [-f] [--log logFileName] project.xml ImportDirectory

Print

Prints all project resource keys contained by the given project.

TileShopCLI Print [--log logFileName]

Resource Keys

Resource keys are fairly flexible in regard to leading and trailing slashes as well as backslash vs forward slash. The preferred syntax is /Folder/Folder/Resource, but many can be used as shown in the examples.

Caveats

Projects can contain the same arranger element many times. When importing from images edited by a third-party graphics program which have no concept of repeated elements, TileShop will always overwrite elements referencing the same file region. This will be an issue if the pixel data for an element varies across references. The file region's final data will come from the last resource key inserted containing the element and if multiple references come from within that same arranger, the insertion order is currently iterated left-to-right then top-to-bottom.

Examples

TileShopCLI Print --log ff2.log "FF2\FF2project.xml"

TileShopCLI Export "FF2\FF2project.xml" FF2Extract "/Character Overworld Sprites/Cecil Map" "Character Portraits\Portraits"

TileShopCLI ExportAll --overwrite "FF2\FF2project.xml" FF2Extract

TileShopCLI Import -fr "FF2\FF2project.xml" FF2Extract "\Character Overworld Sprites\Cecil Map" "/Character Portraits/Portraits"

TileShopCLI ImportAll -f "FF2\FF2project.xml" FF2Extract