Quick Reply
Search this Thread
Forum Resident
Original Poster
#1 Old 20th Apr 2025 at 2:47 PM
Default Problems with "Set to Next"
I'm having problems with "Set to Next" where the game isn't finding all of the relevant sims in a category, and I'm hoping someone can help.

I want to find all the siblings of Sim A. I have Sim A's NID saved as Local 0. To start with I used the following steps:

1. Temp 0 := Local 0
2. Stack Object ID := Literal 0
3. Set Stack Object to Next Neighbor with non-zero var3 relationship with sim in temp 0
4. Is Stack Object ID == Local 0 (if true, 3, if false, 5)
5. Local 2 := Familial relationship between Stack Object and Local 0 (using NIDs)
6. Local 2 Flag Set? Const 011A:03 (the one for siblings)
--> if true, do stuff, if false, back to 3.

Sim A in Testville has two siblings, but the game is only doing stuff to one of them. When I get the game to tell me what neighbor it's investigating between step 4 and step 5, it shows the sibling I know it finds, and then Sim A's baby sister-in-law - who it correctly identifies as "not a sibling" - and then nothing else. The missing sister shows up as a family member in the relationship panel, and all the correct boxes are ticked in SimPE.

Then I tried replacing "Neighbor with non-zero var3 relationship with sim in temp 0" with "neighbor of family in temp 0" and setting temp 0 to the current family (this isn't ideal, as I want this mod to work for siblings not in the same family, but this would be ok). This time it found Sim A's husband and no-one else, not even the other sibling the original had found.

Any help would be greatly appreciated
Top Secret Researcher
#2 Old 20th Apr 2025 at 10:30 PM
Var3 familiar relationship is not flags. You can't be sibling and parent or whatever at the same time. Local 2 == 3 is sibling. Reset temp 0 before set to next if you want to go back after doing stuff to one sibling because temp 0 will likely be used for something else.

1. Stack Object ID := Literal 0
2. Temp 0 := Local 0
3. Set Stack Object ID 0 to Next Neighbor with non-zero var3 relationship with sim in temp 0
4. Is Stack Object ID == Local 0 (if true, 3, if false, 5)
5. Local 2 := Familial relationship between Stack Object and Local 0 (using NIDs)
6. Local 2 == Const 0x11A:0x03
7. do stuff
8. goto 2 if needed.
Forum Resident
Original Poster
#3 Old 21st Apr 2025 at 1:37 AM
Thank you very much.

I don't know why I wrote "Flag Set?" as that wasn't in my code - I had "==" just like I needed. I must have been getting confused with a different part of the code that looked for crush & love flags.

At any rate, resetting the temp 0 fixed the issue.
Back to top