Jump to content
The Dark Mod Forums

Subtitles - Possibilities Beyond 2.11


Geep

Recommended Posts

56 minutes ago, datiswous said:

Do subtitles for voice audio in non-video briefings actually work?

I have an instance where I can't get them to show up. Or I'm missing something.

Both "A New Job" and "Tears of St Lucia" use non-video briefings and have working subtitles. Perhaps one of the GUI defs in the mission is overriding something that subtitles require.

  • Like 1

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

6 hours ago, datiswous said:

Do subtitles for voice audio in non-video briefings actually work?

I have an instance where I can't get them to show up. Or I'm missing something.

Since briefing is completely redefined by you, you need to add subtitles GUI for them to show up.
See stock mainmenu_briefing.gui.

  • Like 1
Link to comment
Share on other sites

I added this to the included mainmenu_briefing.gui :

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

I thought that would do it..

Btw. this is for mission nhat. This section doesn't really need subtitles, because they are already included burned in the images, but I still want to figure out why it doesn't show up.

Edited by datiswous
Link to comment
Share on other sites

On 2/10/2024 at 2:57 PM, stgatilov said:

Some GUIs use some kind of pseudographics.
Reducing the spacing also breaks such readables.

Is this really a problem? Maybe we can figure that out before reverting the "J", which previously was so badly spaced it looked like it had a space character after it.

It would be helpful to identify which missions have such pseudographics. I suspect it's a small number. And those using Stone font smaller still.

In that regard, I did some preliminary experiments, limited to a cohort of 46 FMs on my machine with expanded FM .pk4s, that I can do full-text searches across files on, with TextPad. (@stgatilov, I imagine you are in a position to similarly and more conclusively search the entire english FM collection.)

I searched with characters (or short strings) that would be likely to be found in pseudographics. For untranslated FMs, I searched in filenames of form *.xd . For translated FMs (those that had string "#str_" in their *.xd; there were 8 such FMs in my cohort) I searched in file english.lang

Results

Many search strings were useless due to too many false hits:

"_" Widely used as part of internal xd name. Used on separate line as heading underscore.
"/" Widely used as part of internal xd name.
"\" (except "\\") Widely used \n or \" escape character
"--" (assuming single dash is everywhere) Several in a row to bracket a heading, or as part of a letter's signature.  Used on separate line, as heading underscore or as border between paragraphs

These search strings were moderately useful, showing up in just a few FMs (tho none were pseudographics on examination):

"=" Used on separate line as heading underscore (in penny3's erasing.xd)
"+" Used as bullet points, or (several in a row) to bracket a heading (in penny3's erasing.xd; in bcd's english.lang)

These search strings were most promising:

"|" Only 1 hit, but it's a table-form pseudographic! (northdale1's snowedinn.xd)
"\\" (i.e., escaped \) No hits found in my cohort

Inspection of snowedinn.xd showed this:

Spoiler

readables/snowedinn/candle_shop_ledger
{
    precache
    "num_pages"    : "1"
    "page1_left_title"    :
    {
        "               Sales Ledger"
        "************************"
    }
    "page1_left_body"    :
    {
        ""
        ""
        "         Item         |Gold  |qty"
        "-------------------------"
        "Skull candle    | 15g    | 3"
        "Silver lamp     |20g    | 2"
        "Small candle  |  8g      | 4 "
        "                             |            |"
        "                             |            |"
        "                             |            |"
        "                             |            |"
        "                             |            |"
        "                             |            |"
        "                             |            |"
        "                             |            |"
    }
    "page1_right_title"    :
    {
        ""
    }
    "page1_right_body"    :
    {
        ""
    }
    "gui_page1"    : "guis/readables/books/book_calig_mac_humaine.gui"
    "snd_page_turn"    : "readable_page_turn"
}


Note that it uses book_calig_mac_humaine.gui; so this pseudographic was not in Stone font

 

  • Like 1
Link to comment
Share on other sites

When I actually meant pseudographics, I did not mean some specific line/dots/crosses.
I simply meant the cases when people add spaces until the text gets the exact alignment they want.

You can't search for such cases, because the only offending character is space, which is present everywhere.
The only way to proceed to just change spacing and listen for feedback afterwards.
And it sounds like an OK solution for me in general, but definitely not a good idea for 2.12.

Link to comment
Share on other sites

23 hours ago, stgatilov said:

You can't search for such cases, because the only offending character is space, which is present everywhere.

I don't know what the target format looks like but we could use regular expression, I guess?

Quote followed by one or more spaces..

Quote followed by something that isn't a space followed by more than one space...

TDM Modpack

Link to comment
Share on other sites

It's hard. I see what you are thinking about is a "bullet point" pattern, with or without a bullet point character. For that case, I suppose what we are trying to detect is:

- the line starts with the bullet point pattern

- a "J" character (say) with a shortened spacing, is somewhere in the line.

- the line itself in the xd file is long enough to force a word wrap (let's just think about a single wrapping here)

- the author assumed a particular word wrap point, and put in extra spaces in mid-line, immediately at the wrap point, so as to indent the latter part of the line, aligning with the indent of the first part.

- the shortened-spacing J screws up the resulting alignment.

Probably would need a script/program to winnow this down... ideally, that algorithm could also restrict attention to just Stone font. I'm OK with putting such an effort off for now, maybe revisiting it for 2.13.

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

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.


  • Recent Status Updates

    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...