Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Speed-Building Challenge - posted on 17th Oct 2018 at 7:25 PM
Replies: 5 (Who?), Viewed: 2021 times.
Lab Assistant
Original Poster
#1 Old 12th May 2018 at 2:51 PM
Default Outfit change based on traits
Hi everyone! I'm trying to change the outfit worn by Sims when performing fitness activities (steamroom, massage and yoga) based on a particular trait

E. G. When a Sim with the trait, for example, Romantic, is given a massage on the massage table, rather than switching to the towel, he will switch to nude, but he will switch to towel if he's not romantic

This is the string of the code (placed in the xml posture_MassageTable):



The code part which makes the Sim switch to the towel is missing, as is the remaining part of the code

Consider, however, that with this code the mod doesn't work:

- if I place the string <E n="enabled">EnterBathing</E> BEFORE <L n="tests">, anyone, regardless of the trait, will switch to nude

- if I place the string <E n="enabled">EnterBathing</E> AFTER the </L> of <L n="tests">, no one, regardless of the trait, will switch outfit and will keep their current one

What am I mistaking?
Advertisement
Theorist
#2 Old 14th May 2018 at 2:06 AM
The TDesc file for postures doesn't indicate that tests are available for the outfit_change tuning. So if you put the enabled EnterBathing prior to tests it works always (no test is run) but if you put it after the tests it is ignored since the tests tag triggers an XML error and the rest of that tuning is ignored.
Lab Assistant
Original Poster
#3 Old 14th May 2018 at 11:56 AM
Thank you for the answer! I thought it was something like that, but I wasn't sure, as I never fully understood TDesc files and the various types of XML tags (V, U, T, etc...)

So, is there not a workaround to accomplish this? Maybe by working on interactions and creating separate interactions for Sims with the trait, and ordinary Sims?
Theorist
#4 Old 15th May 2018 at 6:57 AM
Quote:
Originally Posted by DrHouse93
Thank you for the answer! I thought it was something like that, but I wasn't sure, as I never fully understood TDesc files and the various types of XML tags (V, U, T, etc...)

First, I'd recommend going to the Tech Discussions section of The Sims Forums. From the Maxis Documentation topic there you can download the TS4 Custom Content Guide (outdated in some places, but explains what those tags are) and you can get the latest TDesc files from 1.39.74 : TDESCs topic on there as well.

To read the TDescs, you'll want to use the TDesc Browser to avoid going crazy. This reads all the TDesc files in and formats them in a tree view for browsing.
Quote:
So, is there not a workaround to accomplish this? Maybe by working on interactions and creating separate interactions for Sims with the trait, and ordinary Sims?

The only thing I can think of would be to create a second posture which specifies the clothing change you desire, and override whatever triggers thst posture to make the choice of whether to use the original posture or your new one. I'm not entirely sure if that's even possible, though.

Actually, another alternative would be to create a new posture tuning class that changes the outfit change to a list, where each list item has a test attached to allow it to select one from the list. This would certainly work, but would require writing a new Python script to support the new tuning class. The biggest problem with this approach would be maintaining the code once EAxis decides to totally change how the posture class works and having to update the script appropriately.
Lab Assistant
Original Poster
#5 Old 15th May 2018 at 12:36 PM
I didn't even know about the existance of a TDesc Browser, thank you! That helped a lot

Anyway, I tried by creating a new SocialSuperInteraction, which leads to the default posture if the Sim doesn't have the required trait, and leads to a new custom posture (which is the same as the default, but with a different clothing change) if it has the trait. I also created the script to add the interaction to the Massage Table

However, each time I try to give or ask for a massage, the Sims are unable to perform the interaction, because it gives me a route fail error (I tried with just the Swedish Massage, but the error occurs with any type of massage)

I'm attaching the .package and the .zip files containing the script (I'm sorry it's a .zip file, but I still don't know how to create .ts4script files)
Download - please read all instructions before downloading any files!
File Type: rar DrHouse93_FitnessActivies_NudeMassage.rar (4.7 KB, 5 downloads) - View custom content
File Type: zip DrHouse93_NudeMassage_MassageTableNewSA.zip (2.7 KB, 6 downloads) - View custom content
Lab Assistant
Original Poster
#6 Old 24th May 2018 at 12:26 PM
This is honestly DRIVING ME CRAZY. After a lot of tests and troubleshooting, I managed to make the script work, and the proper interactions are now correctly added to the Massage Table object. However, there is an UNKNOWN bug in the "mixer_social_GiveMassage_Swedish_Friendly_alwaysOn" resource, which causes this:

- If the sim to give a massage to hasn't the trait required for the test (in this case, the Vampire trait), it runs the ordinary interaction for giving a massage and the Sim switches to the Towel outfit. EVERYTHING WORKS FINE HERE
- If the sim to give a massage to is a Vampire, he's supposed to switch to his nude outfit, rather than the towel. However, even if the game recognizes the test as true, the XML slows down the game incredibly, only to run the ordinary interaction after "years" (as if the test never occurred)

What am I getting wrong?
Download - please read all instructions before downloading any files!
File Type: zip DrHouse93_FitnessActivities_NudeMassage.zip (9.0 KB, 2 downloads) - View custom content
Back to top