Caves of Qud

Caves of Qud

Denna artikel är inte kompatibel med Caves of Qud. Var vänlig läs instruktionssidan för anledningar varför artikeln inte passar inom Caves of Qud.
63 betyg
Harmony Injector
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Type: Library, Script
Filstorlek
Lades upp
Uppdaterades
1.599 MB
15 jan, 2019 @ 9:26
17 aug, 2019 @ 9:45
17 ändringsnotiser ( visa )

Abonnera för att ladda ner
Harmony Injector

Beskrivning
Note: Thanks to @HawkleyFox for updated Harmony Injector with new features.
Contributor can go here: https://github.com/JHawkley/Harmony-Injector

Note: At the first time install before Enable this mod, you should restart game for make sure mod compiled success.

Note: Upgrade guide from HarmonyShim to Harmony Injector here: https://gtm.steamproxy.vip/workshop/filedetails/discussion/1625698528/1771511442696801069/

Harmony Injector is another injector for Harmony lib. This allow other mods patch any method of the game that not available for modding at current time.

Compare with HarmonyShim this mod allow to use mostly all features of Harmonylike PatchAll with Annotation, Manual Patching, AccessTools, Traverse, ... and just like you using Harmony package directly

For using just:
using Harmony; ... create patch class: in where we patch Mutate function of MultipleArms class [HarmonyPatch(typeof(MultipleArms))] [HarmonyPatch("Mutate", new[] { typeof(GameObject), typeof(int) })] class Patch { static void Postfix() { Debug.Log("[Namkazt.HarmonyTest] Yay!. We just override mutate function if you have mutation [MultipleArms]"); } }
and call Harmony functions like normal.

Note: you do NOT have to call:
var harmony = HarmonyInstance.Create("your.mod.id"); harmony.PatchAll(XRL.ModManager.modAssembly); // or harmony.PatchAll(Assembly.GetExecutingAssembly());

New update: allow to patch in unity MonoBehaviour easier (internal class) by follow this example:
using HarmonyInjector; .... your name space public static class Init { static Init() { try { var original = Injector.GetUnityType("Unity MonoBehaviour Class").GetMethod("Method to patch"); var postfix = typeof(Patch_NewGame_SelectSubtype).GetMethod("Transpiler"); Injector.Shared.Patch(original, null, null, new HarmonyMethod(postfix)); } catch (Exception ex) { Debug.Log(ex); } } }

Learn about Harmony: https://github.com/pardeike/Harmony/wiki/Patching
Populära diskussioner Visa alla (12)
6
14 aug, 2019 @ 12:24
CoQ Update Broke Harmony Injector?
HawkleyFox
3
1 apr, 2019 @ 4:51
Better Ability Bar + Hover Info = Error
HawkleyFox
2
19 maj, 2021 @ 19:42
bug report from game itself
Engreaved
33 kommentarer
HawkleyFox  [skapare] 30 sep, 2020 @ 6:07 
Awesome to hear. A nice official addition for modding~
namkazt  [skapare] 28 sep, 2020 @ 17:13 
@gnarf: cool, thanks
gnarf  [utvecklare] 28 sep, 2020 @ 16:13 
The latest version of Qud now ships Harmony enabled by default; this mod should no longer be required, and I'm hiding it as Incompatible.
HawkleyFox  [skapare] 14 aug, 2019 @ 2:03 
Ahh, I see. Yeah, I guess Steam does not auto-subscribe you to new discussions on your Workshop mods by default, but I think you can enable it. Anyways, I posted the GitHub link in the discussion topic. Give it a try and let me know how it works on your end.
namkazt  [skapare] 14 aug, 2019 @ 1:38 
No but i got notification in here.
HawkleyFox  [skapare] 13 aug, 2019 @ 16:01 
I've been trying to contact you; the mod is broken at the moment, but I've prepared a fix for it, along with some other added features (I got main-menu popups working). Did Steam not notify you of the forum topic I created?
namkazt  [skapare] 17 mar, 2019 @ 20:34 
Ok thanks. I will put on description
Deon ☣ 17 mar, 2019 @ 3:26 
I got the same problem as Tyrant, and disabling that option fixed it. Thank you!
You may want to put it in mod description that the option can mess with Harmony.
namkazt  [skapare] 9 mar, 2019 @ 2:31 
@Tyrant: never test that case but it is not supposed to happen :D
Tyrant 8 mar, 2019 @ 23:22 
I know that's what it's supposed to mean, but that's not the way it's behaving in this instance. If you have this option enabled and are subscribed to Harmony Injector AND a Harmony Injector addon (either Better Ability Bars, Hover Info, or both), Harmony Injector will be un-approvable.