A sad attempt at trying to mod The Sims 1 (11/08/2024)

I've been working on trying to create custom content for The Sims 1 for a while now, and have gotten somewhat far.
I was able to figure out how to get The Sims Transmogrifier working, and actually was able to properly setup a Blender scene to render my custom object, with its alpha and Z buffer maps and everything (I will make a tutorial on how to do this, eventually. Check out the blog page often!).

All was working fairly well, until I imported the bitmaps into the Transmogrifier tool and...

What is that? Why is my image semi-transparent? I had setup the alpha channel bitmap correctly!

Well, it took a while to figure it out, but I eventually realized what was going on.
See, I was using Paint.net to make any needed edits to the Blender renders, and to export them to 8-bit BMP's.
Now, both Paint.net and the Transmogrifier tool follow the same standard, at least in theory, but it turns out there's a slight difference in how they store their colors.
Let's check it out:

Well, well.
This part of the file is what's called the color table. I'm no expert on BMP's, but from what I've been researching, 8-bit BMP's use a 256-color table that every pixel of the image references, instead of having to define every color for each pixel, which would be rather unoptimized.
The Sims Transmogrifier simply has every possible 8-bit color defined in this table.
Each one of these colors is made out of 4 bytes, one for the blue value, another one for the green value, another one for the red value, and finally, a last value which I'm not sure which purpose it has.
It might have something to do with BMP's that use BI_ALPHABITFIELDS compression, which I believe allows for transparency (so this last value would be used for the color alpha, most likely), but I'm not sure and it doesn't really matter for our case.
As you can see (if you zoom in the image), the Transmogrifier tool simply sets that last value to 0 for every color, as it's not needed.

If we look at the Paint.net color table, we can see that it's actually quite different. Paint.net only seems to store whichever colors are actually used in the table, while the reset are set to zero.
And, while the last value is not used here, either, we can see that it's set to FF (255) instead of 0.

Of course, the reference values in the pixel arrays are also completely different, because they're pointing to different spots on the table, which do not correspond to those in the Transmogrifier table, even when they're referencing the same colors:

Now, I'm not actually sure which of the two is the actual problem here, whether the difference in how the colors are arranged in the color tables, or that last "alpha" value, but I'll assume both of them are causing the issue.
So, how did I fix this? With a Java program, of course!

I spent the night working on a neat little Java program that can decode a BMP image, extract all the info we need from it, and then, it will do two things.
First, it will take the color table from the Transmogrifier image and replace the Paint.net image's table with that one.
Then, it will iterate through the pixel array, and replace all the old references with the new ones, pointing to the Transmogrifier table. And finally, save a new file for us.

So what's the result? Well, to us, the image looks identical. But what happens when we import it in the Transmogrifier?

With that done, my custom object should now work properly...
Let's check it out in-game!.. Well, not yet!

You see, as I was about to go try the new object in my game, I thought of something... haven't I just created a possibly OP object?
I made the poster pretty cheap, 35§, to be exact. However, because I cloned the object from a very expensive painting, it's going to be a rather broken object, since it will give too high of a room rating for a really cheap price.
So, what can I do? Well, this is where my lack of knowledge starts showing, but the first thing I did was download IFF Pencil 2, which is a tool that can be used to modify the behaviour and data of an object (the Transmogrifier only really lets us edit visual stuff like the sprites, catalog descriptions, name...).
Once I downloaded that, I started to look through some tutorials to try and figure out how to make my object more reasonable.
I found myself here:

I don't really have any idea what I'm doing, but that seems like a reasonably good start.
It seems the object actually gives a "fun" motive increase, depending on how serious the Sim is. I changed it to use the "playful" personality trait, which I think is more fitting for a fan of the Friday the 13th movies, and changed the maximum value to 2, so it's more fair.

According to one of the tutorials, the value I just changed doesn't actually really affect the way the object works, rather, it's meant as a value to attract Sims.
So, if a Sim is looking to have some fun, he may be attracted to the poster.

With that in mind, I decided to actually give it a room advertisement value of 0 to 5, again based on the playful nature of the Sim, so they won't be too annoyed by it, I guess.

Another important thing to note from this window would be the Action tree and Check tree values, which in this case are 4100 and 4101, respectively.
I believe these will help me find the behaviour files of the object.

Opening both of those behaviour files shows me that they reference another behaviour file, with ID 4096.
According to the behaviours screen, that's the main behaviour!

Unfortunately, this is where things get quite difficult.

Let's try to understand this.
The first line that's actually to our interest, is line one, which reads as follows:

my room impact := my current value

And there are 8 parameters here:

07 00 29 00 00 05 03 03

But what does each one of these values correspond to?
Well, let's change them! For example, if we change the first one from 07 to, say, 06.

Well, well! That actually changed something!
The previous my room impact := my current value value changed to my route id := my current value, which means that each one of these parameters just corresponds to a part of the function.

The 6th value seems to refer to the operator used in the function, which is currently :=, and if I'm not mistaken, that's assigning a value.
Although, since I haven't seen any == or lone = operators yet, this could also be a check operator. Unfortunately, I can't find any documentation about these operators, so I'll have to go on a hunch.
Nevermind! I found a specification for the operators! Hurray!

So, according to this, that line actually is assigning a value to the room rating. Now, which value?... Uh... well... I have no idea.
I can't find any documentation on what "my current value" is supposed to be, so for now, it'll remain unknown.
What I do know tho, is that we're assigning this value to the object's room impact. We then jump to line 5, where the room impact is divided by 40.
Since we don't know what "my current value" is, let's assume it's 0 for now. Which means the result of this is, of course, 0. We then jump to line 6, where we check if the room impact value is above 150.

Assuming the "current value" was indeed 0, this should return false, which means we jump to line 4, where we... update (my room score contribution)?
Okay... I have no idea what that does, but then we jump to line 2 which does... something, and then we jump to line 3 where we're supposed to open behaviour 4098.

Unfortunately, I've only slept 5 hours today as I'm writing this... I think it was 5 hours, anyways, and it's already 23:50, so by now I honestly have no idea what I'm doing.
I think I've somehow managed to clone an object that just happens to not have its room impact value stored in a variable, that, or I have no clue what I'm doing, which is very likely.

So let's just... test the fucking object in the game, shall we?

And it... works? UHHHHHHHH

Well, the results weren't what I was expecting. Somehow the poster ends up on the table behind the wall, even though I'm placing it ON the wall itself.
I didn't change any of the values in the Transmogrifier, so something must've gone VERY wrong during the importing process. What exactly?
I have no idea, and unfortunately, there's very little documentation about modding The Sims 1, specially the base game alone, which is what I'm currently working with, so for now, I think I'll end this post here.
I'm really tired and I'm out of neurons for the day. Hopefully I'll be able to figure this out at some other point...

BYE

Back to the news section

This page is currently under construction!
Please, be patient!