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)
Updated (Feb 27, 2016)
- 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.
- 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.
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.
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_188.8.131.520. 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 _184.108.40.2060 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 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)
- Pre 1.0.0 version info here
- 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.