TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Thu Oct 18, 2018 4:05 am

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: tpa_caption reader
PostPosted: Tue Mar 16, 2010 10:29 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
It was originally designed to display the captions within the stream.tpa, hence the name. It'll also play the normal pcm wav files, export a single wav or mass export all wavs from any .tpa file. It's a gui interface (albeit a bland and boring one), so it's easy to use.

BUTTON CONTROLS:

LOAD TPA: DUH. DOES THAT -

SAVE WAV: SAVES THE CURRENT WAV PLAYED (OR WRITTEN BUT NOT PLAYED (IE. IMA ADPCMS))

EXPORT_ALL: EXPORTS ALL WAV FILES FROM A .TPA FILE

SET ID#: iNPUT A VALID INDEX NUMBER INTO EDITBOX | CLICK SET ID#, CLICK RIGHT ARROW KEY
TO MOVE TO THAT .TPA ENTRY (INDEX OR ENTRY # POSITION WITHIN .TPA).

RIGHT ARROW KEY: GO FORWARD THRU THE .TPA FILE

LEFT ARROW KEY: GO BACKWARDS THRU THE .TPA FILE (IF INDEX # IS GREATER THAN 1)

Other Notes: Mass_exported wavs are saved under the .tpa name loaded and numbered sequentially. Saved wavs are saved under the name [save000] and correspond to the index# they belong to. That's about it. The program itself is available on my temp page.

@EDIT: No one ever bothers to read the read_me files, so thanks to Andres, TSOrd n' PenguiN for the formats page and to Machf for maintaining and continually updating it with more accurate, complete information. He (Machf), and Big Red were also kind enough to test out the program, so I appreciated that too. :nerd:


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Wed Mar 17, 2010 6:07 am 
Offline
-=TresCom Website Manager=-
-=TresCom Website Manager=-
User avatar

Joined: Fri Jun 24, 2005 9:40 pm
Posts: 3333
Location: Sweden
Awesome! A funny and useful little tool you made! Thanks :D

_________________
"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."

"The main laboratory and administrative buildings. This is where we made our work, where the real magic trick happen. When they are in need of height fixing, they'll come here." - Hammond


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 19, 2010 2:55 pm 
Online
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11117
Location: Portland, OR
Another nice little treat to add to Tres CE.

Except... I can't get it to work. :? For all custom-made TPAs, it says "There are 0 to 0 valid entries within the .tpa file", or sometimes "0 to 1", and with all DWI-made TPAs it says the same except "0 to _" (however many entries are really in there, I'm assuming, such as "0 to 15" for the beta menu TPA). Dunno what's up...

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


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 19, 2010 8:52 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
It's works perfectly, Drac. 0 - 15 is the menu.tpa. There are 16 entries (0 - 15) and the count starts at 0, not 1. If you're referring to the .tpas in the maps/folder for atx., there is only 1 entry in those and that equates to 0. Zero, being the one and only entry.

As another fan example, there are 132 entries inside the trescom.tpa file (the most current version) and that registers as 0 -131. It was tested by Machf and Big Red as well as the fact that I tested the piss out of it, I know it works and the count is accurate. The fan based .tpa files are actually wrong in the sense the the entry # was never set to zero with our empty tpa files, so those have too be counted by the program itself to acquire a true count. As an example, trescom's tpa file has an entry # of 588 but there's actually only 132 entries.

Betas:

Menu: 0 - 15 Ambient: 0 - 215 Stream: 0 - 515 Effects: 0 - 595

Retail:

Menu: 0 - 15 Ambient: 0 - 155 Stream: 0 - 454 Effects: 0 - 617


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 19, 2010 9:49 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10880
Location: Lima, Peru
Demo:

Menu: 0 - 15 Ambient: 0 - 25 Stream: 0 - 10 Effects: 0 - 367

Also see attached file.

_________________
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: tpa_caption reader
PostPosted: Mon Mar 22, 2010 4:49 pm 
Offline
Albertosaurus
Albertosaurus
User avatar

Joined: Wed May 16, 2007 10:32 pm
Posts: 2059
Location: Ontario, Canada
Is it normal that only half of the VOs play?
Apart from that it works great.


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Mon Mar 22, 2010 10:13 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Quote:
Is it normal that only half of the VOs play?


Well, normal for the moment. The ima adpcm wavs need to be decoded (or uncompressed (ratio 4:1)) before they can be played and I need to do a little more reading on the subject. The wavs that do play are the standard 8 or 16 bit pcm waves. You can export all of them, though even the windows media players won't play the adpcms, you need a better program like CoolEdit was before Adobe bought them out (now it costs a fortune to purchase that software).

Thanks for checking it out. :)


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Tue Mar 23, 2010 10:03 am 
Offline
Dilophosaurus
Dilophosaurus
User avatar

Joined: Mon Nov 11, 2002 7:06 pm
Posts: 2201
I should have known-... *read* about this app earlier, great stuff! :)


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Wed Mar 24, 2010 11:52 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Thanks for the comments, people. I'm still tinkering with it a bit, but time is rather tight at the moment. I will work on getting the encoded pcms to play at some point though (along with a few other items on my todo list).


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 26, 2010 6:51 pm 
Online
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11117
Location: Portland, OR
Erm, my post was meant to say that my description is ALL that happened... But I see now how it works. I thought the dialog box meant that it hadn't successfully loaded the TPA.

Alright.. Why can't it play anything from EDEffects.tpa, and load TresCom.tpa just fine? ....:| ID#20 is a woman frantically screaming, wth?!?!

EDIT: Yeah, TresCom.tpa seems to be the only custom TPA that it will play, which it also reports 0 - 93 entries for..

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


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 26, 2010 7:24 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Quote:
Alright.. Why can't it play anything from EDEffects.tpa, and load TresCom.tpa just fine? ....:| ID#20 is a woman frantically screaming, wth?!?!


I'd assume it's because you packed your EastDock .tpa with encoded ima adpcm wavs, unlike the trescom.tpa which contains only 8 or 16bit pcm wav data. The retails are packed about 50/50 (either pcm or ima adpcm). As I explained in my last post, I can't presently decode the ima adpcms, therefore you won't hear anything. Technically, no program plays encoded wavs, they decode (or decompress) and buffer (or write out) the decoded data, apply an applicable header and then they are played as pcm wavs. The imas are compressed to save space and nothing else -


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 26, 2010 7:51 pm 
Online
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11117
Location: Portland, OR
Ahhhh, alright, they are just all in the other format then.. And I also tested the TPA made using XmasGift's sounds. Seems to be pretty common.. Is the way TC's sounds are made larger or smaller? Cause if it's smaller and it sounds good, I'd really like to know the process. JPDS will have to set up its custom TPAs pretty soon here and we've lost our sound guy.

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


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 26, 2010 8:10 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
The encoded (ima adpcm) wavs are smaller by a ratio of 4:1. That doesn't mean they'll sound better though. In fact, from what I read, the decoding process isn't always exact and they (meaning the encoded wavs) can actually be inferior (or poorer quality) compared to the original pcm wav it was encoded from.


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Fri Mar 26, 2010 8:16 pm 
Online
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11117
Location: Portland, OR
Ah. Well unfortunately, as we found out with EastDock, size does matter..

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


Top
 Profile  
 
 Post subject: Re: tpa_caption reader
PostPosted: Tue Mar 30, 2010 2:17 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4841
Location: That country nobody likes (you know the one)
Ok, well even though the latest version is alpha (meaning I've only tested it), I've decided to put the link up for v_12.

Mentioning this first (since it's important): Do Not attempt to update either a retail or earlier fan_based tpa file with this program (use tpaAdd is this is your intent). The reader exports new .tpa files (name it whatever you like), and these are the .tpa files you must use if you plan on using this program to add a .cau file (these are basically wbor data blocks which are either exported out of other tpas or created by converting a pcm or ima adpcm wav into a .cau file).

Reason (for anyone curious): The last table entry of retails is slightly smaller (24, as opposed to 36 bytes), and I've made no allowances for this (and don't plan to). The blank.tpa files we've been using for years have an erroneous entry count and some extraneous data written past the last table entry and I've made no allowances for this either (and don't plan to).

Warning given. ..

Onto the .caus. Dealing with wav data as .cau files is preferable for several reasons. The wav data can be either .pcm or compressed (ima adpcm), you can import the wav data as a cau file from other tpas along with the caption data, and it also gives us the ability to add our own caption data to a converted wav (wav into .cau) which can be imported into the new tpa files.

I have to stress that this has been barely tested, by me only. Near as I can tell though, everything seems to be aok with the imported sounds, along with tres displaying the caption data. I'll give the additional instructions below (although they are also included within the read_me file), after mentioning that Machf's & Big Red's input has been quite helpful with this little project and I have Machf to thank for the CRC32 code (I found it nerve-wracking, personally).

ADDITIONAL CONTROLS:

Export as .cau: This is a radio button. If checked, wav data exports as a .cau file (single or mass export).

CONVERT BUTTON: This control converts a wav file (pcm or dvi/ima adpcm) into a .cau file for later import. If adding caption data to a wav, you must enter the caption line(s) into the fields before clicking this control.

EXP_TPA BUTTON: This control creates a user_named tpa file which this program requires.

ADD_CAU: This control imports a .cau file into a .tpa file. To use, select .tpa (not a retail, and not a fan_based (blank) tpa file), enter a 'SOUND ID*' or string name for your entry, then click the 'ADD CAU BUTTON'. Updating may take several seconds or a few dozen, depending on the size of the data being written and the current size of the target .tpa. Allow the program to finish before doing anything further (check caption data readbox for program's current status). A log file is also generated after an import (and appended to if earlier imports occurred) to eliminate the potential of forgetting what name one might have assigned to a particular sound.

Accessing these .tpas: These are basically assumed to be used by atx (Maps/LVL/Example Tpas) and need to be placed
into the aforementioned, bracketed location. Be certain that you either create, or edit the existing .ini level file to be able to access sounds from the .tpa (else, atx won't know where to look for them). Of course, if you're working on a stand alone package, they can also be used as the main .tpa within the data folder.

Extent of testing: Created several .tpas and added up to 24 entries, including larger music waves. All clips played within trespasser, all caption data (including custom caption data) displayed -

That's about it. If one or two people could check it out, that'd be great.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  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:  

Powered by phpBB® Forum Software © phpBB Group