Jump to content
The Dark Mod Forums

English Subtitles for AI Barks


Recommended Posts

FYI, as this project goes forward, I plan to work first on barks for which a text vocal script is available.

Complete bark text are available - via the wiki's "Voices" - for these:

  • The Thug [done]
  • The Grumbler
  • The Pro
  • The Mature Builder (Builder3)
  • The Young Builder (Builder4)
  • The Lord [done]
  • Simpleton
  • Average Jack
  • The Lady
  • The Wench
  • The Commander
  • The Moor
  • The Maiden

These vocal sets are also referenced under "Voices", but the bark text is missing:

  • Builder 1*
  • Builder 2*
  • The Drunk
  • The Cynic
  • The Lady02
  • The Critic

(*Incomplete vocal set text available, referred to as:

Additional vocal sets not referenced under "Voices" (low priority for me):

  • player [mainly various grunts]
  • raven
  • horse
  • generic
  • elemental
  • spider
  • revenant
  • zombie

If you have bark text for any of the missing vocal sets, please get me a copy. Thanks.

  • Like 1
Link to comment
Share on other sites

Question: If an fm author overrides an ai bark with it's own soundfile by using the same filename (assuming this goes this way), does the core subtitle still apply?

Edit: maybe it is set in the sndshd file(s). Still same question.

Edited by datiswous
  • Like 1
Link to comment
Share on other sites

You'd certainly want that override to happen. I don't know if it does. You could try a test by providing an override .ogg & subtitle.

Specifically, as an override target, in 2.11, Dragofer provided a dozen subtitles for The Cynic voice as part of the core; see tdm_sound_vocals_decls01.pk4\subtitles\tdm_ai_cynic.subs.

If you want to make a version of my testSubtitles... FM specifically for these dozen, here is content for an appropriate fm_test_subtitles_shaders.sndshd:


// This content is generated; change only if necessary.
// It has custom sound shaders to aid development of subtitles for The Dark Mod (TDM).
// See project: //forums.thedarkmod.com/index.php?/topic/21740-english-subtitles-for-ai-barks/
// It's meant to be used ONLY with an instance of FM 'testSubtitles', typically renamed for a
// particular AI vocal set, and referred to here as <fm>.
// File deployment location: <fm>/sound/ or below.
// Typical file name: fm_test_subtitles_shaders.sndshd
// Only the file extension is prescribed.
// The sound shader prefix below (fm_test_subtitles_shader) should match that #defined in the <fm>'s .script file.

// IMPORTANT: See bottom of this file for the note about MAX_SHADER_NUMBER.

// All TDM sound shaders here use defaults for everything: minDistance, maxDistance, volume, etc.
// The starting (zero) shader is for a special sound indicating start of list, used with all sets of audio samples.

fm_test_subtitles_shader0    { sound / subtitle_list_start_hit_high01.ogg }

// The remaining shaders wrap sound files to be played along with their subtitles under test.
// These .ogg & .wav files are in an expected location,
// either within this fm, or within a .pk4 of the standard tdm distribution.

fm_test_subtitles_shader1    { sound/voices/cynic/tdm_ai_berny_combat_hit_player_company01.ogg }
fm_test_subtitles_shader2    { sound/voices/cynic/tdm_ai_berny_combat_hit_player_company02.ogg }
fm_test_subtitles_shader3    { sound/voices/cynic/tdm_ai_berny_combat_hit_player01.ogg }
fm_test_subtitles_shader4    { sound/voices/cynic/tdm_ai_berny_combat_hit_player02.ogg }
fm_test_subtitles_shader5    { sound/voices/cynic/tdm_ai_berny_combat_throw01.ogg }
fm_test_subtitles_shader6    { sound/voices/cynic/tdm_ai_berny_combat_melee01.ogg }
fm_test_subtitles_shader7    { sound/voices/cynic/tdm_ai_berny_combat_melee02.ogg }
fm_test_subtitles_shader8    { sound/voices/cynic/tdm_ai_berny_combat_melee03.ogg }
fm_test_subtitles_shader9    { sound/voices/cynic/tdm_ai_berny_combat_melee05.ogg }
fm_test_subtitles_shader10    { sound/voices/cynic/tdm_ai_berny_enemy_out_of_reach01.ogg }
fm_test_subtitles_shader11    { sound/voices/cynic/tdm_ai_berny_enemy_out_of_reach02_2.ogg }
fm_test_subtitles_shader12    { sound/voices/cynic/tdm_ai_berny_enemy_out_of_reach03.ogg }

// Change corresponding value in this test app's .script file to:
// #define MAX_SHADER_NUMBER 12

BTW, this voice is used by two AI characters:

  1. tdm_ai_guard_citywatch (defined in tdm_ai_humanoid_guards01\def\tdm_ai_guard_citywatch.def)
  2. tdm_ai_thief (in tdm_ai_humanoid_guards01\def\tdm_ai_thief.def)
  • Like 1
Link to comment
Share on other sites

The Wench voice is the first one I've tackled that actually needs some audio clips to be done with srt.

For that, I've downloaded and installed "Cadet", free captioning software produced by public TV station WGBH in Boston. Working with one clip, I was able to produce a srt file. Painful process, though. I clearly need to look at more Cadet tutorials....🤔

  • Like 1
Link to comment
Share on other sites

On 3/9/2023 at 10:19 PM, datiswous said:

Question: If an fm author overrides an ai bark with it's own soundfile by using the same filename (assuming this goes this way), does the core subtitle still apply?

Yes, the original subtitle would apply.

What is really bad is that you cannot override subtitle for one sound easily.
Now you can override one decl, but a decl often contains many subtitles.

  • Like 1
  • Sad 1
Link to comment
Share on other sites

On 3/11/2023 at 6:09 PM, Geep said:

The Wench voice is the first one I've tackled that actually needs some audio clips to be done with srt.

For that, I've downloaded and installed "Cadet", free captioning software produced by public TV station WGBH in Boston. Working with one clip, I was able to produce a srt file. Painful process, though. I clearly need to look at more Cadet tutorials....🤔

Have you seen this topic?

I recommend you to use Kdenlive for positioning the subtitles in the right place. Pretty easy.



Edited by datiswous
  • Like 2
Link to comment
Share on other sites

I actually tested multiple subtitle editors before sticking to this one.

Btw. with the scrollwheel you can move back and forward on the track. With Ctrl + scrollwheel you can zoom in. Also, when you want to edit a subtitle, you first have to click inside the edit subtitle area before you can type, otherwise you get a warning.

Link to comment
Share on other sites

Good to know. It will probably be Thursday/Friday before I get to this.

Quick question. There seems to be two popular styles of adding a leading speaker ID. With colon, e.g. "Jack: " and in parentheses, e.g. "(Jack) ". With a TDM conversation, at the start of an srt, what style do you like?

For both styles, general subtitling recommendations seem to say to put the ID on the first line by itself. For TDM, that might have to be amended to "...except where the subtitle phrase doesn't fit entirely on the second line."

BTW, for barks, I'm assuming the ideal max line length is 42 characters/line.

Link to comment
Share on other sites

On 3/3/2023 at 7:52 PM, Geep said:

Testing FM (now with instructions also in Objectives, as requested by @datiswous). Assumes TDM 2.11


I noticed you centered the subtitles. Problem is, already created subtitles don't always fully fit in that box, so some words at the end of long sentences are not visible anymore. So for my own testing I removed tdm_subtitles_common.gui .

Link to comment
Share on other sites

Posted (edited)

@datiswous, the centering of the subtitles was the stock tdm_subtitles_common default, so I left it that way with my The Lord customization. I'm not sure centering (versus, say, left justification) is really the issue with respect to subtitles fitting in the box.

To that point, as a demonstration with testSubtitlesLord, I used rather aggressive side margins of 170 (so a field width of 300), which can just-barely accommodate 42 characters/line. But that means, depending on word breaks, some lines with 42 or 41 characters will force an autobreak, as it sounds like you observed.

While margins of 170 is the minimum required to avoid overlap with fully-enlarged inventory icons, I think such overlap is less critical than avoiding unwanted word-wrap. So going with margins of 160 & field width of 320 is better going forward, while still avoiding the egregious overlap of the stock tdm_subtitles_common.

Can you live with a character-length restriction of 42 characters/line? I think (given 2 lines) that should be adequate for almost all srt phrases that are limited to about 6 seconds.

Another approach to strike a balance between margin overlap and word-wrap would be to reduce the font scale slightly.

And in the long run, it would probably be desirable to have a CVar that the user could use to scale both font size and corresponding field height & width (and probably interfield vertical spacing). This could be shown as part of the HUD Settings special screen, even if internally it is a separate layer. Then the user could find their own compromise.

EDIT: I'll copy this to the "futures" thread, given the "long run" ideas.

Edited by Geep
  • Like 1
Link to comment
Share on other sites

Posted (edited)

Another utility program, "findToolLongSubtitles", is now available:
Win executable
C++ source code file

It is described in the latter as:

// findTooLongSubtitles.cpp  By Geep, March, 2023, for The Dark Mod, under the terms of its open-source license.

// Purpose: Given a particular subtitle maximum fieldwidth, evaluates TDM subtitles - contained in .subs and .srt files -
// and reports those that don't fit. Assumes a maximum 2-line subtitle field. If a subtitle doesn't currently fit
// (or suboptimally relies on auto-word-wrap to fit), but could be made good by inserting or adjusting a linebreak,
// locations where that break could be positioned are shown.

// This program only examines a single folder at a time for contained .subs and .srt files. If your FM has these files in
// multiple places, run this program more than once.

// For an "inline" subtitle, a string-embedded "\n" causes a manual linebreak. When shown in this program's output,
// that subtitle has 2 lines, as in the game. This allows use of a common output routine for inline & srt subtitles.

// Console program invocation:
// findTooLongSubtitles -m maxSubtitleCharsPerLine [default is 42] -d dirWithSoundFiles [default is current dir] -o output file [default is stdout]

// Build: Requires C++ 17 or later


For example outputs, evaluating subtitles found in the 2.11 releases of FMs New Job and St. Lucia against a proposed 42-character fieldwidth, see here.


Edited by Geep
Add link to example outputs
  • Like 1
Link to comment
Share on other sites

FYI, as I work on The Wench, I'm adopting the following style to using parentheses. This differs in my earlier treatment for The Thug and The Lord, where square brackets were more frequent, with a different meaning. (I plan to revisit those subtitles for this and other reasons, after The Wench).

[Fragment from my eventual style guide:]

TO BE DETERMINED: Some styles of including a speaker ID in a subtitle use parentheses or square brackets. This is not important for subtitling barks, but may be for “verbosity story” subtitles.

Parentheses. These are used to refer to what the AI is saying/vocalizing. The most common purpose is:

  • Descriptors for non-word vocalizations that are not otherwise represented, e.g., (coughing) (sneezes)

Other purposes, used sparingly, are:

  • Descriptors for vocal style or sound quality, e.g., (sing-song) (hoarsely)
  • Indicating the speaker’s physical or emotional state, e.g. (surprised) (sleepily) (drowning)
  • Providing stage directions or context, e.g., talking (to buddy)
  • Indicating the speaker is actually talking in a foreign language, though shown in English.

As the examples indicate, the text within parentheses should be all-lower-case and relatively short (for CPS/WPM considerations). If it refers to the entire phrase, put it at the beginning, and, if using a verb, favor the “...ing” form, e.g. (humming). If it refers to a particular location within the sound file, if using a verb, favor the active-form, e.g., (hums). For a long sound, consider indicating its conclusion: (humming done) or (/humming).

Do NOT use parentheses (or square brackets) to enclose speech to indicate:

  • whispering or sotto-voce. Instead, add a prefix word (whispers), (whispering), (confidentially), etc.
  • asides by the speaker. Dashes can be helpful to set off such speech, or an embedded “(aside)”.

Be modest in indicating the loudness of a bark; while the voice tone can be evident, the actual volume that a bark is emitted is not under the subtitler’s control.

Square Brackets. These are:

  • Mainly reserved for future “verbosity effects” sounds.
  • Can be used for non-vocal sound included with a bark clip, whether associated with the AI or not, but important enough to warrant a subtitle mention. This will be rare. Example: [claps].

Curly Braces. TDM fonts do not support these.


  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • MayheM

      Hello, Since this track is originally from TDM,i think it's better to ask here than TTLG. Do you guys have the full version of this ambient track?
      · 2 replies
    • DeTeEff

      Bachelor Mapping Challenge!
      The girlfriend will be away to her mum's place for almost a week, which means more mapping time for me! I'm planning a speed build. Hope it will go my way
      I'm starting by downloading 2.11. Don't know if I'm going to use any fancy new stuff. Just want to crack those itching map muscles that has gone dry and dead since almost a year's worth of no-mapping
      · 3 replies
    • kano

      The cool part of Canonical's Snap, is that my machine can now ray-trace an entire (simple) scene faster than it takes the web browser to start!
      · 5 replies
    • datiswous

      Fm idea (braindump)
      "Experience the life of a mission builder"
      Esentially there are finnished elements placed somewhere in storage in the game and you have to place them in the correct places, build some walls here and there, add guard routes, give them their correct speech lines, etc. Decorate the places.. all in-game. lots of fun.. 😉
      If you do it right in the end you can play the mission.
      (would be even cooler if a thief-ai could play the mission, making it some kind of tower-defence game)
      This first started as an idea for an aquarium builder mission where-in you have to fill an empty aquarium with sand, waterplants, castles water and swimming fish. But above idea is more fun.
      · 4 replies
    • JackFarmer

      Dear ChatGPT, What are The Builders in the Dark Mod?
      The Builders is a popular game mode in the video game community called "Dark Mod," which is a fan-made tribute to the classic "Thief" series of stealth games. In this game mode, players assume the role of builders who construct structures in a dark and ominous environment while trying to avoid detection by patrolling guards.
      The Builders game mode is unique in that it offers players the opportunity to create and design their own levels using the in-game tools and resources provided. Players can experiment with different building materials, construct intricate traps and puzzles, and create their own unique gameplay experiences.
      While The Builders game mode is not an official part of the Dark Mod, it has become one of the most popular and well-loved aspects of the game, thanks to its emphasis on creativity, strategy, and stealth.
      You guys did not know that, did you?
      · 2 replies
  • Create New...