Posted: Sat Jul 03, 2010 9:01 pm
by Jay
BF definitely could have used us. And I certainly wish fern and I were together, rather than being on opposite sides of the world.
There are many reasons why sounds do not work for an animal. Without looking at your ".uca" file, I cannot give specifics. But, in general, sounds do not work because the APE program was not written correctly. Although it is not necessary to know, I will give the simplest example I can to show what APE is doing wrong. I went into APE, told it to create a new animal based on the Giant Anteater, saved the animal to anteater.ztd without doing anything else, and then exited APE. Let's see what APE did.
Inside ZT's animal2.ztd file, there is an anteater.ai file. That is the configuration for the ZT Giant Anteater. The anteater.ai file can be extracted and then looked at using a text editor. As for text editors, some are better than others. I use an open source program called gvim. But the WordPad program that comes with Windows XP is also fine. (It is in start->All Programs->Accessories.) Although NotePad will also work in this case, NotePad does not properly display some ZT files. For example, it does not properly display the dig.ani file that is in the anteater.ztd that APE created, although WordPad does not have a problem.
Looking in anteater.ai, one can find the following Sounds section:
[Sounds]
sniff = anteater
sniff = 1600
placesound = anteater
placesound = 1600
pickupsound = anteater
pickupsound = 1600
The anteater has only 1 sound file: anteater.wav. The "anteater" in the above stands for "anteater.wav". The "1600" tells ZT how softly to play the sound. The higher the number, the softer the sound is played in ZT; the lower the number, the louder the sound is played in ZT. ZT can never play the sound louder than how the sound plays outside of ZT, though. The "pickupsound" lines tell ZT which sound to play whenever you pick up the anteater inside a ZT zoo. The "placesound" lines tell ZT which sound to play whenever you put the anteater back down inside a ZT zoo. The "sniff" is just a name that BF called the sound for when it is used later in anteater.ai. Here is another section from anteater.ai:
[m\BehaviorSet\bTense1]
f = fPlay(stand)
f = fWalk(0,0)
f = fPlayWithSound(shake,sniff)
f = fPlayTime(stand,6)
f = fPlay(dig)
f = fPlay(stand)
The "fPlayWithSound" line in the above section shows how the sound is used. It tells ZT to use the animal's "shake" action while playing the "sniff" sound. This section is one of the sections used whenever the anteater becomes tense. In this case, the "m" in "[m\BehaviorSet\bTense1]" means it is for the male. However, since there is no "[f\BehaviorSet\bTense1]" or "[y\BehaviorSet\bTense1]" in anteater.ai, ZT will also use this section for the female and young as well.
Now let's look at what APE did. I extracted the ".uca" file from anteater.ztd and looked at the ".uca" with a text editor. APE created the following Sounds section:
[Sounds]
pickupsound = anteater.wav
pickupsound = 1600
Notice that this section is missing the sniff and placesound lines. So that means the only sound that will be played is when the animal is picked up inside a ZT zoo. When APE copied the lines from anteater.ai, it put the lines in order, which is okay. So the lines would have looked like this:
pickupsound = anteater
pickupsound = 1600
placesound = anteater
placesound = 1600
sniff = anteater
sniff = 1600
But then APE did something very stupid. Since placesound and sniff used the same sound as pickupsound, APE kept pickupsound (since that is first in the sorted list) and APE deleted placesound and sniff. But APE did even more stupid things. Let's see what it used for the [m\BehaviorSet\bTense1] section in the ".uca":
[m\BehaviorSet\bTense1]
f = fPlay(stand)
f = fWalk(0,0)
f = fPlayWithSound(shake,Undefined)
f = fPlayTime(stand,6)
f = fPlay(dig)
f = fPlay(stand)
APE changed "sniff" that was in the ".ai" version to "Undefined". APE did that because it no longer had a "sniff" in the [Sounds] section. So even if you were to add "sniff" back into the [Sounds] section, it still would not be used without fixing all of the "Undefined". But APE's stupidity did not stop there. anteater.ai did not have any [f\BehaviorSet\...] or [y\BehaviorSet\...] sections. But APE added those sections into the ".uca" by attempting to copy them from the [m\BehaviorSet\...] sections. However, APE did not copy them properly. In [f\BehaviorSet\bTense1] and [y\BehaviorSet\bTense1], APE put "f = fPlayWithSound(Undefined,Undefined)", which is even worse than what APE did for the male section, since this is also missing "shake". So even if you fixed the Tense1 section for the male, the sound would not work for the female or young. And even worse, the female and young would not do anything (such as shake or dig) while they are not walking. APE is even more stupid than that. If I were to go in APE and change anything, APE would add even more lines in the [f\BehaviorSet\...] and [y\BehaviorSet\...] sections.
So how would I fix the ".uca" for the anteater? First, I would make the [Sounds] and [...\BehaviorSet\...] sections look like what is in the ".ai". In this case, that means adding the sniff and placesound lines back into the [Sounds] section, deleting all [f\BehaviorSet\...] and [y\BehaviorSet\...] sections, changing "f = fPlayWithSound(box_used,Undefined)" to "f = fPlayWithSound(box_used,placesound)", and changing all other "Undefined" to "sniff". My next step would be to have the anteater use the ingame sounds. To do that, I would have the [Sounds] section look like the following (either sorted or not):
sniff = animals/anteater/anteater.wav
sniff = 1600
placesound = animals/anteater/anteater.wav
placesound = 1600
pickupsound = animals/anteater/anteater.wav
pickupsound = 1600
Then I can remove anteater.wav from the ".ztd", making it smaller. This will also allow ZT to use less memory.
APE does a lot of other inefficient, and sometimes wrong (as in "can cause some games to crash"), things as well. So that is why I follow the Uca Editing Guide whenever I deal with animal configuration.
Now to make this confusing stuff even more confusing. Let's say I followed the Uca Editing Guide and made all of the appropriate changes to the anteater. I put it into ZT, create a suitable exhibit for it, and put it in the exhibit. So it is perfectly happy. Will I hear it make sounds? No, I will not, except when I pick it up and put it back down. That is true for when the ingame Giant Anteater is happy as well. The reason is because that particular animal is configured to only make a sound when it is not happy. For example, the [m\BehaviorSet\bHappy1], [m\BehaviorSet\bHappy2], and [m\BehaviorSet\bHappy3] sections do not contain any line with fPlayWithSound. So it can be confusing trying to test sounds inside ZT. Most animals should usually make a sound when they are picked up or put down, but some animals are configured not even to do that.
Posted: Sun Jul 04, 2010 1:10 am
by JohnRN1
I really appreciate your tech skills. After reading your last post on sound, I can understand that the APE program can really be a "stinker".
But, you must be helping me, because I redid my sound section in the ica and now when I pick up the animal (I'm using an elephant as a test subject), the "pick up animal sound now works. I don't know why that works, and not any of the other sounds, but I'm taking it one step at a time.
Also, I must have to edit a lot more things, because my test elephant will sometimes keep walking up against a fence.
I am enclosing a copy of my uca file if you want to see it. The only thing I have changed was adding the path to the sounds.
Your explanation of the APE and it changing things made me more confident and not feeling as stupid as I thought I was. Also, it was easier following your explanation than the tutorial...at least a little!
[E34183E3]
[Global]
Class = animals
DefaultSubtype = m
Subtype
Type = E34183E3
[AnimPath]
f = animals/E34183E3/m
m = animals/E34183E3/m
y = animals/E34183E3/y
[m/Icon]
Icon = animals/E34183E3/icele/icele
[Member]
animals
[m/Characteristics/Strings]
cBehaviorInfoTextName = ELEPHANT_BEHAVIOR
cFoodInfoTextName = ELEPAHNT_ANIMAL
cGeneralInfoTextName = ELEPHANT_GENERAL
cHabitatInfoTextName = ELEPHANT_HABITAT
cKeeperFoodType = herbivore
cKeeperInfoTextName = ELEPHANT_KEEPER
cListImageName = animals/E34183E3/lsmele/lsmele
cPlaqueImageName = animals/E34183E3/plele/plele
cPrefIcon = objects/baobob/SE/SE
[m/Characteristics/Integers]
cAllCrowdedChange = -5
cAngryHabitatChange = -5
cAngryTreeChange = -10
cAnimalDensity = 50
cAttractiveness = 50
cBabyBornChange = 80
cBabyToAdult = 2160
cBashStrength = 76
cBuildingUseChance = 20
cCaptivity = 10
cChaseAnimalChance = 10
cClimbsCliffs = 0
cCrowd = 30
cCrowdHappinessChange = -5
cDeathChance = 90
cDeathChance = 10
cDeathChange = -20
cDirtyHabitatRating = 30
cDirtyIncrement = 25
cDirtyThreshold = 100
cDrinkWaterChance = 15
cEatVegetationChance = 30
cElevationPref = 0
cEnergyIncrement = 10
cEnergyThreshold = 100
cEscapedChange = 30
cFamily = 5200
cFastRate = 128
cFlies = 0
cFoodTypes = 0
cFootprintX = 2
cFootprintY = 2
cGenus = 5100
cHabitat = 9400
cHabitatPreference = 65
cHabitatSize = 100
cHappyHabitatChange = 20
cHappyReproduceThreshold = 97
cHelpID = 5000
cHungerIncrement = 10
cHungerThreshold = 50
cHungryHealthChange = 10
cInitialHappiness = 50
cIsClimber = 0
cIsJumper = 1
cKeeperFoodType = 4
cKeeperFoodUnitsEaten = 20
cKeeperFrequency = 2
cLocation = 9600
cMatingType = 1
cMaxEnergy = 100
cMaxHits = 500
cMediumRate = 96
cMinHits = 0
cNameID = 19000
cNeedShelter = 1
cNeedToys = 1
cNeededFood = 100
cNoFoodChange = -50
cNoMateChange = -10
cNotEnoughKeepersChange = -20
cNumberAnimalsMax = 6
cNumberAnimalsMin = 2
cNumberMaxChange = -5
cNumberMinChange = -10
cOffspring = 1
cOtherAnimalAngryChange = 0
cOtherAnimalSickChange = -10
cOtherFood = 0
cPctHabitat = 10
cPctHits = 20
cPrefIconID = 7057
cPrey = 5006
cPrey = 5007
cPrey = 5008
cPrey = 5009
cPrey = 5010
cPrey = 5011
cPrey = 5012
cPrey = 5013
cPrey = 5014
cPrey = 5018
cPrey = 5045
cPrey = 9503
cPurchaseCost = 2500
cReproductionChance = 1
cReproductionInterval = 3240
cRockPref = 2
cSickChance = 2
cSickChange = -10
cSickTime = 4
cSlowRate = 34
cSocial = 1
cSpacePref = 70
cSwims = 0
cTimeDeath = 12960
cTimeDeath = 17280
cTreePref = 3
cVeryAngryHabitatChange = -30
[y/Characteristics/Integers]
cAttractiveness = 150
cBashStrength = 25
cChaseAnimalChance = 30
cIsJumper = 0
[m/Characteristics/Mixed]
[cCompatibleAnimals]
v = 5200
v = 5
v = 5201
v = -5
v = 5202
v = -20
v = 5203
v = -5
v = 5204
v = 5
v = 5205
v = -5
v = 5206
v = -20
v = 5207
v = -20
v = 5208
v = -20
v = 5210
v = -5
v = 5211
v = 5
v = 5212
v = -5
v = 5213
v = -20
v = 5214
v = -5
v = 5215
v = 5
v = 5216
v = -20
v = 5217
v = -20
v = 5000
v = -5
v = 5039
v = -10
v = 5005
v = 10
v = 5031
v = 10
v = 5033
v = 10
v = 5035
v = 10
v = 5028
v = 10
v = 5025
v = 10
v = 5030
v = 10
[cSuitableObjects]
v = 9400
v = 3
v = 9410
v = -15
v = 9408
v = -25
v = 9402
v = -5
v = 9403
v = -10
v = 9404
v = -10
v = 9407
v = -10
v = 9409
v = -10
v = 6062
v = -10
v = 9414
v = -100
v = 7048
v = 3
v = 7001
v = -3
v = 7056
v = 3
v = 7057
v = 12
v = 7063
v = -8
v = 7030
v = -8
v = 7019
v = -8
v = 7017
v = -8
v = 9200
v = 6
v = 9205
v = 3
v = 9206
v = 3
v = 7076
v = -8
v = 8116
v = 20
v = 8117
v = 25
v = 6100
v = 25
v = 9401
v = 0
v = 9405
v = 0
v = 9406
v = 0
v = 9411
v = 0
v = 9413
v = 0
v = 9415
v = 0
v = 9416
v = 0
v = 9417
v = 0
v = 9418
v = 0
v = 9419
v = 0
v = 7000
v = 0
v = 7004
v = 0
v = 7005
v = 0
v = 7006
v = 0
v = 7007
v = 0
v = 7008
v = 0
v = 7009
v = 0
v = 7010
v = 0
v = 7011
v = 0
v = 7012
v = 0
v = 7013
v = 0
v = 7014
v = 0
v = 7015
v = 0
v = 7016
v = 0
v = 7018
v = 0
v = 7020
v = 0
v = 7021
v = 0
v = 7022
v = 0
v = 7023
v = 0
v = 7024
v = 0
v = 7025
v = 0
v = 7026
v = 0
v = 7027
v = 0
v = 7028
v = 0
v = 7029
v = 0
v = 7031
v = 0
v = 7032
v = 0
v = 7033
v = 0
v = 7034
v = 0
v = 7035
v = 0
v = 7036
v = 0
v = 7037
v = 0
v = 7038
v = 0
v = 7039
v = 0
v = 7040
v = 0
v = 7041
v = 0
v = 7042
v = 0
v = 7043
v = 0
v = 7044
v = 0
v = 7045
v = 0
v = 7046
v = 0
v = 7047
v = 0
v = 7049
v = 0
v = 7050
v = 0
v = 7051
v = 0
v = 7052
v = 0
v = 7053
v = 0
v = 7054
v = 0
v = 7055
v = 0
v = 7058
v = 0
v = 7059
v = 0
v = 7060
v = 0
v = 7061
v = 0
v = 7062
v = 0
v = 7064
v = 0
v = 7065
v = 0
v = 7066
v = 0
v = 7067
v = 0
v = 7068
v = 0
v = 7069
v = 0
v = 7070
v = 0
v = 7071
v = 0
v = 7072
v = 0
v = 7073
v = 0
v = 7074
v = 0
v = 7075
v = 0
v = 7077
v = 0
v = 7078
v = 0
v = 7079
v = 0
v = 7080
v = 0
v = 7081
v = 0
v = 7082
v = 0
v = 7083
v = 0
v = 7084
v = 0
v = 7085
v = 0
v = 7086
v = 0
v = 7087
v = 0
v = 7088
v = 0
v = 7089
v = 0
v = 7090
v = 0
v = 7091
v = 0
v = 7092
v = 0
v = 7093
v = 0
v = 7094
v = 0
v = 7095
v = 0
v = 7096
v = 0
v = 7097
v = 0
v = 7098
v = 0
[cCompatibleTerrain]
v = 0
v = 0
v = 1
v = 65
v = 2
v = 10
v = 3
v = 10
v = 4
v = 0
v = 5
v = -5
v = 6
v = -5
v = 7
v = 0
v = 8
v = -73
v = 9
v = 15
v = 10
v = 0
v = 11
v = -5
v = 12
v = 0
v = 13
v = -5
v = 14
v = 0
v = 15
v = 0
v = 16
v = -5
[m/Animations]
box_idle = objects/box/idle/idle.ani
box_used = objects/box/used/used.ani
dustball = objects/dustcld/idle/idle.ani
dusting = dstng
eat = eat
flap_ears = flapears
idle = stnd
jerk_head = jrkhdup
jump_high = run
lie_down = liedown
lying_idle = lying
noise = nois
paw_ground = pawgrnd
rub = rub
run = run
shake_head = shkhead
sleep = sleep
spread_ears = sprdears
stand = stnd
stand_noise = stndnois
step_side = sidstp
sway_body = swybody
sweep_ground = trnkswp
swing_head = swnghed
swing_trunk = trnkswng
trunk_down = trnkdwn
trunk_mouth = trnkmout
trunk_outward = trnkout
trunk_up = trnkup
trunk_up_smell = trnksml
walk = walk
wallow = walwater
waterball = objects/watcloud/idle/idle.ani
[Sounds]
dustball = animals/E34183E3/ele8.wav
dustball = 500
growl = animals/E34183E3/ele4.wav
growl = 800
placesound = animals/E34183E3/ele1.wav
placesound = 500
snort = animal/E34183E3/ele3.wav
snort = 2000
waterball = animals/sealion/splash1.wav
waterball = 1000
[AmbientAnims]
a = 81
a = 100
a = 61
a = 80
a = 21
a = 60
a = -20
a = 20
a = -60
a = -21
a = -80
a = -61
a = -100
a = -81
b = bHappy
b = bFriendly
b = bCalm
b = bNeutral
b = bUneasy
b = bTense
b = bAngry
[defaultLCID]
LCID = 1033
[m\BehaviorSet\bHappy]
f = fPlaySetProb(bIdle1,20,bHappy1,50,bHappy2,30)
[m\BehaviorSet\bFriendly]
f = fPlaySetProb(bHappy3,70,bIdle2,30)
[m\BehaviorSet\bCalm]
f = fPlaySetProb(bCalm1,50,bIdle1,30,bIdle2,20)
[m\BehaviorSet\bNeutral]
f = fPlaySetProb(bIdle1,50,bIdle2,50)
[m\BehaviorSet\bUneasy]
f = fPlaySetProb(bUneasy1,65,bIdle2,35)
[m\BehaviorSet\bTense]
f = fPlaySetProb(bTense1,70,bAngry3,30)
[m\BehaviorSet\bAngry]
f = fPlaySetProb(bAngry1,40,bAngry2,40,bNoise3,20)
[m\BehaviorSet\bEscaped]
f = fPlaySetProb(bEscaped1,70,bNoise3,30)
[m\BehaviorSet\bBabyActions]
f = fPlaySetProb(bBaby2,67,bIdle1,33)
[m\BehaviorSet\bPlayToys]
[m\BehaviorSet\bPlayWithToyHappy]
[m\BehaviorSet\bPlayWithToyFriendly]
[m\BehaviorSet\bSoundtest1]
[m\BehaviorSet\bHappy1]
f = fPlay(stand)
f = fPlayPingPong(trunk_up_smell)
f = fPlayTime(stand,7)
f = fWalk(0,0)
f = fPlay(stand)
f = fPlayWithSound(trunk_outward,snort)
f = fPlay(stand)
[m\BehaviorSet\bHappy2]
f = fPlay(stand)
f = fWalk(0,0)
f = fPlayTime(stand,6)
f = fPlayWithSound(shake_head,snort)
f = fPlay(stand)
[m\BehaviorSet\bHappy3]
f = fPlay(stand)
f = fPlayWithSound(trunk_outward,snort)
f = fPlay(stand)
f = fPlay(sweep_ground)
f = fPlayPingPong(trunk_mouth)
f = fPlayTime(stand,4)
f = fWalk(0,0)
f = fPlay(stand)
[m\BehaviorSet\bCalm1]
f = fPlay(stand)
f = fPlay(flap_ears)
f = fPlayTime(stand,5)
f = fPlay(dusting)
f = fPlay(stand)
[m\BehaviorSet\bUneasy1]
f = fPlay(stand)
f = fPlay(shake_head)
f = fWalk(0,0)
f = fPlayTime(stand,5)
f = fPlayWithSound(trunk_outward,snort)
f = fPlayReverse(trunk_outward)
f = fPlay(stand)
[m\BehaviorSet\bTense1]
f = fPlay(stand)
f = fPlayPingPong(spread_ears)
f = fWalk(0,0)
f = fPlay(stand)
f = fPlay(jerk_head)
f = fPlay(stand)
[m\BehaviorSet\bAngry1]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
f = fMove(0,0,run,66)
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bAngry2]
f = fPlay(stand)
f = fMove(0,0,run,66)
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(shake_head)
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bAngry3]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
f = fPlay(jerk_head)
f = fPlayWithSound(trunk_outward,snort)
f = fPlayReverse(trunk_outward)
f = fPlay(stand)
f = fMove(0,0,run,66)
f = fPlay(stand)
[m\BehaviorSet\bNoise1]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlayTime(stand,5)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bNoise2]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bNoise3]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bIdle1]
f = fPlay(stand)
f = fPlay(flap_ears)
f = fPlayTime(stand,6)
f = fPlay(swing_trunk)
f = fPlay(stand)
[m\BehaviorSet\bIdle2]
f = fPlay(stand)
f = fWalk(0,0)
f = fPlayTime(stand,4)
f = fPlay(flap_ears)
f = fWalk(0,0)
f = fPlay(stand)
[m\BehaviorSet\bIdle3]
f = fPlay(stand)
f = fPlayWithSound(swing_trunk,growl)
f = fPlay(stand)
f = fPlayPingPong(spread_ears)
f = fPlay(stand)
[m\BehaviorSet\bSleep]
f = fPlay(lie_down)
f = fPlayTime(sleep,25)
f = fPlayReverse(lie_down)
[m\BehaviorSet\bDie]
f = fPlay(lie_down)
f = fPlayTime(sleep,5)
f = fPlayTime(sleep,5)
f = fDie()
[m\BehaviorSet\bEat]
f = fFaceTowardFood()
f = fPlay(stand)
f = fPlay(eat)
f = fPlay(stand)
f = fPlay(eat)
f = fPlay(stand)
[m\BehaviorSet\bSick]
f = fPlay(lie_down)
f = fPlayTime(lying_idle,20)
f = fPlayReverse(lie_down)
[m\BehaviorSet\bFindKeeperFood]
f = fWalk(keeperfood,0)
f = fPlaySet(bEat)
[m\BehaviorSet\bFindOtherFood]
f = fWalk(otherfood,0)
f = fPlaySet(bEat)
[m\BehaviorSet\bEscaped1]
f = fPlay(stand)
f = fMove(0,0,run,66)
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bChasePrey]
f = fMove(prey,0,"run",66)
[m\BehaviorSet\bRunFromPredator]
f = fRun(0,0)
[m\BehaviorSet\bCaughtGuest]
f = fPlayTime(stand,4)
[m\BehaviorSet\bCaughtPrey]
f = fDustBall()
f = fPlaySet(bAfterCaught)
[m\BehaviorSet\bAfterCaught]
f = fPlay(stand)
f = fPlayWithSound(noise,Undefined)
f = fPlay(stand)
[m\BehaviorSet\bCaught]
f = fFollow(keeper)
[m\BehaviorSet\bBaby1]
f = fPlay(stand)
f = fWalk(mother,0)
[m\BehaviorSet\bBaby2]
f = fPlay(stand)
f = fWalk(mother,0)
[m\BehaviorSet\bBored1]
f = fPlayTime(stand,10)
[m\BehaviorSet\bBored2]
f = fPlayTime(stand,10)
[m\BehaviorSet\bAngryKeeper]
f = fPlay(stand)
[m\BehaviorSet\bTest]
f = fWalk(0,0)
[m\BehaviorSet\bWalk]
f = fWalk(0,0)
[m\BehaviorSet\bRun]
f = fMove(0,0,run,66)
[m\BehaviorSet\bRattle]
f = fPlayWithSound(box_used,placesound)
[f/Animations]
box_idle = objects/box/idle/idle.ani
box_used = objects/box/used/used.ani
dustball = objects/dustcld/idle/idle.ani
dusting = dstng
eat = eat
flap_ears = flapears
idle = stnd
jerk_head = jrkhdup
jump_high = run
lie_down = liedown
lying_idle = lying
noise = nois
paw_ground = pawgrnd
rub = rub
run = run
shake_head = shkhead
sleep = sleep
spread_ears = sprdears
stand = stnd
stand_noise = stndnois
step_side = sidstp
sway_body = swybody
sweep_ground = trnkswp
swing_head = swnghed
swing_trunk = trnkswng
trunk_down = trnkdwn
trunk_mouth = trnkmout
trunk_outward = trnkout
trunk_up = trnkup
trunk_up_smell = trnksml
walk = walk
wallow = walwater
waterball = objects/watcloud/idle/idle.ani
[f\BehaviorSet\bHappy]
f = fPlaySetProb(bIdle1,20,bHappy1,50,bHappy2,30)
[f\BehaviorSet\bFriendly]
f = fPlaySetProb(bHappy3,70,bIdle2,30)
[f\BehaviorSet\bCalm]
f = fPlaySetProb(bCalm1,50,bIdle1,30,bIdle2,20)
[f\BehaviorSet\bNeutral]
f = fPlaySetProb(bIdle1,50,bIdle2,50)
[f\BehaviorSet\bUneasy]
f = fPlaySetProb(bUneasy1,65,bIdle2,35)
[f\BehaviorSet\bTense]
f = fPlaySetProb(bTense1,70,bAngry3,30)
[f\BehaviorSet\bAngry]
f = fPlaySetProb(bAngry1,40,bAngry2,40,bNoise3,20)
[f\BehaviorSet\bEscaped]
f = fPlaySetProb(bEscaped1,70,bNoise3,30)
[f\BehaviorSet\bBabyActions]
f = fPlaySetProb(bBaby2,67,bIdle1,33)
[f\BehaviorSet\bPlayToys]
[f\BehaviorSet\bPlayWithToyHappy]
[f\BehaviorSet\bPlayWithToyFriendly]
[f\BehaviorSet\bSoundtest1]
[f\BehaviorSet\bHappy1]
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlayTime(Undefined,7)
f = fWalk(0,0)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
[f\BehaviorSet\bHappy2]
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,6)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
[f\BehaviorSet\bHappy3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlayTime(Undefined,4)
f = fWalk(0,0)
f = fPlay(Undefined)
[f\BehaviorSet\bCalm1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayTime(Undefined,5)
f = fPlay(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bUneasy1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,5)
f = fPlayWithSound(Undefined,snort)
f = fPlayReverse(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bTense1]
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fWalk(0,0)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bAngry1]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bAngry2]
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bAngry3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlayReverse(Undefined)
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
[f\BehaviorSet\bNoise1]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlayTime(Undefined,5)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bNoise2]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bNoise3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bIdle1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayTime(Undefined,6)
f = fPlay(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bIdle2]
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,4)
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlay(Undefined)
[f\BehaviorSet\bIdle3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,growl)
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bSleep]
f = fPlay(Undefined)
f = fPlayTime(Undefined,25)
f = fPlayReverse(Undefined)
[f\BehaviorSet\bDie]
f = fPlay(Undefined)
f = fPlayTime(Undefined,5)
f = fPlayTime(Undefined,5)
f = fDie()
[f\BehaviorSet\bEat]
f = fFaceTowardFood()
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bSick]
f = fPlay(Undefined)
f = fPlayTime(Undefined,20)
f = fPlayReverse(Undefined)
[f\BehaviorSet\bFindKeeperFood]
f = fWalk(keeperfood,0)
f = fPlaySet(bEat)
[f\BehaviorSet\bFindOtherFood]
f = fWalk(otherfood,0)
f = fPlaySet(bEat)
[f\BehaviorSet\bEscaped1]
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bChasePrey]
f = fMove(prey,0,Undefined,66)
[f\BehaviorSet\bRunFromPredator]
f = fRun(0,0)
[f\BehaviorSet\bCaughtGuest]
f = fPlayTime(Undefined,4)
[f\BehaviorSet\bCaughtPrey]
f = fDustBall()
f = fPlaySet(bAfterCaught)
[f\BehaviorSet\bAfterCaught]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[f\BehaviorSet\bCaught]
f = fFollow(keeper)
[f\BehaviorSet\bBaby1]
f = fPlay(Undefined)
f = fWalk(mother,0)
[f\BehaviorSet\bBaby2]
f = fPlay(Undefined)
f = fWalk(mother,0)
[f\BehaviorSet\bBored1]
f = fPlayTime(Undefined,10)
[f\BehaviorSet\bBored2]
f = fPlayTime(Undefined,10)
[f\BehaviorSet\bAngryKeeper]
f = fPlay(Undefined)
[f\BehaviorSet\bTest]
f = fWalk(0,0)
[f\BehaviorSet\bWalk]
f = fWalk(0,0)
[f\BehaviorSet\bRun]
f = fMove(0,0,Undefined,66)
[f\BehaviorSet\bRattle]
f = fPlayWithSound(Undefined,placesound)
[y/Animations]
box_idle = objects/box/idle/idle.ani
box_used = objects/box/used/used.ani
dustball = objects/dustcld/idle/idle.ani
dusting = dstng
eat = eat
flap_ears = flapears
idle = stnd
jerk_head = jrkhdup
jump_high = run
lie_down = liedown
lying_idle = lying
noise = nois
paw_ground = pawgrnd
rub = rub
run = run
shake_head = shkhead
sleep = sleep
spread_ears = sprdears
stand = stnd
stand_noise = stndnois
step_side = sidstp
sway_body = swybody
sweep_ground = trnkswp
swing_head = swnghed
swing_trunk = trnkswng
trunk_down = trnkdwn
trunk_mouth = trnkmout
trunk_outward = trnkout
trunk_up = trnkup
trunk_up_smell = trnksml
walk = walk
wallow = walwater
waterball = objects/watcloud/idle/idle.ani
[y\BehaviorSet\bHappy]
f = fPlaySetProb(bIdle1,20,bHappy1,50,bHappy2,30)
[y\BehaviorSet\bFriendly]
f = fPlaySetProb(bHappy3,70,bIdle2,30)
[y\BehaviorSet\bCalm]
f = fPlaySetProb(bCalm1,50,bIdle1,30,bIdle2,20)
[y\BehaviorSet\bNeutral]
f = fPlaySetProb(bIdle1,50,bIdle2,50)
[y\BehaviorSet\bUneasy]
f = fPlaySetProb(bUneasy1,65,bIdle2,35)
[y\BehaviorSet\bTense]
f = fPlaySetProb(bTense1,70,bAngry3,30)
[y\BehaviorSet\bAngry]
f = fPlaySetProb(bAngry1,40,bAngry2,40,bNoise3,20)
[y\BehaviorSet\bEscaped]
f = fPlaySetProb(bEscaped1,70,bNoise3,30)
[y\BehaviorSet\bBabyActions]
f = fPlaySetProb(bBaby2,67,bIdle1,33)
[y\BehaviorSet\bPlayToys]
[y\BehaviorSet\bPlayWithToyHappy]
[y\BehaviorSet\bPlayWithToyFriendly]
[y\BehaviorSet\bSoundtest1]
[y\BehaviorSet\bHappy1]
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlayTime(Undefined,7)
f = fWalk(0,0)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
[y\BehaviorSet\bHappy2]
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,6)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
[y\BehaviorSet\bHappy3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlayTime(Undefined,4)
f = fWalk(0,0)
f = fPlay(Undefined)
[y\BehaviorSet\bCalm1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayTime(Undefined,5)
f = fPlay(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bUneasy1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,5)
f = fPlayWithSound(Undefined,snort)
f = fPlayReverse(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bTense1]
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fWalk(0,0)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bAngry1]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bAngry2]
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bAngry3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,snort)
f = fPlayReverse(Undefined)
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
[y\BehaviorSet\bNoise1]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlayTime(Undefined,5)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bNoise2]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bNoise3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bIdle1]
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlayTime(Undefined,6)
f = fPlay(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bIdle2]
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlayTime(Undefined,4)
f = fPlay(Undefined)
f = fWalk(0,0)
f = fPlay(Undefined)
[y\BehaviorSet\bIdle3]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,growl)
f = fPlay(Undefined)
f = fPlayPingPong(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bSleep]
f = fPlay(Undefined)
f = fPlayTime(Undefined,25)
f = fPlayReverse(Undefined)
[y\BehaviorSet\bDie]
f = fPlay(Undefined)
f = fPlayTime(Undefined,5)
f = fPlayTime(Undefined,5)
f = fDie()
[y\BehaviorSet\bEat]
f = fFaceTowardFood()
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bSick]
f = fPlay(Undefined)
f = fPlayTime(Undefined,20)
f = fPlayReverse(Undefined)
[y\BehaviorSet\bFindKeeperFood]
f = fWalk(keeperfood,0)
f = fPlaySet(bEat)
[y\BehaviorSet\bFindOtherFood]
f = fWalk(otherfood,0)
f = fPlaySet(bEat)
[y\BehaviorSet\bEscaped1]
f = fPlay(Undefined)
f = fMove(0,0,Undefined,66)
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bChasePrey]
f = fMove(prey,0,Undefined,66)
[y\BehaviorSet\bRunFromPredator]
f = fRun(0,0)
[y\BehaviorSet\bCaughtGuest]
f = fPlayTime(Undefined,4)
[y\BehaviorSet\bCaughtPrey]
f = fDustBall()
f = fPlaySet(bAfterCaught)
[y\BehaviorSet\bAfterCaught]
f = fPlay(Undefined)
f = fPlayWithSound(Undefined,Undefined)
f = fPlay(Undefined)
[y\BehaviorSet\bCaught]
f = fFollow(keeper)
[y\BehaviorSet\bBaby1]
f = fPlay(Undefined)
f = fWalk(mother,0)
[y\BehaviorSet\bBaby2]
f = fPlay(Undefined)
f = fWalk(mother,0)
[y\BehaviorSet\bBored1]
f = fPlayTime(Undefined,10)
[y\BehaviorSet\bBored2]
f = fPlayTime(Undefined,10)
[y\BehaviorSet\bAngryKeeper]
f = fPlay(Undefined)
[y\BehaviorSet\bTest]
f = fWalk(0,0)
[y\BehaviorSet\bWalk]
f = fWalk(0,0)
[y\BehaviorSet\bRun]
f = fMove(0,0,Undefined,66)
[y\BehaviorSet\bRattle]
f = fPlayWithSound(Undefined,placesound)
[m/iCharacteristics/Integers]
cEnterLandChance = 100
[f/iCharacteristics/Integers]
cEnterLandChance = 100
[y/iCharacteristics/Integers]
cEnterLandChance = 100
[1033]
cGeneralInfoFileName = animals/E34183E3/texts/1033.txt
cLongHelp = Adopt an African elephant. African elephants live in herds and only elephant shelters are large enough for elephants. African elephants need fresh water to drink from.
cName = African Elephant
cTheString = African Elephant
Posted: Sun Jul 04, 2010 3:06 am
by Jay
There are 2 things you did in that uca; all of the other problems were caused by APE. In the [Sounds] section, you have "animal/E34183E3/ele3.wav" instead of "animals/E34183E3/ele3.wav". In the [1033] section, cTheString should always have "the", so it should be "cTheString = the African Elephant".
APE caused problems in the [Sounds] section and [...\BehaviorSet\...] sections as I described in my previous post. Also, I recommend using the ingame sounds directly. So here are the needed changes. For the [Sounds] section, I looked at elephant.ai in ZT's animal2.ztd to see what it should contain, and then added "animals/elephant/" and ".wav". So this is what I would use for the [Sounds] section:
[Sounds]
trumpet1 = animals/elephant/ele1.wav
trumpet1 = 500
snort = animals/elephant/ele3.wav
snort = 2000
growl = animals/elephant/ele4.wav
growl = 800
trumpet2 = animals/elephant/ele8.wav
trumpet2 = 500
dustball = animals/elephant/ele8.wav
dustball = 500
waterball = animals/sealion/splash1.wav
waterball = 1000
placesound = animals/elephant/ele1.wav
placesound = 500
pickupsound = animals/elephant/ele4.wav
pickupsound = 800
All [f\BehaviorSet\...] sections and all [y\BehaviorSet\...] sections should be deleted. I would also delete the [f/Animations], [y/Animations], [f/iCharacteristics/Integers], and [y/iCharacteristics/Integers] sections. Notice for the last 2 that they are "/iCharacteristics" and not "/Characteristics". All of these changes will cause the female and young to use the male configuration, while the young will still use the young graphics.
In the [m\BehaviorSet\bAngry1] and [m\BehaviorSet\bNoise3] sections, change all Undefined to trumpet2. In the [m\BehaviorSet\bAngry2], [m\BehaviorSet\bAngry3], [m\BehaviorSet\bNoise1], [m\BehaviorSet\bNoise2], [m\BehaviorSet\bEscaped1], and [m\BehaviorSet\bAfterCaught] sections, change all Undefined to trumpet1. I got these from ZT's elephant.ai.
That should fix all of the sounds. But there are other inefficiencies caused by APE or BF. In [m/Characteristics/Integers], there are 2 cDeathChance and 2 cTimeDeath. These were in the BF elephant as well, but there should be only 1 line for each. So delete the "cDeathChance = 90" and "cTimeDeath = 12960" lines. Also, if a user made animal catches a male guest, it will turn into a lion temporarily. That is because the catch graphics are in the guest's files. So I would delete the "cPrey = 9503" line. A user made animal cannot use an ingame toy. So I would also delete the "cNeedToys = 1" line.
In order to get around a ZT problem concerning showing the tooltip for the preferred foliage, I would also make the following changes. I see that the [m/Characteristics/Integers] section contains a "cPrefIconID = 7057" line. So I would also add that line to the [y/Characteristics/Integers] section and I would also create the following section:
[f/Characteristics/Integers]
cPrefIconID = 7057
The [cSuitableObjects] and [cCompatibleTerrain] sections contain pairs of lines. Whenever the second line of the pair is "v = 0", I remove the pair, for efficiency. So, in the [cSuitableObjects] section, I would remove everything from the line pair:
v = 9401
v = 0
through the line pair:
v = 7098
v = 0
In the [cCompatibleTerrain] section, I would remove the following line pairs:
v = 0
v = 0
v = 4
v = 0
v = 7
v = 0
v = 10
v = 0
v = 12
v = 0
v = 14
v = 0
v = 15
v = 0
Finally, a user made elephant cannot use the ingame elephant shelters, because of how the shelters are configured, unless someone is using a shelter hack. So, I would add the following lines to the [cSuitableObjects] section so that the elephant also likes the concrete shelters, but only a little:
v = 8107
v = 1
v = 8108
v = 1
v = 8109
v = 1
And that should be it for the ".uca". There would be things for the ".ztd", such as deleting the ".wav" files, since this would be using the ingame sounds directly. And if the ic..., ls..., and pl... folders contain N.pal files, you can remove the other ".pal" files from those folders.