Interleaf File

From LEGO Island Wiki
Revision as of 10:27, 20 July 2025 by Floriandotorg (talk | contribs) (Add more extra strings)
Jump to navigation Jump to search

An Interleaf File (extension .SI) is a general-purpose asset archive format designed for streaming from CD-ROM. It was developed by Mindscape for use throughout LEGO Island.

Overview

The Interleaf file format was originally thought to be exclusive to LEGO Island, but has since also been discovered in earlier Mindscape games called Warhammer: Shadow of the Horned Rat and Chessmaster 5000. Regardless, it remains an extremely obscure format and therefore is not well documented. All information known about this format has been through reverse engineering or interviews with game developers.

Interleaf files are derived from the Resource Interchange File Format standard (best known as the basis of Audio Video Interleave and WAV files). They are comprised of various LEGO Island-specific structures (such as MxDa and MxCh), however these structures usually contain standard format file data (such as PCM WAV audio and Windows BMP images).

The primary purpose of Interleaf files is to split various file formats into smaller chunks that are interleaved together so they can all be read as one continuous stream. For example, a chunk of voice data may be followed by a chunk of matching animation data or a bitmapped graphic. This is done to reduce the amount of seeking around the disc for assets since CD-ROM speeds of the era were generally very slow and end-user hard drive space was usually too limited to store much game data.

Interleaf files were produced internally with a tool called Weaver, however this tool has never been publicly released or leaked.

Version

Interleaf files went through a number of revisions, as indicated by this error message that's thrown if an SI version doesn't match:

Error. Wrong SI file version. 2.2 expected.

The SI version is set in an SI file's MxHd section. The version used in both retail versions is 2.2.

Below is a table of known SI file versions:

Known Interleaf/SI file versions
Version Known usage
1.0 Warhammer: Shadow of the Horned Rat, Chestmaster 5000, LEGO Island (July 1996 build)
2.2 LEGO Island (final)

Modification

As aforementioned, no official documentation of Interleaf files has ever been released. There are a handful of tools for working with them (e.g. LEGO Island Rebuilder), but none with a complete implementation. Therefore, manual hex editing is often used to replace or extract assets.

When working with Interleaf files, this interleaving needs to be taken account as it will dictate how the data is both extracted and inserted. One file stream may be separated into several chunks with chunks of other files interleaved between them.

Since audio is stored in PCM, Interleaf files can be crudely listened to using Audacity's "Import Raw Data" feature. SI audio is always uncompressed mono PCM and is either 11025 Hz and 16-bit or 22050 Hz and 8-bit. Unfortunately, due to the aforementioned chunked/interleaved nature of SI files, the audio retrieved through this method will be noticeably glitchy and will require further processing (removal of chunk headers and any non-audio chunks) to extract clean PCM data.

Extra string

Each object in the Interleaf file can have an extra string where additional information is stored. It is a list of key-value-pairs, although some keys do not use values and the keys are case-insensitive. To get each pair the string is split along one of the following characters:

Each item can then either be just present or have a value. In some cases, the value can be further split with : or ;.

This is an incomplete list of existing extra information and their meaning:

Key Description Valid values Example
Images
VISIBILITY Makes the image by default invisible/disabled when set to FALSE FALSE Visibility:FALSE
BMP_ISMAP Does not draw the image and is only used to map a position to an value (e.g. to determine what is clicked) BMP_ISMAP
Sound
SOUND Makes the sound by default muted/disabled when set to FALSE FALSE Sound:FALSE
Models
DB_CREATE Spawns the model at the giving location Name of the model in WORLD.WDB DB_CREATE:ambul
Animations
PTATCAM Point object to camera (used on the isle so that actors look at the player) HEAD PTATCAM:HEAD
Dialogs
Actor Name Attaches a phoneme (face animation) or sound to the actor Any valid actor name brickstr
Path actors
PATH Determines the location of the actor name of boundary, source edge, source scale, destination edge, destination scale Path:EDG03_34;2;0.60;0;0.40
Controls
VISIBILITY Makes the control by default invisible/disabled when set to FALSE FALSE VISIBILITY:FALSE
STYLE Can specify how the controls handles a mouse click. MAP and GRID support additional values MAP, GRID, TOGGLE Style:Grid;2;2
Meters (speed/fuel)
FILLER_INDEX Used in meters (speed/fuel) to set the color for the fill used from the image's palette A number between 1 and 255 Filler_index:160
TYPE Determines in which direction the meter is filled. Even though all four directions are recognized RIGHT_TO_LEFT and TOP_TO_BOTTOM are not fully implemented LEFT_TO_RIGHT, BOTTOM_TO_TOP, RIGHT_TO_LEFT, TOP_TO_BOTTOM Type:bottom_to_top
VARIABLE Specifies the variable which is used The name of the variable Variable:jetFUEL
Currently Unknown
World World:current, World:BLDH
Object Object:Act2Actor
HIDE_ON_STOP HIDE_ON_STOP
COLLIDE_BOX COLLIDE_BOX
Speed Any non-negative floating pointer number Speed:0.0
Animation Animation:Cm_Walk;1.0
AUTO_CREATE AUTO_CREATE:Cm
Mute Mute
Comp Comp:1
Map_Locator Map_Locator:Studs_Locator
Map_Geometry Map_Geometry:-900;1100;480;720;150;118;366;216
Action Action:openram
Triggers_Source Triggers_Source:\\Lego\\Scripts\\Race\\CarRaceR
INFOHAT INFOHAT
Must_Succeed Must_Succeed

Note: Action names are case-sensitive and are not cased consistently (e.g. OBject:LegoRaceCar, Auto_create:actor_02).

See also