Tutorial Objects & Scenery Scripting Zoo Tycoon 2 Archived

The How To's of Gift Making

Published
14/11/2026
History
History
Reading time
6 min read
Views
0 views
Comments
0 comments
Like
Originally published by MarineManiac on ZT2 Designing Centre in August 2007.
On this page

Creating Custom Animal Gifts in Zoo Tycoon 2

Okay, you can get you gift files from a number of places. This tutorial teaches how to use only cart based animals, but can be applied to shops.

Gift File Locations

Gifts Folder Files
ZT gifts ai/Tasks/guests/gift/ Gift.tsk & Gift.beh
ES gifts ai/Tasks/guests/ Gift_XP1.tsk & Gift_XP1.beh
AA gifts ai/Tasks/guests/gift/ CP1_Gift.beh & CP1_Gift.tsk
MM gifts AI/Tasks/guests/gift/ Gift_XP2.tsk & Gift_XP2.beh

1. Coding the .tsk File

Okay now for the Gift_XP1.tsk.

Important

Note you HAVE to use the files that your animal correlates with. So if you are making a backpack, you are not going to use an animal that is a hat. Or else your guest will be wearing your backpacks as hats :lol:

So we will continue with a different animal the Fennec Fox, since it uses a cart.. Again you must use the animal that the animal in the file correlates or it will be weird. So if you making an animal out of a dolphin you MUST use the parts of the file that corrleate with the dolphin. But for the purposes of teaching, we will not be doing any correlating. This all so you can learn the ropes.

Preparing the File

Okay first the top of the page must have

<BFAITaskTemplateList>

and the end of the file must be

</BFAITaskTemplateList>

So scroll down on the page a bit until you get to this phrase

<BFAITaskTemplate Name="BuyFoxFennecGift" CursorTask="false" reserveTag="Use_Cart" TaskDelayMin="1000000000" TaskDelayMax="1000000001" UniqueID="Guest_FoxFennec:BuyFoxFennecGift">

now highlight everyhting above that except the very top line and delete it all. Now scroll down until you see

<BFAITaskTemplate Name="BuyGibbonCrestedGift" CursorTask="false" reserveTag="Use_GiftShop" TaskDelayMin="1000000000" TaskDelayMax="1000000001" UniqueID="gift:BuyGibbonCrestedGift">

Highlight that and delete everything below except for the very last line. You should have this

<BFAITaskTemplateList>
    <BFAITaskTemplate Name="BuyFoxFennecGift" CursorTask="false" reserveTag="Use_Cart" TaskDelayMin="1000000000" TaskDelayMax="1000000001" UniqueID="Guest_FoxFennec:BuyFoxFennecGift">
        <BFAICreateData>
            <Subjects>
                <Guest/>
                <Qualifiers_AND inWater_OR_onLand="true" b_NoBuyHeadGift="false"/>
            </Subjects>
            <Targets>
                <giftcart_df/>
                <Qualifiers inSight="30"/>
            </Targets>
            <Objects>
                <t_FoxFennecGift/>
            </Objects>
        </BFAICreateData>
        <BFAIEvalData>
            <BFAIAttributeFloatMap hunger="-100" thirst="-100" dessert="-100" rest="-100" social="-100" amusement="-100" gift="-100" bathroom="-100" viewanimals="-100"/>
        </BFAIEvalData>
        <BFBehExecTask>
            <BFBehPlaySet behSet="BuyFoxFennecGift"/>
            <ZTBehFeedback>
                <ZTFeedbackData>
                    <ZTThoughtInfo locID="guestthoughts:BuyGift" priority="1" timeout="60" global="false"/>
                </ZTFeedbackData>
            </ZTBehFeedback>
        </BFBehExecTask>
        <BFAICompletionData>
            <BFAIAttributeFloatMap gift="-50"/>
            <BFAISubjectData happiness="price_effect(-5,0,5)"/>
        </BFAICompletionData>
    </BFAITaskTemplate>
</BFAITaskTemplateList>

Replacing the Codename

Now replace whatever animal correlates to your project with your animal’s codename. Again I will be using SealHarp. Only for teaching. You can do a find/replace in notepad with this file. And again you can save this file with whatever name, but it must end in .tsk

here’s what it should look like:

<BFAITaskTemplateList>
    <BFAITaskTemplate Name="BuySealHarpGift" CursorTask="false" reserveTag="Use_Cart" TaskDelayMin="1000000000" TaskDelayMax="1000000001" UniqueID="Guest_SealHarp:BuySealHarpGift">
        <BFAICreateData>
            <Subjects>
                <Guest/>
                <Qualifiers_AND inWater_OR_onLand="true" b_NoBuyHeadGift="false"/>
            </Subjects>
            <Targets>
                <giftcart_df/>
                <Qualifiers inSight="30"/>
            </Targets>
            <Objects>
                <t_SealHarpGift/>
            </Objects>
        </BFAICreateData>
        <BFAIEvalData>
            <BFAIAttributeFloatMap hunger="-100" thirst="-100" dessert="-100" rest="-100" social="-100" amusement="-100" gift="-100" bathroom="-100" viewanimals="-100"/>
        </BFAIEvalData>
        <BFBehExecTask>
            <BFBehPlaySet behSet="BuySealHarpGift"/>
            <ZTBehFeedback>
                <ZTFeedbackData>
                    <ZTThoughtInfo locID="guestthoughts:BuyGift" priority="1" timeout="60" global="false"/>
                </ZTFeedbackData>
            </ZTBehFeedback>
        </BFBehExecTask>
        <BFAICompletionData>
            <BFAIAttributeFloatMap gift="-50"/>
            <BFAISubjectData happiness="price_effect(-5,0,5)"/>
        </BFAICompletionData>
    </BFAITaskTemplate>
</BFAITaskTemplateList>

And you’re all done with the .tsk

Note

Note: in MM, if the word GiftCart is present you may have to delete Gift or Cart depending on its usage. with the exception of this phrase <giftcart_df/> That stays the same always.

2. Coding the .beh File

Now for the easiest part, the .beh.

Preparing the File

Make sure your file starts with

<BehaviorSets>

and ends with

</BehaviorSets>

Alright now find the Fennec Fox portion of this file. Delete everything BUT DON’T delete the first and last lines and this phrase:

<BuyFoxFennecGift>
    <subjects>
        <Guest/>
    </subjects>
    <behaviors>
        <BFBehPlaySet behSet="DockGiftCart"/>
        <BFBehAttachObject attachEntity="FoxFennec_Gift" subjectNode="Bip01 Head" detachAction="inventory" container="head_inventory"/>
        <BFBehAnimate targetAnim="Stand_Turn180"/>
    </behaviors>
</BuyFoxFennecGift>

You should have this:

<BehaviorSets>
    <BuyFoxFennecGift>
        <subjects>
            <Guest/>
        </subjects>
        <behaviors>
            <BFBehPlaySet behSet="DockGiftCart"/>
            <BFBehAttachObject attachEntity="FoxFennec_Gift" subjectNode="Bip01 Head" detachAction="inventory" container="head_inventory"/>
            <BFBehAnimate targetAnim="Stand_Turn180"/>
        </behaviors>
    </BuyFoxFennecGift>
</BehaviorSets>

Note

Now in some of the other XP files there may be much more that have nothing to do with animal gifts. Delete those. You only need the portions that have to do with your animals gift.

Replacing the Codename

Next, manually replace the animal’s name with your animal’s codename. Using again Harp Seal, it should look like this:

<BehaviorSets>
    <BuySealHarpGift>
        <subjects>
            <Guest/>
        </subjects>
        <behaviors>
            <BFBehPlaySet behSet="DockGiftCart"/>
            <BFBehAttachObject attachEntity="SealHarp_Gift" subjectNode="Bip01 Head" detachAction="inventory" container="head_inventory"/>
            <BFBehAnimate targetAnim="Stand_Turn180"/>
        </behaviors>
    </BuySealHarpGift>
</BehaviorSets>

And for the last time, save with any name you want as long as it ends in .beh

3. Coding and Painting

Now its time for a part in which we are all familiar with: coding and painting. In your animals entities file make this extension objects/Items/ ai and Gifts ( two separate files)

Inside these two files you will need to copy the all the gift files and ai file that you will be using and that correlate with your animal. You can find these files in the exact same extension that I gave four lines above. Once you do that have fun with the coding and skinning. Its just like making an animal. Let your creativity run wild.

Gift Icon

For your gift icon make this extension ui/infopan/ icon_codename_Gift icon.dds You can find your icon file in the same extension of all XPs.

Marine Mania Files

Note

Also if you are using MM files you will also need to make shared folder in the main section of your folder ( in the same place where entities, ui, ai, lang are) You will need to copy the gift .dds there. All other XPs have there gift .dds with the other files.

Gift Properties

Important

One note I would like to make is to make sure you change Rare to Common. So make sure it reads b_CommonGift. You need to delete Marine in this phrase if your working with MM files.

Good luck and have fun 👍

Remember if you have trouble, post it in the respective areas in the fourm and someone will be able to help.

Comments 0

Log in to join the conversation.

No comments yet.

Loading the history…
Tutorial Archived

Behavior Editing Tutorial

by Zooasaurus

In this tutorial, you will find out how to add and subtract behaviors from animals.

  • Zoo Tycoon 2
  • Animals
  • Scripting
Reading time
5 min
Comments
0
Tutorial Archived

Path Tutorial

by ShenTirag

Learn how to create your own paths for Zoo Tycoon 2!

  • Zoo Tycoon 2
  • Objects & Scenery
  • Scripting
Reading time
5 min
Comments
0

Modal Title