Forum Announcement, Click Here to Read More From EA_Cade.

Washing Hands After Peeing

AlistuAlistu Posts: 742 Member
edited March 5 in Nominated Threads
So back in 2016 I made a functional urinal that could only be used by Sims that pee standing up. http://bootstrap.modthesims.info/d/581702/male-urinal.html

A problem that I have never been able to solve though is that Sims will not autonomously wash their hands afterwards like they do with a regular toilet. What am I missing that tells Sims to do this? The only stuff I removed from the original toilet tuning were the parts of the code that referred to being able to pee sitting down or to privacy. I also changed the tuning for breaking and getting dirty so that those stats never decrease.

I've still got the handhygene code in there and I even set it to -100 at one point to see if that had any effect but it didn't.

Any help would be greatly appreciated.
a.k.a. Menaceman44 on MTS.
Thoughts on a new wall mode?
Post edited by EA_Cade on

Comments

  • TURBODRIVERTURBODRIVER Posts: 68 Member
    edited November 2018
    I don't think you're wrong, running the Hygiene_UseToilet loot should do it. It's all based on their autonomy picking the interaction over anything else.
    <L n="loot_list">
      <T>10396<!--LootActions: loot_Commodity_Motive_Hygiene_UseToilet--></T>
    </L>
    
  • TriplisTriplis Posts: 3,048 Member
    There's something called post_run_autonomy_commodities. IIRC, the general gist is that when you put it in an interaction, it's designed so that it will push autonomy tied to the desired category of interaction when the current interaction finishes.

    Here's an example from toilet-flush:
      <U n="post_run_autonomy_commodities">
        <L n="requests">
          <U>
            <T n="retain_priority">True</T>
            <L n="static_commodities">
              <T>16442<!--StaticCommodity: StaticCommodity_WashHands--></T>
            </L>
          </U>
        </L>
      </U>
    

    There's also parameterized_autonomy. I'm not quite sure what the difference is from memory (I'm sure you could suss out the details in the TDESCs). But it looks like toilet stuff uses post_run_autonomy_commodities. It might be that post_run_autonomy_commodities has stricter prioritization for pushing the connected interaction?

    There's also continuation as loot at the end of an interaction, but that probably wouldn't work here, since you want to push a sim to go do whatever wash hands interaction is available nearby, not a specific wash hands interaction on a specific sink. In this case, sink_washHands has StaticCommodity_WashHands as a static commodity and it (presumably) is pushed as a very high priority through the post_run_autonomy_commodities section in flushing.

    So it looks like why you're not seeing it is (I would guess) the toilet-flush part is separate and is called somehow at the end of peeing, normally. If you make sure that part is called, I think you'll get the behavior you're looking for. Or you might need a custom toilet-flush if the animations are not compatible with your custom object.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • AlistuAlistu Posts: 742 Member
    edited November 2018
    I've just been looking at this again now. Looking at my tuning I did remove the flush coding because it meant that Sims would reach through the wall which I obviously did not want.
    I attempted to add the code you have quoted here, @Triplis , to the Pee tuning instead, attempting to skip the middle stage of flushing first but it had no affect. Sims still pee, finish, and then just stand there. I may not have ccpied it exactly though or into the correct area so I'll take another look and see if anything I do makes any difference.


    Thank you for the feedback the both of you. It is much appreciated.

    ETA: It works! I had stupidly overlooked a single line. Instead of <T n="retain_priority">True</T> I had something which forced the Sims to use the same object for the follow-up action. Seeing as washing hands on a toilet isn't possible, that's why it was failing.

    ETA2: I've now successfully got the game to check if they are slobs or have bad manners and if so, they will not wash their hands. I was worried it would disable being abel to use the urinal all together for those Sims but thankfully that was not the case.
    Post edited by Alistu on
    a.k.a. Menaceman44 on MTS.
    Thoughts on a new wall mode?
  • TriplisTriplis Posts: 3,048 Member
    Glad to hear you've got it working how you want! :) I hear you on overlooking single lines. I can't begin to count the amount of times I've done something like that lol.
    Mods moved from MTS, now hosted at: https://triplis.github.io

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top