TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Tue Jul 23, 2019 11:16 pm

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Editing captions
PostPosted: Sun Apr 21, 2019 10:45 pm 
Offline
Brachiosaurus
Brachiosaurus
User avatar

Joined: Sat Mar 07, 2009 2:56 pm
Posts: 109
Location: Czech republic
Is there any comprehensive tutorial how to edit/change captions (subtitles) in Trespasser? I know how to edit hints and the tutorial via the CE patch, but what about those in TPA files?

_________________
"To defeat an enemy, you must know them. Not simply their battle tactics, but their history, philosophy, art." - Grand Admiral Thrawn


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Sun Apr 21, 2019 11:37 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
A program could be written to do that, but at the moment there isn't one. I think TSord's
Trespasser Sound Editor might have had something like that in mind, but I never could get
that program to load, let alone run.

I imagine either I or machf could do it, but I won't have any free time until next weekend;
I wouldn't know how much free time machf might have. What is your intent anyways? Use
a different language?


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Sun Apr 21, 2019 11:47 pm 
Offline
Brachiosaurus
Brachiosaurus
User avatar

Joined: Sat Mar 07, 2009 2:56 pm
Posts: 109
Location: Czech republic
Yeah, I would like to translate it into my native language. But there's no need to hurry. I was just wondering if it's even possible to do.

_________________
"To defeat an enemy, you must know them. Not simply their battle tactics, but their history, philosophy, art." - Grand Admiral Thrawn


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Mon Apr 22, 2019 6:06 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 11476
Location: Lima, Peru
The simplest solution is extracting everything to .CAU files, editing the captions for those .CAU files, and assembling back the .TPA files. We'd need a way to keep track of the original sound IDs, though...

_________________
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


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Tue Apr 23, 2019 11:32 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
machf wrote:
The simplest solution is extracting everything to .CAU files, editing the captions for those .CAU files, and assembling back the .TPA files. We'd need a way to keep track of the original sound IDs, though...


Ya, I'm thinking something along those lines, a little different, but pretty much the same. The program (let's call it 'caption_editor'), would load the tpa, displaying the captions. In another edit cntl, type in the replacement words, export that as a cau file assigned with the ingame Id sample name (not that difficult to do). Once you've exported all the new .cau files, use tpa player's *caus_to_*eel function, then use the *eel to *tpa function to create the new tpa file. Of course, you'd also export those files (like music) that don't have captions attached too, and the few samples that we may not have the Ids to would simply export as unknown_1, unknown_2 etc.

I may screw around with this concept when the weekend comes 'round. Just thinking about it while daydreaming while at work today, I came to the conclusion that it'd be a nightmare attempting to replace and readjust the sample' size inside the tpa, and updating all the offsets for each entry affected. Not to mention you'd be copying and/or rewriting the tpa after every entry; way too slow and problematic -


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Wed Apr 24, 2019 1:35 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 11476
Location: Lima, Peru
The ideal way is to make an .eel file but using the sound hashes instead of the sound names, that way it doesn't matter if we don't know the name used for a sound in the .TPA file. And I had asked Lee some time ago if he could make it so that EffectsEditor could process such modified .eel files... maybe listing the sound hash between triangular brackets (< and >) to differentiate it from sound names.

Also, keep in mind that, when you extract the sounds from a .tpa file to .cau files, the name that ought to be used should be a reference to the sound sample number, not the sound ID (name) number (since the same sound sample can be referenced by multiple sound IDs), and the .eel file should be generated at the same time...

_________________
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


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Wed Apr 24, 2019 4:51 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11692
Location: Portland, OR
I thought TPA Reader could already do this?

_________________
Image
Image Image T-Script Reference / Trespasser Millennium / JP Dark Secrets / Tres File Box


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Thu Apr 25, 2019 11:39 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
Quote:
Also, keep in mind that, when you extract the sounds from a .tpa file to .cau files, the name that ought to be used should be a reference to the sound sample number, not the sound ID (name) number (since the same sound sample can be referenced by multiple sound IDs), and the .eel file should be generated at the same time...


Err? I'm not following you, machf. If your intent is to say replace 'Welcome to the city of Tomorrow' and the Ingame string sample is VA11 (I actually don't recall the correct number that comes after VA**), you'd want the exported .cau file to be named that and then assigned to that sound being added to the *eel file so that when the new tpa is created (we're not editing the tpa being reviewed) the original string samples are still valid within the tscripts. Or, am I misunderstanding what you are laying out?

@Drac: The reader can assign new captions, yes, but to a wav file (convert button). So, you'd have to export the sound you'd want as a wave, then add the captions before you use the convert to export the .wav as a .cau. So, yeah, in a more drawn out process, you could do this with the reader, but it'd take considerably more time since you'd have to make certain that you are typing in the correct caption data. I think, but don't quote me on this since I may be wrong, but if you do save a sound as a wave file and it has attached captions, a companion txt file with said captions are exported along with the wav. Then, of course, after you did produce all the .cau files you needed, you'd have to either use the effects editor (or the player (I no longer recommend using the reader to build tpa files) to add all the .cau files 1 by 1, or as I mentioned above (if you name the .cau files appropriately), use .caus to *eel function to crank out the eel file so it can be used to create a new tpa.

No matter how this is done, it is time consuming. There's something like what, 450+ entries in the retail stream tpa file? That's alot of entries to go through, especially considering that most do indeed have captions attached to them.


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Fri Apr 26, 2019 1:50 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 11476
Location: Lima, Peru
Rebel wrote:
Quote:
Also, keep in mind that, when you extract the sounds from a .tpa file to .cau files, the name that ought to be used should be a reference to the sound sample number, not the sound ID (name) number (since the same sound sample can be referenced by multiple sound IDs), and the .eel file should be generated at the same time...


Err? I'm not following you, machf. If your intent is to say replace 'Welcome to the city of Tomorrow' and the Ingame string sample is VA11 (I actually don't recall the correct number that comes after VA**), you'd want the exported .cau file to be named that and then assigned to that sound being added to the *eel file so that when the new tpa is created (we're not editing the tpa being reviewed) the original string samples are still valid within the tscripts. Or, am I misunderstanding what you are laying out?

It's not quite like that. Look for example at the retail Effects.tpa file: Sound ID #3, "DRY FIRE A", points to the same Sound Sample as Sound ID #178, "GUN - AUTOMATIC DRYFIRE 01". And there are several more examples like that in the .TPA files of the various Trespasser builds. That's the reason why the number of Sound IDs (formerly "WTEs") in a .TPA file doesn't necessarily match the number of Sound Samples (formerly "WBblocks") in the same file. Since more than one Sound ID can point to the same Sound Sample, this inequality follows:
Code:
#SoundIDs >= #SoundSamples

If you extract a .CAU file for each Sound ID and assign it a name based on the Sound ID itself, you'll end up with some .CAU files that are identical, and once you rebuild a .tpa file from them, it will be unnecessarily larger than the original .TPA file. If you instead use the .TPA file name and Sound Sample # for the name of the .CAU file, you don't have that problem, and an .eel file is generated at the same time. Keep in mind that the .eel file can keep track of the .CAU file each Sound ID is pointing to, and so they have no problem whatsoever processing multiple Sound IDs pointing to the same .CAU file when building a .TPA file with Effects Editor...

And if you were able to use the Sound Hash instead of the actual Sound ID when generating the .eel file (and later loading it into Effects Editor), you wouldn't have to worry about any unknown Sound IDs, as the new .TPA file would just directly store the Sound Hash instead of having to recalculate it from the Sound ID... but as I said, that would require a modification of Effects Editor, which I have asked Lee about, but haven't had a reply yet, IIRC...

_________________
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


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Fri Apr 26, 2019 10:52 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
Yeah, but duplicate ids don't exist inside the stream tpa, so that really isn't a concern in as far as that
tpa. In as far as the effects.tpa pointing to the same samples, the only difference would be that you'd
have a few additional caus being added in the rebuild. The tpa would simply have a few duplicate sounds
that have different sample names attached to them. The end result would be that both the number of
entries and number of samples would match, just like the stream or menu tpa. It really isn't a problem
at all.


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Fri Apr 26, 2019 4:44 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 11476
Location: Lima, Peru
It may not be a problem quite, but it's wasted space... and keep in mind that aside from the "standard" voiceovers in the Stream.tpa file, there are other ones in Effects.tpa which have captions too...

_________________
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


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Fri Apr 26, 2019 7:19 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
Yeah, but the wasted space would be rather small, machf. Just a few kilobytes. Considering the size of
the tpas, it's rather miniscule.

I already have a working prototype, It's just not ready for primetime yet -


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Fri Apr 26, 2019 11:15 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 11476
Location: Lima, Peru
I'll eventually work on a program that dumps the contents of a .TPA file as a set of .CAU files and an .EEL file, anyway. I've had the idea for a long time, now after having handled that TPA udpater it's going to be easier since I can reuse parts of the code. And for the rest I can convert the code of my old QuickBASIC .CAU extractors... and instead of dumping the contents of the TPA file to a .CSV file, now I'll be dumping it to an .EEL file which is also text. Fairly easy.

_________________
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


Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Sat Apr 27, 2019 12:26 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 5342
Location: That country nobody likes (you know the one)
machf wrote:
I'll eventually work on a program that dumps the contents of a .TPA file as a set of .CAU files and an .EEL file, anyway. I've had the idea for a long time, now after having handled that TPA udpater it's going to be easier since I can reuse parts of the code. And for the rest I can convert the code of my old QuickBASIC .CAU extractors... and instead of dumping the contents of the TPA file to a .CSV file, now I'll be dumping it to an .EEL file which is also text. Fairly easy.


Well, it's a good think you're getting more involved with programming, machf. Who the hell knows how much longer I'll be alive. :lol:

Anyhoo, V.Alfa, the program in the zip below should be able to do what you want. But, I cannot stress this enough; please review the readme file in full.

I've tested the program on the ruins stream.tpa file, it only has 50 entries, but it seemed to work fine. Work on only 1 tpa at a time, otherwise you'll have cau files inside the caus_out folder that don't belong. Once you've completed the tpa review and added your new captions, then click the 'Done Button'.

You don't have to do this all at once, though you probably should. If you stop at say 100, when you reload the tpa file again, type in 101 and click 'set entry no#' button. That'll allow you to skip to where you stopped before and continue from there.

Everything you need to know should be either in the instructions pasted on the program's window, or inside the readme file. Again, please read it before you use the program -

*consider the program version 'alpha'


Attachments:
File comment: Caption_Editor _v1
Caption_Editor.zip [381.28 KiB]
Downloaded 33 times
Top
 Profile  
 
 Post subject: Re: Editing captions
PostPosted: Sat Apr 27, 2019 8:20 am 
Offline
Brachiosaurus
Brachiosaurus
User avatar

Joined: Sat Mar 07, 2009 2:56 pm
Posts: 109
Location: Czech republic
Thank you, Rebel. I'll try it and let you know.

_________________
"To defeat an enemy, you must know them. Not simply their battle tactics, but their history, philosophy, art." - Grand Admiral Thrawn


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group