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.
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 18.104.22.168 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.
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!
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:
- "Allow only one instance to run" should be OFF
- "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:
- For the OLD folder, use the game's XML folder for the comparison.
- 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...
- 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.
- Set the files for the comparison in the Your XML File field.
- 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.
- 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.
- Rinse and repeat, and use the time saved to do something in real life!
- 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.
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.
You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.
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
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
Need more information?
- 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\
- 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)
Hide Thanks Posts for this thread (Show only feedback)
#2 16th Jan 2016 at 8:18 PM
#3 16th Jan 2016 at 8:30 PM
#4 16th Jan 2016 at 11:38 PM
#5 17th Jan 2016 at 11:29 AM
#6 10th Feb 2016 at 2:50 AM Last edited by HollyRidge : 10th Feb 2016 at 2:58 AM. Reason: update
#7 10th Feb 2016 at 4:01 AM Last edited by scumbumbo : 10th Feb 2016 at 4:14 AM.
#8 10th Feb 2016 at 4:33 AM
#9 10th Feb 2016 at 6:17 PM
#10 10th Jun 2016 at 7:00 PM
#11 16th Sep 2016 at 10:46 AM
#12 28th Nov 2016 at 4:11 PM
#13 4th Feb 2017 at 3:07 PM
#14 7th Jul 2018 at 12:03 PM
#15 8th Jul 2018 at 5:22 PM
#16 3rd Sep 2018 at 8:38 PM
#17 9th Nov 2018 at 10:58 PM
#18 28th Dec 2018 at 10:01 AM
#19 10th May 2020 at 1:03 AM