Editing captions

FAQ and tutorials on how to mod Trespasser. For viewing only.

Moderators: TresCom Support Team, TresCom Webteam, TresCom Board Managers, TresCom Developers

User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6121
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Re: Editing captions

Post 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 -
Attachments
ceditor_code_4-28-19.zip
Caption Editor (code only)
(62.34 KiB) Downloaded 508 times
Caption_Editor_v2.zip
Caption_Editorv2
(1.98 MiB) Downloaded 485 times
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6121
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Re: Editing captions

Post 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 -
Attachments
caption_editor_04release.7z
Caption_Editor_v4
(195.47 KiB) Downloaded 485 times
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14046
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Editing captions

Post by Draconisaurus »

Rebel, I am just glad you started posting around here again, thanks!
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6121
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Re: Editing captions

Post by Rebel »

Just out of curiosity did anyone ever rewrite the captions on any of the tpas?
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Editing captions

Post by tatu »

I don't think so. Maybe we should start making "Unofficial" translations and have on TresCom? :P
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6121
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Re: Editing captions

Post 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.
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Editing captions

Post 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.
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
LIX666
Stegosaurus
Stegosaurus
Posts: 59
Joined: Wed Sep 16, 2020 12:31 pm

Re: Editing captions

Post 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.
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Editing captions

Post 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!
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6121
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Re: Editing captions

Post 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.
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14046
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Editing captions

Post by Draconisaurus »

Hmm uh. Do the Irish speak Irish these days or is it all English?
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Editing captions

Post 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?
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Editing captions

Post by machf »

No, no captions whatsoever, just dubbed voiceovers.
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
cynodesmus
Dinosaur egg
Dinosaur egg
Posts: 9
Joined: Thu Jun 10, 2021 2:36 pm

Re: Editing captions

Post 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.
Last edited by cynodesmus on Tue Jun 15, 2021 9:53 am, edited 1 time in total.
cynodesmus
Dinosaur egg
Dinosaur egg
Posts: 9
Joined: Thu Jun 10, 2021 2:36 pm

Re: Editing captions

Post 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.
Post Reply