Mod The Sims
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Posted 24th Jan 2019 at 9:22 AM - Updated 26th Mar 2019 at 11:43 PM by scumbumbo : Version 2 Released (New Features) - Viewed 10031 times. Direct link to this thread
40 Comments / replies (Who?) , 65 times favourited , 196 times thanked
Version 2 Released
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.
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.
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.
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:
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:
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!
For more information about this creator and their policies or details, click here.
Expansion / Stuff Packs Required
Built with Game Version: 1.50.67
You must have the expansion, game version or stuff packs listed above installed to use this custom content. Please see the post text for any exceptions.
You need to be a Registered Member to be able to download from MTS. Registration allows you to thank and leave comments for the creators, see your download history, participate in the discussions and much more!
Basic Download and Install Instructions:
1. Download: Click the download link to save the .rar or .zip file(s) to your computer.
2. Extract: Use WinRAR (Windows) or Stuffit (Mac) to extract the .package file(s) from the .rar or .zip file(s).
3. Place in Downloads Folder: Cut and paste the .package file(s) into your Downloads folder:
4. Place in Program Files: Cut and paste the .package file(s) into your appropriate Install folder:
Need more information?