Post by simguy80 on Aug 15, 2020 19:53:13 GMT -5
Edit: I just wanted to gives a heads up I am on the right track to accomplishing what I was seeking.
I just needed to clone Scientist_MindControl_ChangeOutfit_Formal so it appears in the Outfit menu and remove things like needing the ray gun and its upgrades. I also changed the affordance to point to switch_outfit_Career.
Using the XML injector, I was able to successfully create a menu item for the active Sim to change into another outfit on the fly from a menu item.
I modified switch_outfit_Formal to have <T n="category">142150<!--pieMenuCategory_Outfits--></T>.
I also modified changeOutfitPicker_TargetSim_Cheat to include this line, which makes it so NPCs (or non family Sims) outfits can be changed from a pie menu.
I cloned switch_outfit_Formal and renamed it switch_outfit_Career.
I changed <E n="enabled">Category_Formal</E> to <E n="enabled">GoToWork</E>.
Everything works great for the active Sim, but I'm unable to modify the Interaction Tuning so it works with an inactive Sim.
While the pie menu shows up on an inactive Sim, when I select my new "Change Into Career Outfit" option, the active Sim is the one who changes into their career outfit.
I've been trying to cross reference other tunings, and tried multiple combinations of the entries that show ACTOR, TargetSim, OBJECT, but it always effects the active Sim. SimGuy80:switch_outfit_Formal is mostly untouched while SimGuy80:switch_outfit_Career reflects the older ShimrodChangeOutfitInactives_V2 instances which uses "TargetSim" and "OBJECT" in certain entries.
Take note the selected Sims needs to have a job (obviously).
I also have a menu item to change into Formal for testing purposes.
One Interesting aspect I found was that in changeOutfitPicker_TargetSim_Cheat, modifying the line
No matter what's selected in the popup results in the selected Sim changing into their career outfit.
Hopefully someone can help me out. Thanks.
Objects I used for reference that helped me pinpoint which tunings to use:
modthesims.info/d/632577/change-into-career-outfit-whenever.html
modthesims.info/d/541743/change-outfit-on-inactive-sims-1-21.html
I just needed to clone Scientist_MindControl_ChangeOutfit_Formal so it appears in the Outfit menu and remove things like needing the ray gun and its upgrades. I also changed the affordance to point to switch_outfit_Career.
I need to strip it down some more and add menu text and such, but I think I finally got it!
Edit 2: Turns out I didn't need to use Scientist_MindControl_ChangeOutfit_Formal at all!
Doing some further searching of the tuning files I was able to find out how to assign the different codes to "TargetSim".
Of course the three instances where they are used are all completely different!
There are still a few kinks that need to be worked out, like when it takes effect. Right now it goes into the queue list and takes effect when neither Sim is doing anything. It can be tricky when the Sim is walking along or doing something since there's the potential the "Change Outfit" selection will stay in your Sim's queue for a long time and cancelling can also take a long time.
Edit 3: Turns out these changes only effected the NPC Sim. I could have sworn it worked for both.
I guess this means I have to create two separate tunings. One for active Sim and the other one for non-active.
Edit 4: I'm now having issues where the Sim doesn't stand up from a chair to change clothes. They spin high into the sky and back when they change while staying seated. I tried just cloning changeOutfit_Nude_BG, giving it a new TuningID, and changing the menu text and it has the same issue. Modifying changeOutfit_Nude_BG for retaining the same TuningID and modifying for NPC menu works fine on the active Sim, but the NPC doesn't get up.
Edit 5: www.dropbox.com/s/b30wpzbmkrmhvid/SimGuy80_ChangeOutfitsV3.package?dl=0
I was able to fix the standing action for the Tuning with a new ID of the active Sim by adding constraints to it.
Edit 2: Turns out I didn't need to use Scientist_MindControl_ChangeOutfit_Formal at all!
Doing some further searching of the tuning files I was able to find out how to assign the different codes to "TargetSim".
Of course the three instances where they are used are all completely different!
There are still a few kinks that need to be worked out, like when it takes effect. Right now it goes into the queue list and takes effect when neither Sim is doing anything. It can be tricky when the Sim is walking along or doing something since there's the potential the "Change Outfit" selection will stay in your Sim's queue for a long time and cancelling can also take a long time.
Edit 3: Turns out these changes only effected the NPC Sim. I could have sworn it worked for both.
I guess this means I have to create two separate tunings. One for active Sim and the other one for non-active.
Edit 4: I'm now having issues where the Sim doesn't stand up from a chair to change clothes. They spin high into the sky and back when they change while staying seated. I tried just cloning changeOutfit_Nude_BG, giving it a new TuningID, and changing the menu text and it has the same issue. Modifying changeOutfit_Nude_BG for retaining the same TuningID and modifying for NPC menu works fine on the active Sim, but the NPC doesn't get up.
Edit 5: www.dropbox.com/s/b30wpzbmkrmhvid/SimGuy80_ChangeOutfitsV3.package?dl=0
I was able to fix the standing action for the Tuning with a new ID of the active Sim by adding constraints to it.
<L n="_constraints">
<U>
<L n="constraints">
<U>
<V n="value" t="posture">
<U n="posture">
<L n="posture_manifest_tuning">
<U>
<V n="posture_type" t="enabled">
<T n="enabled">15537<!--MobilePosture: posture_Stand--></T>
</V>
</U>
</L>
</U>
</V>
</U>
</L>
</U>
</L
For an inactive Sims, I found various tunings that modified this code to have "TargetSim" in two different places (constrained_participant or _constraints_actor). They can be in either place, or both. And these settings can read either TargetSim, PickedSim, Actor, Object, ObjectParent, etc. I feel like I've tried every combo but still have yet to crack it.
Edit 6: I was able to finally figure out how to make it work with inactive Sims by creating a new SuperInteraction that points to the original active Sim SuperInteraction.
For it to work 100% "TargetSim" is used a lot!
<L n="_constraints">
<U>
<E n="constrained_participant">TargetSim</E>
<L n="constraints">
<U>
<V n="value" t="posture">
<U n="posture">
<L n="posture_manifest_tuning">
<U>
<V n="posture_type" t="enabled">
<T n="enabled">15537<!--MobilePosture: posture_Stand--></T>
</V>
</U>
</L>
</U>
</V>
</U>
</L>
</U>
</L>
<E n="_constraints_actor">TargetSim</E>
Edit 6: I was able to finally figure out how to make it work with inactive Sims by creating a new SuperInteraction that points to the original active Sim SuperInteraction.
For it to work 100% "TargetSim" is used a lot!
<?xml version="1.0" encoding="utf-8"?>
<I c="SuperInteraction" i="interaction" m="interactions.base.super_interaction" n="SimGuy80:switch_outfit_Career_inActive" s="11912755931331030448">
<V n="_icon" t="participant">
<U n="participant">
<L n="participant_type">
<E>TargetSim</E>
</L>
</U>
</V>
<V n="_saveable" t="enabled" />
<T n="attention_cost">0.5</T>
<V n="basic_content" t="one_shot" />
<L n="basic_extras" />
<T n="category">142150<!--pieMenuCategory_Outfits--></T>
<V n="content_score" t="disabled" />
<T n="display_name">0xEBBCFA0E<!--Change Into Career Outfit--></T>
<U n="display_name_text_tokens">
<L n="tokens">
<V t="participant_type">
<U n="participant_type">
<V n="objects" t="from_participant">
<U n="from_participant">
<E n="participant">Actor</E>
</U>
</V>
</U>
</V>
<V t="participant_type">
<U n="participant_type">
<V n="objects" t="from_participant">
<U n="from_participant">
<E n="participant">Object</E>
</U>
</V>
</U>
</V>
</L>
</U>
<L n="interaction_category_tags">
<E>Interaction_Super</E>
<E>Interaction_All</E>
</L>
<V n="outcome" t="test_based">
<U n="test_based">
<L n="fallback_outcomes">
<U>
<U n="outcome">
<L n="continuation">
<U>
<E n="actor">TargetSim</E>
<T n="affordance">12630597746996607901<!--SimGuy80:switch_outfit_Career_Active--></T>
<E n="target">TargetSim</E>
</U>
</L>
</U>
</U>
</L>
</U>
</V>
<E n="scoring_priority">NORMAL</E>
<T n="subaction_selection_weight">1</T>
<E n="target_type">TARGET</E>
<L n="test_globals">
<V t="sim_info">
<U n="sim_info">
<V n="ages" t="specified">
<L n="specified">
<E>TEEN</E>
<E>YOUNGADULT</E>
<E>ADULT</E>
<E>ELDER</E>
<E>CHILD</E>
</L>
</V>
<V n="species" t="specified">
<U n="specified">
<L n="species">
<E />
</L>
</U>
</V>
<E n="who">TargetSim</E>
</U>
</V>
<V t="sim_info">
<U n="sim_info">
<V n="ages" t="specified">
<L n="specified">
<E>TEEN</E>
<E>YOUNGADULT</E>
<E>ADULT</E>
<E>ELDER</E>
</L>
</V>
<E n="who">Actor</E>
</U>
</V>
<V t="trait">
<U n="trait">
<T n="num_blacklist_allowed">0</T>
<E n="subject">TargetSim</E>
</U>
</V>
<V t="identity">
<U n="identity">
<E n="subject_b">TargetSim</E>
</U>
</V>
<V t="career_test">
<U n="career_test">
<V n="test_type" t="has_career_outfit" />
<E n="subjects">TargetSim</E>
</U>
</V>
<V t="outfit">
<U n="outfit">
<L n="blacklist_outfits">
<E>CAREER</E>
</L>
<E n="participant">TargetSim</E>
</U>
</V>
</L>
<T n="time_overhead">30</T>
</I>
Edit 2 code change for reference:
Original post:
XML Injector required for mod: scumbumbomods.com/xml-injector
{Expand Code}
basic_extras --> change_outfit
ACTOR
These are the checks I added so the menu options won't show up when a person doesn't have a career outfit or is wearing the outfit already.
The "TargetSim" lines are added so it is able to work when you select an NPC.
basic_extras --> change_outfit
<L n="basic_extras">
<V t="change_outfit">
<U n="change_outfit">
<V n="outfit_change" t="for_reason">
<U n="for_reason">
<V n="on_entry" t="enabled">
<E n="enabled">Category_Formal</E>
</V>
</U>
</V>
</U>
</V>
</L>
becomes this <L n="basic_extras">
<V t="change_outfit">
<U n="change_outfit">
<V n="outfit_change" t="for_reason">
<U n="for_reason">
<V n="on_entry" t="enabled">
<E n="enabled">GoToWork</E>
</V>
</U>
</V>
<L n="subject">
<E>TargetSim</E>
</L>
</U>
</V>
</L>
ACTOR
<E n="scoring_priority">NORMAL</E>
<T n="subaction_selection_weight">1</T>
<E n="target_type">ACTOR</E>
<L n="test_globals">
becomes OBJECT. <E n="scoring_priority">NORMAL</E>
<T n="subaction_selection_weight">1</T>
<E n="target_type">OBJECT</E>
<L n="test_globals">
These are the checks I added so the menu options won't show up when a person doesn't have a career outfit or is wearing the outfit already.
The "TargetSim" lines are added so it is able to work when you select an NPC.
<V t="career_test">
<U n="career_test">
<E n="subjects">TargetSim</E>
<V n="test_type" t="has_career_outfit" />
</U>
</V>
<V t="outfit">
<U n="outfit">
<L n="blacklist_outfits">
<E>CAREER</E>
</L>
<E n="participant">TargetSim</E>
</U>
</V>
Original post:
XML Injector required for mod: scumbumbomods.com/xml-injector
I modified switch_outfit_Formal to have <T n="category">142150<!--pieMenuCategory_Outfits--></T>.
I also modified changeOutfitPicker_TargetSim_Cheat to include this line, which makes it so NPCs (or non family Sims) outfits can be changed from a pie menu.
I cloned switch_outfit_Formal and renamed it switch_outfit_Career.
I changed <E n="enabled">Category_Formal</E> to <E n="enabled">GoToWork</E>.
Everything works great for the active Sim, but I'm unable to modify the Interaction Tuning so it works with an inactive Sim.
While the pie menu shows up on an inactive Sim, when I select my new "Change Into Career Outfit" option, the active Sim is the one who changes into their career outfit.
I've been trying to cross reference other tunings, and tried multiple combinations of the entries that show ACTOR, TargetSim, OBJECT, but it always effects the active Sim. SimGuy80:switch_outfit_Formal is mostly untouched while SimGuy80:switch_outfit_Career reflects the older ShimrodChangeOutfitInactives_V2 instances which uses "TargetSim" and "OBJECT" in certain entries.
Take note the selected Sims needs to have a job (obviously).
I also have a menu item to change into Formal for testing purposes.
One Interesting aspect I found was that in changeOutfitPicker_TargetSim_Cheat, modifying the line
<T n="affordance">142142<!--changeOutfit_FromPicker--></T>
to<T n="affordance">11842254318791948896<!--SimGuy80:switch_outfit_Career--></T>
actually does what I want it to when you select "Change Outfit..." on an inactive Sim BUT, the outfit picker popup comes up first.No matter what's selected in the popup results in the selected Sim changing into their career outfit.
Hopefully someone can help me out. Thanks.
Objects I used for reference that helped me pinpoint which tunings to use:
modthesims.info/d/632577/change-into-career-outfit-whenever.html
modthesims.info/d/541743/change-outfit-on-inactive-sims-1-21.html