The SPR2 tab panel

sprite tab panel

IFFSnooper SPR2 tab panel interface (IFFSnooper 1.1.9, MacOS X 10.2.8)

The Sims 1 uses sprite graphics to represent 3-D objects. Each object can be viewed at one of three zoom levels and one of four angles. For every tile in the object there are 12 possible views, and 12 potential sprite frames, but sometimes it is possible to save memory by using the same sprite for more than one frame. The collection of sprite frames make up an SPR2 resource.

In the preceding example the pagoda object has six frames in one SPR2 resource, which correspond to

Such a six frame SPR2 resource can provide all 12 views if half the views are drawn by flipping the frames.
Other objects may have three frames per SPR2 or twelve frames per SPR2.
Information on how to use the SPR2 resource to draw an object is stored separately, in a DGRP resource.

Sprite orientations are named for compatibility with the Windows program Transmogrifier, a.k.a. TMog.

Exporting images from SPR2 resources

Images cannot be edited within IFFSnooper so they need to be exported for editing elsewhere.

To export images from SPR2 resources select
Export -- Sprite Images

What Export -- Sprite Images does:
A typical SPR2 resource has the three channels (z-buffer, p-sprite and alpha channel) per sprite frame. The Export -- Sprite Images command exports all the channels from all the SPR2 resources into a series of folders.

sprite channels, TMog style
Example of sprite channels (original Maxis object).

If Settings -- View style Shadow has been selected on the SPR2 tab then the images will be saved as PICT files, without any file extension. If TMog style has been selected then the files will be saved as .BMP files with the appropriate extension.

i.e.

As an example, if we export sprite images from the object file NewSofa.iff

The default radio button setting is View -- TMog style.

Filename truncation

It is sometimes necessary to truncate the first part of the resource name so that it is displayable in all versions of the Mac OS Finder.

Transparent pixel

Exported sprites will have a background colour which corresponds to the transparent pixel value as defined in the SPR2 resource frame header. This is a palette entry which does not show up in game. This colour is often, but not always, yellow. The value used should not affect sprite import.

See the 7DS TMog tutorial for a more detailed explanation of the transparent colour (it's in step 11 "Making a palette for your lamp). This tutorial also explains how the alpha channel mask and z-buffer work.


Making new SPR2 resources

Importing modified channel images into SPR2 resources has been possible since IFFSnooper version 1.0.8. For SPR# resources see here.

If you have exported the SPR2 resources from an IFF file, and edited them, they can be reassembled by using
Import -- Sprite Image

This will bring up a new window which will display the imported sprites. If there are multiple imported sprite folders then you can use
Navigate -- Next Resource
and
Navigate -- Previous Resource
to view the different imported sprites.

Sprite import is currently limited to 20 imported folders at a time, since it is very memory-intensive. This is approximate, and you may find that you need to import smaller sets of folders in order to successfully export certain SPR2 resources.

imported sprite
Example of an imported sprite folder (original Maxis sprites).

You can edit the resource name and PALT ID# for each resource, otherwise the resource name is taken from the sprite image
e.g.
the SPR2 resource generated from
sprite-number-on_large_ne_a.bmp
sprite-number-on_large_ne_p.bmp
sprite-number-on_large_ne_z.bmp et al.
will be given the resource name
sprite number on
unless you change it to something else.

If you don't define the PALT ID numbers then they will be assigned in sequence, starting with ID # 0 for the first SPR2 resource. The SPR2 ID numbers are taken from the sprite#### folder names.

Once you have verified the sprites, you can encode them by clicking the Export All button or Save Resource button. This will encode the SPR2 resources, each with an associated PALT resource. The Export All button encodes and exports the resources for all the imported sprites into a resource folder. The Save Resource button encodes and exports individual SPR2 and PALT resources for a single sprite.

These resources can be incorporated into a new object file by dissassembling the target object, adding the new SPR2 resource(s) and PALT resource(s) to the folder of disassembled resources, and reassembling the object file.

The reassembled sprite position relative to the centre of its tile is specified by the DGRP resource; this can be altered on the DGRP tab panel.

Cloning an object with new sprite images

sample object
Example of a cloned object in game, made with IFFSnooper from original Maxis sprites.

Cloning an object requires the following steps at present:

The imported images must be in TMog style to import correctly.

The reassembled object will probably need a new catalog thumbnail BMP_ resource. This is best accomplished by deleting the BMP_ resources from the folder of disassembled resources, and letting the game build a new BMP_ resource for you.


About TMog

TMog was written by Don Hopkins, one of the original programmers for The Sims[TM], and is copyrighted by Electronic Arts.

The Transmogrifier site is here.


There is some more information about sprites here



Navigation

introduction

What are these resources?

Making new IFF files

Making Floor Tiles

Making Walls

Editing OBJD resources

Editing the GUID

Editing text strings

Editing draw groups

Editing sprites

Editing menu resources

Editing other resources