-
Notifications
You must be signed in to change notification settings - Fork 0
/
workshop.json
1 lines (1 loc) · 1.82 KB
/
workshop.json
1
{"workshopId":1497685893,"Title":"Harmony Shim","Description":"Harmony Shim enables the use of Harmony through a simple shim. This allows other mods to patch parts of the game that are difficult to modify using Caves of Qud's current modding system.\r\n\r\nThis is a modder's resource; this mod does not add features to the game on its own. Other mods may require Harmony Shim to be installed before they will function correctly.\r\n\r\nFor more information on Harmony, please visit the project Github:\r\nhttps://github.com/pardeike/Harmony\r\n\r\nIn order to create a Harmony patch in your script-mod, add the `using HarmonyShim` directive to the script's source. Next, create a class with a static constructor. In the constructor's body, use the `Harmony.Patch` method to perform your patches. Harmony Shim will run your static constructor when it initializes, allowing your patch to be applied.\r\n\r\nDue to the way Harmony needs to be loaded, Harmony Shim can only provide basic manual patching. Attribute-based patching isn't supported and useful things like the AccessTools are also not available.\r\n\r\nCheck out HarmonyShim's API documentation in [url=https://steamcommunity.com/workshop/filedetails/discussion/1497685893/1738841319806121436/]this DIscussions post[/url]. The source code of the script-mod is also documented.\r\n\r\n[b]Special Note:[/b] this mod forces the game to exit without warning if it detects that the mod-assembly needs to be recompiled. This is done to prevent undefined behavior from reapplying patches and causing corruption or other nasty things. Recompilation usually happens upon exiting the mod configuration screen after enabling a script-mod. Simply restart the game and the mod-assembly should compile correctly.","Tags":"Scripting,C#,Harmony,Modder's Resource","Visibility":"2","ImagePath":"preview.png"}