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

Tuning Error Notifier

by scumbumbo Posted 26th Feb 2019 at 7:40 AM - Updated 3rd Mar 2019 at 4:21 PM by scumbumbo : Added EXCLUDE_TEXT_LIST option
Open thumbnail gallery
50 Thanks  Thanks     26 Favourited
This is a utility for modders and not intended for use by players.

Description

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.

Installation

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.

FILTER_TEXT_LIST Option

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:
  • MTS_Scumbumbo_blah_blah
    'sc' and 'bo' both match
  • BOBOS_BOTCHED_Interaction
    'bo' matches
  • SCmods_buff_DingoParty
    'sc' matches
Personally, I just use FILTER_TEXT_LIST = ['scumbumbo'] myself, as I include my name in each mod tuning I write.

EXCLUDE_TEXT_LIST Option

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!

USE_DIALOG_ALERT_FOR_ERRORS Option

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.

REPORT FILE

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.

Kn0WN bUGs

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.

https://discord.gg/29qKsBg

Credits

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!
Download files
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
Tuning Error Notifier.zip | Description: Tuning Error Notifier Utility for TS4 710.8 KB 643 3rd Mar 2019
Need help with downloading or installing content? Click here!
 
16 Comments / Replies (Who?) - 8 Feedback Posts, 7 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)

Expansion/Stuff packs required:
Sims 4

Built with Game Version: 1.50.67

16 Comments / replies (Who?)

671 Downloads

4,403 Views

Type: Additional Functionality Other

Tags: #tuning, #xml, #ten, #tuning error notifier