Hard Light Productions Forums

Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Luke on August 17, 2013, 04:43:08 am

Title: Video subtitle via script (or any other solution)
Post by: Luke on August 17, 2013, 04:43:08 am
Hi all

To the mods: is this the wrong place for my question, please move it to the right place.

I am working as programmer since a really long time, but i am not familiar with the FSO engine or modding.

We on WingCenter searching for a solution to build in subtitles in videos (but without editing the videos) for our translation project, started last year. I heard that it's possible with a "LUA script". I read here several postings/threads about this, but this doesn't help. I have no idea how this must be made. And i don't know is this possible with WCS.

Exists there any examples/documentation for code-controlled-subtitles for FSO?
Title: Re: Video subtitle via script (or any other solution)
Post by: The E on August 17, 2013, 05:49:37 am
There is, at this time, no interface to do this. Our scripting engine (and by extension WCS' as well) is currently not being run during movie playback (In-Engine cutscenes that are rendered in real time are a different matter, of course. Implementing subtitles there is trivial).

Also note that even if we decide to implement such functionality, it wouldn't help WCS, as they have an engine that is vastly different from ours by now (They forked the engine years ago, and we've made quite a lot of changes since then that they haven't copied, and they've made quite a lot of changes to fit their game better that we have no access to).
Title: Re: Video subtitle via script (or any other solution)
Post by: Luke on August 17, 2013, 06:38:53 am
Thx for the answer The E.

Ok, then for the movie playback we need to edit the videos directly. Not what i want, but okay, that's a clear statement i was searching for. ;-)

About the In-Engine cutscenes, you say it is trivial. Is there an example? And, do you know is this possible with WCS?
Title: Re: Video subtitle via script (or any other solution)
Post by: The E on August 17, 2013, 06:53:04 am
During in-engine cutscenes, one can use the built-in functions to display subtitles, or make subtitle cards as images and display them via sexps.

For example:
Title: Re: Video subtitle via script (or any other solution)
Post by: Luke on August 17, 2013, 07:00:43 am
That's exactly what i want.

But i repeat, i am a bloody FSO newbie, i have absolutely no idea how this can be made. Is there any text/script example?

A great video btw!  :)
Title: Re: Video subtitle via script (or any other solution)
Post by: The E on August 17, 2013, 07:06:13 am
For in-engine cutscenes, you can use the "show-subtitle" sexp in order to display any subtitle you want (This obviously means you'll have to edit the mission file).

I am not sure whether WCS already has the distinction between show-subtitle-text and show-subtitle-image that we have, you'll have to check that for yourself.
Title: Re: Video subtitle via script (or any other solution)
Post by: Luke on August 17, 2013, 06:05:36 pm
I don't know what "sexp" is, but "show-subtitle" and "edit the mission file" pointed me to the right location. Now we can translate the existing subtitles.

Thx for your help  :)