Project Zomboid Studio
April 24, 2026 ยท View on GitHub
Original project repository: Konijima/project-zomboid-studio
This is a CLI tool for creating and maintaining Lua mods for Project Zomboid with ease. Visit the link above for:
- Project Zomboid Legacy support (Build 41)
Key Changes in This Branch
- Compatibility in this branch: Project Zomboid b42.17.0 MP
- Added AGENTS.md with build commands, architecture overview, and code style guidelines
- Updated mod ID formatting to be Unix-compatible (Windows and Linux):
- Spaces converted to underscores: "Teleportal Prototype" โ
teleportal_prototype - Special characters removed: "My-Cool Mod!" โ
my_cool_mod - Maintains camelCase without conversion: "TeleportalPrototype" โ
teleportalprototype
- Spaces converted to underscores: "Teleportal Prototype" โ
- Reworked scaffolding to rely on cached templates with explicit refresh via
--force-updateorpzstudio update - Removed the legacy
installLibraries()fallback from intended scaffolding behavior in favor of template-driven project creation - Added
.pzstudioignorefiltering for scaffold and build flows, with built-in maintenance exclusions such as**/.gitkeep - Build 42 Layout Support (NEW):
- Added
pzstudio modinfo generatecommand to authormod.infofiles directly in your source tree. - Supports Build 42 nested layouts: generates into
common,42, or version-specific branch folders containinglua. - Automatically ignores root-level
mod.infofor projects using the new nested layout. - Respects
build.modInfoproject configuration to skip or automate metadata generation.
- Added
- Updated mod.info output path to respect branch-based layouts in both source and workshop builds.
- Enhanced build command to create dual workshop outputs:
- Main workshop:
{projectTitle}with standard mod IDs and configured visibility. - Dev branch workshop:
{projectTitle} - dev_branchwith_devsuffix on mod IDs. - Each mod in dev branch has its ID field prefixed in the generated metadata.
- Dev branch workshop always sets visibility to
unlistedregardless of project.json settings. - Dev branch workshop title appends
- dev_branchsuffix:title={projectTitle} - dev_branch. - Dev branch workshop.txt has no
id=field (excluded automatically).
- Main workshop:
- Robust I/O Validation & Migration:
- Implemented runtime validation for
project.jsonandconfig.jsonwith descriptive Where-What-Why error reporting. - Added
pzstudio migratecommand to safely upgrade legacy configuration files while preserving unknown fields. - Expanded
IModConfigwith support forpack,tiledef,url,versionMin, andversionMax. - Added
--verbosemode for detailed diagnostic logging across all commands. - Stubbed experimental
watchcommand as "Not implemented yet!" to avoid instability.
- Implemented runtime validation for
- Updated documentation to reference original project repository
4. Quality Workflows
Maintain code quality using the following commands:
# Run linting
pnpm run lint
# Run linting and fix auto-fixable issues
pnpm run lint:fix
# Run unit tests
pnpm run test
# Run tests in watch mode
pnpm run test:watch
# Run tests with coverage
pnpm run test:coverage
The automated test suite currently covers deterministic library logic including argument parsing, expectation validation, and shared helper utilities. Manual verification remains required for terminal UI, file watching, and integration-heavy command flows.
๐ ๏ธ Building from Source
This project is a TypeScript CLI tool. While it uses some workspace features, you can build it directly from the root.
Prerequisites
1. Install Dependencies
From the project root, run:
pnpm install
2. Build the CLI Tool
pnpm run build
3. Run Quality Checks
pnpm run lint
pnpm run test
Build the VS Code Extension
After the CLI project is built, you can build the extension:
pnpm --filter pzstudio build
The extension bundle will be available at packages/vscode-extension/dist/extension.js.
Package for Marketplace
To generate a .vsix file for local installation or publishing:
pnpm --filter pzstudio vsce:package