[LIB] ModCheck: patch tests and error logging for mod loading

Started by Nightinggale, October 31, 2017, 06:57:04 PM

Previous topic - Next topic

Nightinggale

Released a new version for RimWorld 1.0. The only other change is added support for Fluffy's Mod Manager.

The DLL is still the B19 file, meaning mods including the file will not have to update.

It's still version 1.8 because the version tag is in the DLL. Updating the number means replacing all DLL files in all mods. It seems like a major task for no DLL change at all.
ModCheck - boost your patch loading times and include patchmods in your main mod.

Canute

Nightinggale,
maybe you should add at the workshop entry a big sign that regular player don't need to add it to their modlist.
I saw now serveral modlist with Modcheck in their modlist.
Ok it don't hurt, but not nessesary.

Nightinggale

Updated to 1.8.1
- Fixed compatibility issue with updated Rimworld. Profiling works again.
- Updated version URL for Fluffy's Mod Manager

The compatibility issue is related to transpiler patching. In order to be sure nothing bad would happen to vanilla xml patching, I decided to only apply the transpiler if the method in question is unaltered. The unstable Rimworld is viewed as modified because the compiler came up with the idea of renaming the autogenerated name f__am$cache0 to f__am$cache2.

I made the modification detector a little less picky, but it did give us a test that it would actually do as intended if Rimworld updates, which is to allow patch operations to continue to work as intended while disabling profiling. Also vanilla xml patching does indeed seem to be unbreakable by ModCheck.
ModCheck - boost your patch loading times and include patchmods in your main mod.


SargBjornson

Any chance of this getting a 1.1 release? It really accelerated all the conditional patching operations :(

cucumpear

I second that request, I use ModCheck for so many of my mods.
In either case, thank you so much for making my life easier!
This person might poke around in Def folders more than is healthy.
https://github.com/cucumpear

SargBjornson

I have a feeling he is no longer around here :( I looked at the code, but it is way too advanced for me

cucumpear

TBF it would require updating to the new harmony. Welp, that will make patching fun, I always have trouble with checks when using vanilla operations.
This person might poke around in Def folders more than is healthy.
https://github.com/cucumpear

grapenuts

I took at stab it it because there's a mod that's super-critical for me and it depends on ModCheck. Getting it updated for Harmony 2.0 seemed easy enough as I've already updated a couple other mods, but there's a method where I'm stuck. In Harmony.cs it uses the Harmony Transpiler on Verse.LoadedModManager.ApplyPatches and verifies it's the same as what it expects it to be by line number and string comparisons. I looked at the decomplied Verse code but I don't see how he got it to match, and thus I'm not sure how to replace it.

I'm not looking forward to trying to pick apart the original mod I wanted to fix and try to get it working without ModCheck :(