Welcome Guest [Log In] [Register]
Welcome to Zoo Tycoon 2 Designing Centre (ZTDC). We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Mixing And Matching Animations/behaviors; turning prey into predator
Topic Started: Jan 14 2009, 10:28 PM (1,885 Views)
miss_midnite
Member Avatar
New Member
thanks for clicking!! i recently finished making a more natural looking raccoon skin but can't work the bugs out of getting him to use the lizard live food.

its based off the red panda (of course) so i doubt there are any inherent "pounce" or otherwise hunting type animationss to use. i tried copying the "chase prey" behavior from the gray wolf beh file, changed prey="true" to predator="true" in the main xml, and i imagine im going to have to link it to some foreign animations. i really want to finish this project and put it up for DL. any suggestions?
Here's a couple pics:

Posted Image
MAIN SKIN

Posted Image
BROWN VARIENT

Posted Image
MOTHER AND BABY

Ive been coding and recoding for days but cant seem to get him to so much as acknowledge the live food.

thanks so much!
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
Hello! Fantastic job so far it's really wonderful :D

So, in the beh file what exactly did you add in to make them hunt? Can you copy the code here?
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
thanks a lot :D its my firsty. here's what i copied from beh to beh:

<ChasePrey>
<subjects>
<raccoon/>
</subjects>
<behaviors>
<BFBehPursuit hitRadius="10" pursuitRadius="30" locoSpeed="stalk"/>
<BFBehAnimate targetAnim="StalkPause_Idle" playTime="3"/>
</behaviors>
</ChasePrey>
<MissPrey>
<subjects>
<raccoon/>
</subjects>
<behaviors>
<ZTBehFeedback>
<ZTFeedbackData>
<ZTActionInfo locID="animalactions:GrowlAngry"/>
</ZTFeedbackData>
</ZTBehFeedback>
<BFBehAnimate targetAnim="Stand_Growl"/>
</behaviors>
</MissPrey>
<AttackPrey>
<subjects>
<raccoon/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="Stand_SwipeLeft" interruptFlag="true"/>
<BFBehPursuit hitRadius="3" pursuitRadius="30" locoSpeed="fast"/>
<BFBehAnimate targetAnim="Stand_SwipeLeft" interruptFlag="true" loopFlag="true"/>
</behaviors>
</AttackPrey>
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
Ok, so multiple places in there have this: targetAnim=

The part after the equals is the name of an animation, but it is unlikely that the red panda doesn't have those animations.
What you need to do is change the names of the animations in the beh file to match animations that you can find in the bfm file.


Also, in the main xml, there is probably some kind of LivePreyUser="true" tag but I dunno exactly what it is. Search in an animal that does use the prey and see if you can find it.
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
thanks a lot! ill give it a shot. i thought the livepreyuser=true was my problem before but i couldnt find anything in the other predators' xmls. the live prey also isnt on the list in the entities/objects/enrichment folder. i think it might be classified as an animal not a "toy". its got beh and tsk files under "LizardLive". i dunno if that makes any difference...
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
well i got the raccoon to at least admit that the live food exists. Current Activity: Going to investigate Live Food. but thats it. :unsure:

Is there something that he needs in the tsk file? i looked in the florida panther tsk but only found code seeming to pertain to infanticide, attacking guests, and attacking other predators.
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
I dont think the tsk folder will have anything.

Hmmm.... It's a shame I can't remember... I don't have access to my files right now so it's a bit tough to help but try this:

Go to the LizardLive.beh file and search for "true"
Tell me what you find XD
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
LizardLive.beh (minus the basic locomotion code before it):

<DockAttacked>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehScript context="behavior" file="scripts/playparticle.lua" function="playParticle" params="{Floor} runps PlacementCloud"/>
<BFBehDockNow targetNode="p_PredatorOffset" subjectNode="p_PreyOffset" reserveSlotName="general"/>
</behaviors>
</DockAttacked>
<Attacked>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehSetAttribute>
<BFAISubjectData b_Dead="true"/>
</BFBehSetAttribute>
<BFBehAnimate targetAnim="Dead_Idle"/>
</behaviors>
</Attacked>
<WaitPickup>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="Dead_Idle" loopFlag="true"/>
</behaviors>
</WaitPickup>
<PickedUp>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="Dead_2Limp"/>
<BFBehAnimate targetAnim="Limp_Idle" loopFlag="true"/>
</behaviors>
</PickedUp>
<BeingCarried>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="Limp_Idle" loopFlag="true"/>
</behaviors>
</BeingCarried>
<Dropped>
<subjects>
<LizardLive/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="Limp_2Dead"/>
</behaviors>
</Dropped>
<PickUpLizardLive>
<subjects>
<Felidae/>
</subjects>
<behaviors>
<ZTBehFeedback>
<ZTFeedbackData>
<ZTActionInfo locID="animalactions:PickingUp" useTargetName="true"/>
</ZTFeedbackData>
</ZTBehFeedback>
<BFBehAttachObject targetNode="Dock_PickUp" targetAnim="Stand_2StandObject_Rough" locoMod="carry" detachAction="dropitem" detachBehSet="DetachLizardLive" targetBehSet="BeingCarried"/>
</behaviors>
</PickUpLizardLive>
<PickUpLizardLive>
<subjects>
<Ursidae/>
</subjects>
<behaviors>
<BFBehAttachObject targetNode="Dock_PickUp" targetAnim="Stand_2StandObject" locoMod="carry" detachAction="dropitem" detachBehSet="DetachLizardLive" targetBehSet="BeingCarried"/>
</behaviors>
</PickUpLizardLive>
<DetachLizardLive>
<subjects>
<Ursidae/>
<Felidae/>
</subjects>
<behaviors>
<BFBehAnimate targetAnim="StandObject_Idle"/>
<BFBehSyncSet syncEntity="object" subjectBehSet="DropObject_Ground" targetBehSet="Dropped"/>
</behaviors>
</DetachLizardLive>
</BehaviorSets>

grr...must fiind bug...must find bug...must find bug... :blink:
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
AH I FOUND IT :D

Ok so you may notice that in there they have like <Felidae/> and <Ursidae/> and such.

In the main xml, you have probably noticed that in the beginning there is a string that relates to the animal's classification. Find the wolf's main xml and exchange all (not just the Felidae) of these classification's with the wolves and that should help.

Now, you also need to make sure you change the animation names of the beh to ones that are listed in the bfm. If you want help with where to find the animation names in the bfm, paste one line of it in here and I'll explain what each part means :)
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
do you mean replace the classification of my raccoon with that of the wolf?
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
Yeah, that should help, and I'm hoping that will make it show up in the zookeeper recommendations.
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
no bueno. switched the classification and it caused the raccoon to not show up in the game any more. i scrapped the xml and recoded another one from scratch two more times to be sure i didnt screw it up but the result was the same.

and it already shows up in the zookeeper reccomendations. he just wouldnt use it or acknowledge it at all. hmm and the beh code for the LizardLive supposedly includes Ursidae and Felidae. the red panda was already classified as Urisdae (bears).

nuts :(
Posted Image
Offline Profile Quote Post Goto Top
 
Penguinman
Member Avatar
Admin and Coding Master
Admin
OH! It shows up in the zookeeper reccomendations???
Then you don't need to change the classification, sorry!!

The problem is now the animation links in the beh. Have you changed those?
Check out my site where you can get many of my downloads here.
Posted Image
Offline Profile Quote Post Goto Top
 
miss_midnite
Member Avatar
New Member
yea sorry about that, i should have been more clear :smack: .

i changed the target animations in the raccoon beh file:

"stalkpause_idle" ----> 'browse_idle"

"stand_growl" --------> "stand_hiss"

"stand_bite" ----------> "stand_swipe"

they're all valid animations from the raccoon bfm file.

its difficult to tell if he is still unable to use it, or just not in the mood. when i place it Current Activity says "Looking at Live Food Lizard" but nothing after that. i think there still might be a problem because i tried placing a gray wolf and florida panther they chased after the lizard right away.
Posted Image
Offline Profile Quote Post Goto Top
 
ShenTirag
Member Avatar
Small and Bitter
Senior Mod
Have you tried not placing any normal food down for the raccoon? Just a blank enclosure with the live prey in it? Sometimes animals can be fussy when testing :)
Shen's Den
Forum Rules Are Your Friends!
Posted Image
Offline Profile Quote Post Goto Top
 
ZetaBoards - Free Forum Hosting
Free Forums with no limits on posts or members.
Learn More · Sign-up Now
Go to Next Page
« Previous Topic · Animal Coding Help · Next Topic »
Add Reply