Git Product home page Git Product logo

harmony's Introduction

Harmony
Version 2
A library for patching, replacing and decorating
.NET and Mono methods during runtime.

About

Harmony gives you an elegant and high level way to alter the functionality in applications written in C#. It works great in games and is well established in titles like 7 Days To Die, BattleTech, Besiege, Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Ravenfield, Rimworld, Sheltered, Stardew Valley, Staxel, Subnautica, The Ultimate Nerd Game, Total Miner, Unturned, SCP: Secret Laboratory and many more.

It is also used in unit testing WPF controls and in many other areas.

How it works

If you develop in C# and your code is loaded as a module/plugin into a host application, you can use Harmony to alter the functionality of all the available assemblies of that application. Where other patch libraries simply allow you to replace the original method, Harmony goes one step further and gives you:

• A way to keep the original method intact
• Execute your code before and/or after the original method
• Modify the original with IL code processors
• Multiple Harmony patches co-exist and don't conflict with each other
• Works at runtime and does not touch any files

Installation

Installation is done by using 0Harmony.dll in your project or by using the Lib.Harmony nuget package.

Documentation

Please check out the documentation and join the official discord server.

Contribute

I put thousands of hours into this project and its support. So every little action helps:

• Upvote this stackoverflow answer
• Spread the word in your developer communities
• Become a GitHub sponsor or a Patreon

This project uses the great MonoMod.Common library by 0x0ade.

Harmony 1

Harmony 1 is deprecated and not under active development anymore. The latest version of it (v1.2.0.1) is stable and contains only minor bugs. Keep using it if you are in an environment that exclusively uses Harmony 1. Currently Harmony 1.x and 2.x are NOT COMPATIBLE with each other and SHOULD NOT BE MIXED. The old documentation can still be found at the Wiki.


 

harmony's People

Contributors

pardeike avatar pardeike-bot avatar lbmaian avatar 0x0ade avatar denjur avatar hcoona avatar mehni avatar simplywiri avatar bugproof avatar pathoschild avatar pengweiqhca avatar windows10ce avatar bbepis avatar tarbisu avatar qkrisi avatar asquared31415 avatar kohanis avatar cybershadow avatar kittyfisto avatar wasabii avatar failedshack avatar teokk1 avatar riqq avatar podostro avatar kaenganxt avatar gnivler avatar daegi01 avatar boformer avatar ayan4m1 avatar rube200 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.