maptool-extractor-cli
v0.1.4
Published
Unpack and pack MapTool .cmpgn campaigns for macro editing
Downloads
51
Maintainers
Readme
maptool-extractor-cli
Command-line tool to unpack and repack MapTool campaign files (.cmpgn) so you can edit macros outside the client.
Requires Node.js 18+.
Global install
npm install -g maptool-extractor-cliAfter installation, the maptool-extractor command is on your PATH (the npm package name is maptool-extractor-cli).
Verify:
maptool-extractor --helpTypical workflow
Unpack the campaign into a working directory (default: next to the file, with a
_worksuffix):maptool-extractor unpack "/path/to/my-campaign.cmpgn"Optionally pass an output directory:
maptool-extractor unpack "/path/to/my-campaign.cmpgn" "/path/to/work_dir"Edit macro files in the generated tree (e.g. in a text editor).
Pack back to
.cmpgn:maptool-extractor pack "/path/to/work_dir" "/path/to/my-campaign_edited.cmpgn"Prefer writing a new file first, verifying in MapTool, then replacing the original.
Commands
| Command | Description |
|---------|-------------|
| maptool-extractor unpack <campaign.cmpgn> [outputDir] | Extracts .cmpgn contents into a working directory |
| maptool-extractor pack <workDir> <output.cmpgn> | Rebuilds a campaign file from the working directory |
| maptool-extractor macro list <workDir> | Lists campaign and token macros in an unpacked directory |
Help for a single command:
maptool-extractor unpack --help
maptool-extractor pack --help
maptool-extractor macro list --helpLocal development (global link)
If you clone the repo instead of installing from npm:
npm install
npm run build
npm linkThen maptool-extractor in the shell points at your local build.
License
MIT
