Update 1.1.0.9 broke Harmony mods

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

Post Reply
szszss
Posts: 1
Joined: Sat Mar 11, 2023 5:34 am

Update 1.1.0.9 broke Harmony mods

Post by szszss »

DW2 upgraded to .Net 7 and switched to self-contained build since 1.1.0.9. However this update broke all Harmony-based mods. MonoMod, a pre-requirement of Harmony, doesn't support single-file self-contained programs. In this issue, the developer of MonoMod said it won't support single-file self-contained programs because of many difficulties. This renders any mods that use Harmony ineffective. For them to work properly, either single-file (PublishSingleFile in project config) or self-contained (SelfContained) should be disable. I propose disabling PublishSingleFile, as players won't experience any difference between updates.
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Update 1.1.0.9 broke Harmony mods

Post by frankycl »

szszss wrote: Sun Mar 12, 2023 3:57 am (...) For them to work properly, either single-file (PublishSingleFile in project config) or self-contained (SelfContained) should be disable. I propose disabling PublishSingleFile, as players won't experience any difference between updates.
+1
User avatar
TylerIN
Posts: 100
Joined: Mon Mar 14, 2022 3:54 pm

Re: Update 1.1.0.9 broke Harmony mods

Post by TylerIN »

I went over an alternative publish strategy a week ago that uses a normal apphost that should get HarmonyX working. It hasn't been attempted for a beta release yet.

We could also provide our own patch backend if the author doesn't support SelfContained. There is no (legitimately significant) difference that would be an issue. We are using Fody for weaving but I believe the author is mistakingly using the term instead of linking or something else; weaving is not an issue. The linkage stage is where things get messy, but we can work around it.

We do have to drop SingleFile mode as it doesn't work with debuggers despite configuration and MS stating that it should.


Also weird to see someone other than 0xade as the principal authority for monomod, looking like not a particularly great showing with that wontfix. Probably should have been forked.
Reach out to me on the official DW2 Discord #mods channel.
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Update 1.1.0.9 broke Harmony mods

Post by frankycl »

TylerIN wrote: Sun Mar 12, 2023 12:56 pm I went over an alternative publish strategy a week ago that uses a normal apphost that should get HarmonyX working. It hasn't been attempted for a beta release yet.
(...)
Why not ? - This would be great, I think (and I'm certainly not the only one) - and in the long run we'll certainly need Harmony. ;)
Post Reply

Return to “Design and Modding”