TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: Subtitles in cut-scene

  1. #1
    Member
    Registered: Dec 2007
    Location: Sweden

    Subtitles in cut-scene

    As the topic says. Is it possible with a script to add subtitles in a video cut-scene?

  2. #2
    Master Builder 2018
    Registered: Jul 2008
    Yes. New Dark has built in subtitles. Look in your root folder for the subfolder called "doc". In there you will see two files "subtitles.txt" and "subtitles-sample.sub". Read those to get the basics. You can apply subtitles to movies and adjust the timing as needed.

    It's explained fairly well in the docs, but one thing I had trouble understanding at first is how they are triggered, but it turns out to be very simple. They are automatically triggered when the associated sound/movie file is played. You don't need a conversation to trigger them, and the timing is all done within your own custom subtitles.sub file that you will create as you go along. It's easiest just to copy the examples given in "subtitles-sample.sub" and fill in your own lines.

    Another option is to use Telliamed's Onscreen Text script. Russ has a great tutorial for that here.

  3. #3
    Member
    Registered: Dec 2007
    Location: Sweden
    Thanks for the answer. The first suggestion, do that work with more languages? I will look it up.

    *EDIT*
    OK, looked in the subtitles-sample.sub file, that was much text. It looks really advanced. Maybe it's looks harder than it is.
    Last edited by Beltzer; 11th Oct 2019 at 17:00.

  4. #4
    Master Builder 2018
    Registered: Jul 2008
    Yes, it looks harder than it really is. Just read it through once and then maybe try using the "subtitles-sample.sub" and substituting your own text for one of them.

    And yes, you can have any language you want. Just make a subfolder called "subtitles" and in that subfolder have a folder for each language. For example,

    \Subtitles
    \English
    mysubtitles.sub (written in English)
    \French
    mysubtitles.sub (written in French)
    \German
    mysubtitles.sub (written in German)
    ... etc.

  5. #5
    Member
    Registered: Dec 2007
    Location: Sweden
    I looked in a FM and figured it out
    Last edited by Beltzer; 12th Oct 2019 at 03:28.

  6. #6
    Member
    Registered: Apr 2011
    Quote Originally Posted by Beltzer View Post
    As the topic says. Is it possible with a script to add subtitles in a video cut-scene?
    Note that for movies you can also use the common .srt format; many video players and tools support this (try googling for "srt editor" for example), which can be easier than writing the timings manually into a text file.

    Heres an example .srt file from a mission of mine, and heres the corresponding entry in the .sub file that tells Newdark to use it.

  7. #7
    Member
    Registered: Dec 2007
    Location: Sweden
    Thanks. All help is appreciated

  8. #8
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany

    Q

    Quote Originally Posted by Tannar View Post
    you can have any language you want. Just make a subfolder called "subtitles" and in that subfolder have a folder for each language. For example,

    \Subtitles
    \English
    mysubtitles.sub (written in English)
    \French
    mysubtitles.sub (written in French)
    \German
    mysubtitles.sub (written in German)
    ... etc.
    As is generally known books, objectives and other STR files with special characters must be DOS-encoded.

    How about those SUB files?
    My FM campaigns Garrett's Young Years XTra, Reunion With Basso
    Want your upcoming FM translated in foreign languages?

  9. #9
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Quote Originally Posted by zappenduster View Post
    As is generally known books, objectives and other STR files with special characters must be DOS-encoded.
    Specifically, Dark strings use CP 850.

    https://en.wikipedia.org/wiki/Code_page_850

  10. #10
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany

    Quote Originally Posted by ZylonBane View Post
    Specifically, Dark strings use CP 850.

    https://en.wikipedia.org/wiki/Code_page_850
    OK thanks ... but how about those SUB files?

  11. #11
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Dragonsreach
    I would assume they use the same, even though that support was added in NewDark.

  12. #12
    Member
    Registered: Nov 2001
    Location: Lille, France
    I've made some tests and I work on PSpad, set it to OEM by default. The special characters are not totally displayed (in briefing cutscene) such as , , , , are considered like e, i,u a... is well displayed.

    The good part is there's no blank space, e.g Chteau is not displayed as Ch teau but like Chateau. So it's OK. Totally acceptable.

    OEM (default) or OEM Latin 1(850) doesn't make any difference.
    I use OEM (Default) for books.(STR)


    There's one thing that is bothering : The colours.

    Background is black, it's ugly. So I set to be transparent.

    BUT, when the cutscene is white, you can't see the white letters, so I set it to be yellow.

    USER.CFG

    enable_subtitles
    subtitles_show_descr
    subtitles_font_dir intrface\
    subtitles_font_name fontaa29
    subtitles_color_player 0 255 255
    subtitles_color_convo 255 255 255
    subtitles_color_bark 255 255 255
    subtitles_color_urgent 255 0 0
    subtitles_color_fx 255 0 0
    subtitles_color_movie 255 255 0
    subtitles_bg_color 0 0 0 90
    subtitles_bg_textwidth
    movsubtitles_bg_textwidth
    movsubtitles_bg_color 0 0 0 0
    Can an author set it with the colours of his/her choice for his/her FM?
    Last edited by Stefan_Key; 28th Oct 2019 at 06:43.
    For a true and 1st quality work, I translate FMs in french without using Google Translate!! No cheat, just brain.

  13. #13
    Member
    Registered: Dec 2007
    Location: Sweden
    Thanks Stefan. I used that in my cfg file Much better.

  14. #14
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Does fontaa29 even include the entire CP850 character set? LGS may have only included the bare minimum international characters to support the official localizations.

  15. #15
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany

    Quote Originally Posted by Stefan_Key View Post
    I've made some tests [...] the special characters are not totally displayed (in briefing cutscene) such as , , , , are considered like e, i,u a... is well displayed.

    The good part is there's no blank space, e.g Chteau is not displayed as Ch teau but like Chateau. So it's OK. Totally acceptable.
    I knew it would be more complicated. I knew it.

    For me it's not optimal. As a non-native french speaker it is hard to read a text without special characters. Apart from that many words with or without accent have different meanings (la/l, tache/tche, ...).

    And I still don't know whether our german characters ////// will be displayed.
    @Stefan: Did you make a test mission for that which I could try myself?

    @Beltzer: I'll upload the changes where all SUB files are encoded like the STRs ("850"). Then I'd like to test the display function with your latest beta version. If it doesn't work I'll have to convert ////// into ae/oe/ue/AE/OE/UE/ss.

    After that I'll know it once and for all future translations ...
    My FM campaigns Garrett's Young Years XTra, Reunion With Basso
    Want your upcoming FM translated in foreign languages?

  16. #16
    Member
    Registered: Dec 2007
    Location: Sweden
    zappenduster: If you send me the files, i could add them and send you a link, just for testing. So it's correct in the next beta.

  17. #17
    Member
    Registered: Nov 2001
    Location: Lille, France
    Quote Originally Posted by zappenduster View Post
    I knew it would be more complicated. I knew it.

    For me it's not optimal. As a non-native french speaker it is hard to read a text without special characters. Apart from that many words with or without accent have different meanings (la/l, tache/tche, ...).

    And I still don't know whether our german characters ////// will be displayed.
    @Stefan: Did you make a test mission for that which I could try myself?
    Well, you can understand with the general sentence meaning.
    ("La" is always followed by a name, and "tche" is "task")

    I've tested with Beltzer's files.

    In fact, you can test with whatever files you want : just an avi file and a sub file with the same name. For instance, b20.avi (in movies folder) and b20.sub (in subtitles folder).

    Don't forget to activate subtitles in the user.cfg. And set a loooonnnggg time, so you can check what letters do what...

    Now I will test thoroughly with those french letters :
    And with capital letters :

    EDIT :

    In testing, small letters look like small capitals and capitals are bigger :

    Wrote through PSPad (OEM) and then watched the movie.

    ===> (In movie) a a e e e e u i i

    ===> (In movie) o -empty- -empty- E -empty- -empty- -empty- -empty-

    Only appears like an E.

    Some letters (, ) are not used in french, anyway.

    Hope it helps...
    Last edited by Stefan_Key; 28th Oct 2019 at 06:44.
    For a true and 1st quality work, I translate FMs in french without using Google Translate!! No cheat, just brain.

  18. #18
    Member
    Registered: Apr 2011
    Quote Originally Posted by zappenduster View Post
    OK thanks ... but how about those SUB files?
    Yes: .sub and .srt files use the same encoding as books.

    For English, French, German, Italian, use CP 850. For Russian, use Windows-1251.

    (I had the same questions while building Making a Profit, and used the above encodings and verified subtitles all displayed correctly in the various retail and fanpatched editions of the gameall with NewDark ofc.)

    Quote Originally Posted by Stefan_Key View Post
    Can an author set it with the colours of his/her choice for his/her FM?
    Yes: with NewDark, you can configure these in fm.cfg for your FM, and they will be used unless the user has put their own settings in user.cfg. (I take it this is what Beltzer has done?)

  19. #19
    Member
    Registered: Dec 2007
    Location: Sweden
    Quote Originally Posted by vfig View Post
    Yes: with NewDark, you can configure these in fm.cfg for your FM, and they will be used unless the user has put their own settings in user.cfg. (I take it this is what Beltzer has done?)
    Yes, i have done that.

  20. #20
    Member
    Registered: Dec 2004
    Location: Germany
    I have used Notepad++ and a character encoding of OEM Codepage 850 to check out foreign characters in FM movie subtitles, and my findings are different from Stefan_Key's.

    The german special characters () are all correctly displayed in a movie subtitle.

    From the french accented characters, all lowercase variants of accented a, e, i, o, u are displayed correctly, as well as the character (with the curved "tail"). From the uppercase characters, only and are displayed. The other uppercase accented (or diacritic) letters are not displayed and may even ruin text formatting of the whole paragraph. I think one needs to use the non-accented versions of these letters, then.

    A quick check with more foreign letters showed that at least one (I did not check which one it was) even shuts down the subtitle displaying system temporarily (until the next movie in the mission(s)).

    When using Notepad++, it is important to change to the right codepage before writing anything new into a text or strings file, otherwise characters may change when finally switching the codepage.


    A while back, I also noticed that NewDark processes subtitles in a different way compared to other texts (in folders books, strings, intrface). At least with a former version of NewDark, I had to include "empty" subtitles for any language that was used in a FM, but should not be subtitled. For example, if there's an english movie, and german subtitles are desired, I had to put in empty english subtitles as well. If I did not, NewDark displayed the german subtitles for english language as well.

    An "empty" subtitle means that one includes a file with everything in it except for the text istself. Technically, one tells the game to display an empty string ("") instead of a subtitle ("Tonight I have an easy job to do.").

    Example: For the first movie in the "Keeper of Infinity" campaign, an english subtitles file (e.g., movies.sub) might look like this:

    SUB1

    // Subtitles file for first briefing movie (B21.AVI) in KoI mission 2.

    {
    type "movie"
    multisub "movie/b21"
    {

    { Time 6798 Length 6000 text "Last night, I met the Keeper Adar in an alleyway." }
    // (More entries for the rest of the text here.)
    }
    }


    An "empty" subtitles file contains the whole structure of a normal one, but no text:

    SUB1

    // Subtitles file for first briefing movie (B21.AVI) in KoI mission 2.

    {
    type "movie"
    multisub "movie/b21"
    {
    { Time 6798 Length 6000 text "" }

    }
    }


    Only one empty text is needed; you may leave out all others.

    I do not know whether that is still needed for NewDark v1.27.
    Last edited by baeuchlein; 22nd Oct 2019 at 16:09.

  21. #21
    Member
    Registered: Dec 2007
    Location: Sweden
    Is there a way to make subtitles contrast? Like a border surrounding all letters.

  22. #22
    Member
    Registered: Nov 2001
    Location: Lille, France
    Quote Originally Posted by vfig
    Yes: with NewDark, you can configure these in fm.cfg for your FM, and they will be used unless the user has put their own settings in user.cfg. (I take it this is what Beltzer has done?)
    Does it mean that the player has only to write in his/her user.cfg enable_subtitles, at least, without the other lines?

    Quote Originally Posted by baeuchlein
    From the french accented characters, all lowercase variants of accented a, e, i, o, u are displayed correctly, as well as the character (with the curved "tail"). From the uppercase characters, only and are displayed.
    We have the same results.
    Last edited by Stefan_Key; 28th Oct 2019 at 06:44.
    For a true and 1st quality work, I translate FMs in french without using Google Translate!! No cheat, just brain.

  23. #23
    Member
    Registered: Dec 2004
    Location: Germany
    Quote Originally Posted by Stefan_Key View Post
    Does it mean that the player has only to write in his/her user.cfg enable_subtitles, at least, without the other lines?
    Yes. If you only write the line enable_subtitles, you will already get subtitles. However, I also recommend placing subtitles_show_descr in the same file. This puts a name before the subtitle shown, which is the only way to tell the player who says what in a conversation, unless the FM author has also defined colors for the subtitles. A third configuration option is enable_subtitles 0 (that "0" is the number zero, not the letter O), which switches off subtitles.

    You can put these two lines into user.cfg, but you can also put them into cam_ext.cfg. Furthermore, a mission author may also place these lines in a fm.cfg file in the FM's main directory. Changes in fm.cfg are only effective in the FM or campaign in which they are included, not in other FM's or in OM's. This opens up some interesting possibilities.

    A setting in the player's user.cfg has highest priority, then comes a fm.cfg of a FM, and then comes the player's cam_ext.cfg. So, if the player has defined his preferred subtitle settings in cam_ext.cfg, a FM author can still override them with a fm.cfg file. If the player instead defines something in user.cfg, a FM author cannot change this with an appropriate setting in fm.cfg.

    This can be relevant if the player has subtitles for the original game enabled with T2Fix, and the player plays a FM which uses .wav files with the same filename as some .wav's from the original game, but without subtitles. One such example is Cardia's "Les Paolis", where the player gets subtitles for some of Garrett's remarks in the OM's. Placing a fm.cfg with the line enable_subtitles 0 in the FM's main directory shuts off subtitles if the player has subtitle configuration defined in cam_ext.cfg, which gets rid of the annoying subtitles displayed there. However, if the subtitle configuration is placed in user.cfg instead, the fm.cfg setting is ignored, and the player still gets weird subtitles in some places of the "Les Paolis" campaign.

    Since T2Fix places the subtitle configutation in user.cfg, a standard installation of Thief 2 upgraded to NewDark v1.27 with T2Fix and with the T2 subtitles installed as well will still display subtitles which don't fit in "Les Paolis" even with the fm.cfg file proposed above. I believe that this problem is present with several other FM's as well, since I have looked into some of them and found that the author had used .wav files with the same name as some files in the original games.

    By the way, you can also disable new_mantle in a FM or campaign by placing enable new_mantle 0 in a FM's fm.cfg file, with the same results (and config file hierarchy). Might be useful for missions where new_mantle is not desired, such as FM's made for OldDark.

    Quote Originally Posted by Stefan_Key View Post
    We have the same results.
    Really? If I understand you correctly, you wrote "" (as in "Chteau") in a subtitle file, but got "a" ("Chateau") displayed in the subtitles instead. I was able to see a "real" "" (with accent intact) in the displayed subtitles, as planned.
    Last edited by baeuchlein; 23rd Oct 2019 at 15:11.

  24. #24
    Member
    Registered: Nov 2001
    Location: Lille, France
    Thanks, I will try with Notepad++ then.

    Is a copy/paste from other files sufficient for sub files (or other str and such, like books and other readables)? Or should i rewrite them?

    Can you set Notepad++ with OEM Codepage 850 by default?

    Because I will only use Notepad++ for translating FMs.

    You have been very patient to test all of that!

  25. #25
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany
    AFAIK the letter can't be displayed in french texts. So you can only write "soeur" or "coeur" etc.

    BTW in Beltzer's FM which uses custom fonts I had to replace by ss, don't ask me why. So I'd recommend to test all characters under these circumstances in game.

    Quote Originally Posted by Stefan_Key View Post
    I will only use Notepad++ for translating FMs.
    Mais pourquoi ? With ParchEd or StrConv you have WYSIWYG text programs ...
    My FM campaigns Garrett's Young Years XTra, Reunion With Basso
    Want your upcoming FM translated in foreign languages?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •