@pardeike pardeike released this Aug 8, 2018 · 35 commits to master since this release

Assets 4

This new release of Harmony combines all the small changes and improvements made and found while testing v1.1:

logging ldstr with format strings no longer corrupts the output
Traverse has direct value manipulation with .Value property
fixed a casting error in inlineswitch
make MethodInvoker call restricted methods
the project got updated to the new package format
fix for RuntimeMethodHandle/IRuntimeMethodInfo error
better error reporting for exceptions during patching
AccessTools can now return declared methods, properties and constructors
improvements in removal of patches
creation of a nuget package for several .NET frameworks
make Type[].Description null reference safe
Transpilers.MethodReplacer now adapts to call types dynamically
patch attributes got a better API while keeping backwards compatibility
fixed access control on getters and setters
new super cool read-write access to private instance fields
specify arguments and injected fields by naming them with index
much improved self patching
Enjoy!

@pardeike pardeike released this Jul 30, 2018 · 59 commits to master since this release

Assets 2

IMPORTANT: A bug has been discovered that results in the following exception being thrown: System.Collections.Generic.List1[Harmony.ILCopying.ExceptionBlock] cannot be converted to target type: System.Collections.Generic.List1[Harmony.ILCopying.ExceptionBlock]

To reproduce, use Harmony v1.1 and v1.2+ alternating in patching the same method (one that contains try/catch logic). That triggers the conversion and this release should fail. Commit c28362a tries to fix the problem but is completely untested. A new version will be released as soon as everything works as expected.

@pardeike pardeike released this Jul 24, 2018 · 65 commits to master since this release

Assets 4

UPDATED 25 July - backwards compatible fixes

We are getting close to the final release of Harmony v1.1.1

So please try it out, some minor details have changed or have been renamed. Noticeable, the property annotation was merged with a more general enum that contains constructors, getter and setters. Just change your annotations to use MethodType.Normal / Getter etc...

This beta is already in use in most of my Rimworld mods so its pretty stable. Please report all problem asap.

Thanks,
Andreas Pardeike aka Brrainz

@pardeike pardeike released this May 20, 2018 · 111 commits to master since this release

Assets 4

Hello Modders!

This is the 2nd major release for Harmony. The API has become more mature and this release contains a few important bug fixes. There are a lot of changes:

# Harmony now supports methods with try/catch logic

This is a big one. CodeInstructions for transpilers now carry a new field 'blocks' that is a list over different enum values that reflect start and end points for exception blocks. If you copy existing instructions around you should use the new Clone() method or empty that field manually.

A mixture of old and new Harmony versions can co-exist because the new Harmony has a self-patching feature that updates selected parts of itself (in this case the transpiler pipeline). There is also a preserving function that makes sure that old CodeInstructions don't lead to information loss.

# Improved AccessTools

There are now more ways to get your MethodInfo's - for declared methods and for private types. Have a look and don't use ordinary reflections.

# Patching improvements

You can now unpatch and there are new ways to mass patch a whole class. Also, Prepare and TargetMethod have been improved.

Postfixes now support a pipe-through function so you can change results that cannot be changed by ref (IEnumerable i.e.). Error reporting has been improved and is faster.

Private fields of the current instance/class can now be injected in your prefixes/postfixes by using their name prefixed with three underscores. It is also possible to annotate argument name translations for obfuscated methods.

# Misc

Tons of other stuff has changed and the documentation will be updated soon. Compatibility with .NET has been improved and you can extract IL code from other methods for usage in your transpilers. AccessCache had a bug fixed where it would cache types wrongly. And lots more...

Please consult the Wiki to learn more about how to use Harmony.

Thanks again to all the friendly people from the different gaming and modding communities. Without you, we would not have come this far.

Andreas Pardeike

@pardeike pardeike released this Mar 25, 2017 · 177 commits to master since this release

Assets 4

This is a maintenance release to fix two important bugs for those who use the Traverse calls in Harmony. Those bugs affect only the local code calling Harmony. Therefore, it is safe to mix this release with the v1.0.9 (as long as you don't Traverse with methods).

  • Bug 1 will not cache your methods and thus grow the method cache indefinitely.
  • Bug 2 wrongly mutates a traverse instance if you call Method() on it.

This release also adds better support for querying which methods are patched by whom.

Thanks go to the user oreganor from the ludeon.com forum for finding the issue and providing a test project that led to a quick discovery of this problem.

Andreas Pardeike

@pardeike pardeike released this Mar 17, 2017 · 183 commits to master since this release

Assets 4

This is the first official release for Harmony. The API is now stable so if you are using an older version please update as soon as possible to avoid conflicts with other instances of Harmony ⚠️

There are lots of changes:

  • no more native mono lib dependency so it works on more platforms
  • more streamlined API for IL code transformations: Transpiler
  • bug fixes in Traverse

Please consult the Wiki to learn more about how to use Harmony.

Thanks to all the friendly people from the RimWorld community that helped me on the journey: Fluffy, Zhentar, UnlimitedHugs, erdelf, SkullyWag, DonationBox, Fumblesneeze and many more!

Andreas Pardeike

@pardeike pardeike released this Feb 22, 2017 · 196 commits to master since this release

Assets 4

Hi everyone,

we are getting closer and closer to a stable version of Harmony. Almost all features are implemented and a lot of bugs have been squashed in this release. Keep those reports coming!

A very quick overview of what is left:

  • add an Audit system
  • improve the documentation so it syncs with the new features in 1.0.7/8
  • improve mono lib support on all linux systems
  • maybe add support of Microsoft .NET runtime

Cheers,
Andreas Pardeike

@pardeike pardeike released this Feb 14, 2017 · 203 commits to master since this release

Assets 4

So this is it.

I am proud to announce that Harmony has become stable and it is time to release the first official milestone. All know bugs are fixed and quite a few people have tested it successfully. Thank you to all of you!

This release is fully compatible with Mono 3.5, aka the engine behind Unity and should work with most if not all Unity games. It defines the base line for the shared data model so as of today, any previous version is deprecated and should not be used.

As for the future: the next release will concentrate on two things: audit functionality and MS.NET compatibility.

Please spread the word across modding communities and support the future of non-destructive real-time patching.

/Andreas Pardeike

@pardeike pardeike released this Feb 4, 2017 · 211 commits to master since this release

Assets 4

Hi everyone,

after lots of help from the friendly folks from the awesome RimWorld modding community and lots of Rubber Duck debugging, I am happy to release a hopefully stable version to the public.

Please feel free to test this release and keep those issue reports coming!

Cheers,
Andreas Pardeike

@pardeike pardeike released this Feb 4, 2017 · 212 commits to master since this release

Assets 4

Hi everyone,

after lots of help from the friendly folks from the awesome RimWorld modding community and lots of Rubber Duck debugging, I am happy to release a hopefully stable version to the public.

Please feel free to test this release and keep those issue reports coming!

Cheers,
Andreas Pardeike