RimWorld

RimWorld

ModCheck[B18]
51 Comments
nightinggale  [author] 14 Sep, 2018 @ 3:35pm 
I figured out the issue and it was just a project file setup, not an issue with the code itself. You can now all go to subscribe for the B19 version .
✬Rustic Fox✬ 14 Sep, 2018 @ 9:47am 
@nightinggale so close yet so far
nightinggale  [author] 14 Sep, 2018 @ 9:46am 
I fixed all issues related to B19, but while preparing to release, I updated to the newest version of Harmony. That caused unexpected problems and I can't release until I figure out what went wrong. This means current status is that I'm waiting for a reply from the Harmony creator.

Release date is: possibly 5 minutes after the Harmony problem has been solved and verified to not break something else. I can't say anything about when that will be, but hopefully soon.
von_krysiak 10 Sep, 2018 @ 4:57am 
You are a god! Keep it up ;-)
Sarg Bjornson 7 Sep, 2018 @ 11:30pm 
Yay! Good to hear!
✬Rustic Fox✬ 3 Sep, 2018 @ 1:35pm 
@nightinggale Keep up your hard work you are a blessing to this modding community.
nightinggale  [author] 2 Sep, 2018 @ 7:14pm 
I will see if I can get it finished this week. It's not like I haven't worked on it until you guys said anything. In fact I started as soon as the unstable version was "released", discovered that changes in vanilla made ModCheck impossible, provided detailed feedback on the issue and got vanilla changed to make ModCheck possible once again. Possible isn't the same as fixed overnight because vanilla quite literally changed every single line ModCheck mods.
2ScoopsPlz 2 Sep, 2018 @ 10:34am 
B19?
Fuglypump 28 Aug, 2018 @ 8:46pm 
The game updated to B19, any chance you can update your mod? I'm trying to update my mods and am getting errors, seems everything in the mod is working except my modcheck patches
nightinggale  [author] 18 Jun, 2018 @ 2:41pm 
The GitHub wiki is updated with a description of every single patch operation. I still have plans for adding guides on how to use the features, not just what they are.
Idelacio 5 Jun, 2018 @ 9:12pm 
Okay all fixed, I thought I was getting additional errors but on completely restarting everything cleared and is behaving! :steamhappy:

I'll upload the save anyway just in case you want to look but with all the mods I have it was probably something really obscure.
Idelacio 5 Jun, 2018 @ 5:27am 
I have no idea why it would even be interfering with that one mod. Literally the saves stopped loading properly after modcheck updated. Removing this allows teh saves to load again.

I can't upload a save at the moment but theres a sample of the load error here:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/836308268/1489987634000889670/?ctp=13
nightinggale  [author] 5 Jun, 2018 @ 5:21am 
@Idelacio I need that savegame uploaded as an issue on GitHub.. I have no idea how it can break savegames and I need a broken one to analyze the problem.
Idelacio 5 Jun, 2018 @ 5:13am 
Erm.... this broke my saves that I had with the hygene mod since this updated. Removing only this mod solves the problem? What? O_o
nightinggale  [author] 5 Jun, 2018 @ 4:36am 
That bug report was really helpful. It turns out that the Harmony DLL somehow got left out when I updated on steam and it would cause an error on startup unless some other mod provided a harmony dll, meaning it's not a matter of conflicting with another mod, but rather lack of another mod to compensate for this problem.

I added the missing dll file. Also it's a steam only problem and the direct download version on github was never affected.
Keller Max 5 Jun, 2018 @ 3:50am 
I subminted an issue on GitHub
nightinggale  [author] 5 Jun, 2018 @ 2:54am 
@Keller:
RimWorld disables mods if it crashes. The way to turn that feature off is to open optoins, enable development mode and then disable "Auto-reset mods config on crash", though doing that might require you to reset the file manually if it crashes at startup.. To restore the mods as they were in a savegame, use the mod MOD-E.

@17shadow:
Those mods work just fine for me. I really need the files mentioned previously to figure out the cause of this issue.
Keller Max 5 Jun, 2018 @ 2:08am 
Can't keep my old mod load order. Mods just become disabled.
17shadow 5 Jun, 2018 @ 12:10am 
Deducing from the error it's throwing at me when I open the game since the last update, I'd say the mistake comes probably from simple sidearms (and possibly its interaction with huglibs). Hunting restriction is the other possible candidates.
nightinggale  [author] 4 Jun, 2018 @ 11:12pm 
Can somebody with this problem go to github and open an issue for this.
I need two files for this:
AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Config\ModsConfig.xml
The other file is a savegame, which can't be loaded. Savegames are in
AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Saves

Apparently the problem is not in ModCheck itself, but rather ModCheck in combo with another mod and I'm not going to try all available mod loading combos at random to hit whatever trigger condition you have encountered. I loaded more than 200 mods at once, some including an outdated version of ModCheck and it works just fine. I'm really not sure what I can do about this without the files, which should allow me to reproduce the problem.
Dracko Rithermort 4 Jun, 2018 @ 9:20pm 
today modcheck start to show errors when start the game the error was "modcheck is using an outdated modcheck.dll files pleas download an update modcheck.dll files or put modcheck on top of the mod list", when i put the mod on the top, restart the game but after some seconds the screen goes black and never finish to lead the game, when i unsuscribe the mod, the game start work properly
nightinggale  [author] 4 Jun, 2018 @ 7:50am 
@fabian-musik That's weird. It works for me, but since you reported this, I subscribed myself and tried with the steam download and it still works for me. Besides ModCheck itself should not be able to prevent starting a new game. It must be due to a conflict with another mod, though I have no idea which one or how it could conflict like that. ModCheck is intentionally backward compatible with any patch file made since 1.0.
Honey_Music 4 Jun, 2018 @ 7:07am 
Can't start new colonies or continue old saves after the last update. Deactivating ModCheck is needed to start a new colony. Just as a heads up - if I am the only one with this problem it may be a corrupted download.
ExoticButts 3 May, 2018 @ 4:12pm 
Hi Nightinggale, just a heads-up that L-Slimes by Leonapp is now using ModCheck as a result of my work on an autopatch for A Dog Said for it, and I will be using your delightful system whenever I use patches in my own mods from now on :)
Extinction 11 Mar, 2018 @ 10:35am 
<Patch>
<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="ModCheck.FindFile">
<modName>Core</modName>
<file>Weapons_Guns.xml</file>
</li>
<li Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[@Name = "Gun_Autopistol"]/verbs/li/warmupTime</xpath>
<value>
<warmupTime>5</warmupTime>
</value>
</li>
</operations>
</Operation>
</Patch>

So i dont realy know what i am doing wrong here. It works when i use the normal xpath method.. but its seems like it doesn't recognize any changes at all when using ModCheck. Could someone guide me on what i actually have to put inside my patchoperationreplace? It seems like the normal way is worng and there is no documentation on how the patchoperation works.
✬Rustic Fox✬ 17 Jan, 2018 @ 5:40pm 
This is a very useful mod i am surprised more mod authors don't use this in thier mods
Fuglypump 12 Jan, 2018 @ 3:16am 
I've found this time log for patches to be extremely helpful for finding out which mods are slowing down load times and being able to let those authors know with actual load time data. I wish more people knew about this mod because there are a lot of mods out there with slow patches.
nightinggale  [author] 19 Dec, 2017 @ 12:44pm 
Nearly undocumented feature in 1.6: you can be told how much time the game spend running each patch.

To enable, go to options, enable development mode and then enable verbose logging. While this is enabled at startup, the time for each mod and each patch is written to the log, like this:

[ModCheck] Time spend on each patch:
1.4382 ms Androids
0.3406 ms
0.1840 ms
0.9136 ms

This shows time for each of the 3 patches in the mod (I added FindFile to them, they aren't part of the mod... yet). This is a great tool when trying to optimize patches for speed. Just measure before and after and you can tell about the scale of the impact.

Note: sometimes one number can be way too high due to multitasking OS stuff. There is nothing to do about it other than measuring 2-3 times to make sure the time is consistent.
Fuglypump 19 Dec, 2017 @ 11:55am 
Interesting link I am reading it right now. I will be testing out using "ModCheck.FindFile" for patching. Unfortunately though I should wait to probably integrate this function into my mod "Job Splitter" because I tell people to load my mod at the very bottom of their list which would give errors if any mod is using a pre-1.6 version of modcheck if I undestand correctly. When I do eventually add its functionality I will also need to suggest people install the standalone modcheck and load it early.

Thanks a bunch for swift reply and detailed clarification.
nightinggale  [author] 19 Dec, 2017 @ 11:01am 
When multiple copies of the same dll exist, the game will use the one from the first mod in the modlist. It will not load multiple copies of the very same dll into memory. This is vanilla behavior, or actually system behavior. The problem is that the first might not be the newest. Because of this, I have made a plan to loop all the available dll files to find the newest and then redirect calls to that one. I just need to write the code for it and make sure it works as intended. After that as long as the first use at least version 1.7, then the newest will be used. (I really hope it will be in 1.7)

Every single update is backward compatible, meaning it should always be safe to use a newer version of the dll than the one you used while writing the patches.

Speaking of performance, follow the new link at the top of the description for how to write a high performance patch file.
Fuglypump 19 Dec, 2017 @ 9:26am 
I'm using the modcheck dll with my mod Bulk Stonecutting Lite and will be using it for other mods as well, how well does this play with multiple other mods with their own copy of same exact modcheck .dll?
nightinggale  [author] 19 Dec, 2017 @ 6:41am 
Yes. You can search for ModCheck to get an incomplete list. I know of mods using it, which fails to show up in that search and I know of more, which are being worked on, but has yet to be released. However it should be noted that nobody has a complete list because some people use ModCheck without telling me.

Mods can include the ModCheck dll files and as such can make use of it without mentioning it at all. This allows them to work without loading the ModCheck mod. However I still recommend using the mod because I can ensure the mod to always be the newest version. I can't prevent that mods made by other people might include an outdated version of ModCheck. I'm working on a solution to minimize the problem, but for the time being, the first mod to include the dll is the version used for all mods, hence the reason why ModCheck should be loaded before Core.
carewolf 19 Dec, 2017 @ 4:58am 
Are there any mods using this yet?
nightinggale  [author] 2 Dec, 2017 @ 2:02pm 
ModCheck will not detect incompatible mods automatically. However if mod creators would inform ModCheck that their mods are incompatible, then it will be reported if the user tries to use both anyway. This mean you shoudl tell the creators of those mods to add a few lines of xml to add ModCheck support.

Technially the xml patch file with such info could be in any mod, including ModCheck. However I would prefer it to be in the affected mods themselves because once in a whille incompatibility issues are fixed and then ModCheck would keep reporting unless I update ModCheck as well. It would be best if the mod creator, who makes the fix has access to remove the error message as well. Remember it is enough that just one of the mods list the other one as incompatible.

If the mod creators for both mods are unreachable, then I could add the incompatibility to ModCheck, but I really view that as a last resort.
Thelockenessmonster 2 Dec, 2017 @ 10:15am 
so i'm currently having an error that people are telling me is from two mods...wouldnt this come under incompatable mods and show up somewhere...modcheck is before core as said above
Broken Valkyrie 28 Nov, 2017 @ 12:51pm 
Thanks for the reply. I gues I'll wait on that documentation.
nightinggale  [author] 28 Nov, 2017 @ 6:23am 
v1.3 was a copy paste error, which caused the code to have two variables with the same name. This allowed it to write to the log that the mod is present while acting like it wasn't according to patching. I'm now considering how to write some semi automated test to quickly verify that future additions will not break existing features.

Setting success to Always will work, but I plan to write documentation to explain why it's bad for startup time and what to do instead. It's too long for a comment here. I have a lot to say about start time and patching.

I considered adding support for a steam ID, but decided against it because it will not work for non-steam mods. Name will work everywhere.
Broken Valkyrie 27 Nov, 2017 @ 8:34pm 
I haven't seen this in any tutorial, anyone who wishes to write long patch sequence needs to add <success>Always</success> to the path operation after the conditional otherwise it only patches the first operation after the condition ignores the rest.

The ability to use PublishedFileId (the file is mispelled and hadn't been fixed since) would be nice for steam work shop file, its only going to change if the author decides to delete and reupload their mod.
Broken Valkyrie 27 Nov, 2017 @ 8:34pm 
v1.3 was messed up isModLoaded operation, thankfully v1.4 fixed it. I hope mod this start becomming main stream.

I tried used vanilla PatchOperationFindMod for dog said patch, and its bad but other reason, the only advantage is that you can use workshop id to find mod. It can't be used in sequence as condition, so you have to write the full operation for every patch operation and dog said patching requires 21 operation. It spits out error if it can not find the mod which is annoying because not finding the mod is to be expected. Your solution is so much more elegant.
nightinggale  [author] 25 Nov, 2017 @ 4:13pm 
Unless specified otherwise, mods can be loaded in any order after Core. However if multiple mods affect the same part in the game, they might require the affecting mods to be loaded in a specific order for all of them to work as intended.
Michelin Man 25 Nov, 2017 @ 12:47pm 
Is there a specific order I'm suppose to load this mod in, like at the very top or can I do it anywhere?
nightinggale  [author] 25 Nov, 2017 @ 12:40pm 
ModCheck 1.3 is released and it fixes the performance issue. Now it's even faster than vanilla. If you want numbers, you can read them here [ludeon.com]. In pure numbers, it's now around a million times faster with around 250 mods if you hit the condition for the slowdown.

The fix actually made ModCheck 1.3 significantly faster than not only v1.1, but also vanilla. While multiple people have tried to make conditional patching since patching was added to A17, none has come even close to the performance ModCheck has now.
nightinggale  [author] 25 Nov, 2017 @ 12:34pm 
@Michlin Man
You are right the log is in the game itself and it will display a bunch of errors if you do something incorrectly. What this mod does is that it allows mod creators to Add their own errors if certain checks fail. For instance if a mod requires HugsLib, it will create errors if it's missing or loaded after the mod itself. However with ModCheck, the mod creator can add the message that HugsLib is missing or loaded too late and those messages will be on top of the log. This makes it easier for users to set up the mod loading list correctly.

It also adds the ability to make mods patch themselves if a certain other mod is present. This mean if an alien race mod is released, it no longer requires an EPOE patch mod. Instead it can be added directly to the mod itself and then only apply if the user has EPOE in the list of loaded mods.
Michelin Man 25 Nov, 2017 @ 10:03am 
So what does this mod do exactly? From what I read it sounds like it's suppose to turn on the debug log whenever I mod creates an error and attempt to fix it. But I don't have this mod installed and the game is already doing that.
nightinggale  [author] 24 Nov, 2017 @ 12:33am 
10 minutes is clearly way too much. I have reuploaded v1.1 to get acceptable performance right away and then I have time to dig into v1.2 to figure out what went wrong.
Duke Al 23 Nov, 2017 @ 11:56pm 
Hi,
though Vaguiners sounds like an asshole and clearly does not know how to behave like a decent human being, i can confirm that since the last update of your mod on the 22nd the loading times have jumped from 30 sec to almost 10 min for me. I am using a lot of mods but as i said, the change happend after your last update.
Vaguiners 23 Nov, 2017 @ 2:06pm 
with mod on, loading "..." takes more time than i can wait, without the mod is fast
nightinggale  [author] 23 Nov, 2017 @ 11:39am 
@Vaguiners
The amount of details you provide makes your comment pointless. Not only is it impossible to tell what you mean by "fucks up", you also tell that you got a lot of other mods, all candidates for problems and conflicts.

I will assume your problems have nothing to do with this mod, at least until more details are provided. The only issue I can see that there might come from having many mods would be that looping all mods takes longer and if more mods need to loop, then it could slow down game startup. However this doesn't "fuck up" the game and I have not seen any evidence that the slowdown is signifcant enough to be considered a problem.
Vaguiners 23 Nov, 2017 @ 10:50am 
this mod fucks up the rimworld when you have tons of mods
nightinggale  [author] 18 Nov, 2017 @ 7:30pm 
Fixed the GitHub link. However I have no idea how it lost the URL as it was missing, not just broken. It worked when I wrote it and if it had been missing the entire time, it wouldn't have added [ github.com ].