Injection Tools
A downloadable mod
A set of tools to inject into different tuning resources. Right now, Injection Tools allows you to inject:
- Shifts of situations into a SchedulingZoneDirector or SchedulingWalkbyDirector
- Situations into a WalkbyTuning
- Filter terms into a SimFilter
These together allow you to add new situations to the world, or add additional constraints to who can be chosen for existing situations, without causing compatibility issues.
Adding Situations To Worlds
To add a situation to most worlds, you'll need to create a snippet tuning of class "SituationShiftInjector". An example tuning is below:
<?xml version="1.0" encoding="utf-8"?> <I c="SituationShiftInjector" i="snippet" m="injection_tools.situation_shift_injector" n="BrainBlasted:DogWalkerWalkbyInjector" s="10017731830411536442"> <V n="references" t="walkby_directors"> <L n="walkby_directors"> <T>232250<!--walkbyDirector_Residential_EcoWorld_Industrial--></T> </L> </V> <L n="situation_shifts"> <U> <T n="count_based_on_expected_sims">True</T> <V n="shift_curve" t="curve_based"> <U n="curve_based"> <L n="entries"> <U> <U n="days_of_the_week"> <T n="0 SUNDAY">True</T> </U> <L n="walkby_desire_by_time_of_day"> <U> <T n="hour_of_day">7</T> <U n="desired_walkby_situations"> <V t="literal" n="desired_sim_count"> <U n="literal"> <T n="value">2</T> </U> </V> <L n="weighted_situations"> <U> <T n="situation">168135<!--WalkbyDogWalker: walkbyDogWalker_walk_TYAE--></T> </U> </L> </U> </U> </L> </U> </L> </U> </V> <E n="shift_strictness">OVERLAP</E> </U> </L> </I>
This tuning injects into the industrial neighborhood from Eco Lifestyle, adding a dog walker situation with 2 sims, starting at hour 7. For City Living neighborhoods, we need to use a snippet of type "WalkbyTuningInjector":
<?xml version="1.0" encoding="utf-8"?> <I c="WalkbyTuningInjector" i="snippet" m="injection_tools.situation_shift_injector" n="BrainBlasted:CityLifeDogWalkerWalkbyInjector" s="10594960976327620679"> <L n="walkby_tunings"> <!-- These are all the city living neighborhood walkby tunings --> <T>134174<!--walkbyTuning_CityLife_OpenStreet_artsQuarter--></T> <T>134172<!--walkbyTuning_CityLife_OpenStreet_FashionDistrict--></T> <T>134171<!--walkbyTuning_CityLife_OpenStreet_SpiceMarket--></T> <T>134173<!--walkbyTuning_CityLife_OpenStreet_Uptown--></T> </L> <U n="walkby_desire_by_day_of_week"> <L n="entries"> <U> <U n="days_of_the_week"> <T n="0 SUNDAY">True</T> </U> <L n="walkby_desire_by_time_of_day"> <U> <T n="hour_of_day">7</T> <U n="desired_walkby_situations"> <V t="literal" n="desired_sim_count"> <U n="literal"> <T n="value">2</T> </U> </V> <L n="weighted_situations"> <U> <T n="situation">168135<!--WalkbyDogWalker: walkbyDogWalker_walk_TYAE--></T> </U> </L> </U> </U> </L> </U> </L> </U> </I>
Injecting Filter Terms To A TunableSimFilter
To add filter terms, use a snippet of class "SimFilterInjector":
<?xml version="1.0" encoding="utf-8"?> <I c="SimFilterInjector" i="snippet" m="injection_tools.sim_filter_injector" n="BrainBlasted:DogWalkerFilterInjection" s="14163905142204243963"> <L n="filters"> <T>133610<!-- filter_PetOwner_Dog_TYAE --></T> </L> <L n="filter_terms_to_add"> <V t="lives_in_region"> <U n="lives_in_region"> <V n="region" t="current_region"/> </U> </V> </L> </I>
This adds a check to the dog walker filter to make sure dog walkers live in the current world.
Note To Mod Authors
If you decide to use the source code to integrate these injectors to your own scripts, please rename the classes. This way they don't conflict with mods using the ts4script on this page.
Download
Install instructions
Place brainblasted_InjectionTools.ts4script directly in your mods folder. In your Sims 4 settings, check that you have script mods enabled.
Comments
Log in with itch.io to leave a comment.
hello! will you have a chance to update this? the 10/22 game update unfortunately completely broke it.
+1. If you (Brain) are too busy with the mod, I would consider giving permission to other modders to fix it in the meantime. Given the mod is relied upon by other mods, it is a critical mod to update fast.
Hello. I can try to fix this injector. Which mods depend on it? I would like to know so I can test it.
Hi there, I believe Zero's Utility Mod - Walkby Filters Shared Tuning (NPCs) uses this injector.
https://www.patreon.com/posts/utility-walkby-45405335
down in simsland's new lot traits for residential rentals also uses it
That is a popular mod, I had no idea it also uses brain blasted's tool.
I can’t find it. A link would be helpful…
In case you're still looking for a mod that depends on this, here's a link to Waffle's Agnes Anywhere:
https://www.patreon.com/posts/agnes-anywhere-109737877
Here's the link: https://down-in-simsland.tumblr.com/post/738900138719936512/looking-for-testers-...
Lemme know if it doesn't work
https://sims-reblogs.tumblr.com/post/758826390559866880?is_related_post=1
waffle's agne's anywhere uses it too
Zer0's Expanded Realm of Magic uses it as well
This one also depend on this injector
https://www.patreon.com/posts/choose-high-mod-109533171
Hi! I wonder if you finally got it fixed? :/
Yes, on my Patreon: https://www.patreon.com/andirz
will this get updated soon? since the current pre Life and Death update broke this injector
Hi Brainblasted!
I think this last update finally broke this injector, or at least part of it.
This piece of code
<I c="SituationShiftInjector" i="snippet" m="injection_tools.situation_shift_injector" n="_Marquillo:ShiftInjector_Restaurant" s="16010680461997879822">
<V n="references" t="zone_directors">
<L n="zone_directors">
<T>131555<!--zoneDirector_Restaurant--></T>
</L>
</V>
<L n="situation_shifts">
<U>
<V n="shift_curve" t="shiftless">
<U n="shiftless">
<U n="_desired_siutations">
<V n="desired_sim_count" t="literal">
<U n="literal">
<T n="value">1</T>
</U>
</V>
<L n="weighted_situations">
<U>
<T n="situation">18152208837344111826<!--Marquillo:Situation_Busboy--></T>
</U>
</L>
</U>
</U>
</V>
</U>
</L>
</I>
No longer works for injecting my custom situation into restaurants. :)
Hey, I used your source code to make an injector for adding `object_based_situations_schedule` to the SchedulingZoneDirector. It's literally almost exactly the same as the SituationShiftInjector, just with a few variable name changes and adjustments to INSTANCE_TUNABLES. Are you OK with me distributing that edited file with mods that use it on my tumblr? I did re-name the classes and files and everything. And I'll link back to this post/give you credit, of course. Let me know, thanks!
Hey man, has this been updated because the "SituationShiftInjector" isn't working for me :-(.
Can I email you? Are you on skype?
Hey there! Can you give me some details? I haven’t been around for a bit to update mods.
Well i made this situation snippet like the instructions said...
I renamed the class so that it wouldn't cause conflict.
I wanted to add to the situation shifts in the zone directors listed so that it would spawn several "situationSimple_TempleSkeleton".
I've attached the script and package as I've added it to my mods folder, but I see no Temple skeletons :-( when i play. Could you let me know where I'm going wrong, or if the script is out of date.
https://filebin.net/rgpx1tpu9f92dmmm
Hey Dude , what happened??
Life - folks do get busy, after all
Hey man, do you do work on commission?
Yeah, people get busy... but uhh, usually rather than a snarky response when asked what happened, they actually respond politely with a real response, and then they move on to actually helping like they said they would. But no big man, you don't need to be a decent human being, you can just be you, a non respectable person-thing.
Being busy can mean that I don’t have the time to type a detailed response or investigate an issue. I have a lot of other things to take care of, with TS4 mods being a very minor priority.
It's been 3 years and this is still incredibly disrespectful. Why are y'all the worst consistently? Thank you for the mod Brain
bro wasn't even being disrespectful what are you on