Directors Cut Wiki : TrailerFiles

DirectorsCutModdingFoundry Categories PageIndex RecentChanges RecentlyCommented Login/Register
Trail: OwnedPages FileFormats TarisonWiki ReshootHelp AnimEffects TextElement WantedPages TrailerFiles

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:
  1. 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.
  2. 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).
  3. Several small unknown blocks, always appearing to total 52 bytes in length.
  4. 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.
  5. The film's thumbnail in JPEG format, if one was taken.
  6. A complete list of all the custom music and sound files available, presumably used as a cache for the file list.
  7. 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.
OffsetData Type# BytesDescription
0x0000Integer4Always 17. This likely acts as a way for the game to identify the file as a TRL file.
0x0004Float[4]16Four 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.
0x0014Integer4Size of this header block, in bytes. This appears to always by 4256 (or 0x10A0).
0x0018Unicode Text520Name of movie.
0x0220Unicode Text520Name of movie, again. I'm not sure why this exists twice!
0x0428Integer4Number of scene blocks.
0x042CInteger4Number of actor blocks, not including the director role.
0x0430Integer4Unknown purpose. It appears to always be slightly larger than the number of scene blocks.
0x0434Unicode Text520If 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.
0x063CInteger or Float[3]12Unknown purpose.
0x0648Plain Text260Genre identifier. This is always one of "genre_action", "genre_comedy", "genre_horror", "genre_romance", or "genre_sci-fi".
0x074CUnicode Text520Studio name, as chosen in the game.
0x0954Plain Text260Film size.
0x0A58Plain Text260Film stock.
0x0B5CPlain Text260Type of camera.
0x0C60Plain Text260Type of sound.
0x0D64Plain Text260Type of camera rig.
0x0E68Integer4Unknown purpose.
0x0E6CInteger4Year of release (as mentioned in game time).
0x0E70Float[2]8Unknown purpose.
0x0E78Unicode Text520Full pathname of the last WMV file exported.
0x1080Integer[5]20Unknown purpose.
0x1094Plain Text12Language / 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.
  1. A header section with the in-game actor name and character name. It also contains some additional bits of data.
  2. 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.
  3. The actor icon image, in JPEG format.

The header section of the actor block is organized as follows:
OffsetData Type# BytesDescription
0x0004Integer4Size of this actors block, measured in bytes.
0x0008Integer[6]24Unknown. 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.
0x0020Unicode TextVariesIn-game name of actor. This is a zero-terminated Unicode string.
VariesUnicode TextVariesIn-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:
OffsetData Type# BytesDescription
0x0000Float4The in-game actor's experience rating for this genre. This is a value between 0 (not experienced) and 1 (fully experienced).
0x0004Plain TextVariesGenre 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:
OffsetData Type# BytesDescription
0x0000Integer4Block identifier, always a value of 8.
0x0004Integer4Size of this unknown block. This always seems to be 28.
0x0008Integer[5]20Five unknown integers.


Unknown block #2:
OffsetData Type# BytesDescription
0x0000Integer4Block identifier, always a value of 6.
0x0004Integer4Size of this unknown block. This always seems to be 16.
0x0008Integer[2]8Two unknown integers.


Unknown block #3:
OffsetData Type# BytesDescription
0x0000Integer4Block identifier, always a value of 3.
0x0004Integer4Size 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.
  1. A header section containing the scene, set, and backdrop information. It also contains the clipping information, and counts for the sections that follow.
  2. A list of slider values.
  3. A list of actors used in the scene.
  4. A list of props used as set dressing.
  5. A list of props that the actors can interact with (telephones, cars, cigarettes, guns, etc.)
  6. Free-cam position and orientation.

The header section of the scene block is organized as follows:
OffsetData Type# BytesDescription
0x0000Integer4Scene block identifier. This is always a value of 1.
0x0004Integer4Size of this complete scene block, measured in bytes.
0x0008Plain Text64Scene identifier.
0x0048Plain Text32Scene file to use (*.FLM file).
0x0068Plain Text32Mesh file to use for the set (*.MSH file).
0x0088Plain Text32Backdrop file to use (*.DDS file).
0x00A8Integer[3]12Unknown purpose.
0x00B4Integer4Clip front. This measures, in tenths of a second, how far into the clip to begin rendering this scene.
0x00B8Integer4Clip back. This measures, in tenths of a second, how far from the end of the clip to stop rendering this scene.
0x00BCInteger[6]24Unknown purpose.
0x00D4Integer4Number of slider values.
0x00D8Integer4Number of actors in this scene.
0x00DCInteger4Number of props used as set dressing.
0x00E0Integer4Number of props that actors can interact with.
0x00E4Integer4Unknown 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:
OffsetData Type# BytesDescription
0x0000Float4Slider value.
0x0004Plain Text260Slider 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:
OffsetData Type# BytesDescription
0x0000Float[5]20Unknown purpose.
0x0014Plain Text72If 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).
0x005CUnicode Text128In-game name of this actor.
0x00DCUnicode Text128In-game name of this character.
0x015CInteger[2]8Unknown purpose.
0x0164Float4Unknown purpose.
0x0168Integer4This looks like the length (measured in bytes) of the rest of the actor block (including this integer).
0x016CInteger4Unknown purpose.
0x0170Plain Text32Filename of base costume (*.COS file).
0x0190UnknownVariesThis 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:
OffsetData Type# BytesDescription
0x0000Plain Text32Filename of prop mesh (*.MSH file).
0x0020Float[12]48Position 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:
OffsetData Type# BytesDescription
0x0000Integer4Slot number for this prop.
0x0004Plain Text32Filename 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:
OffsetData Type# BytesDescription
0x0000Integer[16]64Unknown purpose. Usually all zeros?
0x0030Integer[3]12Not completely sure, but the second number here looks like a flag indicating whether Position 1 of the free-cam has been activated.
0x003CFloat[8]32Position and orientation information for Position 1 of the free-cam.
0x005CInteger[3]12The second number here looks like a flag indicating whether Position 2 of the free-cam has been activated.
0x0068Float[8]32Position and orientation information for Position 2 of the free-cam.

There are 639 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional Valid CSS Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1156 seconds