MTropolis/Subtitles

From ScummVM :: Wiki
< MTropolis
Revision as of 06:41, 12 August 2022 by OneEightHundred (talk | contribs) (Created page with "Subtitle add-ons for mTropolis use a multi-file CSV table format. All of the tables are mandatory and the filenames must be set during the engine's boot step. The subtit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Subtitle add-ons for mTropolis use a multi-file CSV table format. All of the tables are mandatory and the filenames must be set during the engine's boot step.

The subtitle system was developed for authoring in LibreOffice Calc, but other CSV-compatible editors may work. The CSV files are expected to be UTF-8 and trailing empty columns must not be skipped.

Speakers Mapping File

The speakers mapping file provides a single point of translation for subtitle speaker names. It has two columns:

  • speaker: The speaker ID. This can be anything as long as it's unique.
  • text: The text to display for of the name of the speaker.

Lines File

The lines file contains tracks of lines. Lines are grouped as "subtitle sets" and subtitle sets must be contiguous in the file.

  • subtitle_set_id: The ID of the subtitle set. This can be anything as long as it's unique.
  • text: The text to display for the line. Lines may be separated with a backslash character.
  • time: The time offset in seconds from the start of the sound or movie to display the line.
  • duration: The duration to display the line for. If this is left blank or set to 0, then the line displays until a new line replaces it, or until 3.5 seconds after the sound stops playing.
  • slot: The slot of the line. The default slot is 0. Only one line displays for a given slot at a time, so multiple slots allow multiple lines to be displayed at once.
  • speaker: The speaker ID of the speaker. If left blank, no speaker name will appear.
  • class: The class of the line. This can be left blank. Lines with the "gameplay" class will only display if the "Enable subtitles for important sound effects" option is checked.
  • position: The position of the line. This is expressed in vertical line heights and positive numbers are down. The subtitle box is bottom-aligned.

Asset Mapping File

The asset mapping file maps movie and sound assets to subtitles either by ID or asset name. Using asset name if possible is preferred as it may allow the same asset mapping to be used across multiple builds of the game.

It has 3 columns:

  • subtitle_set_id: The subtitle set ID to map the asset to.
  • asset_id: The decimal ID of the asset. If this is set to 0, or the asset is not found by ID, then the asset_name field will be used instead.
  • asset_name: The name of the asset.

Modifier Mapping File

The modifier mapping file maps MIDI and sound effect modifiers to subtitles. It has 2 columns:

  • subtitle_set_id: The subtitle set ID to map the modifier to.
  • modifier_guid: The hexadecimal GUID to map the modifier to.