TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Fri Sep 22, 2017 12:40 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Fri Nov 21, 2003 2:42 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4721
Location: That country nobody likes (you know the one)
Most of the below information has been covered in various sections on this forum, but for ease of reference it has been updated and placed here.

TpaAdd is a program written by Andres James that allows us to add new wav clips into Trespasser's sound files. These files are commonly known as 'Tpa Files'.

There's actually two methods of adding sound, and though both require command line prompt entries to satisfy the parameters of the TpaAdd program, one method is easier than the other. We'll cover the more difficult method first which you will find detailed below.

Important Notes:

*Your target tpa (the tpa you want to alter, obviously) needs to be 'archive' and not 'read only'


*Keep your data paths simple. Your best bet is to place the TPAAdd onto your desktop, along with a 'copy' of the tpa that you either want to replace or add sound too. Also place your wav file (s) that you wish to add or use as a replacement on your desktop as well.



*Program works with a command prompt, meaning of course, no nice interface for us lazy folks.



Steps:

1)Go to MS Dos Prompt (located in start menu, programs and under
accessories).

2) Type in: \desktop\TPAAdd

3) Once program starts, press any key

4) The c prompt (C:\WINDOWS>) now shows.


*For example, my tpa file target is Menu.tpa and my sound is beep.wav*


Replacing a Wav File:

After the c prompt (C:\windows>) type;

desktop\TPAAdd.exe desktop\Menu.tpa desktop\beep.wav "DINO - TREX FOOT"

This command line 'replaces' "DINO - TREX FOOT" with the wav file 'beep'. If there are no spacings between the wav file's name there is no need for quotation marks.

Adding a Wav File:

After the c prompt (C:\windows>) type;

desktop\TPAAdd.exe desktop\Menu.tpa desktop\beep.wav "SOUND ID1"

This command line 'added' the beep.wav to the Menu's tpa file. If added to the STream.tpa, it'd be accessible ingame by the following(string Sample = "SOUND ID1" and using actiontype 0). If you're unaware of what an actiontype tscript command entry is, please take the time to read thru Andres' Tscript reference page. Also note that using the Menu.tpa was just an example. In most instances, adding your new sounds to the stream.tpa file is your best option.


Second (and the easiest) method:

By using a *bat file, we can automatically execute a program and run the command lines entered into it without any further input from a user. Operating the TpaAdd program in this manner also allows a level builder to provide an easy method of an end user of his level to update his (or hers) tpa file by simply opening up or clicking on the *bat file.

An Example:

Below, are the internal entries for our *bat file.

:: NW_TPA.bat (the external name of our *bat file)
:: Used to add tracks inside Stream.tpa
REM - Please, be patient and touch nothing!!!
REM - Adding Sound, may take several minutes.
REM - Wait, for program to complete its task!
tpaadd.exe Stream.tpa NewWav01.wav "NS - My Wav1"
@REM - Please, do not edit.
REM - OPERATION COMPLETE. QUIT, PROGRAM.
@ECHO OFF

One needn't understand every line, but to be quick about it, any type beyond a double colon is ignored, they're simply unseen comments. Comments after the command REM will be seen by user during update. The sixth line of our bat file, tpaadd.exe Stream.tpa NewWav01.wav "NS - My Wav" is the actual command line which performs all necessary operations.

Further Explanation;

tpaadd.exe -- this opens up the tpaadd program
stream.tpa -- this supplys the input of the tpa's name that the tpaadd program requires
NewWav01.wav -- this supplys the input of the wav file to be added to the stream.tpa
NS - My Wav -- this supplys the input for the name being assigned to the new sound.

Quite simple, really. The above example is only adding 1 sound to the stream.tpa, but by adding additional lines which correspond to other wav files that you wish to add and then assigning them a desired name, in theory you can add many, many more.


Multiple entry example:

:: NW_TPA.bat (the external name of our *bat file)
:: Used to add tracks inside Stream.tpa
REM - Please, be patient and touch nothing!!!
REM - Adding Sound, may take several minutes.
REM - Wait, for program to complete its task!
tpaadd.exe Stream.tpa NewWav01.wav "NS - My Wav1"
tpaadd.exe Stream.tpa NewWav02.wav "NS - My Wav2"
tpaadd.exe Stream.tpa NewWav03.wav "NS - My Wav3"
@REM - Please, do not edit.
REM - OPERATION COMPLETE. QUIT, PROGRAM.
@ECHO OFF


The above example adds not 1, but 3 sounds to the Stream.tpa. It can add many more, though keep in mind the more sounds, the longer it will take for the program to add the sounds and update the stream.tpa file.

Well, that's about it. If you're unaware as to how to actually create a *bat file, you'll be pleased to know that it's rather simple to do.

Steps:

1) Create a new text file
2) Provide the required entries. (use the above examples as guides as to how to do this)
3) Go to file, choose 'save as'
4) Go to 'save as type' choose 'all files'
5) Enter name and add the extension .bat
Example: Mybatfile.bat
6) Choose 'Save'

That's it. You're done. The last note would be to be certain that all related files are in the same location as to avoid those messy location problems. The best solution to avoid any such difficulties is to place the TpaAdd program, the stream.tpa, your new *bat file and all wav files you wish to add to the stream.tpa into a single folder.

End tutorial....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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