Author Topic: Animal Attribute Changing  (Read 3047 times)

0 Members and 1 Guest are viewing this topic.

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« on: October 30, 2006, 04:26:38 PM »
This deals with some of the most common changes designer's wish to make. Each post deals with a different attribute so scan through them till you find the one you want. If you are trying to edit files of official animals then make sure that you make a copy of the file first to toy with, or you may have to reinstall your game...save yourself the hassle!

This is only a partial guide – it cannot (and will not) teach you everything. It is intended to help those who are first coding to get down a few simple changes to the animals. If you have a question, please use the [topic=5628]Search[/topic] feature to look for a topic that may already be discussing your problem before starting a new one. Private messaging myself or other designers is a last resort, and even then try not to do it.

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« Reply #1 on: October 30, 2006, 04:29:42 PM »
Files that you'll want to edit: (All located under C:\Program Files\Microsoft Games\Zoo Tycoon 2)

If you have just ZT2: ai.z2f or entities.z2f or ui.z2f
If you have ZT2 + ES: x100_000.z2f for ES animals and ZT2 animals
If you have ZT2 + ES + AA: x110_000.z2f for the AA animals and x101_000.z2f for ZT2+ES animals
If you have ZT2 + ES + AA + MM: x200_000.z2f for the MM animals, x110_000 for the AA animals, x120_100 for ES animals, and x120_000.z2f for ZT2 animals
If you have Zookeeper Collection x151_000.z2f for ZT2, ES, and AA animals

All of these files can be opened with any program that can open .zip files. Most people use WinRar.
« Last Edit: November 12, 2006, 01:59:32 PM by mikaboshi »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« Reply #2 on: October 30, 2006, 04:31:02 PM »
Where to find the specified Files:

BEH or TSK: refer to the list above to determine which file to look in, then go to ai\tasks
XML: refer to the list above to determine which file to look in, then go to entities\units\animals\ai
LANG: refer to the list above to determine which file to look in, then go to ui\zoopedia\entries

All of these can be opened with Notepad.

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« Reply #3 on: October 30, 2006, 04:43:18 PM »
General Directions for Each Attribute Change


If you are coding a new animal
Use the directions in APE II - that is all the information you will need. The reason you would want to be reading this is to know where in the files you can change certain aspects of your animal.


If you are just editing the official animals:
First decide what animal you want to change. Then, recall what expansion pack it is from. I will use the Nile Monitor Lizard as an example. Because of this I will want to locate x110_000.z2f, and open it up with WinRar. Refer to the list above to go to find which files you should go to. Extract it by first selecting the file you want, and then right click on it and hit "Extract to Specified Folder". If I don't have a folder already made for it, I just usually place the file on my desktop. Navigate to your destination area and hit okay. WinRar will automatically place the file inside of folders like the ones it came out of, so look for whatever the top "parent folder" is, which will be entities or ai, depending on what you are extracting. Go inside this folder and inside the sub folders, until you find the file you actually want to edit.

It should be known that you can also just find the file you want and "drag" it out of WinRar into a folder or to your desktop, but it's much easier in the end to do it the way described above. When you are done editing, instead of writing over the original files (in case we screw up), we can make a new, separate .z2f that will still give us the new attributes, but will not get rid of the original file, just in case!

Now go to the place you extracted the file to, and right click on it. Firstly, select "Properties". At the bottom of the window, you should see a some options, including one that says "Read-Only". UNcheck that box; now you can actually save changes to the file. Hit okay to let the changes take place.

Right click on the icon again. Select "Open With..." from the menu, and it should give you a list of programs you can open the file with. Scroll down till you find Notepad. Now, generally there is a little box next to a statement that reads:  "Always use the selected program to open this kind of file" You can leave this here, and if you do, anytime you have a file of that sort, you can just double click on the icon, and it will know to automatically open the file with Notepad. I generally UNcheck this box. Really, its a personal preference, but for XML files you do NOT want the default program to be Notepad.

The file should open up into notepad, and you can continue the directions under the correct heading below!

Then, when you are done making all of your changes, you will want to get them to work for your game! The easiest way to do this is make sure your file is in the same folder names as the original file was (the file should be named the same as the original as well). Example: a beh file is in ai\tasks. (Consult the list above to find out correct paths). So for the Nile Monitor file, I would want to make sure it was in a folder called "tasks" which would be in a folder called "ai." If you used the Extract method described above, then the work is really already done for you. Now, You should right click on the top-most folder (ai or entities) click "Add to Archive." Before you start naming anything, locate the area that ZIP is selected instead of RAR. Now, you can name the file anything you want, but because you want this file to be override what the other files in the game say, you need to put a "Z" before the name. This just makes sure that your file is the one it uses, not the original. Also make sure to write ".z2f" after your name, so that it becomes a Zoo Tycoon 2 File. Place this file into the main ZT2 Directory (where it installed to) and it should work! Yay!

If you run into problems with the changes you made, or simply want to go back to the way the game was before you tinkered with it, you can delete this file you made, without any damage to the game files.

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Amount of Babies
« Reply #4 on: October 30, 2006, 04:44:54 PM »
Amount of Babies

Changing the number of babies an animal has per pregnancy.



For this change you will need the BEH file. Use the above list to know which file you should be getting the BEH from.

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

BFBehRandomSet minPlays

And hit enter or press ok. This should take you to an area that looks like this:

Code: [Select]
<BFBehRandomSet minPlays="1" maxPlays="2">
Make sure that the word BIRTH appeares near these words; other attributes could be affected if you edit just any random area. The first number (minPlays) represents the amount minimum number of babies/eggs the animal will have. The second number (maxPlays) represents the most they will have. Some animals, like ones that automatically only have one baby, may not include this set of code. If that is the case, simply copy and paste the code from an animal who has this coding and you should be set. The amount the animal will have during the game will be somewhere between these two numbers. Change these to whatever you want but keep a few points in mind:

1. The min number cannot be less than 0
2. The min number cannot be larger than the max number
3. If you set the min/max too high, the game could crash
4. If you set the min/max high, remember that you have to care for all of those babies: this means lots of room, lots of refilling dishes, lots of poo, and possible cannabalism between your animals.
« Last Edit: February 13, 2007, 07:26:28 AM by ShenTirag »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« Reply #5 on: October 30, 2006, 04:46:30 PM »
Size

Changing how large or small your animal is.


For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.
The Main XML can be described as the first XML for your animal; it does not have anything besides the animal name in the title.

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

BFActorComponent actorfile

And hit enter or press ok. This should take you to an area that looks similar to this:

Code: [Select]
<BFActorComponent actorfile="entities/units/animals/Cheetah/Cheetah_Adult_F.bfm" scale=".6" />
The number after "scale" determines how large the animal will be. The larger the number, the larger the animal, the smaller the number, the smaller the animal.

Things to Keep in Mind:

1. The number must always be formatted with a decimal; thus, use "1.0" rather than "1"
2. Making an animal too small or large may make it interact with its surroundings in an unsatisfactory manner.
« Last Edit: February 13, 2007, 07:27:07 AM by ShenTirag »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Fame Level
« Reply #6 on: October 30, 2006, 04:48:02 PM »
Fame Level

Changing the amount of stars an animal needs to become available in campaign or challenge mode.


For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.
The Main XML can be described as the first XML for your animal; it does not have anything besides the animal name in the title.

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

adoptRarity

And hit enter or press ok. This should take you to an area that looks similar to this:

Code: [Select]
f_adoptRarity="40"
The number here represents how many stars it will take before an animal is accessible in campaign or challenge games. Each value of 10 represents an half star. Thus the animal in this example is a 2-star animal.

for ½ star fame make f_adoptRarity="1"
for 1 star fame make f_adoptRarity="20"
for 1½ stars make f_adoptRarity="30"
for 2 stars make f_adoptRarity="40"

etc until 5 stars which would be:

five stars make f_adoptRarity="100"

Things to Keep in Mind:

1. Rarity values cannot be below 1 or over 100.
« Last Edit: February 13, 2007, 07:27:31 AM by ShenTirag »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Cost
« Reply #7 on: October 30, 2006, 04:49:03 PM »
Cost

Changing the price of an animal


For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.
The Main XML can be described as the first XML for your animal; it does not have anything besides the animal name in the title.


With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

ZTEconomyComponent cost

And hit enter or press ok. This should take you to an area that looks similar to this:

Code: [Select]
<ZTEconomyComponent cost="5500">
The number after the equals is the cost of the animal in the currency your game uses, probably dollars in most cases. Simply change this number to whatever you want the animal to cost. Generally more rare animals cost more than common ones do.

Things to keep in Mind:

1. The number cannot be below zero
2. If a cap exists on how expensive an animal is, I do not know it, but I wouldn't suggest finding it either.
« Last Edit: February 13, 2007, 07:28:27 AM by ShenTirag »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Types of Food
« Reply #8 on: October 30, 2006, 04:50:57 PM »
Types of food

Changing the food an animal eats.


For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.
The Main XML can be described as the first XML for your animal; it does not have anything besides the animal name in the title.

To locate the general area that we want to be in, with the file open in Notepad, scroll down a little ways until you see the first substantial block of text. It should look something like:



etc etc etc

Now the types of food that an animal eats are determined by codes like this.

Basically, all you have to do is take out the foods you DON'T want your animal to eat and replace them with ones that you DO. This example is from the Fennec Fox: an omnivore, so he might be using more codes than what your animal will. Here is a list of all of the codes you should need to make your animal eat what you want it to, as well as what the codes control. If one of these is listed in your animals XML file and you DON'T want her eating that, then just simply change the "true" to false. They are organized by what Expansion pack they became available in


Zoo Tycoon 2
b_Ambivore="true" : Diet consists of grasses and broad leaf plants
b_Folivore="true" : Diet consists of foliage (leave and trees)
b_Carnivore="true" : Diet consists of meat
b_Piscivore="true" : Diet conists of fish
b_Insectivore="true" : Diet that consists chiefly of insects
b_HoneyEater="true" : Diet consists of honey
b_Granivore="true" : Diet consists of seeds/grain
b_Graminivore="true" : Diet consists of grasses
b_Crustacivore="true" : Diet consists of crustaceans
b_Frugivore="true" : Diet consists of fruit
b_BambooEater="true" : Diet consists of bamboo

Marine Mania
b_Cancrivorous="true" : Diet consists of Crustaceans (clams included)
b_SquidEater="true" : Diet consists of squid
b_MarinePiscivore="true" : Diet consists of marine fish (underwater dishes)
b_Fucivore="true" : Diet consists of seaweed
b_Planktivore="true" : Diet consists of Plankton
b_MarineCarnivore="true" : Diet consists of Marine Meat (underwater dishes)
b_JellyfishEater="true" : Diet consists of Jellyfish


Also, herbivores generally include these codes to make them eat the foliage around them:
b_Grazer="true"
b_Browser="true"
b_TreeBrowser="true"
« Last Edit: February 13, 2007, 07:34:17 AM by Penguino »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Biome/Location
« Reply #9 on: October 30, 2006, 04:54:29 PM »
Biome/Location

Changing where an animal lives and what biome they like

For these changes refer to the APE II Tutorial and Penguinman's Map Location Tutorial. Note that the Map Location Tutorial link will take you to Zoo Tycoon 2 Designing Centre
« Last Edit: October 30, 2006, 05:02:37 PM by mikaboshi »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Animal Attribute Changing
« Reply #10 on: October 30, 2006, 04:57:33 PM »
Conservation Status

Changing the endangerment level of an animal


For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.
You will also need to edit the lang file. Use the above list to find out where to find it.

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

Endangerment

And hit enter or press ok. This should take you to an area that looks similar to this:

Code: [Select]
s_Endangerment=Endangered"
The different endangerment codes are:

LowRisk
Vulnerable
Endangered
Critical

Change the code inside the quotations to whichever you want. Now let’s visit the lang files.

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

Status

And hit enter or press ok. This should take you to an area that looks similar to this: (colors added for clarification)

 
Quote
<br/>   
                  <cell width=32" pady="0">               
                     <img src="ui/zoopedia/vulnerable.dds" sx=0" sy="0" sw="64" sh="64" width="32" height="32"/>
                  </cell>                 
                  <cell width="224" padx="10" pady="0">
                     <color r="255" g="255" b="255">
                     Conservation Status:
                     <br/>
                        <color r="225" g="225" b="0">
                      Vulnerable

Here you need to change a few things. Where it says vulnerable.dds (in this example) you need to change that to whatever conservation status you have stated in the XML file, making sure to keep it in all lower case letters.

Next, change where it currently says Vulnerable in this example to match once again what you said in the XML file. You can use a capital letter here.

The last change is the colors. Where it says

                        <color r="225" g="225" b="0">

You need to make it match the color of the icon. R= is the Red value, G= the green value, and B= the blue value. The numbers state how much of each color you want to mix in order to get your color. The colors for the statuses follow:

LowRisk: <color r="0" g="255" b="0">
Vulnerable: <color r="225" g="225" b="225">
Endangered: <color r="225" g="225" b="0">
Critical: <color r="225" g="0" b="0">

Things to Remember:

1. The number values can never be more than 225 or less than zero
« Last Edit: February 13, 2007, 07:36:22 AM by ShenTirag »

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Space Requirements
« Reply #11 on: October 30, 2006, 04:59:42 PM »
Space Requirements

How much space in an exhibit an animal needs to be happy.

For this change you will need the main XML file. Use the above list to know which file you should be getting the XML from.

For ZT2/ES/AA:

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

RequiredInitial

And hit enter or press ok. This should take you to an area that looks similar to this:

Quote
f_RequiredInitialSpace=280" f_RequiredAdditionalSpace="40"


The first number refers to how many units animal needs in order to be happy. The second number refers to the number of units each additional animal will need. For instance, this is the Space requirements for a Giant Sable Antelope. The exhibit has to be a minimum of 280 units in order to be suitable for one Antelope. If the exhibit has two animals in it, then the amount needed is 280+40 or 320 units, and so on and so forth. The larger the number, the larger the amount of space the animal requires; the smaller, the less amount of space an animal requires.

For MM animals:

With the file open in Notepad, Hit "Ctrl-F", which will bring up the "Find" Box. Inside this box, type, or copy and paste this:

RequiredInitial

And hit enter or press ok. This should take you to an area that looks similar to this:

Quote
f_RequiredInitialTankSpace="200" f_RequiredAdditionalTankSpace="50" f_RequiredTankDepth="5"



The first number refers to how many units animal needs in order to be happy. The second number refers to the number of units each additional animal will need. The third number refers to how deep the tank or water depth of the exhibit must be. For instance, this is the Space requirements for a Beluga. The exhibit has to be a minimum of 200 units in order to be suitable for one Beluga. If the exhibit has two animals in it, then the amount needed is 200+50 or 250 units, and so on and so forth. How deep the tank is does not change based on the number of animals in the tank. The larger the number, the larger the amount of space the animal requires; the smaller, the less amount of space an animal requires.


Change these numbers to be more appropriate for your animal. Remember:

1. The numbers cannot be below zero
2. The Initial Space should be larger than the Additional Space