Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Tuning Error Notifier v2

by scumbumbo Posted 26th Feb 2019 at 7:40 AM - Updated 22nd Apr 2019 at 5:32 PM by scumbumbo : Version2 - Added REBUILD_INVALID_XML option
 
22 Comments / Replies (Who?) - 13 Feedback Posts, 8 Thanks Posts
Thanks are currently OFF: Show Thanks Posts for this thread
Lab Assistant
THANKS POST
#2 Old 26th Feb 2019 at 7:47 AM
Thanks for this and to LillteMsSam for highlighting the beta version on your discord channel. Great work as always.
Deceased
Original Poster
#3 Old 26th Feb 2019 at 7:56 AM
Indeed, her feedback was most helpful - I've added her specifically to the credits now
Instructor
THANKS POST
#4 Old 26th Feb 2019 at 11:08 AM
Great, thank you so much. I think this to be very useful. But:

I am a modder beginner. There are Terms that still confuse me. E.g.:

"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.
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."

So, "extract the __init__.py file from the ts4script file" - is there any tutorial showing how to do this? What programs do I need to do this?
"Recompiling the script" - sorry, erm, I do not know how to do that. Or even what that is.

For me, it just could be very helpful to have some links included that help me to understand, so I can use this useful tool. :D

Thank you for reading, creating that tool and helping other Modders!!! :)
Deceased
Original Poster
#5 Old 26th Feb 2019 at 11:20 AM Last edited by scumbumbo : 27th Feb 2019 at 6:34 AM.
@helene912 - Good thoughts - I'll put together a quickie tutorial on doing just that tomorrow and edit this response to include that information.

ETA - Attached is a PDF with a quick (probably more detailed than it needs to be) how-to for editing those options.
Attached files:
File Type: zip  Editing Options for TEN.zip (608.1 KB, 315 downloads)
Description: PDF Tutorial for Editing the Options
Instructor
#6 Old 26th Feb 2019 at 11:42 AM
Quote: Originally posted by scumbumbo
@helene912 - Good thoughts - I'll put together a quickie tutorial on doing just that tomorrow and edit this response to include that information.

Some real quick pointers that may get you started before I get to that -- a "ts4script" file is really just a zip archive that has had the file extension renamed from ".zip" to ".ts4script" So you can get at the files inside by renaming it back to a ".zip" file and opening it with any archive manager program (I use WinRar, but 7-zip or others will work). You can then get at the file from there which is named "__init__.py" and drag and drop it to your desktop for editing. That file can be edited with Notepad, or any other text editor. Once you've changed the file to set the options mentioned in the text to what you need, you can then drag and drop the file back into that ".zip" file in the same location and rename the ".zip" file back to a ".ts4script".

You will not need to know anything about recompiling the script, it will take the changes from that file without needing to recompile it.


Wow, you are Wonderful!!! Thank you very much, this was very enlightening. I did not know how easy it is just to rename from sims 4 script back: just vice versa, so to speak. :DDD Thank you very, very much, also for the work you promised to do.

"Erfahrung heisst gar nichts. Man kann seine Sache auch 35 Jahre schlecht machen.“ (Kurt Tucholsky)
"Experience means nothing. You can also do your thing in a bad way for 35 years." (Kurt Tucholsky)
Rabid Recoloring Renegade
retired moderator
#7 Old 26th Feb 2019 at 3:09 PM
When you said this: "a "ts4script" file is really just a zip archive that has had the file extension renamed from ".zip" to ".ts4script" So you can get at the files inside by renaming it back to a ".zip" file and opening it with any archive manager program (I use WinRar, but 7-zip or others will work)" it was like a light bulb went off above my head and simply exploded. I knew that we renamed zip files for careers as ts4script, but I did not translate this to other ts4script files for some reason and always found them daunting. I wholeheartedly second helen912's comments
Instructor
#8 Old 26th Feb 2019 at 4:47 PM
Quote: Originally posted by Simmiller
it was like a light bulb went off above my head and simply exploded. I knew that we renamed zip files for careers as ts4script, but I did not translate this to other ts4script files for some reason and always found them daunting. I wholeheartedly second helen912's comments



Exactly, thx 2 both of u!!! :lovestruc

"Erfahrung heisst gar nichts. Man kann seine Sache auch 35 Jahre schlecht machen.“ (Kurt Tucholsky)
"Experience means nothing. You can also do your thing in a bad way for 35 years." (Kurt Tucholsky)
Inventor
THANKS POST
#9 Old 26th Feb 2019 at 5:47 PM
Still not sure if i should hate you or love you for this tool xD But seriously thank you
Lab Assistant
THANKS POST
#10 Old 26th Feb 2019 at 7:10 PM
Again, thank you so much for this! :)
Smeg Head
THANKS POST
#11 Old 27th Feb 2019 at 5:35 PM
Hi Scumbumbo, wanted to ask something. Ages ago I noticed, that if leaving purposeful white spaces in XMLs (To stand out as the coding part edited) when doing comparisons with WinMerge, it attempts, suggests, to fill in those white spaces with what it thinks are the missing Us and Vs and what not. Would this app also see white spaces as missing code? Thanks for all you do, Scumbumbo.
Deceased
Original Poster
#12 Old 27th Feb 2019 at 7:46 PM
@coolspear1 No, the errors are as reported by EA's tuning loader, which will ignore any extra whitespace or comments. As far as the XML loader is concerned
Code:
<U><T n="something">SomeValue</T></U>
and
Code:
<U>
    <T n="something">SomeValue<!--Set this to SomeValue so that some effect happens
                              you should not change this without seriously thinking
                              about the consequences!-->
    </T>


                                   </U>
Are functionally identical.
Quote: Originally posted by coolspear1
Hi Scumbumbo, wanted to ask something. Ages ago I noticed, that if leaving purposeful white spaces in XMLs (To stand out as the coding part edited) when doing comparisons with WinMerge, it attempts, suggests, to fill in those white spaces with what it thinks are the missing Us and Vs and what not. Would this app also see white spaces as missing code? Thanks for all you do, Scumbumbo.
Instructor
#13 Old 28th Feb 2019 at 6:10 PM
Quote: Originally posted by scumbumbo
@helene912 - Good thoughts - I'll put together a quickie tutorial on doing just that tomorrow and edit this response to include that information.

ETA - Attached is a PDF with a quick (probably more detailed than it needs to be) how-to for editing those options.


Thank you very, very much, great!!!

"Erfahrung heisst gar nichts. Man kann seine Sache auch 35 Jahre schlecht machen.“ (Kurt Tucholsky)
"Experience means nothing. You can also do your thing in a bad way for 35 years." (Kurt Tucholsky)
Lab Assistant
THANKS POST
#14 Old 2nd Mar 2019 at 9:35 PM
Thank you for your tools! I really need them.
Test Subject
THANKS POST
#15 Old 3rd Mar 2019 at 6:27 AM
so there is no option to exclude strings?
like I want to exclude all TURBODRIVER:WickedWhims
that mod from some noob generate a lot of errors and I can't find something that is mine!
just kidding, I love TURBODRIVER
but srsly some animation for WW generate tons of strings
ofc I can remove mods that cause errors just for testing my mod... but man, is time consuming
Deceased
Original Poster
#16 Old 3rd Mar 2019 at 3:37 PM Last edited by scumbumbo : 3rd Mar 2019 at 4:19 PM.
Quote: Originally posted by Illume
so there is no option to exclude strings?

Didn't really think that'd be necessary, but it wouldn't be difficult to add that. Is there no unique string (like author name) in your own mods that you can use for filtering? Seems like it would be a good enough feature to add if there's others who have that same issue, and I can resist the urge to say you really should follow best practices and include that unique name in your tuning names.

ETA - Updated to include an EXCLUDE_TEXT_LIST option.
Test Subject
#17 Old 3rd Mar 2019 at 4:57 PM Last edited by Illume : 3rd Mar 2019 at 5:23 PM.
Quote: Originally posted by scumbumbo
Is there no unique string (like author name) in your own mods that you can use for filtering?

yes
for now I just made some small tuning here and there for myself
so there is no new stuff if that is what you mean
thanks for update! worked like a charm!
Deceased
Original Poster
#18 Old 22nd Apr 2019 at 7:02 AM
Version 2 adds a new option which will rebuild the XML for certain types of errors to make the invalid XML much easier to locate in your tuning. The rebuilt XML is nicely reformatted with "pretty" indentation regardless of how the input XML was formatted. See the screenshot attached to this message for an example.
Screenshots
Lab Assistant
#19 Old 22nd Apr 2019 at 10:49 PM
Does the REBUILD_INVALID_XML option actually fix the invalid XML it finds???

I run a Discord server dedicated to assisting Mac Simmers. Come join me here: https://discord.gg/6sjegZD

"It wasn't long ago that I was just like you." -- "Emenius Sleepus" by Michael Ryan Pritchard
Deceased
Original Poster
#20 Old 23rd Apr 2019 at 10:17 AM
Quote: Originally posted by Athena Apollos
Does the REBUILD_INVALID_XML option actually fix the invalid XML it finds???

LOL - I wish! No, that would be entirely too difficult as there are countless errors that could be in the XML so trying to guess what it should be would be impossible, or at least highly improbable.

It just takes the binary processed XML node that Python sees and regenerates the human readable XML from that so you can see what the source that has an error looks like. In other words instead of just saying "Here's what kind of error you have" it says "Here's what kind of error you have and here is the actual XML code that contains that error."
Lab Assistant
#21 Old 23rd Jun 2019 at 12:10 AM
One of the methods you patch in this mod, sims4.tuning.tunable._TunableCollection.load_etree_node , changed enough in the last Sims 4 version that your mod is causing crashes when REBUILD_INVALID_XML is set; a few attributes from that object, which are used in the previous version of the method, don't exist anymore.
Lab Assistant
THANKS POST
#22 Old 5th Dec 2019 at 11:33 PM
So sorry Scumbumbo desapeared
Lab Assistant
#23 Old 10th Dec 2019 at 9:02 AM
Quote: Originally posted by Valdesca
So sorry Scumbumbo desapeared
um read the creator news https://simsvip.com/2019/12/09/the-...nthly-mod-news/