Injection Tools
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.