Note: most recent version v19c or higher (v31) should be in use
Alrighty, don't know if anyone is actually using this or not, but I've come to realize that the read_me I included with the program sort of sucks and now that a project is out of my hair for the moment, I took an hour to write up some possible questions some might have about this utility.
Anyhoo, let's play and pretend we're doing a little Q. & A. That way, if anyone is or intends to use this and I'm not around, it'll stop someone from cursing my name under breath.
Q. How do I use this program to add a sound file?
A. The program takes a .cau file (this is a wav file that has been transformed by this program into a data block trespasser understands. It is also the format that this program uses to add sound into trespasser packed audio (.tpa) files.
Steps:
CREATING A .CAU FILE:
Before you do anything else;
if any caption data is being added to your wav file, enter that information first. If only one line is being used, the first caption line must be used. Currently, caption data is limited to the available lines shown (two lines).
Secondly;
Click on the 'Convert Button'. From here, you will select your wav file and it will be automatically converted into a .cau file. Note, the created .cau file will have the same name as that of the wav file it was created from.
IMPORTING A .CAU FILE;
Select the desired .tpa file you wish to update.
2nd, Type in the 'String ID' (this is the name which is used in-game to access the sound). Do not miss this step! Otherwise, your sound will be inaccessible to you.
3rd, If your .cau file is an Effects sound and you wish to have attenuation and distance values applied to it (ie. dino vocals), depress the radio button labeled, 'Import as Eft'.
Last, Click on the 'Add Cau Button'. Through the explorer shell window that has opened, select the .cau file and click 'ok'. Updating a .tpa file takes several seconds or more depending upon the size of the .tpa you are adding sound to. Be patient, and do not interfer or touch any other controls until the process is completed. The caption data window will display current progress. Note, the tpa file is closed afterwards, so if you wish to hear the sound you've just added, you need to reload the tpa file.
EXPORTING A .CAU FILE:
Select and Load the desired .tpa file.
Once the sound is located, either through hearing its audio or viewing its companion caption data, depress the radio button labeled 'Export a Cau'. Next, click the 'Save Wav Button'. The sound will be exported as a .cau file with the designation of the currently displayed ID #. Any accompanying caption data attached to the sound will be exported as well and can be imported, caption data included, into another, presumably, a custom or fan-based .tpa file.
Q. How do I create a new .tpa file?
A. Type in the desired name, then click the 'Create Tpa Button'. The created .tpa file will export to the current directory.
Q. Why don't all the sounds play inside this program?
A. 'Cause, Rebel got a headache attempting to decode the compressed wavs and gave up before succeeding. Machf has since taken over the project, so perhaps he'll succeed where I failed.
@Edit: all sounds now play inside reader -
Q. Can I still add a compressed wav (IMA ADPCM) to a .tpa file even though the program can't play them?
A. Yes. They can be converted into a .cau file and imported just as a standard pcm wav file can. Existing ima adpcm wavs can also be exported from a .tpa file as either a valid .cau or ima adpcm wav file.
Q. What is the SET ID# for?
A. It serves as both a visual reminder of what index the user is at in relation to the number of entries inside the .tpa file and it can also be used to jump to a particular entry (must be a valid #). To do this, simply type in the number, depress the button 'SET ID', then click the 'Right Arrow Button'. The index will move to that position and load that particular sound clip. Note, that when loading a.tpa file, a message box lists the amount of valid entries within the selected .tpa file.
Q. What is the blank.tpa for inside the program's folder and how does it differ from the new .tpa files this program exports?
A. That's Machf's version of an empty .tpa file. It's the most pristine .tpa file available to date. The difference between the two is that the version the program itself generates adds a 'silent wav' to the .tpa as the very 1st entry. Trespasser's engine plays this sound if another sound that is called upon either fails to play or cannot be found.
Q. I loaded up a .tpa file and tried to export all, but all I heard was a ding when I clicked the button.
A. Click the right arrow button a few times first, the export all function will work then. The index will reset to '0' and export all audio entries into the current directory. Note, you can export all wavs in either .cau or .wav format (depress radio button 'Export as .Cau' for .cau format). Additionally, any accompanying caption data associated with a tpa's entry are exported into a separate file.
Q. Can I add mutiple .cau files at one time, or do I need to add them one at a time?
A. No, only one sound (or .cau file) may be added at a time. Using TpaAdd, along with a *bat file or the companion program, tpa_batchmaker, which creates the *bat for you, you may add multiple sounds to a .tpa file.
Q. If TpaAdd can add multiple sound files at once, why should I use the tpa_caption reader?
A. Well, it (the tpa_captionreader) does have a few advantages. The user interface being a gui is much easier to use, and it has the advantage of being able to export existing sounds with caption data from a .tpa file and import it into a custom .tpa, with caption data intact. It can also add new caption data as well as import Effects sounds with attentuation and distance values, this of course being particuarly useful when adding dinosaur vocals or some other sound which needs distance calculations applied. Additionally, it is afterall a caption reader and can play the wav file that it's associated with. So there's that recreational aspect of it -
Q. What happens if I forget what name I gave to my imported sound?
A. Lucky you. The program maintains a log file which can be found inside the program's directory. It'll list the names you've given them and their assigned crc values. It is suggested that it (the log file) not be deleted or edited until you've completed your project and you're no longer in need of a sound_name list.
Q. Which .tpa files can this program update?
A. Tenatively, all of them, including all retail, beta and fan_based .tpa files, along with the program's own new .tpas and machf's blank .tpa file. (There was an import bug regarding the Effects.tpa file, though it has been addressed in latest version 19c (be certain that is the version you are using)).
Q. Should I make a backup of a .tpa file before adding sound to it?
A. I no longer do that myself since I've come to trust the program, but for one's own peace of mind, it couldn't hurt doing so.
Q. What is the SndIds.dat file for?
A. The file acts as an external lookup table. When the program accesses a sound from inside the tpa file, it reads the hash value (crc-32) of that particular sound block. The program compares that value with what is stored inside the SndIds.dat file. If found, it retrieves its companion string_name and displays it inside the $Names Edit Cntl.
Q. Can I add to the SndIds.dat file? For instance, add the entries from another fan_based tpa file such as XMasGift.tpa?
A. Yes. If you're lucky, whoever created the .tpa file kept a log file of the sounds added. You can use machf's crc_tool to generate the individual hash values for each sound, or use the crc32 utility found inside the caption_reader's most recent release. Note, if adding a sound listing to the SndIds file, you must maintain the proper format for the added information to be read properly. Hex values are also listed in lower case (change if required).
Example: e8d783cc "this is my sound"
Q. What is the crc_util program used for?
A. This is used to generate the hash (crc id) of a known string (or name) sample. Once generated, the results are exported into the crc_util's log file. The information inside is in a compatible format used by the tpa_reader. Simply, copy and paste that information inside the log file into the Sndlds. dat file (add new listings to the end of file; be certain file ends with empty line). Once added, tpa_ reader is able to access that information if a particular sound clip is loaded and display this info in the edit control boxes labeled; Crc32 and $Name.
Again, note: the SndIds.dat file is editable using Windows NotePad -
Q. I added a .cau file with subtitles. The sound played in-game, but I didn't see the sub-title being displayed. Why?
A. Most likely, a simple oversight on your part. Be certain your actiontype is set to 0 and not 2 as action_type 2 is specific to music and does not display subtitle information. Also verify that option to display subtitles is checked off in game's audio menu.
|