EP Compatibility:

Three things to know about Expansion Pack Compatibility and converting things to work with the original (unpatched) The Sims

1. EP Checks

Checking to see what kind of lot it is (among other things) will crash a pre-hotdate game. BUT checking to see what expansion pack is installed will not. The code means something else to a pre-living large game (something about the lot values) BUT it always returns the correct answer so can be used

    Global ( from Simulation ) Game Edition >= 3

    Function: 2
    parameter 1: 20
    parameter 2: (edition number. 3 for hot date)
    parameter 3: (operator - 3584 for 'equal to or greater than')
    parameter 4: 1798

Alternative operators (parameter 3) can be
 3854 ('<=' which is equal to or less than)
 2048 (which is 'Flag Set" and that means "is installed". It also displays the edition name instead of number so you can use it to make sure you've typed the right umber in Parameter 2 then change to the operator you'd rather use:
Global ( from Simulation ) Game Edition Flag Set? Hot Date

EDIT (January, 2007)

I have learned something new (to me) and cool from Peter Gould (of Atelier Quebec and of IffSnooper fame). It turns out I was mistaken.

I'll rewrite this section explaining how shortly but in the meantime you can see where Peter explains it in the SSoW group's Message archives or over at Simblesse Oblige

2. SemiGlobals and Categories

HotDate streamlined and improved a lot of the old objects in game which is great but means that many things cloned from that point forward were no long backward compatible. Two things happened during this improvement process. The first is that several objects had their coding removed; SemiGlobals were created to store this coding instead and each of those objects now use to the semiglobals instead. This was done to objects that are plentiful in the game and all work pretty much in the same basic way: counters, sofas, artwork, lighting. Any of these items that have a GLOB resource inside of it is not compatible with Pre-HotDate games.

The other thing that happened was several items were given 'categories'. This allows the game to find them easily in a versatile manner. Stoves can be cloned and used in a DownTown restaurant because the podium looks to see if there's an object in the "Stove Category" to know whether it should create a chef. Without categories the podium would have a difficult time recognizing your clone (as it does not know your clone's GUID or those from future expansion packs.) These categories, however, are defined by referring to a 'constant' in the global.iff that did not exist until HotDate. Categories themselves did, so the original game CAN handle (the concept of) those just fine but it's the Constant that makes it crash. You can solve this pretty easily and ensure it works in both cases ("pre hot date" games and "hot date or higher" games)

The first thing to do is look up the value stored inside of that constant. To do (after finding out what constant your category is, of course. Categories are assigned in an object's init BHAVS) that you have to look in the global.iff. If you've not done so before extract that from the global.far file to a place outside of your game. It's a wonderful reference file and since it's outside of your game there's no danger of messing the game up if you accidentally make a change in that global.iff one late night. Open the global, look at the BCONs and you'll spot one called Categories. It's BCON number wont seem to match to us but the game knows they are the same thing. the lines inside do match. For instance (using a stove as an example since already brought them up)

    My category Assign To: Constant 8198:19

8198:19 is Global BCON 262's line #19. popping that BCON open we find the value listed on line #19 (the twentieth line) is "19". if you look through the list you'll see the value is usually the same as the line number but not always so checking to make sure is always a good idea.

The Second thing to do, now that you have the actual category number (instead of the constant that this number is stored in) is to change the coding in your stove so that IT reads with the actual number. Open the object (stove in this example) in your iff editor (IffPencil, for instance), return to the init BHAV and locate you category line. Parameter four needs to be changed from "6659" to "1795". This will change it from a constant to a literal value. Then change parameter 2 to the value you looked up (19 in this case)

    My category Assign To: 19

It means EXACTLY the same thing so all Hot Date and higher games will be able to use it with no problem. PreHotDate Games understand categories and understand "19" and will also have no problem with it. Nothing in the game will actually USE the category but having it assigned to 'Category 19' is not going to harm anything.

An alternative method of solving this could have been to insert an EP check in front of the category line and if HD or higher was not installed then route around the category line altogether. I used to do this but I've decided using a literal value is a better solution now. By assigning the stove it's category it will still be available for any special (third party) hacks that look for things by category.

3. Newer Resources and Technologies

Each expansion pack has added BHAVS and other resources to the global file. Objects that refer to any of these new resources confuse the older games, often causing them to crash. To solve this you'd need to figure out exactly when a resource was added (which can be a bit tricky some of the time) and you can use an EP check to route around that bit. Alternatively you can mimic the global's code in a local BHAV but complex routines can use several global BHAVs and that all can take a bit of patience to pick through. Always a great learning experience though as you get to see how Maxis opted to achieve something. Good stuff.

Lots of times the names of the BHAVS ( like "Robot Sounds?") or the new function (like "Manage Inventory...") makes it pretty obvious and happily the global is just always added to, never trimmed down. This means someone who has Makin' Magic but does NOT have unleashed will still have all of the global BHAVs that Unleash added in it's day. It wont be able to *use* the pets stuff very well but referring to that BHAV number wont make the game crash.

Lines within the BHAV can also create some problems. Anything referring to a date or to "autofollow" did not exist before Hot Date. Anything referring to Fame did not exist before Superstar. Additional person types (such as House Party's party crashers) and gender ids (such as those used for Unleashed's cats and dogs) did not exist from the beginning and references to those will also stump the original game.

Author: Raeven