The Movies File Formats - Trailer Files (*.trl)
(started by rileyman)
These files contain most of the information needed for the game to render and export a single movie. The INI files of the same name contain the rest of the data, which includes extra audio information and visual fades. These are the files that are opened in both the Advanced Movie Maker (AMM) and Post Production (PP) buildings, as well as the Movie Player off the game's main menu.
TRL Files are organized in the following manner:
- A header block that contains global information about the movie. This includes the movie title, genre, studio name, type of film stock, and year of release.
- A list of actor blocks that indicate the in-game actor name and character name. Additional data appears to include aspects such as the actor's experience in each genre, and the in-game icon image in JPEG format. This only lists the actors that will get posted on the online film description (maximum of four entries).
- Several small unknown blocks, always appearing to total 52 bytes in length.
- A list of scene blocks that indicate most of the information needed to render each scene. This includes the set, scene, backdrop, slider values, actors used, set dressing, props, and free-cam information.
- The film's thumbnail in JPEG format, if one was taken.
- A complete list of all the custom music and sound files available, presumably used as a cache for the file list.
- A message digest block, always 1024 bytes in length. (identified by Reacher) It is believed this is generated using some kind of secure public key algorithm.
TRL Header Block
The following table provides the offsets for each piece of data stored in the opening portion of every TRL file.
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Always 17. This likely acts as a way for the game to identify the file as a TRL file. |
| 0x0004 | Float[4] | 16 | Four floating-point values, unknown purpose. It is possible this is the key information related to the message digest that appears at the end of the file. |
| 0x0014 | Integer | 4 | Size of this header block, in bytes. This appears to always by 4256 (or 0x10A0). |
| 0x0018 | Unicode Text | 520 | Name of movie. |
| 0x0220 | Unicode Text | 520 | Name of movie, again. I'm not sure why this exists twice! |
| 0x0428 | Integer | 4 | Number of scene blocks. |
| 0x042C | Integer | 4 | Number of actor blocks, not including the director role. |
| 0x0430 | Integer | 4 | Unknown purpose. It appears to always be slightly larger than the number of scene blocks. |
| 0x0434 | Unicode Text | 520 | If the film has been uploaded to TMO, this is the user account name. If not, it is the name of the studio head, as chosen in the game. |
| 0x063C | Integer or Float[3] | 12 | Unknown purpose. |
| 0x0648 | Plain Text | 260 | Genre identifier. This is always one of "genre_action", "genre_comedy", "genre_horror", "genre_romance", or "genre_sci-fi". |
| 0x074C | Unicode Text | 520 | Studio name, as chosen in the game. |
| 0x0954 | Plain Text | 260 | Film size. |
| 0x0A58 | Plain Text | 260 | Film stock. |
| 0x0B5C | Plain Text | 260 | Type of camera. |
| 0x0C60 | Plain Text | 260 | Type of sound. |
| 0x0D64 | Plain Text | 260 | Type of camera rig. |
| 0x0E68 | Integer | 4 | Unknown purpose. |
| 0x0E6C | Integer | 4 | Year of release (as mentioned in game time). |
| 0x0E70 | Float[2] | 8 | Unknown purpose. |
| 0x0E78 | Unicode Text | 520 | Full pathname of the last WMV file exported. |
| 0x1080 | Integer[5] | 20 | Unknown purpose. |
| 0x1094 | Plain Text | 12 | Language / locale identifier. This is typically "EN_US" or "EN_UK" for English copies of the game. |
TRL Actor Block
Each actor block appears to consist of three sections, as follows.
- A header section with the in-game actor name and character name. It also contains some additional bits of data.
- A list of genres, with an accompanying float value. As the float value is probably the actor's experience rating, it is likely this data is used to calculate the in-game star rating of the film.
- The actor icon image, in JPEG format.
The header section of the actor block is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0004 | Integer | 4 | Size of this actors block, measured in bytes. |
| 0x0008 | Integer[6] | 24 | Unknown. The third value seems to always be a value of 5; and thus might indicate the number of genres stored in the genre section. The fourth value appears to be the length of the actor icon image in bytes. |
| 0x0020 | Unicode Text | Varies | In-game name of actor. This is a zero-terminated Unicode string. |
| Varies | Unicode Text | Varies | In-game name of character. This is a zero-terminated Unicode string. |
The genre list section of the actor block contains one entry for each genre. Each entry is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Float | 4 | The in-game actor's experience rating for this genre. This is a value between 0 (not experienced) and 1 (fully experienced). |
| 0x0004 | Plain Text | Varies | Genre identifier. This is a zero-terminated string. |
The rest of the actor block contains the actor's icon image in JPEG format. If it does not end at a 4-byte boundary, it is padded with up to 3 extra zeroes.
TRL Unknown Blocks
Between the actor blocks and scene blocks exists a bunch of data always 52 bytes in length. It's likely this is actually three separate small blocks of data, because it follows the same basic structure as all other blocks (a block id, followed by the length of the block). This is speculation, but this appears to be organized as follows:
Unknown block #1:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Block identifier, always a value of 8. |
| 0x0004 | Integer | 4 | Size of this unknown block. This always seems to be 28. |
| 0x0008 | Integer[5] | 20 | Five unknown integers. |
Unknown block #2:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Block identifier, always a value of 6. |
| 0x0004 | Integer | 4 | Size of this unknown block. This always seems to be 16. |
| 0x0008 | Integer[2] | 8 | Two unknown integers. |
Unknown block #3:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Block identifier, always a value of 3. |
| 0x0004 | Integer | 4 | Size of this unknown block. This always seems to be 8. |
And yes, it seems the third unknown block is always essentially empty. There may be cases I simply haven't come across yet that provide more clues as to what these unknown blocks mean. It's also possible some of this is just remnants of game features that never got implemented, or were removed.
TRL Scene Block
Each scene block appears to consist of six sections, as follows.
- A header section containing the scene, set, and backdrop information. It also contains the clipping information, and counts for the sections that follow.
- A list of slider values.
- A list of actors used in the scene.
- A list of props used as set dressing.
- A list of props that the actors can interact with (telephones, cars, cigarettes, guns, etc.)
- Free-cam position and orientation.
The header section of the scene block is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Scene block identifier. This is always a value of 1. |
| 0x0004 | Integer | 4 | Size of this complete scene block, measured in bytes. |
| 0x0008 | Plain Text | 64 | Scene identifier. |
| 0x0048 | Plain Text | 32 | Scene file to use (*.FLM file). |
| 0x0068 | Plain Text | 32 | Mesh file to use for the set (*.MSH file). |
| 0x0088 | Plain Text | 32 | Backdrop file to use (*.DDS file). |
| 0x00A8 | Integer[3] | 12 | Unknown purpose. |
| 0x00B4 | Integer | 4 | Clip front. This measures, in tenths of a second, how far into the clip to begin rendering this scene. |
| 0x00B8 | Integer | 4 | Clip back. This measures, in tenths of a second, how far from the end of the clip to stop rendering this scene. |
| 0x00BC | Integer[6] | 24 | Unknown purpose. |
| 0x00D4 | Integer | 4 | Number of slider values. |
| 0x00D8 | Integer | 4 | Number of actors in this scene. |
| 0x00DC | Integer | 4 | Number of props used as set dressing. |
| 0x00E0 | Integer | 4 | Number of props that actors can interact with. |
| 0x00E4 | Integer | 4 | Unknown purpose. Appears to usually contain the value 14. |
Special Note: The "Clip front" and "Clip back" values will be zero if the scene was not clipped using the "Split Scene" button. They are integer values, and are measured in tenths of a second, starting at the endpoints of the scene's timeline.
It may be possible to determine the default length of each scene, as adjusted by the slider values, by inspecting the associated *.FLM file. If this is possible, then the Devil's Bookmark scenes (as termed by
JazzX, which appear as a black frame in the exported movie) could be identified programmatically. Devil's Bookmark scenes can be manually identified by looking at the "Clip back" value, and determining if it points to a position in the timeline before the "Clip front" value. Since you can't have a scene that ends before it begins, the game apparently gets confused when rendering the movie and just outputs black.
The slider list section of the scene block contains one entry for each slider value. Each entry is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Float | 4 | Slider value. |
| 0x0004 | Plain Text | 260 | Slider identifier. Typical values include "sld_location", "sld_duration", and "ai_stunt_fail". |
The actor list section of the scene block contains one entry for each actor appearing in the scene. Each entry is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Float[5] | 20 | Unknown purpose. |
| 0x0014 | Plain Text | 72 | If this actor was created through the Starmaker, this is the folder name (with the characters "ud_" attached to the front). Otherwise, it is the template name used by the game to create the actor (*.HD file). |
| 0x005C | Unicode Text | 128 | In-game name of this actor. |
| 0x00DC | Unicode Text | 128 | In-game name of this character. |
| 0x015C | Integer[2] | 8 | Unknown purpose. |
| 0x0164 | Float | 4 | Unknown purpose. |
| 0x0168 | Integer | 4 | This looks like the length (measured in bytes) of the rest of the actor block (including this integer). |
| 0x016C | Integer | 4 | Unknown purpose. |
| 0x0170 | Plain Text | 32 | Filename of base costume (*.COS file). |
| 0x0190 | Unknown | Varies | This block of data appears to hold a variety of integer, float and string values. Some of this data indicates the filenames of textures for the eyes and eyebrows, and the mesh used for the hair. Work will continue on trying to decipher the structure of this data. |
The set dressing props list of the scene block contains one entry for each prop placed in the scene. Each entry is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Plain Text | 32 | Filename of prop mesh (*.MSH file). |
| 0x0020 | Float[12] | 48 | Position and orientation information for this prop, organized into a standard transformation matrix. |
The interactive props list of the scene block contains one entry for each prop that interacts with an actor. Each entry is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer | 4 | Slot number for this prop. |
| 0x0004 | Plain Text | 32 | Filename of prop mesh (*.MSH file). |
The free-cam portion of the scene block is a little bit sketchy, but I think it is organized as follows:
| Offset | Data Type | # Bytes | Description |
| 0x0000 | Integer[16] | 64 | Unknown purpose. Usually all zeros? |
| 0x0030 | Integer[3] | 12 | Not completely sure, but the second number here looks like a flag indicating whether Position 1 of the free-cam has been activated. |
| 0x003C | Float[8] | 32 | Position and orientation information for Position 1 of the free-cam. |
| 0x005C | Integer[3] | 12 | The second number here looks like a flag indicating whether Position 2 of the free-cam has been activated. |
| 0x0068 | Float[8] | 32 | Position and orientation information for Position 2 of the free-cam. |
There are 639 comments on this page. [Display comments]