MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

TS4 Package Conflict Detector - WINDOWS ONLY

by scumbumbo Posted 13th Feb 2016 at 6:05 AM - Updated 11th Dec 2017 at 11:39 PM by scumbumbo : Update Version 1.3.0
190 Comments / replies (Who?) - 13 Feedback Posts, 12 Thanks Posts
Update 1.3.0 (Dec 11, 2017) - Added feature to load packages in the TS4 load order. In the "By Resource ID" view tab, the version of the resource which will be used in the game (the FIRST one loaded, not the last like previous versions of The Sims) will be highlighted in green. So you can now easily see whether the most recent version of a conflicting resource is the one that gets used in the game.

Bugfix 1.2.1 (Dec 7, 2017) - Fixed a bug which caused several lines of the output view to be inaccessible.

Re-release and Update (Dec 1, 2017)
  • First, AN APOLOGY:
    • Apparantly my account on Mod The Sims was hacked during my absence and a malware infected version of this program was uploaded in it's place.
    • This was not the fault of the Mod The Sims website, I had a relatively weak password that was apparantly hacked through a brute force dictionary attack. I did not anticipate that anyone would go through this effort to hack my MTS account, and that is my own fault.
    • This was the only one of my programs which was replaced, at least on MTS, and if you download this program elsewhere you are putting yourself at risk.
    • I now have a very secure password which is not subject to a brute force attack.
    • The downloads for this program have been secured in a locked and digitally-signed rar file. If you use WinRAR to extract this file you can click the Info button on the toolbar, or choose Show Information from the Tools menu of WinRAR - this will reveal the Authenticity Verification which will be attributed to "Rich Gade". I do not know if a WinRAR signature can be hacked, but this should provide some measure of confidence that this is once again a legitimate version of this program!
    • Since this is unpaid, hobby work, it should go without saying that I can never accept liability for damage caused by this program, any other programs I've written, or any hacked version of my programs. If you do not agree with this, don't use it!
  • As a side note to the above, this program is for Windows only. It will never be available for the Mac as I do not own a Mac computer. Any Mac version purporting to be written by me is a hacked and malicious program. The source code for this program is available for download here; however, as it is written in Visual Basic .NET it is not likely to be easily converted for the Mac computer. If someone wishes to make the attempt based on these sources (or create a fork of this program for Windows), they are free to do so as long as they credit me for the techniques used by this program but do not attribute the authorship to me.
  • There's only one real update to the program itself, a switch has been added to Display Conflicts Only. This will result in any byte-for-byte identical resources in packages (bloat) being eliminated from the output - only conflicting resources will be shown.

Updated (Feb 27, 2016) - The discussed UI rehaul is completed and available as version 1.1.2. This makes the usage tutorial below a bit out of date until I get around to updating it. Should be easy enough to follow though - instead of a separate tab for conflicts and duplicates, they are both on a single tab with conflicts shown in red. Resource types are now shown in the four-character format used by S4PE and in the "By File" list hovering over the resource type name will show a more useful description (where known).

Description and Installation/Compatibility
This is a program to analyze package mods for The Sims 4 to determine if there are resource conflicts or duplicates. In addition, it will scan package files for corruption which can cause the TS4 game to abort loading with an error.

This program is written using Visual Studio for Windows and requires .Net 4.5 or higher to be installed on your computer to use. There is an installer if you want a program folder and start menu entry automatically created, easy upgrades, etc. You can also just download the EXE file and run it from any folder you want to put it in. Finally, if you are a masochist you can download the source code and compile, alter or extend the program in any manner you wish.

Basic Usage

There are two basic modes the program can run in:
  • The default mode will only read the indexes of all packages and then perform a hash comparison only on those resources which have the same ID.
  • Optionally, you can choose to verify the readability of all the resources in your package files. In addition to performing the comparison above, this will read everything in every package in order to ensure they do not have internal errors.
The default mode is very fast. A scan of my entire mods folder (about 750 MB of mods) takes about six seconds! The full verification mode is significantly slower, and on that same folder will take about two minutes and fifteen seconds. So by intelligently scanning only those resources that absolutely need to be checked, this program can run very fast. I recommend typically using the default mode; however, the full check can be enabled on the Scan Settings tab seen when the program loads by checking "Verify Readability of All Resources in Packages". This should be done if your game fails completely to load and you suspect a corrupt mod is a possibility.

Basic usage is to first click the Browse button to select your mods folder (or a subfolder if you have organized your mods). By default, all subfolders of the selected folder will be scanned for packages as well. This can be turned off by clearing the checkmark prior to scanning.

The "Path to S4PE" can be optionally selected as well if you wish to utilize the ability to launch S4PE on a package directly from the conflict lists. You will be prompted to set it later if you don't bother at this time, and it will remember the location for you the next time you run the program. There is also an option (checked by default) to make a backup copy of any package file you choose to open in S4PE from the program. These will be placed in the "TS4 Package Backups" folder in your My Documents folder. If a backup of a package already exists, the new backup will include a "Copy #" in the backup filename so nothing is ever overwritten.

Finally, you can choose to set the font used by the conflict lists. This too will be remembered for the next time you use the program.

Once you have the options set as desired, click the Scan Folder button to initiate the scan. The progress will be indicated as the scan is performed and once complete the first results tab will be opened automatically. If everything is clean you will merely see a note that no conflicts were found.

First, a bit of terminology that is likely clear, but in case you are unsure:
  • A "Duplicate" resource is one that is present and IDENTICAL in two or more packages. These don't really cause problems, but can use up more space and increase loading times. These are good candidates for merging packages.
  • A "Conflicting" resource is one that is present but DIFFERENT in two or more packages. These typically require a more complex resolution as only one of these will actually be used by the game. The game doesn't merge these resources (in most cases this would simply be impossible for the game to determine how to) so only the last one loaded is actually used.

There are four tabs available for examining the results (plus one tab for files with errors).
  • Files with Duplicates - This will show every duplicate resource found, grouped by the package filename. This is useful for determining what other packages can be merged, or if multiple copies of a mod are installed in separate folders or using different names.
  • Files with Conflicts - This will show every conflicting resource found, grouped by the package filename. This is useful for detecting, analyzing, and if you have the knowledge how (which goes beyond the scope of this program description) correcting the case where two mods conflict with each other.
  • Duplicate Resources - This will show every package that contains a duplicated resource, grouped by the resource ID.
  • Conflicting Resources - This will show every package that contains a conflicting resource, grouped by the resource ID.
  • Package Errors - This will indicate any errors that may have occurred trying to read a package during the scan. If any files show up in here, they will likely cause the game to crash with an error when loading. If you suspect a package may be bad, be sure to select the "Verify Readability of All Resources in Packages" option before scanning so that every package is completely loaded and every resource completely verified.

Finally, to examine a package file in even greater detail, or to delete or move it if you know you no longer need it, you can right-click any package name and choose "Open in Windows Explorer" to go directly to that file in Windows, or "Open in S4PE" to launch S4PE to open that package.

Example Output

Hopefully when you scan your mods folder, you won't have this many duplicates and conflicts - but I had to make sure the program was well tested!

The image shows some conflicts, grouped by package filename. The first package group is "pbox_cabinet-basegame-blandco_no-drop_defaultcolours" and under that we see two resources and the package those are contained in. The very next group is the same information in the opposite order - in other words, we see both that "A" conflicts with "B" and also "B" conflicts with "A".

Since these are actual conflicts (the information in these resources is different), we know that only one of these packages will actually work properly in the game. One of these packages should be removed. Which one is up to you, the modification date on the list can help determine if one is newer than the other. Or you can use the aforementioned "Open in Windows Explorer" to get a window where you can move one temporarily out of your mods folder to compare which one you prefer to use.

Finally, you can of course combine the two mods if you are so inclined and knowledgeable in doing so. Again, you can use "Open in S4PE" on any file in the list to open up S4PE with that file for further investigation and/or editing.

Again in the screenshot above, looking further down in the screenshot to the next two file groups we can see an issue that is somewhat easier to repair. Two files exist that have conflicts: pbox_windowbox-superiority_fixes conflicts wtih pbox_windowbox-superiority_fixes_1.4.83.1010. By looking at the modification dates, we can see that one is dated 3/10/2015 (actually it's cut off in the screenshot, so you just have to trust me) and the other is 12/1/2014. The file with the _1.4.83.1010 in it is much newer, so it's a simple matter to right-click the second file (pbox_windowbox-superiority_fixes) and open it in Windows Explorer to be deleted (or archived). Note I always intended to enable clicking anywhere on the line, but somehow never got around to it, so you actually always have to right-click on the FIRST column, in this case the resource ID (either one) -- FIXED in version 1.1.0.


The above screenshot shows several resources which are identical duplicates of each other. Taking the first group, we see that resource ID 034AEECB_80000000_E56691BD12AB70DA is present and identical in both "CF_workout oufit" and "CF_workout top". It probably doesn't do any good for this resource to be duplicated, and these packages could be merged together to reduce loading times.

This can be easily accomplished by right-clicking one of the package names and choosing to launch it in S4PE, then right-clicking the other to open it in Windows Explorer. The file can then be dragged from Windows Explorer and dropped on the open file in S4PE to merge the two. You'd want to make sure there are no conflicts between these files first, of course - and you can check the "Files with Conflicts" tab for that information first. Once the files are merged, you can then save the file in S4PE and delete the other file (or move it somewhere for archiving).


Finally a look at some bad files. I intentionally created three bad package files by mangling them in a hex editor. We can see in the screenshot above that two of these files (_BADPKG_TEST_2 and 3) were detected, and the errors indicate which resources are corrupted. It's likely these files won't even load into S4PE to have these invalid resources removed, but in some cases this may be possible.

"Surely if there's a _BADPKG_TEST_2 and 3 there must be a _BADPKG_TEST_1, so where is that," you ask? Well, that file didn't have any shared resources with any other package, so the resources contained in the package were never even read. This is what makes TS4 Package Conflict Detector so fast, after all. It would show up if "Verify Readability of All Resources in Packages" had been selected prior to scanning as this causes every resource to be read, even if there's nothing to really compare it to.

Version Info
  • Version 1.1.2 (February 27, 2016)
    • Combined duplicates and conflicts into a single tab view with conflicts in red.
    • Type names and hover tooltip descriptions added.
    • Double-clicking a package name will open a package with the Windows default program for packages.
    • Link to S4PE download location added.
    • "Version" numbers added for By Resource ID view - identical numbers indicate identical resources (just because there is a conflict does not necessarily mean ALL resources are different, some may be duplicates).
  • Version 1.1.1 (February 14, 2016)
    • Added selection to allow fallback to the old tree-style folder browser as some Windows 10 users have problems with the Win 7 style common dialog
    • Set the path and filename only when browsing for S4PE executable (was placing the entire path in the filename)
  • Version 1.1.0 (February 13, 2016)
    • Added enable/disable package
    • Added move package to backup folder
    • Removed the _KEY resource type from duplicate/conflict checking
    • Fixed the bug which required right-clicking in the first column to view the menu
  • Version 1.0.0 (February 13, 2016)
    • Initial release
  • Pre 1.0.0 version info here

Additional Credits
  • Thanks to all the folks at MTS who helped develop this program with their testing, suggestions and sometimes criticism. This program is for you!! (Although anyone else is free to use it as well)
  • Microsoft for the Visual Studio Express development environment.
  • Caphyon, Ltd. for their Advanced Installer used to make the installer package.

Operating System: Windows
Utility Type: CC Managers
Plugin Type: Not Applicable

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 4
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
TS4 Package Conflict Detector (VS 2015 Source Code).rar | Version 1.3.0 - Visual Basic Source Code

Size: 49.4 KB · Downloads: 5,467 · 11th Dec 2017
49.4 KB 5,467 11th Dec 2017
TS4 Package Conflict Detector (MSI Installer).rar | Version 1.3.0 - Windows Installer version

Size: 142.9 KB · Downloads: 26,644 · 11th Dec 2017
142.9 KB 26,644 11th Dec 2017
TS4 Package Conflict Detector (EXE Only).rar | Version 1.3.0 - (Portable) EXE File Only

Size: 30.5 KB · Downloads: 16,580 · 11th Dec 2017
30.5 KB 16,580 11th Dec 2017
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:
1. Download: Click the File tab to see the download link. Click the link to save the .rar or .zip file(s) to your computer.
2. Extract: Use WinRAR (Windows) to extract the file(s) from the .rar or .zip file(s).
3. Cut and paste the file(s) into your Mods folder
  • Windows XP: Documents and Settings\(Current User Account)\My Documents\Electronic Arts\The Sims 4\Mods\
  • Windows Vista/7/8/8.1: Users\(Current User Account)\Documents\Electronic Arts\The Sims 4\Mods\
Need more information?
  • Anyone can use both .rar and .zip files easily! On Windows, use WinRAR.
  • If you don't have a Mods folder, just make one.
 
190 Comments / Replies (Who?) - 109 Feedback Posts, 71 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 1 of 8
Test Subject
#2 Old 13th Feb 2016 at 6:15 AM
Will there be a Mac version?
Deceased
Original Poster
#3 Old 13th Feb 2016 at 6:21 AM
Quote:
Originally Posted by EliteAgent51
Will there be a Mac version?

Sorry, I have no idea how to make .Net code work on a Mac.

The source code is available though, so if someone else knows how to do so that is a possibility, and I would be glad to assist them if I can.
Instructor
THANKS POST
#4 Old 13th Feb 2016 at 6:50 AM
Thank you so much for this! I'm going to try it out right now.
Scholar
THANKS POST
#5 Old 13th Feb 2016 at 9:22 AM
Thank you very Much scumbumbo! Also trying it now!!!!
Test Subject
THANKS POST
#6 Old 13th Feb 2016 at 10:33 AM Last edited by morgana191919 : 13th Feb 2016 at 10:37 AM. Reason: a question
hi friend
thank you for the mod . the only question i have.
what happens is i delete the double files does it interfere with the game.
Space Pony
THANKS POST
#7 Old 13th Feb 2016 at 10:47 AM
Thank you for this - much needed
Field Researcher
THANKS POST
#8 Old 13th Feb 2016 at 11:18 AM
Very good thank you.
Lab Assistant
THANKS POST
#9 Old 13th Feb 2016 at 11:36 AM
WOW! Amazing!!! A great tool for finding conflicts. I used to use another conflict detector tools but it doesn't differentiate between resource duplicates and real conflicts, and also it doesn't say what are the conflicting resources. Thanks!!
Lab Assistant
THANKS POST
#10 Old 13th Feb 2016 at 11:54 AM
Thank you !
Test Subject
THANKS POST
#11 Old 13th Feb 2016 at 1:10 PM
OMG! You are A-Maze-Zing! Thank you so much!
Test Subject
#12 Old 13th Feb 2016 at 2:14 PM
will there be link to sims 4 studio and not just s4pe?
Field Researcher
THANKS POST
#13 Old 13th Feb 2016 at 2:15 PM
Thank you so much for this, excellent work.
Lab Assistant
#14 Old 13th Feb 2016 at 3:00 PM
you should remove the resource with type 0x0166038C, and both group and ID 0, from the results. That resource isn't (AFAIK) read by the game, it is only used to add names to the other resources inside the .package file, and when it exists is actually supposed to be different for every package.

(Granted, not many mods out there include it. But mine do include it, both my published and unpublished ones.)
Field Researcher
THANKS POST
#15 Old 13th Feb 2016 at 4:32 PM
Wow! thank you so much!!
Deceased
Original Poster
#16 Old 13th Feb 2016 at 5:00 PM
Quote:
Originally Posted by morgana191919
thank you for the mod . the only question i have.
what happens is i delete the double files does it interfere with the game.

It definitely can affect gameplay. Just because two mods have one or more resources that are identical does not mean that the entire package is identical - it only means that they share SOME of the same information. It's generally a good idea to move one file temporarily out of your game and see how it affects things, you can then always change your mind and put it back and then possibly remove the other file instead.
Deceased
Original Poster
#17 Old 13th Feb 2016 at 5:21 PM
Quote:
Originally Posted by wanaariza
will there be link to sims 4 studio and not just s4pe?

Not unless they open their source code for the benefit of other programmers. I know that may seem silly - they have made a nice program that is immensely useful for many people, but there is a difference in how their work is distributed that I don't so much disagree with as merely don't support. I can benefit from the S4PE work in that I can examine it, use portions of it, alter them to work differently, and so forth (which I didn't for this program but that's not really the point - I said it may seem silly to some!)

Anyone can also download the source for my programs and see how they work internally to assist them in making their own programs, or even alter portions and use that in their own programs (with appropriate credit). In the end, that means that ALL the tools benefit from each other and I feel that is important for a modding community.

So, while S4PE and Sims 4 Studio are both fine programs and the talented coders behind each deserve every ounce of success and respect, I put my support behind S4PE.
Deceased
Original Poster
#18 Old 13th Feb 2016 at 5:28 PM
Quote:
Originally Posted by DarkWalker
you should remove the resource with type 0x0166038C, and both group and ID 0, from the results.
Good eye, and you're correct those are not truly conflicting resources! That's one of those things I saw occasionally and thought "I should get rid of those _KEY resources" and never got around to. I will make that change in the next version, and do so now before I forget. An update should be out in the next few days, or a week or so, depending on the quantity of feedback and suggestions.
Lab Assistant
#19 Old 13th Feb 2016 at 6:37 PM
Quote:
Originally Posted by scumbumbo
Good eye,

More like, "Why the heck is this program saying all my mods conflict with each other?" Kinda hard for me to not notice it

BTW, a suggestion for improvement: when it detects a conflict between a mod and a cache file (as it did for me), perhaps it should offer to delete (or move to the backups folder) the offending cache file. Practical for us that know the files can be deleted, safer for the less knowledgeable users that doesn't know which files are needed by the game and which aren't.
Lab Assistant
#20 Old 13th Feb 2016 at 6:45 PM
Quote:
Originally Posted by EliteAgent51
Will there be a Mac version?


I know right? They're just like forget about us Mac users when it comes to these tools, smh.
Deceased
Original Poster
#21 Old 13th Feb 2016 at 7:15 PM
Quote:
Originally Posted by DarkWalker
More like, "Why the heck is this program saying all my mods conflict with each other?" Kinda hard for me to not notice it

BTW, a suggestion for improvement: when it detects a conflict between a mod and a cache file (as it did for me), perhaps it should offer to delete (or move to the backups folder) the offending cache file. Practical for us that know the files can be deleted, safer for the less knowledgeable users that doesn't know which files are needed by the game and which aren't.

I've fixed the bug with the _KEY resource and as that is definitely a possible source of confusion for users I've decided not to wait but will be updating the download very soon. Also included will be a disable/enable package option.

Offering to move files to that backup folder is also an excellent idea and should be very quick and easy to implement, so I'll add that in now - along with a button to open Windows Explorer to that backup folder.
Deceased
Original Poster
#22 Old 13th Feb 2016 at 7:17 PM
Quote:
Originally Posted by gigihuxtable
I know right? They're just like forget about us Mac users when it comes to these tools, smh.

Sorry, I just don't have a Mac to even play around with trying to port the program to. The only Mac I have access to is an ancient and slow laptop, and that's owned by my employer so using it for coding would not be ethical. Otherwise, I'd love to try my hand at making it work!
Mad Poster
THANKS POST
#23 Old 13th Feb 2016 at 7:28 PM
Thanks, thanks! A million and one - this is something so needed!
Deceased
Original Poster
#24 Old 13th Feb 2016 at 8:20 PM
Quote:
Originally Posted by VerDeTerre
Thanks, thanks! A million and one - this is something so needed!

I guess so, it's going like hotcakes even though I believe there's already a competent conflict detector in existence! I should put ads in the program (joke, just a joke!)

In other news, version 1.1.0 is now available with the changes discussed above. Some were just good changes, but the change regarding the _KEY resource seemed like a possible point of confusion for users so I wanted to get that fix in ASAP.
Field Researcher
THANKS POST
#25 Old 13th Feb 2016 at 10:21 PM
And how I need this! Thank you so much for this utility. I am happy to have you back.
Page 1 of 8