Page 2 of 2

Re: Editing captions

Posted: Sun Apr 28, 2019 6:39 pm
by Rebel
I've posted the final version of this below (in zips). Some minor cosmetic and code changes,
though nothing worth the time to type. I did have a version of this that exported a new tpa
file, but compared to the effects_editor, it was way slow. So, I added the effects_editor into
the program's folder so the few people that may use this do not have to go and look for the
effects_editor, it's right there for you (the ef.editor is Lee's version). If anyone's interested,
the code is in a separate zip -

Re: Editing captions

Posted: Sat May 04, 2019 6:51 pm
by Rebel
I know that there isn't much interest to this, but I . . .

Reintroduced the auto-creation of a tpa file. The eel file is still outputted, but it is more of a backup
than a necessity. Tpa file creation (eg. 129mbs) will only take a second or two now and is compar-
ble to the speed of the Effects_Editor. I also compared the files against one another, one outputted
by the Effects_Editor and the other with the Caption_Editor. Byte for byte, they matched exactly -

Both the *eel and *tpa files are created once the 'DONE BUTTON' is clicked (with a messagebox
inbetween). The tpa file is created directly from caus being read out from the directory, (that'd be
the caus_out folder) but the program still outputs the *eel file for Effects_Editor use.

*Updated program tested on my windows 7 32bit machine only

I'll probably add this caus_to_tpa function to the tpa player at some point, but I don't have a hell
of a lot of time these days. But, I will get around to it -

Re: Editing captions

Posted: Mon May 06, 2019 7:15 am
by Draconisaurus
Rebel, I am just glad you started posting around here again, thanks!

Re: Editing captions

Posted: Wed Dec 30, 2020 12:27 am
by Rebel
Just out of curiosity did anyone ever rewrite the captions on any of the tpas?

Re: Editing captions

Posted: Wed Dec 30, 2020 12:57 pm
by tatu
I don't think so. Maybe we should start making "Unofficial" translations and have on TresCom? :P

Re: Editing captions

Posted: Wed Dec 30, 2020 1:09 pm
by Rebel
If I was fluent in another language I'd do the stream myself, but alas, I only know 2 languages, English and
bad English.

Re: Editing captions

Posted: Wed Dec 30, 2020 1:25 pm
by tatu
Rebel wrote:If I was fluent in another language I'd do the stream myself, but alas, I only know 2 languages, English and
bad English.
"Simple English" ;)
Maybe one day I tackle to translate it into Swedish, even though I dislike having Swedish subtitles even in movies, I prefer English ones.

Re: Editing captions

Posted: Thu Dec 31, 2020 4:26 pm
by LIX666
tatu wrote:
Rebel wrote:If I was fluent in another language I'd do the stream myself, but alas, I only know 2 languages, English and
bad English.
"Simple English" ;)
Maybe one day I tackle to translate it into Swedish, even though I dislike having Swedish subtitles even in movies, I prefer English ones.

i dont think i would ever want the original english content translated into croatian... i had a lot of trouble reading official translations of some literary epics and had to switch to english in order to better immerse myself in the book, especially because the names were being translated and that just takes away from the experience.

Re: Editing captions

Posted: Thu Dec 31, 2020 4:38 pm
by tatu
LIX666 wrote:
tatu wrote:
Rebel wrote:If I was fluent in another language I'd do the stream myself, but alas, I only know 2 languages, English and
bad English.
"Simple English" ;)
Maybe one day I tackle to translate it into Swedish, even though I dislike having Swedish subtitles even in movies, I prefer English ones.

i dont think i would ever want the original english content translated into croatian... i had a lot of trouble reading official translations of some literary epics and had to switch to english in order to better immerse myself in the book, especially because the names were being translated and that just takes away from the experience.
Oh I am with you. Even with books I prefer to read them in English, it just sounds weird in Swedish!

Re: Editing captions

Posted: Thu Dec 31, 2020 5:34 pm
by Rebel
I was thinking Spanish since so many people speak it. Even where I live in Pa., I hear Spanish almost as often as I do
English. I just never had a desire to learn a different language, or a pressing need to.

Re: Editing captions

Posted: Thu Dec 31, 2020 6:31 pm
by Draconisaurus
Hmm uh. Do the Irish speak Irish these days or is it all English?

Re: Editing captions

Posted: Thu Dec 31, 2020 6:35 pm
by tatu
Rebel wrote:I was thinking Spanish since so many people speak it. Even where I live in Pa., I hear Spanish almost as often as I do
English. I just never had a desire to learn a different language, or a pressing need to.
We could probably upload the Spanish TPAs for people to download. I think those has Spanish subtitles as well?

Re: Editing captions

Posted: Thu Dec 31, 2020 6:46 pm
by machf
No, no captions whatsoever, just dubbed voiceovers.

Re: Editing captions

Posted: Mon Jun 14, 2021 8:57 pm
by cynodesmus
Rebel wrote:I know that there isn't much interest to this, but I . . .
Interest may arise at the most unexpected moment. :)

Is it possible to unload titles into a single text file, separated by special characters. And, the possibility of embedding back the already translated text?

Much the same as with subtitles in the mkv container.
That is, the sequence number in the container for the sound to be changed will be indicated in the unloaded / loaded file. The phrases are separated by line feeds. Phrase completion - setting a special character that means the end of the test for this sound.
Rebel wrote:Just out of curiosity did anyone ever rewrite the captions on any of the tpas?
I started to translate into Russian. To warm up, I started with one of the mods.
True, while I was practicing using programs not from this topic, but - TPA_Reader and TPA_Player. For a not very large-scale project - feasible, but for a long time. Since you have to do a lot of the same type of operations, at the same time, make sure that you do not accidentally change the wrong file.
Now I want to try the program from this topic, since I aimed at the sound bank of the main game (I translated the text a long time ago, it remains to implement it in *.cau).

The only thing there is a nuance that everyone who wants to translate into a language that uses a character code table different from US and Western Europe will face.
Spoiler: show
Apparently, this has been the case since the main game in 1998, since in the version released in Russia, the translators had to create a special font, and write the localization text based on the use of this font.
I suspect that tpass-ce is rigidly tied to the c_1252.nls file, regardless of the regional settings of the system, or the parameters specified in the Windows registry.
I have not seen the source code, but I suspect that somewhere there is a hard-coded parameter responsible for the used code table.
There are 2 options for solving this problem.

1) "Simple" in implementation, but has a serious disadvantage. The user must have local administrator rights on the computer being used. The user must replace the c_1252.nls code table file with the one used in his regional system settings in accordance with the ANSI identifier (GetACP). The localizers that released the version of the game in Russia did not take such a step, since it is bad form to change the system files of the user's operating system without his knowledge. Therefore, they tried to go the other way (drawing their own font, etc.)
However, this method is still practiced by users (however, usually it is enough to change the regional settings in the system, or change the registry settings. Replacing system files is used in especially difficult cases). Microsoft promised to fix the problem with region code tables and did a little bit with it ... but didn’t solve it 100%

2) It is necessary to make changes to the source code of the program, removing the hard link to the file of the code table used in the USA and Western Europe (c_1252.nls). Either use the parameter specified in the registry, or take the necessary values ​​from the * .ini file.
Or, compile several versions of the program for each code table: 874, 932, 936, 949, 950, 1251, 1252, 1253, 1254, 1255, 1256, 1257.
machf wrote:No, no captions whatsoever, just dubbed voiceovers.
Voice acting is already attracting people with a suitable voice. Good reproduction of intonation ... This all requires material investment.
People are not always willing to donate to such projects. Alas.
Especially when a lot of time has passed since the release.
If there was a re-release in GOG - maybe it could improve the situation.

There is an option using voice engines. Some even sound good. And, the demo mode allows you to read out a fairly large amount of text. But, there are nuances associated with licensing agreements. And getting the right intonation from the voice engine is not always so easy. For a small project - maybe, but for a large one .... not sure.

Re: Editing captions

Posted: Tue Jun 15, 2021 9:19 am
by cynodesmus
Rebel wrote:If I was fluent in another language I'd do the stream myself, but alas, I only know 2 languages, English and
bad English.
I had plans to translate into RussianTresCom Ops Anthology (Act I-IV)

And, in any case, the localization of the mod is also associated with the localization of the TPA file of the main game (those same 450 lines)

But, TPA_Reader - allows you to unload the entire array of text from TPA into one file. However, in the resulting file, titles are located in one line (which is convenient), but without special characters indicating a line feed when displayed on the screen.
Also, the strings are located in the ordinal location inside the TPA (very often, phrases are related to each other in meaning - this simplifies translation if you translate a single array of text). But, TPA_Player - creates wav files by assigning only names to them, as a result of which their sorting is already broken. And, additional control is needed when choosing a file.

Also, I noticed that Stream.tpa uses different control codes (https://www.aivosto.com/articles/contro ... cters.html). Perhaps they are somehow related to the duration of the display of text on the screen during the game.
For example VA214.cau this is the text line is split into HEX values: 06, 0D, 17, 19. A value of 27 is probably a typo. I suspect that the developers of the game entered the text in one line, typing control codes with their hands ...
Also, in other files I have come across the control code "20" (in "VH66") ... Maybe some other control codes are involved. but it is necessary to revise all the files in the hex editor.

Unfortunately, all programs for working with TPA ignore these control codes when displaying them on the screen or unloading them into a text array.
As a result, the localizer will be forced to do the line splitting again on its own.