Jump to content
The Dark Mod Forums

2.10 Subtitles


boissiere
 Share

Recommended Posts

I thought I would try out the new subtitles feature in the 2.10 beta by developing the subtitle files for "A New Job". I already had the text of the conversations from my own abortive local attempt to add subtitles to TDM a couple of years ago so it wasn't too onerous. The subtitles system seems fairly solid with just a couple of wrinkles (detailed below).

If anyone wants to try this out then you will need to add the three attached files as follows.

Firstly, create two folders, "subtitles" and "guis", both directly under the "newjob" directory (under the "fms" folder). Copy the mainmenu_briefing.gui file into the "guis" directory and the other two files (briefing.srt and fm_root.subs) into the "subtitles" folder. The mainmenu_briefing.gui file is identical with the one that is included with the FM but includes two extra lines that #include the subtitles gui - without these lines you won't see subtitles in the initial briefing. Adding these lines to an overridden briefing gui probably needs adding to the wiki page.

Other wrinkles/comments

  • In the initial conversation between the two guards, the second guard's first (and only) utterance is too long to fit into the space allocated. One could use a .srt file for the relevant sound but this would seem to be overkill if an FM only had one or two sounds that were too long. A way to split up the 'inline' sounds would be a good improvement.
  • If you do a save when a subtitle is being displayed, when you load that save, the subtitle is still displayed but it never goes away. Further subtitles just get written on the top in a mishmash of letters.
  • What's the plan for localisation of subtitles? I tried using the same system as for other texts but it doesn't work, I suspect because the code isn't calling common->Translate when reading in the lines of the files.

mainmenu_briefing.gui briefing.srt fm_root.subs

  • Like 4
Link to comment
Share on other sites

If sound is too long for one line, then one can add "\n" to split a line into two.

If sound is too long for one message, then creating .srt file is the best idea.
Because if you split it into two messages, then there comes a question what timing to use for the split, and sooner or later someone will want to have the full power of .srt in .subtitles decl files, which I surely don't want.

There is no support for localization in subtitles yet.
In fact, the current localization system is very questionable. Mappers usually don't use it because it makes further mapping painful, and I don't understand whether these i18n packs are really used by players or not. Also, it uses a lot of huge perl scripts internally, which no developer wants to maintain. I'm afraid we'll have to rework the whole localization system before you see any localized subtitles, so it won't happen soon.

Regarding how to enable subtitles on the briefing page.
Mapper is expected to take mainmenu_briefing.gui file from the version of TDM he uses, then adjust it to create his own briefing. In 2.10, this file already enables subtitles, so mapper has nothing special to do. A mission originally made before 2.10 of course has mainmenu_briefing.gui without subtitles, so you need to add them.
I have added a sample on the wiki page.

Nice catch about saving/loading.
I assume it happens for in-game subtitles, right?

P.S. I'm trying to add subtitles to Saint Lucia right now.
@Springheel has just sent me proofread text, so hopefully they will officially be in the next beta.

  • Like 2
Link to comment
Share on other sites

Quote

I assume it happens for in-game subtitles, right?

Yes, though I've never tried quick-saving whilst a briefing is playing.

I thought that the major problem with the localisation system was the Dark Radiant didn't understand it and that the hash variables used weren't very flexible (i.e. integers only). Whatever is developed instead surely needs DR support too - however, maybe that's a discussion for TDM 2.11

Link to comment
Share on other sites

2 hours ago, boissiere said:

I thought that the major problem with the localisation system was the Dark Radiant didn't understand it and that the hash variables used weren't very flexible (i.e. integers only). Whatever is developed instead surely needs DR support too - however, maybe that's a discussion for TDM 2.11

That's discussion for a very uncertain time, I'd say.
The current system is so vast, that it takes a lot of courage and time to start reworking it.

I have the following ideas regarding localization:

  • Allow string placeholders in addition to numbers (in fact, we already have some in 2.10, and nothing broke)
  • Allow localization to replace by full-text match. That's crude, but mappers won't have to do anything to support such localization, and no changes are needed on DR side too.
  • Throw away perl scripts, and reduce script usage to minimum (which is hopefully zero).

 

  • Like 1
Link to comment
Share on other sites

I love to those subtitles.

The some things i do not like are:
(comparing with dutch tv subtitles)

  • that the most subtitle-fields with long sentences are almost screen-wide.
    To me, those are too wide.
    To me decent size is the one  0:35, fill that one with more sentences lines.
  • Background of the subtitle is transparent dark.
    Keep it only transparent, without a color.
  • And maybe another, not themed, font.
Edited by freyk
  • Like 1

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

10 minutes ago, freyk said:

Background of the subtitle is transparent dark.
Keep it only transparent, without a color.

A dark background is needed to make sure the text is always readable regardless of the image behind it.

  • Like 2
Link to comment
Share on other sites

2 hours ago, Dragofer said:

A dark background is needed to make sure the text is always readable regardless of the image behind it.

True.
But those dark background subtitles, remembers me of my early days of dutch television.
After some years they removed the background. (some examples)

Its always funny to see the differences in Dutch-, Belgian- and English subtitles.
I did not know that there are standard dutch guidelines for it.

Oh well, its nice to see we have finally got subtitles. It took some years😉

 

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

41 minutes ago, freyk said:
  • that the most subtitle-fields with long sentences are almost screen-wide.
    To me, those are too wide.
    To me decent size is the one  0:35, fill that one with more sentences lines.
  • And maybe another, not themed, font.

As for size, I'd be glad to hear more opinions.
Wide lines are used because this way it's possible to use large font, which can be nice for some people.

Quote

Background of the subtitle is transparent dark.
Keep it only transparent, without a color.

Definitely won't change that for the reason @Dragofer mentioned.

Link to comment
Share on other sites

22 minutes ago, JackFarmer said:

Will that also work with cinematic cameras (for example as in the starting scene in TBM)?

Yes, indeed.

You most definitely have sound samples for all the speech. If you assign subtitles to them, the engine will grab them while sound samples are playing. And you need to ensure that subtitles GUI overlay shows during these cutscenes, which I suppose just happens automatically.

  • Like 1
Link to comment
Share on other sites

Here is a suggestion of something for the future perhaps, now that subtitles are possible.

Fully Optional colored text (for fast gender differentiation) and tagged subtitles for the AI, to know who said what, imo with this TDM will become fully supportive of hearing impaired people and on my book that is always a good thing to strive for.

Just a example:

Spoiler

Colored text: (colors just a example, they can be others)

for women 

What's that noise? Who goes there?

for man

What's that noise? Who goes there?

////

Tagged text only:

Guard:  Who goes there? Is that a thief?

Guard:  Take that you fiend!

Priest: Builder be my strength!

Capitan: What are you doing about?! Go to your post!

Servant: This room is so dusty! And cold. 

Servant: Time to get the wine to my lord. 

////

Colored tagged text:

(tags can be generic like this or for better differentiation, numbered, perhaps even the character name)

Guard:  Who goes there? Is that a thief?

Guard:  Take that you fiend!

Priest: Builder be my strength!

Capitan: What are you doing about?! Go to your post!

Servant: This room is so dusty! And cold. 

Servant: Time to get the wine to my lord. 

 

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

1 hour ago, stgatilov said:

As for size, I'd be glad to hear more opinions.
Wide lines are used because this way it's possible to use large font, which can be nice for some people.

Can we set the subtitle width to be fraction of screen width, or, ideally, height?

E.g. 2/3 of width or 100% of height

  • Like 1
Link to comment
Share on other sites

8 hours ago, datiswous said:

I was recently playing the new mission from @Sotha and apparently it has subtitles for certain things ai say. Is this automatically applied? Or is it something already in tdm, but I never noticed it?

  Reveal hidden contents

deadeye_2021-12-31_20_53_44.thumb.jpg.95d9ca794e949e2400b3e560d5113a58.jpg

 

Oh yes, that's the new subtitles from core assets in 2.10.
I added a few subtitle lines for a particular AI for testing purposes.

In general, you can avoid such spam by keeping Subtitles setting at Story level in the main menu.

  • Like 3
Link to comment
Share on other sites

  • 1 year later...
On 12/28/2021 at 7:09 AM, stgatilov said:

Mapper is expected to take mainmenu_briefing.gui file from the version of TDM he uses, then adjust it to create his own briefing. In 2.10, this file already enables subtitles, so mapper has nothing special to do. A mission originally made before 2.10 of course has mainmenu_briefing.gui without subtitles, so you need to add them.

I made subtitles for Requiem and they work, but I did not add anything to the mainmenu_briefing.gui file that is included in the fm. How is that possible?

Link to comment
Share on other sites

I think that the mainmenu_briefing.gui change is only needed for briefings that are accompanied by a voice-over like the ones in the included missions 1 and 2.

  • Like 2

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

On 12/28/2021 at 7:09 AM, stgatilov said:

Regarding how to enable subtitles on the briefing page.
Mapper is expected to take mainmenu_briefing.gui file from the version of TDM he uses, then adjust it to create his own briefing. In 2.10, this file already enables subtitles, so mapper has nothing special to do.

If in mainmenu_custom_devs this is set:

#define ENABLE_MAINMENU_BRIEFING 0

Will mainmenu_briefing.gui still be used? Or maybe it doesn't matter. I just wonder what needs to be set if the fm creator has a video intro, with an audio file overriding the intro-speech and wants to set subtitles for that.

Link to comment
Share on other sites

6 hours ago, datiswous said:

If in mainmenu_custom_devs this is set:

#define ENABLE_MAINMENU_BRIEFING 0

Will mainmenu_briefing.gui still be used? Or maybe it doesn't matter.

I think it will be "used" in very little sense, but it will be skipped and you won't see it.

Quote

I just wonder what needs to be set if the fm creator has a video intro, with an audio file overriding the intro-speech and wants to set subtitles for that.

As far as I see, mainmenu_briefing_video.gui already includes subtitles code:

	//stgatilov #2454: display subtitles
	#define SUBTITLES_NAMEPREFIX BriefingVideo
	#include "guis/tdm_subtitles_common.gui"

So just adding subtitles for your audio file would be enough.
I guess sound from video file is also supported, just need to find the syntax on wiki.

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

23 hours ago, datiswous said:

Currently when subtitles don't work for some reason there is no warning or error in the console. Could this be added?

For a particular reason yes, it probably can be added, but "for some reason"?...
What exactly is the typical problem?
Syntax errors of .srt of .subs files not reported?

The engine has debug command com_showSoundDecoders, which displays all currently playing sounds on screen.
It should be easy to add a small tag here showing which sounds have subtitles and which not.

  • Like 2
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.

Guest
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.

 Share

  • Recent Status Updates

    • peter_spy

      Perhaps an unpopular opinion: TDM team might benefit from someone with actual QA experience; someone with naturally and professionally developed curiosity, who is interested in how and why things work, how they break At least to me it's kind of mind-boggling how untested some rather important features are (first the absence alert feature for items, now the rope +body carry behavior).
      · 4 replies
    • nbohr1more

      The Dark Mod is hosting an Ask Me Anything thread on the PC Gaming reddit forum:  https://www.reddit.com/r/pcgaming/comments/10nfcwj/hello_we_are_the_international_development_team/
      Feel free to join the discussion there
      · 2 replies
    • stgatilov

      Bumped into an interesting piece of wisdom called Hyrum's Law:
      With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.
      · 5 replies
    • The Black Arrow

      I love playing The Dark Mod when it's cold in my place. Bonus points when it's a bit (or even very) dark and it's raining, too.
      · 2 replies
    • The Black Arrow

      I've been having stutters in Vulkan, apparently it's Nvidia Drivers' fault, so I reverted to 512 according to this: https://www.nvidia.com/en-us/geforce/forums/geforce-graphics-cards/5/505679/regular-microstutter-in-vulkan-applications-after-/?topicPage=40

      And no, that did NOT fix it. What's going on? My GPU is an RTX 2070, by the way.
      · 4 replies
×
×
  • Create New...