Back Previous Next

The "gay marriage hack"

This hack pushes the limits of "simple".

"Family", in The Sims, is an ambiguous concept. It means, simply put: all the Sims inhabiting one lot and, for administrative reasons, sharing one surname. It implies family ties and relationships of the kind created through marriage. Consequently, a Sim moves into another family through a marriage proposal. That is, if the proposer and proposee are of a different gender. If they are of the same gender, the option "Propose" is struck from the interactions menu and replaced with "Move in". When hetero romantic conventions don't apply, joining a family is suddenly a dry, businesslike agreement. Similarly, a loving opposite-sex couple in the same house can't get married - because they're already in the same family. But a Sim wanting to join that family may turn out obliged to fall in love. Soggy emotions are required one moment, and ruled out the next. Oh, and children have no luck; they can only move along with an adult, so orphans are stuck. Needless to say, all this has drawn some criticism.

The gay marriage hack that I originally downloaded allowed marriage between Sims of the same sex. But I would like to go a bit further. I would like marriage between adult Sims to be allowed at all times; to let Sims of any gender move in, rather than marry; and to let children ask and be asked to move in by anyone else, whether adult or child. (I once tried to let this apply only to orphans, but had to add some code as opposed to simply changing it, and produced a worthless file. Maybe when I know more about coding...) Lastly, I want children to be able to send adult guests packing.

The reason same-sex Sims can't marry and opposite-sex Sims can etc. is the conditions set in the file "PersonGlobals.iff" from GameData\Global\Global.far. This file has little questions: is this person a grownup? If so, a grownup of the same sex? The conditions can be made ineffective by making sure the two outcomes of these questions are always the same. But first the questions have to be found, and that requires some delving into the BHAV block; and "PersonGlobals.iff" is one of those files that grows with every release. In this example, I'm editing the LL, Deluxe and Unleashed versions, after applying all patches to all three (and I suspect that these patches don't only alter "Sims.exe", but the PersonGlobals too!). I also need to extract "SocialInteractions.iff" from GameData\Objects\Objects.far for LL, and - knowledge I owe to the Yahoo group "Simfully" - "HDSI_Propositions.iff" from ExpansionShared\ExpansionShared.far for Deluxe and UL. The "HDSI" stands for Hot Date Social Interactions, and its routines replace the routines in "SocialInteractions.iff", which stays largely unchanged in all releases from LL onwards. "HDSI_Propositions.iff" changes enormously between releases, as does "PersonGlobals.iff", and, for hacking purposes, both must be extracted from the version the hack is intended to work with. When these files are done, they should be put in the directories they came from; put "PersonGlobals.iff" in GameData\Objects, for instance, and the game will ignore it!

The LL and Deluxe versions of "PersonGlobals.iff" are pretty simple. I look up the menu items "Propose" and "Move In", ticking the box that makes the second available to children. I note the numbers to look up in the BHAV block: #8280, #8281, #8284, #8285. Of these, only the menu test routines, #8281 and #8285, need to be altered. The "Ask To Leave" option, which is already available to children, has action #8208 and test #8209.

The two lines to alter in #8281 are outlined in red. The first prevents same-sex marriage proposals, the second, in-house marriage proposals. Their outcomes should become "4,4" and "9,9".

#8285 presents a similar picture, but here only the outcome of the child check and gender question needs to be altered. Why ask one's roommate to move in?

Checking #8209, it becomes clear that adults can ask anyone to leave, but children can only ask other children. I'll solve this by making the first check point to line 1 in either case, skipping the test in line 10.

The PersonGlobals file (for LL and Deluxe, at least) is now done.

Testing this file, I find that the "Move In" option appears for children, but keeps dropping out of the queue. Some poking around leads me to "SocialInteractions.iff". This file, too, has a TTAB block with menu items, but its items don't appear directly in the pie menu; they are called from PersonGlobals. Because the checks are done in PersonGlobals, the TTAB items in SocialInteractions are almost all ticked to be available for adults, children and visitors; except, as chance would have it, the two "Move In" options (one for the asker, one for the person being asked). To allow children asking in others and being asked in themselves, the "Available to children" box must be ticked for both options, just as it was for the PersonGlobals "Move In" option.

Now everything works in LL, but not in Deluxe. That is because in Deluxe (and every version from Hot Date onwards) the propositions are no longer handled by SocialInteractions, but by "HDSI_Propositions.iff". This file has to be given the same treatment: find the TTAB "Move In" menu options, and make them available to children.

A less simple hack, to prevent the annoying reshuffling of inhabitants after an in-house marriage: in "SocialInteractions.iff", I look up the TTAB menu option for the person proposed to: #4240, under the BHAV block. In this code it says that if the Sim proposed to accepts, there's a little wedding ceremony for which both dress up, then their dress goes back to normal and something called "do move in" is run, and more stuff happens, and then the routine exits. If the person proposed to already lives in this house, I want to prevent the move-in. So I add another line, in which I ask: does this person live here? If so, exit routine. If not, continue normally and do a move-in.

Technically, I right-click on the BHAV routine and choose Add to add a blank line of code. It will have something in it like "My attribute < my attribute", but that doesn't matter. It will have number #34. To the right are a function field, two fields for the True line and False line and four parameter fields. The function should be "2".

Line #30 is the "change back to normal" line, and it points to line #22. That means that to include the new line in the processing, line #30 should have "34" in its "True" field, and line #34 should have "22" in its "False" field. The "True" field of line #34 should be "1", as this is the exit line. Finally, the four parameters of line #34 should be: 32, 16896, 512, 6674. These values I found in BHAV routine #4282 which tests if a person is a resident. There is another line higher up, #21, which also points to #22. This one also has to point to #34, or strange freezes occur.


The end result should look like this.

For Hot Date and higher, including Deluxe, this hack is done in "HDSI_Propositions.iff", same BHAV block (#4240), same line numbers, same code.

Altering a later PersonGlobals.iff - say, that of Unleashed - involves the same steps, but it gets more complicated. The menu options are now sub-options, and harder to locate.

The numbers for the BHAV routines are still the same, though. This is because the IFF is backward-compatible with earlier versions, not changing, only growing. When object hackers put up a hacked iff that "works with all versions", that is probably the version of that IFF found in the latest expansion pack. Hey, wait, there is a difference! "Move in" points to a different menu test routine! (Looking through the menu options, I find that beside this option #66, there is a "Move In" option #83, which uses the old routine but isn't available to anyone.) So I follow roughly the same steps: make #66 available to children, note the test routine number.

The marriage test is still at the same number, but another gender test has snuck in. Here, I've neutralized all three.

For the "Move In" test, I've altered both the old #8285 and the new #8390, the latter also having a double gender test. The example below shows #8390.

Saving the best for last: "Ask To Leave" has been fragmented into many ways to say goodbye, all with different routines. I noted all the test routine numbers:
Shoo - #8480, #8391
Wave - #8481, #8209 (the old Test routine)
Shake hands - #8479, #8392
Suave Kiss - #8476, #8395
Hug - #8474, #8394
Kiss - #8475, #8393
Polite Kiss - #8475, #8396
Passionate Kiss - #8477, #8397

Absolutely none of these have their "available to children" boxes ticked, because children have a separate, rather hidden menu option line: #91 "Say goodbye", action routine "Child - Ask to Leave" (#8208), check routine #8495! It's so nice to be able to find things easily!

Routine #8495 gives me the following screen, which strongly suggests that children now have their own menu choice to shoo anyone off the property.

Not trusting this completely, I've reinstated the old "Goodbye/Wave" option, #8209. I've ticked it to make it available to children and again neutralized the child check, which is now on a different line:

This hack is not perfect; when moving in, children will take a single parent with them (pretending it was the parent that moved, not the child) and during the move-in question, they may display the missing animation balloon. Children from a family of orphans can't move out. These things can be fixed; however, that kind of hacking doesn't qualify as simple, and so I've put it under the advanced hacks.

Since Unleashed, two new expansion pack have come out for which editing PersonGlobals is probably more complicated still, given vague rumours I've heard about a submenu bug. However, the basics will be the same for each version.





Back Previous Next