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

Latest Site News

2018 MTS Calendar Contest - posted on 12th Nov 2017 at 4:48 PM
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...
Advertisement:

Apartments - Auto STR-LTR Check Fix

by simler90 Posted 10th Nov 2017 at 9:30 PM - Updated 13th Nov 2017 at 5:19 PM by simler90
33 Thanks Say Thanks
3 Favourited
152 Downloads
1,341 Views
Advertisement:
2 Comments / replies (Who?)
This is a fix which corrects a Maxis mistake in the "Apartments - STR/LTR Check" BHAV introduced by Apartment Life. This code seems to be used by the game in certain Test BHAVs to determine whether visitors to your apartment can perform certain interactions autonomously. However, Maxis made a mistake in the code which leads to the problem where visitors can never perform those interactions autonomously even though they are supposed to be able to. So far, I have only found 2 interactions that use this BHAV, but there may be even more.

The 2 interactions are "Take Shower" and "Take Bath". I came across this problem, because I was making a "Autonomous Shower/Bath in Community Lots" mod (which I will release here soon). As this BHAV is used in those 2 interactions, I decided to open it and found a problem. The screenshot that I have attached shows the mistake (above the red line) and the fix I made (above the green line). I have tested this fix quite a bit and everything works perfectly.

Now, I'll tell you what Maxis tried to do exactly with this "Apartments - STR/LTR Check" BHAV. As far as I understand, this check is specifically done to determine whether invited Apartment neighbours can take a shower or bath in your apartment. Normally, in non-apartment residential lots, only those visitors who have been "Invited to Stay" can autonomously take a shower and bath in your house, and that's cool: if their hygiene is low, they take a shower or bath and increase that motive, instead of leaving. That's how it should be. The reason Maxis made a separate BHAV to check apartment neighbours who visit your apartment is because apartment neighbours are not technically considered visitors by the game. They are residents of the lot, not visitors. The only other sim type that is like that are dormies in university dorms, who are also not considered visitors, despite being unplayed. Dormies are already automatically allowed to take a shower or bath in dorms, there is no special code needed for that, because dormies cannot be invited into the dorm, they already live there. Apartment neighbours are special, because in apartment lots, there are individual apartments that are owned by specific families. If apartment neighbours were allowed to autonomously take a shower/bath in your apartment, then they could do that even if your sim had a low relationship with them.

The "Apartments - STR/LTR Check" BHAV makes it so that if a playable sim inside your apartment has a STR>=25 and LTR>=15 relationship with an apartment neighbour who is currently visiting your apartment, then that neighbour is allowed to use your shower or bath. In addition to this, Maxis actually made it so that even non-apartment neighbour visitors (those sims who live on other lots that you invite over to your apartment) also have to pass this exact same "Apartments - STR/LTR Check". This seems to be some kind of streamlining by Maxis, because non-apartment neighbour visitors can only use showers and baths if they have been "Invited to Stay" (as I have said above), and in order to "Invite to Stay" a visitor, you need a relationship that is higher than STR>=25 and LTR>=15. In other words, non-apartment neighbour visitors are already supposed to pass this check automatically if they have been invited to stay.

So, what happens in an unmodded game? The code fails each time, and returns False, preventing your visitors (of any kind) from being able to use your showers and baths, despite having STR>=25 and LTR>=15 (with apartment neighbour visitors), and despite being "Invited to Stay" (for non-apartment neighbour visitors). From what I can see, Maxis set Local 0x0007 to the STR between your sim and the visitor, and then made a mistake and set the LTR relationship to Local 0x0007 as well. Then the code tries to perform a check on the STR by checking Local 0x0007, but the code instead checks the LTR there (because that is the last value that Local 0x0007 is set to). And then, it checks Local 0x0008 in order to check the LTR, but fails, because there is no Local 0x0008. This always returns False, which prevents visitors from taking a shower or bath, despite being expected to be able to do so by Maxis.

If you see anything wrong with the information above, leave a comment. I am not a coder, but when I looked at this BHAV for the first time, the first thing I saw was this mistake. I have looked at many other BHAVs, and I think that is how Locals are used.

Keep in mind that despite the fact that I talked about the "Take a Shower" and "Take a Bath" interactions in this explanation, it may not be just those interactions that are affected. Any interaction that uses the "Apartments - STR/LTR Check" will be affected by this mistake. This mod fixes the mistake.
Edit: I have found one more interaction that makes use of the "Apartments - STR/LTR Check": Sleep. In other words, if you don't have this fix, you cannot have an apartment sleepover. That is why your visitors on apartment lots would spend the entire night watching TV or dancing to music, while all your own playable sims were sleeping in their beds. This fix makes it so that your visitors to your apartment can now sleep in your apartment.

From what I can see, any interaction that has to pass the "Invited to Stay?" check, also needs to pass the "Apartments - STR/LTR Check" on apartment lots.

In order to unrar this mod, you need the latest version of 7zip or WinRar.

This is a global mod that modifies one resource in the objects.package file. If any other mod modifies the same resource, they will conflict with this mod:
Apartments - STR/LTR Check/Group:0x7FD46CD0/Instance:0x00000670

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Apartment Life
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
Apartments - Auto STR-LTR Check Fix.rar 503 Bytes 152 10th Nov 2017
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:

1. Download: Click the download link to save the .rar or .zip file(s) to your computer.

2. Extract: Use WinRAR (Windows) or Stuffit (Mac) to extract the .package file(s) from the .rar or .zip file(s).

3. Place in Downloads Folder: Cut and paste the .package file(s) into your Downloads folder:
  • Windows XP: Documents and Settings\(Current User Account)\My Documents\EA Games\The Sims 2\Downloads\
  • Windows Vista/7/8: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads\
  • Mac: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads\

-or-

4. Place in Program Files: Cut and paste the .package file(s) into your appropriate Install folder:
  • Windows XP: C:\Program Files\EA GAMES\The Sims 2 (Your Latest EP)\TSData\Res\Catalog\Bins
  • Windows Vista/7/8: C:\Program Files\EA GAMES\The Sims 2 (Your Latest EP)\TSData\Res\Catalog\Bins
  • Windows Vista/7/8: C:\Program Files(x86)\EA GAMES\The Sims 2 (Your Latest EP)\TSData\Res\Catalog\Bins
  • Origin: C:\Program Files (x86)\Origin Games\The Sims 2 Ultimate Collection\Fun with Pets\SP9\TSData\Res\Catalog\Bins
  • Mac: APPLICATIONS FOLDER -> THE SIMS 2 -> TSDATA -> RES -> CATALOG


Need more information?
Back to top
Advertisement: