ReiPatcher API: Setup

In this and subsequent chapters we will discuss how to use ReiPatcher’s API to create patchers.

This chapter mainly lists the requirements and suggestions on tools to use.

Tools and requirements

The following tools and libraries are required to create patchers:

  • Target assemblies (the ones that are to be patched).
  • ReiPatcher.
  • .NET Framework 3.5 or later.
  • Mono.Cecil (included in ReiPatcher).
  • Basic knowledge of C# (or other language supporting .NET).

These tools and libraries are optional but will make patching much easier:

In this tutorial we will use Visual Studio and C# 6.0 to create patchers.

List of additional patcher tools

Below is a (not finished) list of pre-made libraries and templates to make patching easier.

Name Links Description
PatcherHelper.cs GitHub A compilation of common patching methods for Mono.Cecil. Created by neguse11 and is used in majority of his mods for CM3D2.
Cecil.Inject GitHub, Documentation A separate library to extend the functionality of Mono.Cecil and provide patching capabilities. Used mainly as a separate DLL.
Can be thought of as PatcherHelper.cs, but with more methods and proper documentation.
Mono.Cecil.* Extensions Found within Mono.Cecil Additional minor helpers to work with IL within Mono.Cecil. For instance, Mono.Cecil.Rocks provides some methods to optimize IL code and so forth.