Animal Configuration Checker

Released user-created animals which have been tested and approved by our staff.
Locked
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Animal Configuration Checker

Post by Jay »

Note: This version is here just for archival reasons. Use the download in the third post instead.

This is an Animal Configuration Checker utility. All Zoo Tycoon animals have a configuration file inside a ztd file. For most user created animals, this configuration file ends with ".uca". For all Blue Fang animals and some user created animals, this configuration file ends with ".ai". This utility looks in the uca/ai file and does two things. First, it checks the file for problems and inefficiencies. This will help testers and animal creators. It does not check everything that is listed in the Uca Editing Guide in the APE Questions Forum; so that Guide should still be used by animal creators. However, this utility can help with the bulk of that checking. Second, this utility will show various characteristics about the animal that can help zoo builders to create better exhibits.

The utility is not fancy. Therefore, you have to be somewhat proficient with MS Windows and unzipping in order to use it. You must already know how to get the ".uca" or ".ai" file out of the ztd file. When you extract the ".uca" or ".ai" file, do not extract it into any Zoo Tycoon folder. Otherwise, Zoo Tycoon might list the animal twice in the game. Put the uca/ai file and the Animal Configuration Checker in the same folder (such as \Program Files\CHECKUCA) and run the Checker. It will ask for the name of the uca/ai file. Enter the name and the file will be checked.

The zip file has 5 files in it. Two of these files are different versions of the Checker. "chkuca.exe" is a "QuickWin" version. This means it will pop up a window. However, this might not work in all Windows environments. It worked in a Windows XP environment. However, it caused Windows 3.11 to hang. (Zoo Tycoon does not run in Windows 3.11. So, hopefully, this will not be a problem.) "checkuca.exe" is a DOS version. It will run in a DOS compatibility box or Command Prompt window. The remaining 3 files (checkuca.c, checkuca.mak, chkuca.mak) are provided for those programmers out there who might want to compile the program on their own.

For completeness... For those that understand and write scripts, the Checkers can also be run by specifying the uca/ai file (and an optional animal info txt file) on the command line. In addition, the source file will compile under Linux as well.

zip size: 63.1 KB
current exe dates: November 1, 2004 for both

Note: This version is here just for archival reasons. Use the download in the third post instead.
Download the Animal Configuration Checker here.

Even some of the Blue Fang animals have minor problems. Here is an example using their sealion:

Code: Select all

Which Zoo Tycoon animal uca or ai file do you want checked?
sealion.ai
 
*** Warning: cPrefIconID 7062 is not in [cSuitableObjects] with value > 0.
sealion description:
Minimum happiness needed for chance of breeding: 90.
Liked foliage:
 Water Lily, Water Lily
Liked rock:
 Large Rock, Small Rock - Medium, Small Rock - Small
Number of animals allowed per exhibit: 2-16 with 35 squares each.
A suitable exhibit for 2 of this animal has 70 squares containing terrain of:
 63 Salt Water, 7 Gray Stone
using 2 grid squares filled with 4 Water Lily most liked plant
and using 8 Small Rock - Small most liked rock.
Here are instructions on how to run the checkers in Windows XP. You should already have the checkers and the uca or ai file in the same folder (such as \Program Files\CHECKUCA).

For chkuca:
1. Click "start".
2. Click "Run...".
3. Click "Browse..."
4. Go to where chkuca.exe and the uca or ai file are (such as \Program Files\CHECKUCA).
5. Click "chkuca".
6. Click "Open".
7. Click "OK".
8. In the "Stdin/Stdout/Stderr" window, type in the name of the uca or ai file (such as 12345678.uca) and press the "Enter" key.
The information for the uca/ai file is shown.

For checkuca:
1. Click "start".
2. Go to "All Programs".
3. Go to "Accessories".
4. Click "Command Prompt".
5. In the "Command Prompt" window, go to where checkuca.exe and the uca or ai file are. (For example, type: cd "\Program Files\CHECKUCA")
6. Type "checkuca" and press the "Enter" key.
7. Type in the name of the uca or ai file (such as 12345678.uca) and press the "Enter" key.
The information for the uca/ai file is shown.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Configuration Checker

Post by Jay »

Note: This version is here just for archival reasons. Use the download in the third post instead.

The ".exe" files in the above post do not work with 64-bit MS-Windows. In 2013, a newer compiler was used to create a checkuca.exe that works in both 32-bit MS-Windows and 64-bit MS-Windows. The checkuca-ForMenu.zip in this post contains that updated checkuca.exe. The source program itself did not change.

The ".exe" program can be run from any folder. In order to make it easier to work with right-clicking on a ".uca" file, I created ".bat" files for the program. The checkuca-ForMenu.zip in this post includes the 2 ".bat" files I use: checkuca.bat and checkuc2.bat. checkuc2.bat is not meant to be run directly; it is used by the other ".bat" file. In order to use the ".bat" files, one has to create a "ZT-utils" folder in the top level of the C: drive (C:\ZT-utils), and then the files in checkuca-ForMenu.zip have to be extracted into the ZT-utils folder.

checkuca-ForMenu.zip size: 28.8 KB
current checkuca.exe date: February 22, 2013
current checkuca.bat date: June 8, 2018

Note: This version is here just for archival reasons. Use the download in the third post instead.
Download checkuca-ForMenu.zip here.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Configuration Checker

Post by Jay »

This is an Animal Configuration Checker utility. All Zoo Tycoon animals have a configuration file inside a ztd file. For most user created animals, this configuration file ends with ".uca". For all Blue Fang animals and some user created animals, this configuration file ends with ".ai". This utility looks in the uca/ai file and does two things. First, it checks the file for problems and inefficiencies. This will help testers and animal creators. It does not check everything that is listed in the Uca Editing Guide at Zookeeper's Lounge; so that Guide should still be used by animal creators. However, this utility can help with the bulk of that checking. Second, this utility will show various characteristics about the animal that can help zoo builders to create better exhibits.

The utility is not fancy. Therefore, you have to be somewhat proficient with MS Windows and unzipping in order to use it. You must already know how to get the ".uca" or ".ai" file out of the ztd file.

This is the 2022-10-29 version of the uca2post program. The 2006 version of the uca2post program checked for 9 types of errors and 67 types of warnings. Its Animal Characteristics section could show up to 12 characteristics. This October 2022 version of the uca2post program checks for 9 types of errors, 268 types of warnings, and 49 types of efficiencies. Its Animal Characteristics section can show up to 25 characteristics. Other enhancements and changes were made as well compared to the 2006 version, such as improving what it shows in the suitability guide when the configuration checker shows warnings. Because this version does a lot more than early versions, older uca2post programs as well as the checkuca and chkuca programs are now obsolete.

For completeness... For those that understand and write scripts, the checker can also be run by specifying the uca/ai file (and an optional animal info txt file) on the command line. You can run uca2post.exe with a "-h" option to get more information.

----- Start of instructions -----

Here are instructions for running the uca checker and suitability guide program uca2post. The results from the uca2post program are in a format for posting. The uca2post program takes habitat settings into account for suitability, just like ZT does.

Although the uca2post program can be run from different locations, the best place is from a C:\ZT-utils folder. If that folder does not exist yet, create a "ZT-utils" folder in the top level of the C: drive (C:\ZT-utils). Extract the files from uca2post.zip into the ZT-utils folder. The following procedures were tested in Windows XP, but other Windows versions should be similar. For example, Windows 10 uses "More apps" instead of "Choose Program".

To run uca2post for the first time for a ".uca" file:
1. Extract the entire animal ".ztd" file or its ".uca" file. When you extract the ".uca" or ".ai" file, do not extract it into any Zoo Tycoon folder. Otherwise, Zoo Tycoon might list the animal twice in the game.
2. Right click on the ".uca" file.
3. Click "Open With".
4. Click "Choose Program".
5. Click "Browse".
6. click "My Computer".
7. Double click "C:".
8. Double click "ZT-utils".
9. Click "uca2post.bat".
10. Click "Open".
11. Click OK and the results of the checker are shown in a window that can be scrolled.

To run uca2post after the first time:
1. Extract the entire animal ".ztd" file or its ".uca" file.
2. Right click on the ".uca" file.
3. Click "Open With".
4. Click "uca2post" and the results of the checker are shown in a window that can be scrolled. You might need to scroll the window to see if there were any warnings or errors.

If you extract the entire animal ".ztd" file and it includes a 1033.txt file, then the above procedures will also show the first paragraph that is in the 1033.txt file, which is the first paragraph that is shown for the Animal Info in English versions of ZT.

To copy the results information so that it can be pasted into something, do the following:
1. Right click in the results window and click "Mark".
2. Move the mouse pointer to the bottom far left of the results window.
3. While pressing the left mouse button, move the mouse pointer from the bottom far left to the top far right of the window, allowing the window to scroll to the top. Everything will be highlighted. Release the mouse button and press the Enter key. The highlighting will disappear and the information can now be pasted elsewhere.

The results will have the following information:

1. A "Results From Configuration Checking" line is shown, with the date of the checker version. That helps to know if the most recent checker version is being used.

2. The ".uca" or ".ai" file name is shown with its date and time. That is the file name of the animal's configuration. Since the world has different time zones, the date and time that is shown might be up to one day different than the date and time you see on the file you have.

3. The program might show errors, warnings, or efficiency messages for the ".uca" or ".ai" configuration file. Efficiency messages do not affect how the animal works in ZT. They are messages for the animal's creator in case the creator wants to make the ".ztd" or ".uca" smaller. Technically, inefficiencies make ZT go slower. But most inefficiencies, will not be noticed while ZT is running. Warning messages could affect how the animal works in ZT. But that does not mean they will affect how the animal works in ZT. And even if they do affect how the animal works in ZT, it could be minor, such as not showing a tooltip for the preferred object for the female or young animal. Error messages indicate things that might cause some versions of ZT to crash or cause the animal to be invisible in some versions of ZT. However, that does not mean all versions of ZT will have problems with the animal, and maybe no version of ZT will have problems, since it is possible that particular configuration might never be triggered.

4. The Animal Type is shown, which usually is the same as the ".uca" or ".ai" file name.

5. If the name of the animal is inside the configuration (which it is for nearly all user made animals), the name of the animal is shown. When possible, this is the name in English.

6. If English animal info (1033.txt file) is found, the first paragraph of it is shown. The number of other paragraphs is also shown.

7. Animal Characteristics are shown. This includes the Habitat, Location, Cost, Crowd number, ZT Family, ZT Genus, Minimum happiness needed for chance of breeding, and possibly more characteristics, depending on the animal. The additional characteristics that might be shown are Era, Bash Strength, whether it Lays eggs, whether it breeds, Preferred shelter, fence heights it can crush, whether it Tests electrified fences, whether it needs a scientist or marine specialist, whether a DRT Base can be used if it escapes, whether it can swim in water terrain or tanks, minimum tank depth needed, whether it has to stay in tanks, whether it can jump or climb fences, whether it can climb cliffs, whether it can walk over small objects, and whether it uses expansion pack food.

8. Exhibit Preferences are shown. This shows which foliage and rocks the animal likes or specifically tolerates. It might also show shelters and other objects that the animal specifically likes or specifically tolerates.

9. Exhibit Construction is shown. This shows how many animals may be in the exhibit, the minimum number of squares/tiles that each adult animal wants, and what exhibit size, terrain, foliage, rocks, and elevation are needed for the smallest possible exhibit for the animal.

Most of the suitability guide should be self-explanatory, but some things might not be. So here is an explanation for some of those things:

- The ZT Family and ZT Genus are not the same as the scientific Family and Genus, although often they are similar. ZT uses the ZT Family and ZT Genus to make it easier for a creator to say what other animals this animal likes or dislikes.

- There is research that increases the chance of breeding for animals and, when that research is done, an animal that does not breed without that research might then be able to breed, although also might not, depending on the animal configuration. The suitability guide says "This animal does not breed initially, but might if appropriate research is completed in ZT." if an animal does not breed initially but can when the appropriate research is done. For the current version of uca2post, the suitability guide says "This animal does not breed." if the animal cannot breed even if the research is done. Older versions of uca2post showed "This animal does not breed." whether the animal could never breed or the animal could not breed initially but could with research.

- Sometimes the suitability guide shows what the animal configuration has for the Preferred shelter. But many of ZT's shelters do not allow user made animals unless a hack is used for ZT's shelters. If the Preferred shelter is one of those shelters, then the suitability guide also shows the "Preferred ZT shelter allowing any animal without hack", if there is one. The Preferred shelter might be a user made shelter, since the suitability guide knows names for 26 user made shelters. But some of these names are used by more than one user made shelter, with the shelters taking different amounts of space. When the suitability guide calculates how much the animal likes something, it takes space into account, just like ZT does. For user made shelters, the suitability guide uses the space for the oldest shelter using each shelter name. So there could be better shelters to use than the one shown as the Preferred shelter. Also, although a "Preferred shelter" or "Preferred ZT shelter allowing any animal without hack" might be shown, the animal might not be configured to need shelters or to use shelters.

- When the suitability guide says "Animal can jump.", the animal's exhibit should not be enclosed by a fence that can be jumped.

- When the suitability guide says "Animal can climb objects.", the animal's exhibit should not be enclosed by a fence that can be climbed.

- Currently, the Exhibit Construction section only mentions ZT objects and not user made objects.

- Sometimes the Exhibit Construction section might show 0 for a terrain, foliage, or rock. That means none of that terrain, foliage, or rock is needed for the minimum size exhibit, but it might be needed for a larger exhibit. If an animal does not want foliage or rocks, then "No foliage should be used." or "No rocks should be used." will be shown instead.

----- End of instructions -----

uca2post.exe was updated October 29, 2022 by Jay. One of the messages was missing the word "no". "***** Error: cNameID is set to 19000, but there is [defaultLCID] section." was changed to "***** Error: cNameID is set to 19000, but there is no [defaultLCID] section."

Note: Unfortunately all ZT's animals and nearly all user made animals will give "No fPlay... type of line" Warnings. But that is the cause of having a zookeeper sometimes repeatedly shoot darts at an escaped animal without the animal turning into a crate. So I felt it was worthwhile to flag, even though the problem rarely occurs for escaped animals. And even when the problem occurs, it is not a big deal, since picking up the escaped animal and putting it back down will cause it to turn into a crate. For animal designers, if you want to fix this potential problem, you want every "fPlayTime" line to have an "fPlay", "fPlayWithSound", "fPlayPingPong",or "fPlayReverse" line immediately before it and have an "fPlay", "fPlayWithSound", "fPlayPingPong", "fPlayReverse", or "fDie" line immediately after it. For example, you could change "f = fPlayTime(stand,6)" to:

f = fPlay(stand)
f = fPlayTime(stand,4)
f = fPlay(stand)

Also, do not have a large number in the "fPlayTime" line. Instead, you can split the "fPlayTime" line into multiple lines. For example, you could change "f = fPlayTime(stand,25)" to:

f = fPlay(stand)
f = fPlayTime(stand,11)
f = fPlay(stand)
f = fPlayTime(stand,11)
f = fPlay(stand)


uca2post.zip size: 53.0 KB
current uca2post.exe date: October 29, 2022
current uca2post.bat date: July 8, 2022

Download uca2post.zip here.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Configuration Checker

Post by Jay »

If you are a programmer with a C compiler such as gcc, it is possible to compile the uca2post program yourself. Here is its source code. Extract uca2post.c from the ".zip" and use the following commands to compile it in a MS Windows Command Prompt window:
gcc -O3 uca2post.c -o uca2post
strip uca2post.exe

uca2post.c was updated October 29, 2022 by Jay. One of the messages was missing the word "no". "***** Error: cNameID is set to 19000, but there is [defaultLCID] section." was changed to "***** Error: cNameID is set to 19000, but there is no [defaultLCID] section."

uca2post-Source.zip size: 38.0 KB
current uca2post.c date: October 29, 2022

Download uca2post-Source.zip here.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Animal Ztd Checker

Post by Jay »

Here is another checker for user made animals. While the above uca2post program checks various settings in ".uca" files, the checkztd program checks a few things in animal ".ztd" files:
1. gives an error if an ".ani" file in the ".ztd" has a dir1 setting that does not refer to a directory in the ".ztd".
2. gives an error if a ZT image file in the ".ztd" refers to a ".pal" file that is not in the ".ztd".
3. gives an error if the ".pal" file path in a ZT image is using a backslash.
4. lists ".pal" files in the ".ztd" that are not being used by any ZT image file in the ".ztd".
5. lists ".txt" files in the ".ztd" that are duplicates.
6. lists ".ani", ".txt", and ".wav" files missing from the ".ztd" that the ".uca" files say they use.
7. lists ".txt" files in the ".uca" files that are using directories that do not contain the internal names of the ".uca" files.
8. lists ".txt" and ".wav" files in the ".ztd" that are not used by the corresponding ".uca" files.

The program is not fancy. Therefore, you have to be somewhat proficient with Microsoft Windows and unzipping in order to use it. You must already know how to get the ".uca" files out of the ".ztd" file. The program can give false results if things are not set up correctly for it.

checkztd.zip contains a number of files. checkpal.exe, checkztd.bat, and checkztd.exe were created specifically to check animal ".ztd" files. grep.exe, strings.exe, and unzip.exe are free and open source programs made by others that are based on Linux programs. sort.exe is another program made by others based on a Linux program, but I renamed it to sortu.exe so that it does not conflict with the sort.exe that comes with Microsoft Windows.

For completeness... For those that understand and write scripts, the programs can also be run on the command line. You can run checkztd.exe and checkpal.exe with a "-h" option to get more information.

----- Start of instructions -----

Here are instructions for running the checkztd programs.

The programs from checkztd.zip must be in a C:\utils folder. If that folder does not exist yet, create a "utils" folder in the top level of the C: drive (C:\utils). Extract the files from checkztd.zip into the utils folder. The following procedures were tested in Windows XP, but other Windows versions should be similar. For example, Windows 10 uses "More apps" instead of "Choose Program".

When the following procedures are run, a Command Prompt window is open temporarily and closes when the procedures finish. Also, checkztd-c1.tmp, checkztd-c2.tmp, checkztd-c3.tmp, checkztd-c4.tmp, checkztd-c5.tmp, and checkztd-c6.tmp are created temporarily in the folder, but are deleted when the procedures finish. The results are put in a checkztd.lst file.

To run checkztd for the first time for a ".uca" file:
1. Have a folder with the ztd file, but do not use any of Zoo Tycoon's folders. Extract the ".uca" files from that ztd file into the same folder. Do not have any other ".uca" files in that folder.
2. Right click on the ".ztd" file.
3. Click "Open With".
4. Click "Choose Program".
5. Click "Browse".
6. click "My Computer".
7. Double click "C:".
8. Double click "utils".
9. Click "checkztd.bat".
10. Click "Open".
11. Click OK and the results of the checker are put into a checkztd.lst file. The checkztd.lst file can be opened in a text editor such as WordPad. If no problems were found, checkztd.lst will only have the ".ztd" and ".uca" file names.

To run checkztd after the first time:
1. Have a folder with the ztd file, but do not use any of Zoo Tycoon's folders. Extract the ".uca" files from that ztd file into the same folder. Do not have any other ".uca" files in that folder.
2. Right click on the ".ztd" file.
3. Click "Open With".
4. Click "checkztd" and the results of the checker are put into a checkztd.lst file. The checkztd.lst file can be opened in a text editor such as WordPad. If no problems were found, checkztd.lst will only have the ".ztd" and ".uca" file names.

----- End of instructions -----

checkpal.exe was updated August 9, 2022. There was a case where it was giving an '".ani" dir1 setting' Error when it was not actually an error.

checkztd.zip size: 455 KB
current checkztd.bat date: July 12, 2022
current checkpal.exe date: August 9, 2022
current checkztd.exe date: April 21, 2022


Download checkztd.zip here.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Ztd Checker

Post by Jay »

If you are a programmer with a C compiler such as gcc, it is possible to compile the checkpal and checkztd programs yourself. Here is the source code for them. Extract checkpal.c and checkztd.c from the ".zip" files and use the following commands to compile them in a MS Windows Command Prompt window:
gcc -O3 checkpal.c -o checkpal
strip checkpal.exe
gcc -O3 checkztd.c -o checkztd
strip checkztd.exe

checkpal.c was updated August 9, 2022. There was a case where it was giving an '".ani" dir1 setting' Error when it was not actually an error.

checkpal-Source.zip size: 1.50 KB
checkztd-Source.zip size: 2.55 KB
current checkpal.c date: August 9, 2022
current checkztd.c date: April 21, 2022

Download checkpal-Source.zip here.
Download checkztd-Source.zip here.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Configuration Checker

Post by Jay »

On August 9, 2022, checkpal.exe was updated in checkztd.zip and checkpal.c was updated in checkpal-Source.zip. There was a case where checkpal was giving an '".ani" dir1 setting' Error when it was not actually an error. The updated ".zip" files are now available in the previous two posts.
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Animal Configuration Checker

Post by Jay »

uca2post.zip in the third post and uca2post-Source.zip in the fourth post were updated October 29, 2022 by Jay. One of the messages was missing the word "no". "***** Error: cNameID is set to 19000, but there is [defaultLCID] section." was changed to "***** Error: cNameID is set to 19000, but there is no [defaultLCID] section."
Locked