Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 29th Dec 2022 at 4:57 PM
Functional Perfume - Add Interaction, Live Drag, Buff etc
Hi all,

I've just started making my first mod which is all about gifting. One of the things I've decided to start on is kids perfume, and I created my own mesh of a hello kitty perfume. I'm wanting to add an interaction to this so that the sim picks up the object and sprays it and recieves a buff. Essentially I'd love it to work exactly like the mod by Ilex (https://modthesims.info/d/662045/de...nd-cologne.html)

However, I've followed various tutorials and although it all is starting to make sense to me, it's still not working in game. I can't figure out where I'm going wrong.

The perfume bottle I've made has been merged with the mesh for a decoration rose, I wondered if this was the issue as decorative objects don't naturally have any interactions linked to them?

Code for the Interaction Tuning - I took the interaction from the herbalism 'spray' for fireleaf - I also tried animation tuning and adding the "Freshen Up" animation from High School Years lockers but again, when I load the game the object doesn't have any interactions and is unselectable.

Code:
<?xml version="1.0" encoding="utf-8"?>

<I c="SuperInteraction" i="interaction" m="interactions.base.super_interaction" n="SimSwisher:herbalism_Potion_Spray" s="14587752402719582620">

  <L n="_constraints">

    <U>

      <L n="constraints">

        <U>

          <V n="value" t="circle">

            <U n="circle">

              <T n="ideal_radius">1.25</T>

              <T n="ideal_radius_width">0.25</T>

              <T n="radius">2</T>

            </U>

          </V>

        </U>

      </L>

    </U>

    <U>

      <L n="constraints">

        <U>

          <V n="value" t="facing" />

        </U>

      </L>

    </U>

  </L>

  <V n="_icon" t="participant">

    <U n="participant">

      <L n="participant_type">

        <E>Object</E>

      </L>

    </U>

  </V>

  <V n="_saveable" t="enabled" />

  <L n="_static_commodities">

    <U>

      <T n="static_commodity">101859<!--StaticCommodity_Herbalism--></T>

    </U>

  </L>

  <T n="allow_autonomous">True</T>

  <T n="allow_from_sim_inventory">True</T>

  <T n="attention_cost">0.5</T>

  <V n="basic_content" t="one_shot">

    <U n="one_shot">

      <U n="animation_ref">

        <T n="factory">104383<!--Herbalism_Fireleaf_Spray--></T>

      </U>

    </U>

  </V>

  <V n="basic_reserve_object" t="enabled">

    <U n="enabled">

      <L n="subject_list">

        <U>

          <V n="reserve_type" t="all" />

        </U>

      </L>

    </U>

  </V>

  <V n="content_score" t="disabled" />

  <T n="display_name">0x90DCBDE6<!--Spray Perfume--></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>

    <E>Interaction_Skill_Mischief</E>

  </L>

  <V n="outcome" t="single">

    <U n="single">

      <U n="actions">

        <L n="basic_extras">

          <V t="destroy_object">

            <U n="destroy_object">

              <V n="objects_to_destroy" t="from_participant">

                <U n="from_participant">

                  <E n="participant">PickedObject</E>

                </U>

              </V>

            </U>

          </V>

        </L>

        <T n="consume_object">True</T>

        <L n="loot_list">

          <T>104479<!--loot_Commodity_ObjectStateValue_ElixirOfBurning_Max--></T>

          <T>11080<!--Skill_Loot_Dynamic_Small--></T>

        </L>

      </U>

    </U>

  </V>

  <E n="scoring_priority">NORMAL</E>

  <U n="skill_loot_data">

    <V n="level_range" t="enabled">

      <U n="enabled">

        <T n="lower_bound">1</T>

        <T n="upper_bound">6</T>

      </U>

    </V>

    <T n="stat">16707<!--statistic_Skill_AdultMajor_Mischief--></T>

  </U>

  <T n="subaction_selection_weight">1</T>

  <V n="super_affordance_compatibility" t="literal">

    <U n="literal">

      <V n="default_inclusion" t="include_all">

        <U n="include_all">

          <L n="exclude_affordances">

            <T>14428<!--toilet-use-standing--></T>

          </L>

        </U>

      </V>

    </U>

  </V>

  <E n="target_type">OBJECT</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">Actor</E>

      </U>

    </V>

  </L>

  <T n="time_overhead">30</T>

</I>


And here's the Object Tuning:

Code:
<?xml version="1.0" encoding="utf-8"?>

<I c="GameObject" i="object" m="objects.game_object" n="SimSwisher:object_plant_non_gardening_generic" s="15002695756854057900">

  <U n="_components">

    <V n="focus" t="enabled">

      <U n="enabled">

        <V n="_focus_score" t="globally">

          <U n="globally">

            <E n="base">LOW</E>

          </U>

        </V>

      </U>

    </V>

    <V n="retail_component" t="enabled">

      <V n="enabled" t="reference">

        <T n="reference">110393<!--retailComponent_Default--></T>

      </V>

    </V>

    <V n="state" t="enabled">

      <U n="enabled">

        <L n="states">

          <U>

            <L n="client_states">

              <U>

                <T n="key">39478<!--FireState_Burn_Incinerate_Burning--></T>

              </U>

              <U>

                <T n="key">39479<!--FireState_Burn_Incinerate--></T>

              </U>

              <U>

                <T n="key">39612<!--FireState_Burn_Incinerate_Not_Burning--></T>

              </U>

            </L>

            <V n="default_value" t="reference">

              <T n="reference">39612<!--FireState_Burn_Incinerate_Not_Burning--></T>

            </V>

          </U>

          <U>

            <L n="client_states">

              <U>

                <T n="key">131794<!--Kelpto_Stolen_Object--></T>

              </U>

              <U>

                <T n="key">131795<!--Klepto_Not_Stolen_Object--></T>

              </U>

            </L>

            <V n="default_value" t="reference">

              <T n="reference">131795<!--Klepto_Not_Stolen_Object--></T>

            </V>

          </U>

        </L>

      </U>

    </V>

    <V n="tooltip_component" t="enabled" />

  </U>

  <L n="_super_affordances">

    <T>13328<!--debug_Reset--></T>

    <T>14587752402719582620<!--Spray Perfume--></T>

    <T>13326<!--debug_ObjectDestroy--></T>

    <T>103888<!--cheat_set_as_head--></T>

    <T>106859<!--simRay_Transform_Object--></T>

  </L>

  <U n="recycling_data">

    <L n="recycling_values">

      <U>

        <E n="Bucks Type">RecycleBitsBucks</E>

        <T n="Value">0.5</T>

      </U>

      <U>

        <E n="Bucks Type">RecyclePiecesBucks</E>

        <T n="Value">0.5</T>

      </U>

    </L>

  </U>

</I>


Any help with steps or where I'm going wrong would be great!

Thanks,
SS
Back to top