Back to Blog
Rimworld mod harmony7/7/2023 ![]() Mods that still use any of the broken versions before Harmony 2. I understand that players want a stable and predictable game and we messed it up. While it did help with sorting out the underlying problem it was not able to solve the chaos that we created in the modding community. I removed the library from my own mods and added a dependency to the new Harmony mod and it worked. Some people argued that HugsLib would be an alternative but that would tie Harmony releases to HugsLib releases. I suggested that I could make an empty mod for it that would go first. I realised that in order to control the chaos we had to control the first load of Harmony. That explained why all kind of confusing reports had come in. As a consequence the very first mod loaded that uses some version of Harmony will dictate that version to every other mod loaded later. But it was a fact that everyone had missed while preparing the release. The new version would not load more than one Harmony at the same time and I knew that the devs had not changed anything. After another period of confusion we finally found out why: something in the whole update process loads libraries different than before. While I was fixing the library more confusion arose. This makes multiple versions running at the same time a very difficult thing to do think rocket science level. Since mods will eventually want to patch the same function in the game, some coordination has to be done. ![]() To understand why, you should know that Harmony is not working in isolation. At first I thought I could just release a hotfix for Harmony 2, call it 2. Soon after modders started using Harmony 2 as they were used to reports came in that it did not work as before. It had been in development for a year and people were using Harmony 2 outside RimWorld with success. My original plan was to release Harmony at the same time and call it a day. Then the unstable version was released and we had one week of testing it. We agreed that I would create a small guide that would explain how to move things around and how to separate the two major versions of Harmony. ![]() I had a short amount of time to finish Harmony 2 and test it with the new Unity version that Tynan wanted to use. We discussed different ways to integrate Harmony into the game and agreed upon to not put it directly into RimWorld because it might update more often than the game once the game is stable. It looked like a clean cut to me and I saw a chance to introduce Harmony 2. Tynan contacted me about the move to the latest Unity a while ago. ![]() I was working on a version 2 that fixed a lot of design misses that 1. It does one thing: it allows mods to manipulate code in games. I am the author and maintainer of a small library called Harmony. I will try to keep this as simple as possible. A lot of hysteria and miss information runs around the community. Or spread the word in your developer communities.Hi everyone. One way is to upvote this stackoverflow answer. Help by promoting this library so other developers can find it. If you feel stuck or have questions that this site does not answer, feel free to join the official Discord Server or file a GitHub Issue. New to modding and C#? Beside the basic language features you need at least a good overview of Reflection in C#. or write about it on the official discord.fork the repository and create a pull request.If you find a factual error or if you have feedback about the documentation you are welcome to In the second section you can browse the public API and all its methods and classes. The main section brings you to the full documentation that explains everything about Harmony and gives you lots of high level examples. You can learn more about Harmony by using the top menu links. Installation is usually done by copying and referencing 0Harmony.dll from your project or by using the Lib.Harmony nuget package. Harmony is used in mainstream Unity games and many other applications.ĭesigned to be used by multiple users (usually called Mods) that would otherwise override each others hooks, it was originally created for the game RimWorld and its large modding community by Andreas Pardeike. ![]() NET environments on Windows, Unix and macOS except when Unity uses the stripped down NetStandard profile (.NET 4.x profile works fine). It does this at runtime by monkey patching methods unlike other solutions that change the content of dll files. Harmony gives you an elegant and high level way to alter functionality in applications written in C#. ![]()
0 Comments
Read More
Leave a Reply. |