Now I'm not accusing you of anything, but I've literally made my own patcher for Stardew Valley that uses MonoMod, and it doesn't require any special permissions.
Keep in mind that:
1. Stardew Valley is also programmed in XNA/MonoGame, depending on the platform (Terraria is XNA/FNA, and your program uses WPF, so I mean... XNA...).
2. MonoMod uses Mono.Cecil to modify the IL of an assembly, I assume you do the same given the packaged libraries (and the fact that Harmony is supported).
Also, you kind of glossed over what
@pollen__ originally said: "How did you manage to break ILSpy and dnSpy?"
That really
is concerning, to say the least. I've never seen any other assembly cause something like that, and the fact that ILSpy and dnSpy both have the same issue
and the same error despite using different libraries for decompilation, is concerning to say the least. I prefer to be able to see what I'm downloading before I download it if it isn't from a reasonably reputable source.
Digging deeper, it seems like the only possible answer is you used a program like ConfuserEx, which is questionable as you should have no reason to hide any code to such an extent. A regular, light obfuscator would be reasonable enough.
I'm sure there's a more reasonable answer to this, but I feel like I should lay that all on the table just in case.
Something else I forgot to mention: Pollen__ never really said it was supposed to just modify save data, he was saying that any files written should go into the save location (My Games/Terraria/...). Not sure how it's relevant to everything else he said, but meh.
IMPORTANT EDIT:
With some effort, I was able to remove some anti-tampering stuff and managed to properly decompile the TTApplicator. The process should work on Terraria Tweaker 2.
EDIT:
Process worked on TT2 as well. We're pogging.
(For reference, DarwinLine's ctor normally wasn't even decompiled as a ctor, and most of the IL class refused to decompile into anything as well. Not going to reveal the code here for obvious reasons.)
View attachment 319304
Screenshot of an example of a failed decompilation of the unmodified EXE with ILSPY:
View attachment 319303