More Awesome Than You!
Welcome, Guest. Please login or register.
2024 March 28, 15:50:38

Login with username, password and session length
Search:     Advanced search
540270 Posts in 18066 Topics by 6511 Members
Latest Member: zheng
* Home Help Search Login Register
+  More Awesome Than You!
|-+  The Bowels of Trogdor
| |-+  The Small Intestines of Trogdor
| | |-+  Set to Next family member Spouse
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Set to Next family member Spouse  (Read 77333 times)
rufio
Non-Standard
Uncouth Undesirable
****
Posts: 3030


More Nonstandard Than You


View Profile WWW
Set to Next family member Spouse
« on: 2011 December 24, 21:01:54 »
THANKS THIS IS GREAT

Does anyone know what this actually does?  It appears to be made of fail, since I tried to use it, and could not see for all the Too Many Iterations errors.  (For comparison, using rel var 1 & temp 1 with temp 1 = marriage bit, as in x261 had no problems in the same context.)  What's it for, and why does it suck so much?  The only place I've ever seen it is in x20E.
« Last Edit: 2011 December 25, 02:56:47 by rufio » Logged

I was thinking about these things and I am a feminist.

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26281



View Profile
Re: [Modding]Set to Next family member Spouse
« Reply #1 on: 2011 December 25, 02:29:45 »
THANKS THIS IS GREAT

It iterates to the next NID that is the spouse of the input NID. It also probably loops endlessly rather than terminating upon reaching the highest NID (and there's NORMALLY only supposed to be ONE anyway), so that's why you get too many iterations: You need to record your starting point and stop if it repeats itself.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
****
Posts: 3030


More Nonstandard Than You


View Profile WWW
Re: [Modding]Set to Next family member Spouse
« Reply #2 on: 2011 December 25, 02:56:25 »
THANKS THIS IS GREAT

Ah, I did not know Set to Next could loop endlessly on some settings - good to know.  By "loop", you mean it would go back to NID 0 at some point, so you could just check for 0 and break?  Well, and start with 1.  Does it actually go all the way to unsigned -1, or is there some hard-coded maximum NID? 

ETA:  Now that I am not tired, I can think better.  You'd actually have to call it once to save the NID of the first spouse and then compare for that in the loop body, and now that I think about it, it must return false if it never finds any spouse at all - I had a good 30 seconds of error-free game before a sim with an actual spouse showed up and tried to interact with people.  I get that EA never imagined that you'd ever want to call this more than once in succession, but you'd think the primitives would at least be consistent.

I know there is not supposed to be more than one spouse (which kind of raises the question of why EA decided that should be a StN option, really), but that can't be assumed when you have e.g. the polygamy arch, and it's nice when having polygamous sims doesn't break in-law relationships.
« Last Edit: 2011 December 25, 18:46:25 by rufio » Logged

I was thinking about these things and I am a feminist.

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26281



View Profile
Re: Set to Next family member Spouse
« Reply #3 on: 2011 December 26, 00:46:28 »
THANKS THIS IS GREAT

Actually, they did imagine you would want to call it in succession. Multi-calls are used for things like checking for multiple siblings, parents, etc., where multiples actually exist. Calling it in this way for spouses is an abnormality and not normally how you locate a sim's spouse.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
****
Posts: 3030


More Nonstandard Than You


View Profile WWW
Re: Set to Next family member Spouse
« Reply #4 on: 2011 December 26, 05:30:41 »
THANKS THIS IS GREAT

Is there another common method of locating the sim's spouse?  Granted, I haven't done a thorough search, but the methods I've seen involve calling BHAVs which themselves just call Set To Next, although they usually use Set to Next 9C or A4.  For example, EAxis's original borked in-laws check called 0x261, which calls Set To Next A4, as I mentioned.
Logged

I was thinking about these things and I am a feminist.

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26281



View Profile
Re: Set to Next family member Spouse
« Reply #5 on: 2011 December 26, 08:13:00 »
THANKS THIS IS GREAT

No idea. Haven't done anything there in ages.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.065 seconds with 19 queries.