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

TS4 XML Compare - Version 1.3.21

by scumbumbo Posted 16th Jan 2016 at 7:55 PM - Updated 7th Jul 2018 at 12:04 PM by scumbumbo : New Higher Performance Version 1.3.21
18 Comments / replies (Who?) - 12 Feedback Posts, 6 Thanks Posts
Picked Upload! This is a picked upload! It showcases some of the best talent and creativity available on MTS and in the community.
Update to 1.3.21 (July 7, 2018) - Two noteworthy changes prompted me to release an update after all this time, and I expect folks will be happy with the changes:
  • Huge performance increase indexing the two game XML folders used for comparisons. Measurements averaged between 75-85% faster (e.g. 2.5 seconds vs. 19 seconds).
  • When matching XML files are not located in either one or both of the XML folders, instead of popping up a message box for each missing file a single dialog is presented at the end of the process.

Bugfix (February 9, 2016) - The program was not properly saving the path to WinMerge, or enabling the other program buttons once it was manually located. Both of these bugs have been corrected.

Description

This is probably one of my favorite modding utilities when it comes time to update mods for a new game version. This will compare the XML from two versions of the game easily so you can see what has changed from the old version to the new version. You will be able to easily see exactly which game XML tuning files have been updated and what those changes are - which can be a massive time saver and help to find any inconsistencies your mod may be causing (for instance, an EA update to a tuning file that doesn't affect gameplay for you because you don't have the expansion or game pack, so you wouldn't notice it otherwise).

The program launches the WinMerge program to make the comparisons, so you will need to install it from SourceForge in order to use this program. Some of the command line options for WinMerge have changed from older versions - this is written to be compatible with version 2.14.0.0 of WinMerge.

The program requires .NET Framework 4 to be installed, which you likely already have. This can be installed from Microsoft's web site.

There is no installation program, this is just an EXE file, so you can place it anywhere on your system, create a shortcut to it, etc.

Usage

Read the Very Important Safety Tip from the outdated thread where this program was originally available before actually using this. Seriously read it!

You need to have your game XML extracts stored sensibly in separate folders for each game version. For instance:


The program will find WinMerge automatically when it is first started if the program is installed to the WinMerge folder of your Program Files. If it is not found, you will need to click the Browse button to locate it. The path will be stored for future use.

Next, set the old and new folders in the TS4 XML Extract Folders by clicking the browse buttons next to the respective entries. These folders will also be saved. All of the files in these folders and their subfolders will be indexed (in memory only, nothing is saved) for search speed. This indexing can take a few moments, particularly if you have a slower system.

For instance, if you look at the screenshot for the program you will see I am currently comparing the "2015-09-24" game version to the "2016-01-07" version.

Finally you can select the XML files you want to compare. Click the Browse button next to the Your XML File field, or drag and drop files from a Windows file Explorer window to the box. The files you want to compare are the ones from YOUR MOD. These files aren't even opened, it's just looking for all the filenames so it knows what to search for in your XML extracts.

So for instance, if I'm wanting to update Faster Gardening, I'll open up the folder I store all my XML for that mod in Windows Explorer and drag and drop all my XML files into the Your XML File box. The program would then know to compare all of the XML files used in Faster Gardening from the "2015-09-24" game version to those for "2016-01-07".

Again, it doesn't compare my mod to the existing XML (although you can set that up, more on that later) it compares the game's XML so I can see what EA has changed between the two game versions.

Once everything is filled in, you should be able to click Launch WinMerge. A new WinMerge window will open up for each comparison and if the files are identical (EA didn't change the XML) then it will close immediately. If any WinMerge windows remain open when the process is done, all changes will be highlighted - the old XML on the left, and the new XML on the right, like so:


You can now see exactly which file(s) need to be updated and precisely what has been changed - which can be a massive time saver and help to find any inconsistencies your mod may be causing (for instance, an EA update to a tuning file that doesn't affect gameplay for you because you don't have the expansion or game pack, so you wouldn't notice it otherwise).

Read the Very Important Safety Tip from the outdated thread where this program was originally available. Seriously read it!

Advanced Usage

You will want to set some options in WinMerge the first time you use this to make comparisons work more smoothly. I suggest the following, I'm not sure what the installed defaults are any more, so I'll highlight all of the options that really make a difference:
  • General
    • "Allow only one instance to run" should be OFF
  • Compare
    • "Whitespace" should be set to IGNORE ALL
    • "Ignore blank lines" should be ON
    • "Ignore case" should be ON
    • "Ignore carriage return differences" optionally on
    • "Enable moved block detection" should be ON
    • "Match similar lines" should be OFF
  • Any other options can be set as desired

Back to the compare program itself: the "Open all files in one instance of WinMerge" option can be used with care. This will make WinMerge compare all the files in tabs in a single WinMerge window rather than opening a separate window for each file. But and this is a BIG but -- WinMerge will not work properly if you are comparing a large number of files. I don't know the limit exactly, five or ten files are probably safe. I just leave the option off always and unless you've only got small mods you should probably do the same!

Another use of the program which can be handy is to compare YOUR mod's XML to that of a specific game version. If major changes are made to a game version and you have many files to update, fixing each one repeatedly can be extremely time consuming. The process here is as follows:
  1. For the OLD folder, use the game's XML folder for the comparison.
  2. For the NEW folder, use the folder you are storing your mod's XML files in. This may seem backwards, but this is because we want to...
  3. Turn off the "Read Only Right Side" checkmark. This will allow you to easily merge changes from the left pane (EA's files) into your XML files on the right side of the WinMerge window.
  4. Set the files for the comparison in the Your XML File field.
  5. Launch WinMerge, you should see a window(s) like this one. Notice there is a big chunk of code that needs to be added to the right-hand side to make the XML compatible with the current game.
  6. Since the right side is no longer Read Only, you can simply right click the highlighted text in the left pane and choose the "Copy to Right" option. This will merge those lines into your XML file, which can now be saved.
  7. Rinse and repeat, and use the time saved to do something in real life!
  8. Note that the "Read Only Right Side" option is NOT saved and will always be turned back on when you start the program. This is to ensure that you don't accidentally change your extracted XML files in a WinMerge window.

Additional Credits

Thanks to the makers of the WinMerge program! It's open source, so there would be far too many to name here, but thanks to all of you!

Also, thanks to everyone who has tested and suggested improvements for earlier versions of this program.
Tags: #XML, #compare, #update

Operating System: Windows
Utility Type: Miscellaneous
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 XML Compare.rar | Version 1.3.21

Size: 12.2 KB · Downloads: 6,883 · 7th Jul 2018
12.2 KB 6,883 7th Jul 2018
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.
 
18 Comments / Replies (Who?) - 11 Feedback Posts, 6 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Deceased
Original Poster
#2 Old 16th Jan 2016 at 8:18 PM
Quick note...

Read the Very Important Safety Tip from the outdated thread where this program was originally available. Seriously read it!
Deceased
Original Poster
#3 Old 16th Jan 2016 at 8:30 PM
Also, for those familiar with the program from previous versions, the biggest change with this one is that it now supports drag and drop of files to the Your XML File field. In addition, if you are trying to compare files which were extracted using S4PE from another mod it will automatically remove any of the "%%_INFO" from the filename and find the file to compare using the extractor's standard "S4_TTTTTTTT_GGGGGGGGG_IIIIIIIIIIIIIIII.xml" file naming convention.
Test Subject
THANKS POST
#4 Old 16th Jan 2016 at 11:38 PM
Thanks for continuing to make mods and tools for Sims 4. Could you please find the time to update the outfit_copy mod. I screwed up and saved the game after the last update without mods thus wiping out all my sims (100+) clothes hair etc. I have been using the new reset_bathing by Linere but it doesn't include some skin and other things my sleep and or swim outfits have. It does make their bathing outfit just the base nude skin. I am sure a lot of simmers are really hoping you will make this work again. This is one of the most used mods that I have and I have really appreciated several other of your mods. Thanks again!
Instructor
THANKS POST
#5 Old 17th Jan 2016 at 11:29 AM
Thank you for this program, happy to see you back, your mods terribly missed me, I hope to put my favorite functions if corrected, would be happiness
Lab Assistant
#6 Old 10th Feb 2016 at 2:50 AM Last edited by HollyRidge : 10th Feb 2016 at 2:58 AM. Reason: update
Having problems getting it to save the winmerge path. Mine is on the D:\Program Files not on C:\. I load the program up, click browse, follow breadcrumb path to the winmergeu.exe but everything is still greyed out. If I close the program and reopen it, it does not save the path. I have also tried compatibility mode to Windows 7 (on Windows 10 Pro) and running as admin.

UPDATE: I uninstalled winmerge and reinstalled to default path and is working however I try to keep unnecessary programs from C since it is an SSD drive. I prefer to have programs such as this on D instead.
Deceased
Original Poster
#7 Old 10th Feb 2016 at 4:01 AM Last edited by scumbumbo : 10th Feb 2016 at 4:14 AM.
Quote:
Originally Posted by HollyRidge
Having problems getting it to save the winmerge path. Mine is on the D:\Program Files not on C:\.

Hmm, I only have one hard drive myself, but I can look at the code and see if I can figure out a reason why this might be a problem. Doesn't seem like it should be, but... well, all I can do is look

ETA - One note - you don't need to run the program as administrator unless you need those permissions to get to the files you want to read. The settings are saved separately for each user that runs the program.

ETA2 - I should definitely be able to debug what the issue is, I get the same results by moving WinMerge onto a USB stick.

Thanks for the bug report!
Deceased
Original Poster
#8 Old 10th Feb 2016 at 4:33 AM
Thanks again, HollyRidge for finding those issues - version 1.3.1 should fix those problems!
Lab Assistant
#9 Old 10th Feb 2016 at 6:17 PM
Quote:
Originally Posted by scumbumbo
Thanks again, HollyRidge for finding those issues - version 1.3.1 should fix those problems!
Your welcome. I have tested and can confirm the bug is now fixed. Thanks for sharing this app and for fixing it!
Test Subject
THANKS POST
#10 Old 10th Jun 2016 at 7:00 PM
Thank you so very much!
Lab Assistant
THANKS POST
#11 Old 16th Sep 2016 at 10:46 AM
Thank you so much for that! That's very needful thing if you create tuning mods!
Test Subject
#12 Old 28th Nov 2016 at 4:11 PM
Default not found
not found in extracts :/ I extract the file by s4pe support me!!!
Field Researcher
#13 Old 4th Feb 2017 at 3:07 PM
Since the masculine/feminine patch and any patch after that I've been getting a not found in extracts error. So I've been re-making my mods with each patch just in case. Hopefully this gets updated/fixed but doubtful since the creator of the program is AWOL

Origin: Simstopics
Steam: BrokeShopaholic
Xbox: BrokeShopaholic
PlayStation: InDebtShopaholic/BrokeShopaholic
Deceased
Original Poster
#14 Old 7th Jul 2018 at 12:03 PM
One word about this update: "Warp speed"
Test Subject
#15 Old 8th Jul 2018 at 5:22 PM
Loving this update scumbumbo. Not just the speed, but the way it handles the not found xml's. Perfect, thanks!
Lab Assistant
#16 Old 3rd Sep 2018 at 8:38 PM
Thank you for this ! But I have a question. I extracted all the xmls, but my game is patched and I can't get the older files to compare. Where could I get these files ?

I'm trying to patch a mod, but I always get errors.
Test Subject
THANKS POST
#17 Old 9th Nov 2018 at 10:58 PM
I just changed to a Mac and am sadden I can no longer use this wonderful tool. I wanted to say a big thank you Scumbumo for the new features! This is my go to tool to use for my XML changes. I am out of my home state for a bit and won't have access to my desktop with Windows. Again I want you to know I love all you do for the Sims community.
Test Subject
#18 Old 28th Dec 2018 at 10:01 AM
Damn this saves lives. Thanks.
Lab Assistant
THANKS POST
#19 Old 10th May 2020 at 1:03 AM
Is there an update to this MOD that the late Scumbumbo had made? I went to the link provided, but this particular mod was not listed.