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 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.
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.
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.
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)
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)