Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

2018 MTS Calendar Contest - posted on 12th Nov 2017 at 8:48 PM
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...
Advertisement:

Picked upload! TS4 XML Compare - Version 1.3.1

by scumbumbo Posted 16th Jan 2016 at 8:55 PM - Updated 10th Feb 2016 at 5:31 AM by scumbumbo : Bugfix Version 1.3.1
140 Thanks Say Thanks
43 Favourited
2,269 Downloads
14,987 Views
Advertisement:
12 Comments / replies (Who?)
Picked Upload! This is a picked upload! It showcases some of the best talent and creativity available on MTS and in the community.
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 | Description: Version 1.3.1 13.4 KB 2,269 10th Feb 2016
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.
 
12 Comments / Replies (Who?) - 7 Feedback Posts, 4 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Back to top
Advertisement: