Kingdom Come: Deliverance

File information

Last updated

Original upload

Created by

Letum

Uploaded by

Leturn

Virus scan

Safe to use

Tags for this mod

About this mod

Mod Merger for KCD using KDiff3 (like the other one)

Permissions and credits
Mirrors
Hello!

Yes, original introduction. 

Changelog v1.4 'Ariadnes Threads':
  • I've written this changelog once already but my PC crashed. I'm starting to see a pattern. Apparently the windows kernel crashed wow.
  • ModNames (the list on the left) is now sorted alphabetically!
  • Added multithreaded modloading, boosting performance by a lot.
  • Added Multithreaded support to Logger. You can see that by opening the log and looking for a "[Threaded]" keyword. 
  • Added "Expander" to the performance watchers making them hidden (and hidable).
  • Added Thread Watcher to the performance watchers. Was quite suprised to see 15 Threads...
  • Added better system information logging at the start
  • Improved the unhandled exception handler (yes, this is a thing). It will now display a popup informing the user of a crash, rather than silently exiting.
  • Added RAR support. This is realized with Unrar, which also powers WinRAR. As a consequence, you will need to re-extract the tools folder with the current release. The RAR support works as follows: It will check the encoding and if it detects a RAR, it will extract its files and remerge them as ZIP, while renaming the original RAR file as [name].backup
  • Added options menu consisting of delete old files and copy all files. Should be pretty self explanatory.
  • Streamlined the whole merging process a lot making it easier to add future functionality.
  • Vanilla files are now indexed at the beginning of a merge process and then saved, which wasn't the case before. This improves performance a lot. I also improved the index to now only consume around 10MB rather than 20MB. 
  • Streamlined the whole manifest thing, making it easier to add future functionality.
  • Fixed bug causing empty tags in the XML to crash the app. In my infinite wisdom, I thought an empty string would be an empty object, rather than a well...empty string. 
  • Fixed a few (potential) bugs and pitfalls while we're at it. 
  • Changed button behaviour to now only be disabled rather than hidden, and displaying a tooltip when hovererd over detailing the requirements for it to be enabled again. 
  • Improved performance by kicking the Garbage Collectors ass after a merge process. Due to the nature of the process, a lot of memory was consumed but not immediately freed up after the process because the GC was quite reluctant to touch it. 
  • Added a startup lua script which will be added to every merged mod, saying it was loaded and the files it contains. Code was stolen from the cheat mod (please don't tell him). 
  • Future plans: This release opened the door for a lot of additional features. It would be an incredibly easy task to add basic "enable/disable mod" functionality. I'm also considering extending RAR support to other formats. I also plan on improving unhandled exception handling and maybe an auto upload functionality for the log or something. I'm not sure how recoverable some exceptions are and if I should even touch upon that, but I know that Subnautica has a bit of that. I also plan to add proper "versions supported" and "dependencies" support to the manifests and displaying any mismatches in red or something. I'm also experimenting with extending LUA scripts in some way and maybe adding a hook to the pak loading of KCD to display any conflicts in-game, but I'm not sure how well that would go. 

If you have any issues please attach your whole log file to a Github Issue or a Nexus issue.


I've seen a few "complaints" on the other merger about the error "Line ending conflict" which will show up if you merge two files that have different line endings (most of the time DOS vs Unix). You can select your choice of line endings in a dropdown above the merged file in Kdiff. I've also uploaded a screenshot showing this. 

It basically bothered me that the other Mod Merger wasn't maintained anymore and the Source Code not publicly available. You could of course just use dotPeek or similar to copy the Source Code, but that'd be copyright infringement so...I just made my own. 

The Code is available on Github.

Please keep in mind that I just hacked this together while watching Netflix and after not writing any C# code in 2 years, so it is a bit...messy. But will hopefully get cleaned up a bit soon. 

I opted to use KDiff3 like the other for now, but I'm looking for a more.... CLI based solution without the unnecessary popups and more options, and using KDiff as a resolver for conflicts. 

Most of the Merger should be pretty self-explanatory, but I included some screenshots to show you what a typical process should include. 

Changelog v1.3 'Logginus Lanze':
  • I wrote this changelog once already but Nexus didn't save it
  • Added EXCESSIVE Logging system that should help you give me those sweet error messages and stack traces.
  • The Log file is saved to the Program's(henceforth 'Application') directory under the name "KCDModMerger.log".
  • Just look at it. Isn't it beautiful?
  • Changed compilation target to 64 Bit (lol) so if any of you are running an unknown 32Bit version of KCD hit me up and I'll compile the app for you.
  • Added Fluent Design. It's not an actual UWP app but just a theme which will impact performance a bit, so please tell me if it's too much. 
  • Removed Fluent Design. (Btw this dropped RAM Usage by 30 MB and CPU peak by 50%)
  • Added Performance Monitor to Application.
  • Added Clear Cache to Application, which will clear the application's cache (KCD path, Mods List, Conflicts List etc).
  • Added Last Log Entry to Application, which will display the last written log entry.
  • Added Open Log File, which will open the log file in your favorite editor. 
  • Added the choice to delete merged files (a window will plop up after you click on "merge"). Please keep in mind that anything might go wrong and your mods might be damaged due to it. They shouldn't. But it could happen. Just...keep it in mind. 
  • Added merged_files to mod.manifest of merged mod, which will be displayed in the application after you click on the mod in the left list. 
  • Removed numerous bugs and pitfalls that I didn't think of after multiple years in JS. Everything should be much more stable now, but I don't have any testers and a sample size of one isn't really enough for this kind of program. 
  • I hope that nobody will experience any outages or crashes now, but if you do please give me the log file. 
  • The log file will ALWAYS be there, since it's written to when the app opens, when it crashes and when it exits (not to confuse with exists). If the log file does not exist, I hope that the additional information in the log file will help me debug the problem. 
  • There is a bit of extra information collected in the log file. Typical game/engine stuff like Architecture, Version, whether it's run in administrator or not, so please don't fear that Facebook will get your data. I got it. 
  • The application may require administrator privileges now, since it writes its log file to wherever you placed the application and it collects some information that might be restricted on some systems. Should be functioning without it though. 
  • I did this update after I finally got a haircut, so my 20/20 vision should be enough to spot any bug now. 
  • I couldn't watch any Netflix today (except a movie or two...) even though I took a day off work, so please show appropriate THANK YOU ^-^

If you have any suggestions or want to contribute please go ahead. I will mention anyone who makes a meaningful contribution on Github and here.