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

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)
187 Comments / replies (Who?) - 22 Feedback Posts, 2 Thanks Posts
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_v2.zip | XML Injector Version 2

Size: 13.0 KB · Downloads: 100,249 · 26th Mar 2019
13.0 KB 100,249 26th Mar 2019
XmlInjector_Modders_Documentation_v2.zip | Documentation for Modders

Size: 1.30 MB · Downloads: 26,248 · 26th Mar 2019
1.30 MB 26,248 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
 
187 Comments / Replies (Who?) - 122 Feedback Posts, 50 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 6 of 8
Test Subject
#126 Old 14th Nov 2019 at 2:29 PM
Has this been updated for the latest patch? Because I only see the September update.
Test Subject
#127 Old 14th Nov 2019 at 3:15 PM
Hi, according to Mod Conflict Detector, this mod is no longer working with the latest patch! Please let me know when it's fixed
Test Subject
#128 Old 17th Nov 2019 at 7:53 PM
With this installed, my game was crashing to the desktop when I created a new Sim and tried to start playing.
Lab Assistant
DELETED POST
17th Nov 2019 at 9:11 PM
This message has been deleted by Figlilly.
Top Secret Researcher
#129 Old 17th Nov 2019 at 9:45 PM
This mod is working for me on patch 1.58 and Discover Uni...not sure why others are having issues? This is using Tripilis' version a few pages back.
Lab Assistant
#130 Old 18th Nov 2019 at 2:07 PM
Quote:
Originally Posted by claudiasharon
This mod is working for me on patch 1.58 and Discover Uni...not sure why others are having issues? This is using Tripilis' version a few pages back.



It’s working for me too.
Test Subject
#131 Old 19th Nov 2019 at 3:42 PM Last edited by Tyllevas : 19th Nov 2019 at 6:48 PM.
Quote:
Originally Posted by claudiasharon
This mod is working for me on patch 1.58 and Discover Uni...not sure why others are having issues? This is using Tripilis' version a few pages back.


EDIT: My sincerest apologies, I have identified the culprit, and this mod is not it!

Old text: It's not working for me! At least, I think this is what's causing the problem - my game closes whenever I load a family to play. I removed all mods (not cc), and now it works. I have so many mods that I haven't bothered to put them in some at a time.. basically waiting for all teh updates (and to all the modders out there, I love you 3000! )
Lab Assistant
THANKS POST
#132 Old 21st Nov 2019 at 2:31 PM
The interactions are not getting injected on the computer anymore though (not even the test one is there)
Mad Poster
#133 Old 21st Nov 2019 at 8:26 PM
Quote:
Originally Posted by Zer0_
The interactions are not getting injected on the computer anymore though (not even the test one is there)

Are you using the version from the download page or the update by Triplis on page 4 of the comments?

Speaking of, @Triplis might it be a good idea for you to upload your update to its own thread where people can more easily find a currently functioning version? Scumbumbo has been absent for 6 months now.

My deviantART, MTS Yearbook Origin ID = Alistu
Lab Assistant
#134 Old 22nd Nov 2019 at 8:28 PM
Quote:
Originally Posted by Menaceman44
Are you using the version from the download page or the update by Triplis on page 4 of the comments?

Speaking of, @Triplis might it be a good idea for you to upload your update to its own thread where people can more easily find a currently functioning version? Scumbumbo has been absent for 6 months now.

yes, but I managed to make it work by making the interaction being added by filtering for ID and not for Affordance, all the rest works.
Test Subject
#135 Old 23rd Nov 2019 at 8:53 PM
Quote:
Originally Posted by Menaceman44
Are you using the version from the download page or the update by Triplis on page 4 of the comments?

Speaking of, @Triplis might it be a good idea for you to upload your update to its own thread where people can more easily find a currently functioning version? Scumbumbo has been absent for 6 months now.


This still wont work for me, I do need help because the XML needed is always showing up.
Lab Assistant
#136 Old 25th Nov 2019 at 12:59 AM
The Triplis version of this mod is working fine in my game.
Test Subject
#137 Old 25th Nov 2019 at 4:35 PM
After the upgrade, the version from Triplis disappeared to interact on the computer.
Lab Assistant
#138 Old 27th Nov 2019 at 2:17 AM
Quote:
Originally Posted by Tyllevas
EDIT: My sincerest apologies, I have identified the culprit, and this mod is not it!

Old text: It's not working for me! At least, I think this is what's causing the problem - my game closes whenever I load a family to play. I removed all mods (not cc), and now it works. I have so many mods that I haven't bothered to put them in some at a time.. basically waiting for all teh updates (and to all the modders out there, I love you 3000! )


It's slot mods that are causing the crash. Showers too. Sims4Studio has a batch fix for showers, and EA fixed the slot issue in today's patch.
Test Subject
#139 Old 30th Nov 2019 at 6:09 AM
To anyone who was wondering if scumbumbo is all right, I am the bearer of bad news. Sadly, he passed away about six months ago (so around the last time he was on here.) I was a gaming friend of his, but he'd moved away a few years back and I only just learned of his passing, and that he was prolific here. I don't think his extended family knew of his presence here, or if they would have cared. Anyway, he was a good guy who will be missed.

But on a more pragmatic note, I don't know what the protocol is for such things, but I imagine he would want others to continue his work in his absence.
Test Subject
#140 Old 30th Nov 2019 at 3:29 PM
Quote:
Originally Posted by Krud
To anyone who was wondering if scumbumbo is all right, I am the bearer of bad news. Sadly, he passed away about six months ago (so around the last time he was on here.) I was a gaming friend of his, but he'd moved away a few years back and I only just learned of his passing, and that he was prolific here. I don't think his extended family knew of his presence here, or if they would have cared. Anyway, he was a good guy who will be missed.

But on a more pragmatic note, I don't know what the protocol is for such things, but I imagine he would want others to continue his work in his absence.

Can we get any confirmation on this? It's not that I don't believe you, I'm just skeptical.
Test Subject
#141 Old 2nd Dec 2019 at 5:27 AM
Quote:
Originally Posted by Br3nn0_G4m3r
Can we get any confirmation on this? It's not that I don't believe you, I'm just skeptical.


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.)
Test Subject
#142 Old 2nd Dec 2019 at 10:25 AM
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.)


Hi. I appreciate you passing on this information, if it is true. It is hard to believe and I understand you don't want to invade anyone's privacy by sharing more than you should. Scumbumbo's a huge, huge part of this community and is the reason many modders are doing what they are doing today. If it is true, and you do have contact with the family, please pass on that it is almost impossible to express how much he meant to us, to me and every other simmer who ever used one of his mods or spoke to him. Thousands of us. If anyone wants to reach out from there, you know where to find us.

If it is true and he is gone, everyone here can safely agree that he was the King.
Lab Assistant
#143 Old 3rd Dec 2019 at 5:45 AM
Quote:
Originally Posted by Krud
To anyone who was wondering if scumbumbo is all right, I am the bearer of bad news. Sadly, he passed away about six months ago (so around the last time he was on here.) I was a gaming friend of his, but he'd moved away a few years back and I only just learned of his passing, and that he was prolific here. I don't think his extended family knew of his presence here, or if they would have cared. Anyway, he was a good guy who will be missed.

But on a more pragmatic note, I don't know what the protocol is for such things, but I imagine he would want others to continue his work in his absence.

Thanks for the information, Krud. I unfortunately suspected this news. He was so active in the modding community, and then he was just gone. I second the motion asking you to please let his loved-ones know he will be sorely missed, and from what we knew of him, he was a really great guy. Praying for peace for his family and for all who knew him. Thanks, again.
Test Subject
THANKS POST
#144 Old 3rd Dec 2019 at 10:25 PM
Thank You..
Lab Assistant
#145 Old 4th Dec 2019 at 1:53 AM
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.)


Thank you from letting us now Krud. He will be missed for sure. As many have said before, he was a well known modder and very respected. From time to time he tend to dissapeared but he always came back. This time it was just weird that he didn't.
Instructor
#146 Old 4th Dec 2019 at 12:03 PM
I cannot believe he is gone. I really hoped he just had a stressful life and one day would be back again. This is really really sad & i am going to miss him. He was a great person & modder.

~~~ FIND OVER 150+ MODS ON MY OWN SITE https://littlemssam.tumblr.com/ ~~~
Lab Assistant
#147 Old 4th Dec 2019 at 7:01 PM
I had just read it in another forum and could hardly believe it. I came here to see if it was thematized here and read the confirmation and that it was so long ago. Like LittleMsSam, I assumed that real life didn't leave him any time or desire for modding. I'm really sad right now. You will be missing, rest in peace Scumbumbo!
Test Subject
#148 Old 5th Dec 2019 at 12:24 PM
The modder's modder. A giant among men.

The world is a lesser place without him.

Rest in peace, Scumbumbo.
Mad Poster
#149 Old 6th Dec 2019 at 4:07 AM
Scumbumbo mods found their way into my game early, before MCCC was created. He was literally one of the first Sims 4 creators I ever talked to. Wonderful guy.
I miss him deeply. I'm glad we found out more about what happened.

Rest in Peace, Scumbumbo.
Page 6 of 8