Author Topic: Editing Sounds For User Created Animals  (Read 2270 times)

0 Members and 1 Guest are viewing this topic.

Offline xenopuszoo

  • Pooper Scooper
  • *
  • Posts: 5
Editing Sounds For User Created Animals
« on: April 29, 2006, 05:02:46 PM »
I really enjoy the user created animals, but in some cases they do not have any sounds in the game..  I am trying to edit some of the animals so that they make noise in the game..  Let me also say that I am only doing this for my game and do not want to "steal" peoples projects that they worked on... I only want to put sound so they are more real..  I also want to eidt some of the sounds to make them more real..  

I read this tutorial and do not understand how to identify like it says: any help would be greatly appreciated I have APE 1.1 that i downloaded here and I have the DD an MM versions as well..

Can anyone elaborate a bit more on this please..

 I do not understand where you define the sound and give it a correct path?  
 :(
[Sounds] Section

There should not be animations or sounds in the ztd file that are not used in the uca file. These animations or sounds will slow Zoo Tycoon when it starts, loads a zoo, or loads menus. They will also cause longer downloads and use more bandwidth. First off, delete any "wav" files in the ztd unless you put them in the ztd. I would recommend going to the original animals "ai" file (in this case, animals/cloulep.ai for the clouded leopard) and copy its sound section. This way Zoo Tycoon will use its own sound files instead of the ones in your ztd and you can make the ztd smaller by deleting the "wav" files. However, be sure full paths are always used. For example, if you copy the [Sounds] section from animals/gorilla.ai, the line "pant = gorilla1" must be changed to "pant = animals/gorilla/gorilla1.wav". The other lines in the [Sounds] section would have to be changed similarly, except for those that already show full paths.

In case you added a new "wav" file, you need to add it to this section, give it the correct path, give it a name, and add it into the Behavior Sets. For example:
baby1 = animals/566F83BC/lelgrowl.wav
baby1 = 1500
"baby1" is the name that will be used in the Behavior Sets. All of the files you added are in the animals folder. 566F83BC refers to the animal's ID# (also a subfolder). lelgrowl.wav is the sound file you supplied. 566F83BC will have to be changed to your animal's ID# and lelgrowl.wav to the name of your sound file. In "baby1 = 1500", 1500 tells how loud it should be. If you add sound files, be sure they are in "Microsoft PCM, 16 bit" or "Microsoft PCM, 8 bit" format. Zoo Tycoon does not support other formats. For example, it does not support "Microsoft APCM" format.

If sounds are defined in the [Sounds] section, then the [Sounds] section should also define sounds for placesound and pickupsound.
pickupsound = animals/ID#/oneOfTheOtherSounds.wav
pickupsound = 1500
placesound = animals/ID#/oneOfTheOtherSounds.wav
placesound = 1500
These cause the animal to make a sound when you pick up and put down the animal. Make appropriate changes to these lines for your animal and your sound files.

Offline Jay

  • Zookeeper
  • *
  • Posts: 135
Editing Sounds For User Created Animals
« Reply #1 on: April 29, 2006, 10:44:54 PM »
I assume you already have an animal ".ztd" file and that you know how to get files out of and into it. I also assume you already have a ".wav" sound file that is in one of the formats that Zoo Tycoon understands: "Microsoft PCM, 16 bit" or "Microsoft PCM, 8 bit". For this discussion, I will pretend it is a lelgrowl.wav file. If you look inside the animal ".ztd" file, you will see an "animals" folder. Inside the "animals" folder is an 8 character subfolder such as "566F83BC". You want to put the lelgrowl.wav file inside the "566F83BC" subfolder. Inside the animal ".ztd" file, you will also see a ".uca" file. In this case, it would be called 566F83BC.uca and will be in the animals folder. This ".uca" file must be edited to use the new sound file. Any text editor, such as Notepad, can be used to edit the ".uca" file.

Inside the ".uca" file, there is a section that starts with the line "[Sounds]". You want to add 2 lines to this section. The first line gives a name to the sound. For example, if you want to name the sound "baby1", you would add the line "baby1 = animals/566F83BC/lelgrowl.wav". This says that the sound named "baby1" is in the file "lelgrowl.wav", which is in the "566F83BC" subfolder, which is in the "animals" folder. The second line to add will tell Zoo Tycoon how quietly to play the sound. For example, if the sound is rather loud, you could add the line "baby1 = 1500" in order to make Zoo Tycoon play the sound softer.

Now that the sound file has a name and softness value, the next step is to use the sound whenever the animal does a certain type of action. Look for "fPlay" lines. These are the actions that the animal will do. If you want your sound to play whenever the animal does a "jerk_head" action, you could change any or all "f = fPlay(jerk_head)" lines to "f = fPlayWithSound(jerk_head,baby1)" instead.

Offline xenopuszoo

  • Pooper Scooper
  • *
  • Posts: 5
Editing Sounds For User Created Animals
« Reply #2 on: April 30, 2006, 04:55:29 PM »
Thanks Jay :D

I have taken the "animal file.ztd" and clicked on "open or  import exisiting project"  option in APE 1.1  i clicked on the sound section and uploaded the wav file into that section. then i went to the "behaviors" and tried to assign the sound file there.. didnt work..

I also used the user created bactrian camel which makes sound and tried replacing the existing sound file with the two i have. and it didnt work.. I am not certain how to open a ztd file outside of APE..

 :wtg I have seen and done this:

Quote
Now that the sound file has a name and softness value, the next step is to use the sound whenever the animal does a certain type of action. Look for "fPlay" lines. These are the actions that the animal will do. If you want your sound to play whenever the animal does a "jerk_head" action, you could change any or all "f = fPlay(jerk_head)" lines to "f = fPlayWithSound(jerk_head,baby1)" instead.

the "wav" files i have are audio format PCM 8 or 16 bit and Microsoft ADPCM 4 bit so i would assume that any 4 bit sound will not work.  :><

I am not certain on how i open the ".ztd" file to find the numbered subfolder "example: 566F83BC" which i understand varies from animal to animal.. I will be able to follow the rest of the instructions once I know how to and what program I use to open that ".ztd" file to gain access to those subfolders..

thanks for all of your help in advance

Offline Jay

  • Zookeeper
  • *
  • Posts: 135
Editing Sounds For User Created Animals
« Reply #3 on: April 30, 2006, 06:45:11 PM »
Every time APE is used, it adds more inefficiencies to ".uca" and ".ucs" files. So APE should only be used to create a new 8 character id for new things and to put graphics into a ".ztd", but not for anything else.

A ".ztd" file is actually a ".zip" file. There are lots of ways to work with ".zip" files, depending on the version of MS Windows you have and what other programs you have. Windows XP, for example, can work with ".zip" files directly. In my case with Windows XP, I associated ".ztd" with the "compressed files" file type and I turned on showing file extensions in "My Computer". That makes it a little easier to work with ".ztd" files directly. Some others rename ".ztd" to ".zip" to work on them and then rename them back to ".ztd" when done.

To work with things inside a ".ztd", I create a work folder for it, but I do not create the folder in any Zoo Tycoon folder since sometimes Zoo Tycoon will see these work folders and use them. I extract the ".ztd" into the work folder. Then I copy sound files into the subfolders as mentioned and I edit the ".uca" file with Notepad as mentioned. When done, I zip everything into a ".ztd" file again.

As for your comment about "4 bit" sounds not working, it is actually that ADPCM does not work. For speed, Zoo Tycoon only works with the PCM formats mentioned since ADPCM uses compression, which takes time to decompress. There are programs that allow converting from one time of sound file to another. Also, I normally edit animal sound files down to a few seconds for Zoo Tycoon. There are programs to do that as well.

Offline xenopuszoo

  • Pooper Scooper
  • *
  • Posts: 5
Editing Sounds For User Created Animals
« Reply #4 on: May 01, 2006, 05:18:31 PM »
Ok.. I renamed  the ZTD file to .ZIP opened it up with winzip and gained access to the  "UCA"sound files with microsoft works word processor.  

I edited everything like you said then tried to rezip the folder and send it to an email.. I could not open the zip file correctly and when i tried to rename it back to .ztd the icon didnt change to a zoo file it was still a winzip file.  when i try to unzip the file it opened up a folder just like it opened when i went to edit the animal. :blink


I am not certain how to correctly combine the folder and the numbered.uca file back to being the animal??

I'm getting there phew.. I apprecaite all of your help!

Offline Jay

  • Zookeeper
  • *
  • Posts: 135
Editing Sounds For User Created Animals
« Reply #5 on: May 01, 2006, 06:45:56 PM »
I do not use winzip. So I cannot help you with that. Also, the procedures to use even with winzip are probably different depending on which MS Windows version you are using.

Offline xenopuszoo

  • Pooper Scooper
  • *
  • Posts: 5
Editing Sounds For User Created Animals
« Reply #6 on: May 02, 2006, 09:53:36 AM »
I am using a no cost trial of winzip..  so maybe that is the problem.. The newest problem is that when i opened note pad all of the .ztd files changed to the note pad icon..  I played the game and it doesnt seem to affect any of the animals in the game though..

what program do you use to rezip the files and is it a trial version?  I'm so frustrated that i am this close  :w00t

and how do you rezip the file with the program you are using.. I really do appraciate all of your help.. btw I am using windows XP Home edition