The Sims Transmogrifier Tutorial 1: The Green Flamingo
Using Transmogrifier: A Simple Walk Through Example
Goal: Clone the Pink Flamingo
(
), and mutate it into a Green Flamingo
( ).
- First, quit running The Sims.
For some people, this might be the hardest part of the entire process,
but rest assured that it's necessary,
because Transmogrifier can't open all the files it needs while The Sims is running.
Never run The Sims and Transmogrifier at the same time: always quit one before running the other!
- The "Transmogrifier.exe" program file should be in the top-level directory of "The Sims",
next to the "Sims.exe" file.
(The name of the exe file may be different, including a version number.)
- Once you've quit The Sims, run "Transmogrifier.exe",
and select the "flamingo" from the scrolling list of
object files:
- Note that Transmogrifier tells you the path name of the selected
object file,
".\gamedata\objects\flamingo", and it says that
"The selected file is Read-Only. Clone to modify."
There is a total of 1
object
in this file (just the flamingo),
but other object files contain several objects.
- Press the "Edit Object..." button to pop up the
Edit Object dialog.
- The "Language" menu lets you select the language in which to display the strings.
You can view or edit the strings in any of the languages The Sims supports.
- Note that Transmogrifier again tells you that the
object file
is Read-Only, and can't be changed.
So you can't edit the text fields, but you can read what they say,
and change the language setting.
- Press the "View Object..." button to pop up the
View Object dialog,
and take a look at picture of the Pink Flamingo:
- Note that the Pink Flamingo is a
Single Tile Object,
and that it only has one
graphical state:
"TransmogrifierGlossary.htm#128: flamingo draw group".
You can change the
rotation
and
zoom
with the sliders.
There are three zoom levels (small/medium/large),
and there are four rotated views.
- Since the flamingo is
bi-laterally symmetrical,
the game flips two images of the even rotations to draw the odd rotations,
so it only needs sprites for two opposite rotations.
Not all objects are
symmetrical,
though.
Some objects are not symmetrical at all (requiring four images for all four rotations),
others like the flamingo are bi-laterally symmetrical
(requiring two images for two opposite rotations, flipped to make the other rotations),
and some are even radially symmetrical
(requiring only one image for all rotations, flipped to make every other rotation).
- Press the "OK" buttons in the
view
and
edit
dialogs, to get back to the
main Transmogrifier window.
Now press the "Clone Object File..." button to pop up the
Clone Object File
window, to make a clone of the Pink Flamingo which you can edit:
- The
Clone Object File
dialog asks you for a unique
Object File
name.
It also asks for a
Magic Cookie
number, which defaults to zero.
And it allows you to select the
Objects
in the
Object File
to clone.
- Transmogrifier automatically makes up a default unique
Object File
name by appending six random digits,
and incrementing the number until the file name is unique.
- The file name in this example is "flamingo813554".
Your new object file name will probably be different,
but you can change it to any name you want that's unique.
- A
Magic Cookie
is a unique 16 bit number that is assigned to each object producer
(a person or organization creating new objects).
The purpose is to ensure that all objects created by different people have unique
identifiers.
- Magic cookies are free for the asking, while they last.
You can get one at the
Magic Cookie Registry.
- Type your magic cookie into the "Magic Cookie" field of the
Clone Object File
dialog, and Transmogrifier will remembered it in the registry for later.
Please leave it zero, if you don't have one.
- Some
Object Files
contain many different
objects,
and you might want to clone all of them, or just one (like the sets of flowers).
-
Multi Tile Objects,
like the hot tub,
are composed of a
Master Object
and a set of
Slave Objects,
but they're treated as one for your convenience.
The flamingo object file has only one
single tile object:
the flamingo.
-
You must select at least one object and enter a unique file name,
in order to clone an object file.
Otherwise the "OK" button will be disabled,
and the messages on the right will tell you what you need to do to enable it.
- The defaults are acceptable for the flamingo, so just go ahead and press "OK".
After you press the "OK" button, the
"Cloning Progress"
window will pop up,
and display the ongoing progress of cloning,
as well as a bunch of cryptic progress messages.
Once the cloning process is complete,
the progress meter turns into an "OK" button,
which you can press to dismiss the window.
- When you go back to the
main Transmogrifier window,
notice that the new file name "flamingo813554" is added to the list,
and it is automatically selected for your convenience.
You can see that it worked, because now it says that "The selected file is Editable."
- Now it's possible to edit the object!
Press the "Edit Object..." button to bring up the
Edit Object
dialog,
and notice that the text fields are editable now.
- First, change the
name of the object
from "Pink Flamingo" to "Green Flamingo".
Next, lower the
price,
since green flamingos are so ugly and worthless.
Finally, type in an amusing
product description,
to trick people into buying it!
Once you're done, press the "OK" button to save your changes and
get back to the
main Transmogrifier window.
- Now that you've changed the
name,
price
and
product description,
it's time to export the sprites, so you can edit them in another program.
-
Press the "Export Object File..." button, and the
"Export Whizzer"
dialog will pop up,
which will whiz you through the process of exporting an object:
- The
"Export Whizzer"
has many options to choose from,
that control how it imports and exports sprite images.
- In this tutorial,
we are just going to change the colors of the flamingo sprites, not their shapes.
So you won't need to change any of the options,
because the default settings do what you want.
- The
"Just Change Colors"
box should be checked,
so Transmogrifier will preserve the
Z buffers
and
Alpha channels
in the object file, and let you change the sprite colors.
- The
Z buffers
define the depth of each sprite pixel from the camera,
and the
Alpha channels
define the transparency of each sprite pixel.
-
Changing the shapes of sprites is more complicated,
and that will be covered in another tutorial.
It involves editing the
Z buffers
and
Alpha channels
(which is tedious),
or having Transmogrifier generate them automatically (which is low quality).
But as long as the
"Just Change Colors"
box is checked,
Transmogrifer will only export the color images for you to edit,
preserving the shape of the original sprites.
- The "One Zoom, One Channel" radio button should be selected,
so Transmogrifier will save you from having to make all three
zooms
of each
sprite.
It will automatically generate the two smaller zooms from the largest one.
- Selecting the "All Zooms, One Channel" radio button
will cause Transmogrifier to export images for all three zooms,
which you can edit in full detail.
There is slight loss of image quality when Transmogrifier scales the images down,
when automatically generating small zooms.
So if you're picky about how the smaller zooms look,
export all zooms and touch them up yourself.
- One check box that is always available is the
"Compress Bitmap Files"
option (checked by default).
It controls whether the exporter writes out run length encoded
BMP files
(which are smaller and use less disk space, but may confuse some image editors),
or uncompressed BMP files, which use much more disk space.
You should probably leave it on by default, unless compressed bitmaps cause a problem,
since there is no loss in image quality when the images are compressed.
- Another check box that is always available is the
"Create Sub Directories"
option (checked by default).
controls whether the exporter creates a bunch of sub directories
to organize the many
BMP files
that it exports.
If it's checked, the exporter automatically creates a tree of sub directories
in the file system wherever you export an object.
If it's un-checked, all of the BMP files are written into the same directory.
- After you press the "OK" button of the
"Export Whizzer"
dialog,
a standard "Save As" dialog pops up,
to prompt you for a file name to export the object.
The file that it exports has an ".XML" suffix,
since it's a text file of
XML (eXtensible Markup Language)
that describes the object and points to all the
BMP files.
This XML file allows the importer to read all the other bitmap files back in,
without asking you any stupid questions you already answered.
- Navigate to a convenient directory (with lots of disk space),
and press "Save" to accept the default file name,
which should be "flamingo813554.xml":
- After you press the "Save" button, the
"Exporting Progress"
window will pop up,
and display the ongoing exporting progress.
Once the exporting process is complete,
the progress meter turns into an "OK" button,
which you can press to dismiss the window.
- Now, go back to the Windows desktop,
and explore the directory where you exported the
XML file.
- You will notice a text
XML document
called "flamingo813554.xml",
that ties all the
BMP files
together,
and records additional information about the exported
object file.
You can double click the XML file to view it as an outline in Internet Explorer,
or view it in any text editor.
There's no need to look at it or change it, unless you're curious or up to something sneaky.
- You will also notice a directory whose name begins with the first part of the
XML
file name:
"flamingo813554_sprites".
This directories contains
BMP files
from the sprites used by the
object.
- The "flamingo_sprites" directory contains a sub directory for every
sprite
of the object.
The flamingo is simple and doesn't have any animation or other
graphical states,
so there's only one sub directory for the one sprite ("flamingo813554_sprites\sprite0128").
Since we only exported the large
zooms,
there are only large images in the directory ("*_large_*_*.bmp").
Since the flamingo is
bi-laterally symmetrical,
there are two images for the two opposite
rotations,
("*_*_back_*.bmp" and "*_*_front_*.bmp").
- Now that you've exported all the
XML,
BMP files
and
sprite
images, you can edit them with a 2D image editing program like Photoshop or Paint Shop Pro.
You don't need to quit Transmogrifier while you edit the images,
but make sure you save all your images in the image editor,
before you try to import them into Transmogrifier again.
Here is a picture of all the "Before" bitmaps, opened up in Photoshop:
- Take a look at the
pixel channels
("flamingo-graphic_large_front_p.bmp" and "flamingo-graphic_large_back_p.bmp").
- Now it's time to do the actual work of changing the color of the pink flamingo to green!
Here's how it looks before you change the color:
- The easiest way to change the color in Photoshop is to use the "Hue/Saturation" tool.
Shifting the hue all the way over to the right changes the bright pink to a sickly green.
How convenient!
It also changes the background color from yellow to blue, which does not matter,
since that area is transparent:
- Drag the "Hue" slider all the way to +180 on the right, then press the "OK" button.
Now the flamingo should look like this:
- Now do the same thing to the other colored pink flamingo sprite,
so the two flamingo sprites look like this:
- In this tutorial, we just used to Hue/Saturation control
to change the colors of 8 bit
indexed color
sprite
images.
But if you want to paint details into the image,
or apply color to specific parts of the image,
you will need to convert the bitmaps to full color 24 bit RGB images.
Converting the images to RGB will make it much easier to edit the colors in the image,
since many drawing tools and effects only work on full color images.
-
Most paint programs can easily convert an 8 bit
indexed color palette
image into a 24 bit full color RGB image.
In Photoshop,
pull down the "Image" menu,
go into the "Mode" submenu,
and select the "RGB Color" item.
In Paint Shop Pro,
pull down the "Colors" menu,
go into the "Increase Color Depth" submenu,
and select the "16 Million Colors (24 bit)" item.
Now you can save the images as full color 24 bit RGB
BMP files,
and Transmogrifier will automatically make an optimal
color palette and internally convert them to 8 bit images for you.
- Once you're done editing the images,
don't forget to save them all back to the same files where they came from!
- Now you can go back to Transmogrifier, and import the files back in to see your changes!
Select the "flamingo813554" file in the
main Transmogrifier window,
and press the
"Import Object File..." button.
A standard "Open" file dialog will pop up,
starting in the same directory you saved the file (if you haven't quit Transmogrifier),
prompting you to select the
XML file
that you exported.
Please be sure to select "flamingo813554" from the file list before pressing "Import Object File...",
then select the corresponding XML file "flamingo813554.xml" that you previously exported:
- Once you press the "Open" button of the Open file dialog,
the
"Import Progress"
window will pop up, and
the importer will read in the
XML file.
That tells it the names of all of the
BMP files
that it tries to import back in, generating the smaller
zooms
and
color palettes
as necessary.
Luckily for you, it remembers all the exporter settings in the XML file,
so it can go ahead and import everything without quizzing you.
- The
"Import Progress"
window pops up and displays the ongoing progress of the import process.
Once the importer is finished, press the "OK" button
on the "Import Progress" window to get rid of it.
But first you might want to scroll through the diagnostic output
to see if there were any errors or warnings.
- Now you can finally view the object to see if it worked!
Press the "View Object..." button on the main Transmogrifier window, to pop up the
"View Object"
dialog,
and take a look at the various
zooms
and
rotations.
The flamingo has only one
graphical state,
but for objects with more states, you should check out all the
different zooms and rotations of all the different states.
The grid shows you where where the object will appear on the tile.
You can click on the picture of the flamingo to change the background from white to black and back again.
Notice how the anti-aliased edges blend into both the white and black backgrounds
without any unsightly fringes or jaggies.
There are some other controls for adjusting the offsets and flip flags of the draw groups,
which will be explained in a later tutorial.
- Now that you've cloned the pink flamingo and changed its color to green,
it's time to test it out in the game! But first, make sure to quit Transmogrifier
before starting The Sims, since they can't both open the same files at the same time.
- Select a family and go into buy mode. Click on the decoration category icon (a hanging picture frame).
The green flamingo's catalog icon should show up near the beginning of the product list,
since it's so cheap, and the list is sorted by price.
- Click on the green flamingo icon
(the pink one should still be there, unchanged),
and look at the catalog description and the price,
to make sure they're right.
- Now drag a new green flamingo out into the yard, and place it somewhere on the ground outside.
It will be tinted red when you're not allowed to place it,
and you can only place it outside on the terrain of the first floor.
Hopefully you also have enough money to afford it!
- Place a green flamingo nearby your Sims, and see how your family reacts!
They might walk over to it and express their approval or disapproval by displaying the speech icon,
which should now be green instead of pink.
Now check out the different zooms and rotations!
- Whether or not the Sims like an object depends on their personality,
as well as the cost of the object.
So don't feel bad if they reject the first custom object you made for them by hand.
Some Sims are just fickle, and will never appreciate all the hard work you've gone through
to make them a nice inexpensive green flamingo.
Next time you can make them an extremely expensive golden flamingo,
and see if they like that better.
- Last but not least, here are the most important instructions of all:
Be creative,
have fun,
stop whining,
share your creations,
give credit to the original artists,
and please play together nicely!