Harmony Runtime Patching Guide

Patch, replace, and intercept .NET methods using Harmony for game modding.

1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/VibePlugins/VibePlugins --skill harmony-runtime-patching-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Harmony Runtime Patching Guide
Source: https://github.com/VibePlugins/VibePlugins/tree/main/.agents/skills/harmony
Command: npx skills add https://github.com/VibePlugins/VibePlugins --skill harmony-runtime-patching-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires HarmonyLib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides comprehensive guidance on using Harmony, a .NET library for dynamically modifying methods at runtime, enabling users to create advanced modding solutions in various game communities.

Core Features & Use Cases

  • Method Patching: Replace, decorate, and intercept methods in existing assemblies.
  • Modding Support: Widely used in communities like Unturned, RimWorld, and Cities: Skylines.
  • Use Case: Develop custom game modifications that change gameplay mechanics, enhance UI, or create entirely new features without altering original code.

Quick Start

Run the Harmony library to create a Harmony instance with a unique ID and patch methods as needed in your mod.

Frequently Asked Questions about Harmony Runtime Patching Guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I patch methods at runtime in .NET game assemblies?

Runtime method patching in .NET uses the Harmony library to dynamically intercept, replace, or decorate methods in compiled game assemblies without altering original code. You create a Harmony instance with a unique ID to apply these modifications.

Can I use Harmony for runtime modification in Unturned or RimWorld mods?

Yes, Harmony supports runtime modification for various game modding communities including Unturned, RimWorld, and Cities: Skylines. It allows you to modify gameplay mechanics and create new features in these .NET environments.

What is the best way to intercept and replace methods in existing .NET assemblies?

The best way to intercept and replace methods in .NET assemblies is using HarmonyLib, which provides runtime patching capabilities to modify method execution flow dynamically for modding solutions.

Do I need a .NET environment to use Harmony for method patching?

Yes, you need a .NET environment and a basic understanding of assembly manipulation and modding to effectively use Harmony for runtime method patching in game modifications.

What are the limitations of runtime method patching with Harmony in game modding?

Harmony method patching requires careful handling of assembly references and depends on a .NET environment. Complex patches may conflict with other modifications targeting the same methods in heavily modded game communities.