April 22, 2019 - Version 2 released:
- Added the REBUILD_INVALID_XML option. Be sure to read the documentation on that below if you're upgrading the mod to familiarize yourself with it.
Tuning mods can be a complex business, and frequently small errors are introduced to the XML when it is written or occur when the game is patched and the XML syntax changes unnoticed. These errors are logged to the Tuning log file (and you can get that file using the Sims Log Enabler
); however, I have found that there are so many mods that have so many errors that it is difficult to see when one of my own mods has developed an error.
Many of these errors can be easily missed and are virtually unnoticeable without extensive testing. Many don't actually affect the game play at all, but could cause problems later with a future game patch. Ideally they should all be fixed, but with the previously mentioned issue of the Tuning log file being full of errors from other mods it's easy to just ignore the minor issues until they eventually become big problems.
The Tuning Error Notifier addresses the issue by allowing you to set a filter of what tuning names to watch out for, and when it notices an error generated by one of those XML tunings it notifies you when the first lot is loaded in the game and can prepare an easily readable HTML report which includes only those errors from the mods you are watching. Once you've taken care of everything the script sits quietly in the background, unnoticed until the next error occurs when again you will become quickly aware of it from a fresh notification.
The following information is included in the ReadMe text file in the download, so you can read this here or there (but not anywhere -- I mean, you can hardly expect me to put this information just anywhere for your own convenience. I'm not about to break into your house as you sleep and slip a copy of it under the alarm clock on your nightstand for you to read bright and early when you wake up. Nor do I intend to tattoo it onto the head of that bald guy you'll be riding behind on the subway to get to work tomorrow.)
I mean those things would be illegal, or at the very least weird, time-consuming and expensive for me.
I won't put this information into the newspaper for you to read over your morning coffee.
Just be satisfied that you can read it here or there, thank you very much.
Oh, I've also included a PDF file that includes three real-world examples of some of these tuning errors from my own mods, how I located and fixed those errors, and what effect they had on the game play.
Basically, install it like any other script mod for The Sims 4.
That said, there are a couple of options you can set. To set them you will need to extract the __init__.py
file from the ts4script file and edit the values near the top of that script.
I've uploaded a fairly comprehensive how-to tutorial of how to edit these values for those not familiar with Python scripting. You can find it in message 5 of the feedback thread
for this mod.
After changing the options, you should replace the __init__.py
file in the ts4script with your changed version. It MUST be in the same location, the tuning_error_notifier subfolder of the zip
file, in order to function. Recompiling the script should be optional, as the game prefers to load script mods from the source files if both .pyc and .py files are included in a script file.
Set this to True (default) to override several game functions which parse XML input allowing them to rebuild the XML and output the portion with the error to the log files. This makes it easier to locate certain XML errors which may otherwise be difficult to locate from the game's normal error logging.
The errors which rebuild the XML include:
- Incorrectly matched tuning types in
- the ETreeTuningLoader
- TunableCollections (e.g. lists)
- Invalid list elements in _TunableCollections
Although no errors with these overrides have been reported, it is possible that some rare issues could possibly occur. The code seems to work identically to the EA scripts; however, as it is based on the decompiled game code there could be a currently unnoticed error. To be absolutely safe it may be best to turn this option off except when you need it to locate an invalid tuning.
Set this to a list of strings which should be compared to tuning instance names to check. The default is a single blank string, which will match all instance names and produces a report containing all tuning errors the game reports.
The strings are not case sensitive.
For example, setting FILTER_TEXT_LIST = ['sc', 'bo']
would match instance names such as:
'sc' and 'bo' both match
Personally, I just use FILTER_TEXT_LIST = ['scumbumbo']
myself, as I include my name in each mod tuning I write.
Set this to a list of strings which should be compared to tuning instance names to exclude from checks. The default is an empty list, which will produce a report containing all tuning errors the game reports.
The strings are not case sensitive.
Be sure, if later turning this feature off, that the list is empty 
and not an empty string ['']
like you would use for FILTER_TEXT_LIST
. An empty string will match everything and then all tunings will be excluded!
The default is False which will cause the notifier to issue a notification on the game notification wall when the first lot is loaded if any tuning errors were seen and matched. A button will be available on the notification to launch a report of errors in your system's default web browser.
If set to True, then a modal dialog alert will be issued instead. This pauses the game and forces you to make the choice whether to open the report (OK button) or ignore the errors on this game load (Cancel button).
In either case the alert will only be displayed when the first lot is loaded on a game run.
The HTML report is saved in your system's temporary files folder and removed when the game exits. If you want to retain the report for reference you can print it or use your web browser to save that file to your Desktop or another location. Don't just save a bookmark, as the file will be gone after the game exits!
COMPATIBILITY WITH SIMS LOG ENABLER
The Tuning Error Notifier is reporting the same errors that would be in the Tuning.log if you use Sims Log Enabler. It will function properly with or without the log enabler installed; however, the log enabler can disable the notifier if Sims Log Enabler loads AFTER the Tuning Error Notifier as it will overwrite the changes to the Logger.error() method that the notifier makes.
To ensure that both work properly, you should make sure that Sims Log Enabler runs FIRST. This can be fairly easily assured if you name the sub-folder for the log enabler to start with an 'A' character as scripts load in alphabetical order. I use "A Sims Log Enabler" for my log enabler sub-folder to ensure that it loads before any other mods and that logs will start working very early in the mod-loading process.
Making the log enabler load early is a good idea in any event, so that logging will begin occurring as soon as possible in the loading sequence.
There are no real known bugs to be aware of; however, I am never surprised when bugs are found! If you do notice something, please let me know on this mods download thread on Mod the Sims or my Discord server in the #scumbumbo-mods channel.
Thanks for the modders on my Discord server who have tested this and been highly receptive to how it works and its usefulness. In particular LittleMsSam who encouraged me to write the examples PDF documentation!