RaptorRush135.PvZR.Sdk
1.2.1
<Sdk Name="RaptorRush135.PvZR.Sdk" Version="1.2.1" />
#:sdk RaptorRush135.PvZR.Sdk@1.2.1
🌱 PvZRSdk
A MSBuild Sdk for creating MelonLoader mods for Plants vs. Zombies™: Replanted.
Overview
PvZRSdk simplifies the development of MelonLoader mods for PvZ: Replanted by providing automated project setup, version control, deployment, and packaging through an MSBuild SDK.
To get started, see PvZRModTemplate.
✨ Features
🎯 Project Defaults
- .NET 6.0 target framework
- Nullable reference types
- Implicit usings
- Latest C# language version
- x64 platform targeting
- Invariant globalization
- Base EditorConfig
🔄 Automatic Versioning
- MinVer Integration: Automatically determines mod version from git tags
- Manual Override: Set
ModVersionproperty to override auto-detection
📝 Auto-Generated ModInfo.cs
- Automatically generates metadata file during compilation
- Contains mod information:
- Name: Derived from RootNamespace
- Version: From
ModVersionproperty - Author: From
ModAuthorproperty - DownloadLink: From
ModDownloadLinkproperty
- Compiled directly into your DLL for easy access at runtime
✅ Build Validation
- Validates
PvzReDirpath exists before compilation - Ensures MelonLoader is installed in the specified directory
🚀 Automatic Deployment
- Copies compiled DLL to
{PvzReDir}\Modsfolder post-build
📦 Release Packaging
- Debug info: Emits debugging information into the .dll.
- Release zip: Creates
.zippackages automatically- Folder Structure: Maintains proper
Mods\hierarchy in zip
- Folder Structure: Maintains proper
🩹 Polyfills
🔍 Code Quality Analysis
Integrated code analyzers:
⚙️ Configuration
Configurable Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
IsModBuild |
bool |
true |
Whether to apply mod-specific build targets (deployment, packaging, Melon References & Metadata). Set false for library projects. |
PvzReDir |
string |
C:\Program Files (x86)\Steam\steamapps\common\PVZ Replanted |
Path to PvZ: Replanted installation directory. |
ModVersion |
string |
(Auto-detected by MinVer) | Explicit mod version override. If empty, MinVer automatically determines version from git tags. |
ModAuthor |
string |
??? |
Mod creator/author name. |
ModDownloadLink |
string |
TODO |
Download or repo URL of the mod. |
ModMelonType |
string |
(Required) | Fully qualified type name of the mod class that inherits from MelonMod. |
ModColor |
string |
(Optional) | Color for the mod in the MelonLoader console. Format: ARGB (e.g., 255, 0, 200, 0). |
ModZipReplaceVersionDots |
bool |
(None) (false) |
Replace dots in version number with dashes in zip filename (e.g., MyMod_1.0.0.zip → MyMod_1-0-0.zip). |
ModEnvironmentReference |
Item |
(None) | Adds an assembly reference from $(PvzReDir)\MelonLoader\net6 (e.g., <ModEnvironmentReference Include="Microsoft.Extensions.Logging.dll" />). |
📚 Version Management
Using Git Tags with MinVer
Versions are automatically determined from git tags:
# Create a version tag
git tag v1.0.0
git push origin v1.0.0
# Build will automatically use version 1.0.0
dotnet build
See MinVer for additional configuration options.
Manual Version Override
If you need to bypass MinVer:
<PropertyGroup>
<ModVersion>1.0.0</ModVersion>
</PropertyGroup>
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.