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

Featured upload! XML Injector version 2

by scumbumbo Posted 24th Jan 2019 at 9:22 AM - Updated 26th Mar 2019 at 11:43 PM by scumbumbo : Version 2 Released (New Features)
189 Comments / replies (Who?) - 16 Feedback Posts, 5 Thanks Posts
This is a featured upload! It showcases the best talent and creativity available on MTS and in the community.
Version 2 Released
  • Contains new features which may be required by some mods.
  • Don't forget to remove version 1 when you upgrade!

Description

The XML Injector for The Sims 4 is a mod library to allow mods that would normally require a script for simple changes to instead use a custom snippet. The library provides the scripting, and the modder can release their mod without having to concern themselves with writing, compiling and maintaining a script. Currently the XML Injector snippet handles adding interactions to game objects in a variety
of ways with a simple XML definition.

Player Info

If you just play the game then you only need to download and install this library mod if another mod you download tells you that you must have this installed. On it's own this mod does nothing, it works in the background to make other modders able to code their mods more easily.

If another mod does inform you that this mod is required for it to work, then you should proceed to download and install this. You do not need to download the Modder's Documentation file, this contains the technical information for modders to reference.

Installation is simple. The file you download will contain two files, a script named XmlInjector_Script_v2.ts4script and XmlInjector_Test_v2.package.

Extract both of these files from the download file into your game Mods folder. You should install it directly into your Mods folder, and not a subfolder, in order to ensure that it can be easily located if you need to upgrade the script to a newer version.

The current version of the XML Injector is version 2, and denoted by the _v2 in the filenames. It has been written to work with the most recent game patch, 1.50.67 (February 21, 2019).

Once both files are installed, you must also ensure that script mods are enabled in your game options. This is very important as, though the XML Injector allows other mods to eliminate their scripts, the XML Injetor does the scripting for them and so script mods must be allowed in your game.

After installing the XML Injector, you should test to make sure it is working properly. The included test package adds several test interactions to several game objects. Choosing one of these "XML Injector Test" interactions from the pie menu should display a notification that the XML Injector is working properly. If you do not see these test interactions then the XML Injector is not installed properly and will not work for mods that depend on it.

The "XML Injector Test" test interactions can be selected from any of the following six locations in the game.
  • On a household's mailbox
  • Any of the game's computer objects
  • Clicking on any Sim
  • In the "Friendly" chat choices when clicking on another Sim
  • From a Sim on the relationship panel
  • From the "Household" phone category
There is not really any need to test more than one of these choices, any single one should suffice. The test is primarily in so many places in order to serve as a useful reference for modders to see how to code their own mods.

Once you have verified that the XML Injector is working, you may remove the XmlInjector_Test_v2.package file and test interactions will no longer appear on your pie menus.

The script file should remain in your Mods folder. If the script is removed, other mods which depend on it will no longer operate properly.

You should check back here occasionally, particularly a day or two after game updates if it stops working, to see if the mod has been updated with any important additions or fixes for new game patches. In the future, a mod you download may specify that it requires features from a version newer than the one you have installed, and again this is an important reason to keep the mod installed in the main Mods folder so it can always be located easily and the version number verified.

Modder Info

The primary purpose of this mod is to eliminate the need for modder's to write, compile and maintain their own scripts for the simple tasks of modifying the game's XML tunings (e.g. _super_affordances list). It currently supports:
  • Add interactions to game objects. The game objects can be selected by instance number, an existing interaction (e.g. sink_washHands), or a partial name search.
  • Add interactions to the Sim's object.
  • Add interactions to the relationship panel.
  • Add interactions to the phone panel.
  • Add interactions to AffordanceLists ("Friendly" mixers, etc.)
  • Version 2
    • Test that XML Injector v2 or higher is installed.
    • Test that that the installed version of XML Injector supports your mod.
    • Add loot actions to LootActions and RandomWeightLoot tunings.
    • Add buffs to traits.
    • Add name and object relationship components to game object tunings.
    • Add states and state_triggers to object tunings.

By offloading these tasks to a shared script, controlled by a simple XML snippet that you include in your mod package, this eliminates the need for you to include a script. In addition, if future game updates alter the method that these XML tunings must be modified in a script, this library will be promptly updated with any necessary fixes - and no changes will be required to your mod.

The majority of the documentation for the library is contained in the Modder's Documentation. This contains the following resources:
  • A PDF document with the technical details on creating an XmlInjector snippet tuning, including several examples.
  • The raw XML and STBL files contained in the test package.
  • A tuning description file for the XmlInjector snippet. If you use the TS4 Tuning Description Browser, you can place this file into your snippets folder where you have stored the EA TDesc files to view it within the browser.
  • The script source files for reference. At least one other script modder should acquaint themselves with the code (feel free to ask me any questions on how something works!) in the event that I am unable to update it myself for whatever unplanned and involuntary reason.

Once you've setup your mod to use an XmlInjector snippet, you should inform players who download your mod to obtain and install a copy of the XML Injector from this download page. Do not distribute the library with your own mod. This ensures that players have only one copy of the script installed, and that they can easily determine if they have the latest version installed and know where they can get the most recent updates if required.

The XML Injector can be extended to update other tunings. If you have any ideas, feel free to ask if they can be implemented. Ideal candidates for new features would be common tuning changes that would otherwise create the possibility of mod conflicts without a script. More complex or rare changes would not receive any priority for implementation as the mods that make those complex changes are likely to require a script for other reasons. The main goal is to allow other mods to be implemented and distributed without requiring their own scripts.

If you have any questions or run into technical difficulties, please post here on the mod library's discusion thread. In addition, some alternative methods of contacting me are given in the PDF documentation.

Thank you to all the modders who have tested, and given me ideas and encouragement for implementing this library snippet!

Thank you to Triplis for joining the development team and creating new features for future XML Injector versions!

You must have the expansion, game version or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 4
Built with Game Version: 1.50.67
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
XmlInjector_Modders_Documentation_v2.zip | Documentation for Modders

Size: 1.30 MB · Downloads: 28,473 · 26th Mar 2019
1.30 MB 28,473 26th Mar 2019
XmlInjector_v2.zip | XML Injector Version 2

Size: 13.0 KB · Downloads: 108,393 · 26th Mar 2019
13.0 KB 108,393 26th Mar 2019
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.
Read the upload description for installation instructions. If nothing else is specified, do the following:
2. Extract: Use WinRAR (Windows) to extract the .package file(s) (if included, ts4script as well) from the .rar or .zip file(s).
3. Cut and paste the .package file(s) (if included, ts4script as well) 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.
  • Mod still not working? Make sure you have script mods enabled
 
189 Comments / Replies (Who?) - 123 Feedback Posts, 51 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 7 of 8
Field Researcher
#151 Old 6th Dec 2019 at 6:01 PM
People been talking about it in Twitter too. So I guess it is really true that he passed away. So sad to read
Have a good journey Scumbumbo - R.I.P -
Field Researcher
#152 Old 7th Dec 2019 at 2:08 AM
Oh my... I'm so sorry to hear this. Rest in peace, Scumbumbo.
Instructor
DELETED POST
7th Dec 2019 at 7:12 AM Last edited by heidi137 : 8th Dec 2019 at 7:08 AM.
This message has been deleted by heidi137.
Instructor
#153 Old 7th Dec 2019 at 8:05 AM Last edited by heidi137 : 7th Dec 2019 at 9:29 PM.
Quote:
Originally Posted by Krud
This being the internet, I totally understand your skepticism, especially since literally the only thing I've done as a logged-in user is give you this information. The only reason I made an account at all was because I saw he was well-known here and I hadn't heard from him in months. I'm not sure what I would gain by making it up, but then I won't pretend to understand why a lot of people do what they do online.

Anyway, despite dropping this news on you, I don't feel it's my place to provide real-world confirmable information. Even if I did, what would it prove, exactly? One either knew who scumbumbo was in real life or they did not, and nothing I could show would necessarily prove anything one way or the other. And anyone who would make up something like that could just as easily falsify proof. You can believe me or not. If the situation were reversed, I'd rather not believe me. I'm still trying to process it, days later. But I promise it's the truth (which, again, it's the internet, so I know that means very little.)


Hello, Scumbumbo has always been there alternately, he was absent for very long periods. You had to know this normally, because he was also absent from your game. Here, we knew that he stopped without warning and that he returned from the very long months after, it was the normality. This makes a lot of people sad, I hope for you that you are sure of what you are doing! To announce a death is very serious, I hope that enough elements allow you to announce this without any doubt. This is an emblematic figure of MTS, weird that the staff is not aware of anything, they are friends for many years ... You are a generous donor, as I could see, it's for his memory? I never believe the ads on the net, everything is nebulous, I like things to be clear and safe, I work like that in real life too, when it is not verifiable especially. It is so bad to announce a death without justifying formal sources, sorry, but I remain in doubt since you can not say for sure...
Test Subject
THANKS POST
#154 Old 7th Dec 2019 at 9:32 AM
Always love your work. You're a great person and a great modder.
I'll miss your cute mouse avatar.
Rest in peace, Scumbumbo.
Lab Assistant
THANKS POST
#155 Old 8th Dec 2019 at 3:44 AM
So sad. Rest in peace, dear Scumbumbo.
Lab Assistant
#156 Old 9th Dec 2019 at 12:29 AM
Can someone please make a modlist of mods that needs this mod, just links in the mod list too
Test Subject
#157 Old 9th Dec 2019 at 6:30 PM
Quote:
Originally Posted by heidi137
Hello, Scumbumbo has always been there alternately, he was absent for very long periods. You had to know this normally, because he was also absent from your game. Here, we knew that he stopped without warning and that he returned from the very long months after, it was the normality. This makes a lot of people sad, I hope for you that you are sure of what you are doing! To announce a death is very serious, I hope that enough elements allow you to announce this without any doubt. This is an emblematic figure of MTS, weird that the staff is not aware of anything, they are friends for many years ... You are a generous donor, as I could see, it's for his memory? I never believe the ads on the net, everything is nebulous, I like things to be clear and safe, I work like that in real life too, when it is not verifiable especially. It is so bad to announce a death without justifying formal sources, sorry, but I remain in doubt since you can not say for sure...


Hi, Heidi. I can appreciate your skepticism, and don't blame you if you continue to doubt, but this is an unfortunate side effect of anonymous usernames online. I knew him in real life, and you're right, he would go quiet for long periods, which is why it was so long before I had even thought to investigate further. But I also know his real life name, and the city he was living in, and I read his obituary, and comments/tributes from his relatives. If I thought it would help to share it here, I would consider doing so. But you would still have no way of knowing that the man I knew by both his real name and as scumbumbo was in fact him. Though if you did know him in real life, his obituary is still available online. Otherwise it's not my place to link real-world personal data to online accounts. Again, the only reason I said anything is because I saw how much he meant to this community and I thought people might want some degree of closure. You are well within your rights to refuse.
Test Subject
#158 Old 10th Dec 2019 at 3:06 AM
Quote:
Originally Posted by Krud
Hi, Heidi. I can appreciate your skepticism, and don't blame you if you continue to doubt, but this is an unfortunate side effect of anonymous usernames online. I knew him in real life, and you're right, he would go quiet for long periods, which is why it was so long before I had even thought to investigate further. But I also know his real life name, and the city he was living in, and I read his obituary, and comments/tributes from his relatives. If I thought it would help to share it here, I would consider doing so. But you would still have no way of knowing that the man I knew by both his real name and as scumbumbo was in fact him. Though if you did know him in real life, his obituary is still available online. Otherwise it's not my place to link real-world personal data to online accounts. Again, the only reason I said anything is because I saw how much he meant to this community and I thought people might want some degree of closure. You are well within your rights to refuse.


Maybe that's none of our business, but could you tell what caused the death? Accident, disease? I got scared by the news.
Test Subject
THANKS POST
#159 Old 10th Dec 2019 at 3:47 AM
Thanks for making everything possible on Sims 4 Modding!
Test Subject
#160 Old 10th Dec 2019 at 3:17 PM
I’m sorry to hear of this news, it is horrible to think of losing anyone let alone someone who made such a big difference on the way people do things. If anyone is interested there is now an ode to him for your Sims games on MTS by Flerb (https://modthesims.info/download.ph...=1&goto=newpost) to remember him by.
You will be greatly missed
Lab Assistant
#161 Old 11th Dec 2019 at 5:15 AM
Quote:
Originally Posted by ReeceBar
Can someone please make a modlist of mods that needs this mod, just links in the mod list too

Here are some I know of:
http://modthesims.info/d/632577
http://modthesims.info/d/617383
https://modthesims.info/d/626058
https://modthesims.info/d/633419
https://www.patreon.com/posts/university-my-on-31807750
Instructor
#162 Old 11th Dec 2019 at 6:46 AM
Quote:
Originally Posted by Krud
Hi, Heidi. I can appreciate your skepticism, and don't blame you if you continue to doubt, but this is an unfortunate side effect of anonymous usernames online. I knew him in real life, and you're right, he would go quiet for long periods, which is why it was so long before I had even thought to investigate further. But I also know his real life name, and the city he was living in, and I read his obituary, and comments/tributes from his relatives. If I thought it would help to share it here, I would consider doing so. But you would still have no way of knowing that the man I knew by both his real name and as scumbumbo was in fact him. Though if you did know him in real life, his obituary is still available online. Otherwise it's not my place to link real-world personal data to online accounts. Again, the only reason I said anything is because I saw how much he meant to this community and I thought people might want some degree of closure. You are well within your rights to refuse.

Thank you for answering. In the first word, you did not speak so clearly about your relationship with him, now, doubt is no longer possible and it is sad. You lost a friend, we a great creator nice, great in his art and available. We are all hurt in our own way by this sad news.
The net is nebulous and I have learned over the years that we must be careful about everything that is said, there are too many unscrupulous people who navigate and do not hesitate for anything. I hope now that all his work will not be squandered and transferred to other sites for more visits, that big hearts keep his work up to date and on his page, it is his work, his time, his life and his passion. Take good care of yourself and thank you again.
Top Secret Researcher
THANKS POST
#163 Old 11th Dec 2019 at 9:21 AM
Loosing a member of our sims community is always a hard news, RIP Scumbumbo
Yes this is how virtual life is, we're never sure of anything. But as a part of several long years community this kind of news is inevitable. Other non uploaders members here probably passed away since long and there's actually absolutely no way to discover their loss. So thank you krud for telling us.
Forum Resident
THANKS POST
#164 Old 13th Dec 2019 at 4:03 AM
I think it is safe to say that he is immortalized with not only the contributions he has made in this virtual environment, but as well as all those people who he has inspired to improve upon something and share it with others. He was a mentor and a creative inspiration to many. His inspiration and teachings to those that were touched by this person will continue to have an effect in this very real world long after the sims 4 will have been shelved by many... because he was a spark that lit a fire in many eyes that viewed his work... and those fires continue to burn, and they in turn will spark and inspire those who are yet to come.
Test Subject
DELETED POST
29th Dec 2019 at 1:28 PM
This message has been deleted by MantaLeigha.
Test Subject
#165 Old 2nd Jan 2020 at 11:46 AM
Default recent update?
Quote:
Originally Posted by Triplis
Since Scumbumbo hasn't been around lately (that I'm aware of) and I have some familiarity with the tool, I looked into this being broken after the September 5th patch. Deaderpool ended up pointing me in the direction of what had changed in the official code causing the error I was seeing and I applied what appears to be the needed fix to the mod. What was broken seems to be working now.

So I'm posting a message to share the fixed version, one the injector itself and one the modder's documentation, including the uncompiled files with the one I changed.

If you are a modder, I recommend testing this with your mods that need it before notifying people about the change. That way if there's something still broken that I missed, you can catch it first.

- Triplis


is there a more recent update to this because it is no longer working in my game?
Top Secret Researcher
#166 Old 2nd Jan 2020 at 6:40 PM
Quote:
Originally Posted by nat2016
is there a more recent update to this because it is no longer working in my game?


That update by Triplis works still in my game. Dec patch, all packs, etc.
Test Subject
#167 Old 5th Jan 2020 at 12:43 PM
Quote:
Originally Posted by claudiasharon
That update by Triplis works still in my game. Dec patch, all packs, etc.


do you know if there is something that might conflict with it? I added the ts4script file and the package file to my mod folder, but it isn't showing up in game.
Top Secret Researcher
#168 Old 5th Jan 2020 at 8:51 PM
Quote:
Originally Posted by nat2016
do you know if there is something that might conflict with it? I added the ts4script file and the package file to my mod folder, but it isn't showing up in game.

Are they just in your mods folder? Labeled mods? It might not work if it is in too many folders deep. So I would try it directly in your mods folder. What mod are you using that using this mod? You might want to ask them too.
Test Subject
DELETED POST
28th Jan 2020 at 1:09 AM
This message has been deleted by Hellfrozeover. Reason: Nope.
Test Subject
DELETED POST
28th Jan 2020 at 4:45 PM
This message has been deleted by Hellfrozeover.
Test Subject
#169 Old 31st Jan 2020 at 1:07 AM
Hello all. Is there a discord for whoever has taken on this mod after scumbumbo's terrible passing? I've been getting a bed/sleep error.
Test Subject
#170 Old 1st Feb 2020 at 5:19 PM
There is no sleep option when I attempt to use this mod, currently. Is there a current update as to the state of the mod?
Test Subject
#171 Old 4th Feb 2020 at 5:04 AM
Hi there! I hope it is okay for me to post this, but ... this mod, and most of Scumbumbo's mods, are being updated and maintained by other talented modders, as a means of memorializing Scumbumbo. I think it's a lovely gesture, not only to Scumbumbo, himself, but also to those like me who use his content, or use mods that depend upon the XML Injector. ♥ You can find the site here: http://scumbumbomods.com/
Page 7 of 8