Configuring Restrooms Using ZT IDs Guide

These are guides to help designers create their ZT1 objects beyond APE.
Post Reply
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Configuring Restrooms Using ZT IDs Guide

Post by Jay »

The following guide was updated April 29, 2016 by Jay.

This guide will show how to configure a restroom that uses in-game IDs. That is one of the easiest buildings to configure. The end of this guide also mentions some user IDs that can be used to configure a restroom. This guide assumes that you already know how to create scenery for ZT, which includes how to compress and uncompress ".ztd" (".zip") files and how to set the positions of ZT images.

There are two types of restrooms in the original ZT that you can use as a base: a smaller restroom and a larger restroom. Before proceeding, see which of the two types is a match for your restroom. The smaller restroom is just called Restroom in ZT. It has a footprint of 2x2, which is the size of a grid tile in ZT. If your restroom is that size, base your restroom on that ZT restroom. If your restroom is larger, then you probably want to base it on ZT's larger restroom, which is called Family Restroom in ZT. You also want to make sure that the ZT messages are appropriate for your restroom. Here are the messages used in the original ZT. The first message in each set is the object name that is shown in the purchase menu. The number in front of it is called the object name's ID and will be used later in this guide. The second message in each set is the tooltip for the object in the purchase menu. The third message in each set is the phrase that is used in the Zookeeper's Recommendations when an animal does not like the object. For English, it is the same as the object name with the addition of "the" in front.

8008, "Restroom"
38008, "Purchase a restroom. Guests will need to use restrooms if they eat or drink, or if they've been in the zoo for very long. This restroom is not the largest, but it does the job."
63008, "the Restroom"

8009, "Family Restroom"
38009, "Purchase a family restroom. Guests will need to use restrooms if they eat or drink, or if they've been in the zoo for very long. This restroom is larger than the small restroom, but more expensive."
63009, "the Family Restroom"

Next, you want to think about what name you will use for the ".ztd" file. Make the name descriptive so that others will know what it is. I recommend not using spaces or unusual symbols in the name of the ".ztd" file. Sometimes unusual symbols can make it difficult to put it into the download areas of some web sites. In this guide, I will pretend I am making a Space Age Restroom. So I would eventually put everything into a SpaceAgeRestroomByJay.ztd.

Next, you would use APE or ZOOT to load the images of your restroom. I prefer using ZOOT because I can create my own 8-character ID and because APE does not use the correct size for new icons. But ZOOT takes more work than APE. So this guide uses APE. When you load the graphics, you want the opening/door to your restroom to be in the front right (cFootprintX direction) of the SE image. That is how BF did all of their buildings. Look at the Characteristics Guide to understand what cFootprintX represents. There are different versions of APE. APExp 3.2 or newer would be the best version to use because you can then use a scenery version of the in-game restroom as a base and then fewer changes are needed later. But this guide assumes APE 1.1 is used. When you create a new project in APE 1.1 for your restroom, you can base the project on the "Elephant Statue". Load your restroom images, save into a ".ztd", and exit APE. You will get a list of files inside the ".ztd" similar to the following:

objects/12345678/i.pal
objects/12345678/idle/idle.ani
objects/12345678/idle/ne
objects/12345678/idle/ne.pal
objects/12345678/idle/nw
objects/12345678/idle/nw.pal
objects/12345678/idle/se
objects/12345678/idle/se.pal
objects/12345678/idle/sw
objects/12345678/idle/sw.pal
objects/12345678/ne/n
objects/12345678/ne/n.pal
objects/12345678/ne/ne.ani
objects/12345678/nw/n
objects/12345678/nw/n.pal
objects/12345678/nw/nw.ani
objects/12345678/se/n
objects/12345678/se/n.pal
objects/12345678/se/se.ani
objects/12345678/statue2.pal
objects/12345678/sw/n
objects/12345678/sw/n.pal
objects/12345678/sw/sw.ani
scenery/other/12345678.ucs

The above list and the rest of this guide use "12345678" as the 8-character ID. Your 8-character ID will be different. Be sure to use your 8-character ID instead of "12345678" wherever you see "12345678" in this guide.

APE does a number of inefficient things. You can see "i.pal" and "statue2.pal" in the above list. These are copies of the ".pal" files from the elephant statue. Since APE created 4 ".pal" files in the "idle" folder, "statue2.pal" may be removed. Since APE created ".pal" files in the ne, nw, se, and sw folders, "i.pal" may be removed. Extract the contents of the ".ztd" into an empty folder. Then remove the statue2.pal and i.pal files. You may now need to use ZOOT to set the positions of the images properly.

Every building needs to have a file that scenery do not have: an ".scn" file. The ".scn" file is what tells ZT when to make the object available. Although the ".scn" file could be any name that begins with "unlock", I recommend using "unlock", followed by the object name without spaces and using lower case letters, followed by ".scn". The reason for this recommendation is to be more efficient when there are more than 1 user made restroom using the same object name. Since they will all use the same name, ZT does not have to read all of the ".scn" files for them. This is especially true for people that combine ".ztd" files. As mentioned above, these restrooms will use one of 2 object names: "Restroom" or "Family Restroom". So the ".scn" file name for your restroom based on this guide should be either unlockrestroom.scn or unlockfamilyrestroom.scn, and no other name. You would use the first name if your restroom is based on the smaller ZT restroom and you would use the second name if your restroom is based on the larger ZT restroom. In a previous version of this guide, it was recommended to use dashes ("-") in the ".scn" file name. But we have since learned that dashes in an ".scn" file name can cause the ZT expansions to unlock more than expected. So dashes should not be in ".scn" file names. You can use a text editor such as WordPad, Notepad, or Vim to create the ".scn" file. WordPad is preferred over Notepad because WordPad is more flexible. But when you save a file in WordPad, you have to remember to save the file as type Text Document. Create a "freeform" folder in the same folder that contains your objects and scenery folders. The ".scn" file should be created in the "freeform" folder. If you are creating a restroom based on the ZT family restroom, put the following lines inside the freeform/unlockfamilyrestroom.scn file:

Code: Select all

[goals]
goal=DEFAULT_ITEMS

[DEFAULT_ITEMS]
rulea=7
ruleb=2
value=0
text=17700
trulea=7
truleb=0
targa=1000
hidden=0
sticky=0

[1000]
id=8009
If you are creating a restroom based on the smaller in-game restroom, put the above lines inside the freeform/unlockrestroom.scn file, but change the last line to:

Code: Select all

id=8008
What these lines say is to make the Restroom (8008) or Family Restroom (8009) available at the beginning of the game. This also means that the in-game ones will be available at the beginning of the game as well. Sometimes you will see lines in these files that begin with ";". These lines are merely comments and are ignored by ZT. So files are more efficient without those comment lines.

One of the files that was created by APE is a ".ucs" file. Rename this file so that it ends with ".ucb" instead of ".ucs". This file then needs to be edited to tell ZT this object behaves like a restroom. You can use a text editor such as WordPad, Notepad, or Vim to edit this file. When you first look at the file, it will look similar to the following:

Code: Select all

[]

[12345678]

[Icon]
Icon = objects/12345678/SE/SE
Icon = objects/12345678/SW/SW
Icon = objects/12345678/NW/NW
Icon = objects/12345678/NE/NE

[Member]
scenery

[Characteristics/Integers]
cFootprintX = 2
cFootprintY = 4
cHabitat = 9414
cHeight = 3
cHelpID = 6039
cNameID = 19000
cPurchaseCost = 210
cUseNumbersInName = 0
cUsedThought = 10222

[Animations]
idle = idle

[EstheticBonus]
v = 9503
v = 3
v = 9504
v = 6
v = 9505
v = 3
v = 9506
v = 6

[defaultLCID]
LCID = 1033

[Global]
Type = 12345678

[1033]
cGeneralInfoFileName = objects/12345678/texts/1033.txt
cLongHelp = Purchase an elephant statue.  Guests will appreciate the beautiful elephant sculpture.
cName = Elephant Statue
cTheString = the Elephant Statue
Even as scenery, APE 1.1 often makes an inefficient file. In the above, for example, any "[]" line without anything inside the brackets could be removed. Also, any blank lines at the top or bottom of the file could be removed. To convert to a building, the [defaultLCID] and [1033] sections would be removed, and other sections would need to be added and changed. So, basically, the file has to be changed from the above to look similar to this (but without the "; This could change; see below." comments):

Code: Select all

[12345678]

[Icon]
Icon = objects/12345678/SE/SE
Icon = objects/12345678/SW/SW
Icon = objects/12345678/NW/NW
Icon = objects/12345678/NE/NE

[Member]
structures

[Characteristics/Integers]
cFootprintX = 4               ; This could change; see below.
cFootprintY = 2               ; This could change; see below.
cHabitat = 9414
cHeight = 3
cHelpID = 8009                ; This could change; see below.
cNameID = 8009                ; This could change; see below.
cPurchaseCost = 250           ; This could change; see below.
cCommerce = 0
cSelectable = 1
cNeedsConfirm = 1
cAdultChange = 0              ; This could change; see below.
cChildChange = 0              ; This could change; see below.
cBathroomChange = -100
cHideUser = 1
cUserStaysOutside = 0
cHideBuilding = 0
cTimeInside = 5
cCapacity = 8                 ; This could change; see below.

[UseSound]
loops = 0
name = scenery/building/bathroom.wav
attenuation = 1300

[Characteristics/Strings]
cInfoImageName = scenery/building/inbldg/inbldg

[Characteristics/Floats]
cUpkeep = 50.00               ; This could change; see below.

[Animations]
idle = idle
used = idle

[EstheticBonus]
v = 9503
v = 0                         ; This could change; see below.
v = 9504
v = 0                         ; This could change; see below.
v = 9505
v = 0                         ; This could change; see below.
v = 9506
v = 0                         ; This could change; see below.

[Global]
Type = 12345678

[Satisfies]
building
familybathroom                ; This could change; see below.
bathroom

[slots]
name=slot

[slot]
slotpos=0
slotpos=0
entrpos=-32                   ; This could change; see below.
entrpos=33                    ; This could change; see below.
exitpos=-32                   ; This could change; see below.
exitpos=33                    ; This could change; see below.
capacity=8                    ; This could change; see below.
facing=0
Double check your changes. Make sure that all sections are included, that it is "structures" in the [Member] section instead of "scenery", and that there is not more than 1 [Animations] or [EstheticBonus] sections. You would change all of the "12345678" to your 8-character ID. The following are some other things you might change as well.

cFootprintX and cFootprintY: These should accurately reflect the size of your restroom. Read the Characteristics Guide for an explanation of these lines. It is very unlikely that a restroom would have the same lines as a statue because the ZT statues are 2x4 and the family restroom is 4x2.

cHelpID and cNameID: These should be set to the object name ID that you used in the ".scn" file. They will be set to 8009 if your restroom is based on the larger in-game restroom or set to 8008 if your restroom is based on the smaller in-game restroom.

cPurchaseCost: This is the purchase price of the restroom. It should be based on the size of your restroom compared to the in-game restrooms and their prices. The smaller in-game restroom has a footprint size of 2x2 and costs 120. The in-game family restroom has a footprint size of 4x2 and costs 250. In the above example, the restroom is the same size as the family restroom, so the same cPurchaseCost of 250 was used. But if we were making a restroom with a different footprint size, then we would use a different cPurchaseCost setting. For example, if we were making a restroom with a footprint size of 6x4 (cFootprintX = 6 and cFootprintY = 4), we would do the following. If you multiply 6x4, you get 24. If you multiply 4x2 (the footprint size of the in-game family restroom), you get 8. Since 24 is 3 times bigger than 8, that means a 6x4 restroom would be 3 times bigger than the in-game family restroom. So that means the price for a 6x4 restroom should be 3 times bigger than the in-game family restroom's price: 3 times 250 equals 750. Depending on how fancy your building is, you can adjust the price somewhat. But try to keep it close by using this type of arithmetic. That way the game economics will work in a similar way.

cAdultChange and cChildChange: These tell ZT how happy a guest will be when they use the restroom. A value of 0 indicates that the restroom has no affect on a guest's happiness. A value greater than 0 will increase a guest's happiness and a value less than 0 will decrease a guests's happiness. The in-game restrooms use 0. But feel free to use slightly larger numbers if your restrooms are fancy.

cCapacity and capacity: These should always match when there is only 1 entrance. This tells ZT how many guests may be in the restroom at the same time. Just like for "cPurchaseCost", these lines should be based on the size of your restroom compared to the in-game restrooms. The smaller in-game restroom has a capacity of 2 and the in-game family restroom has a capacity of 8. Since the above restroom is the same size as the family restroom, the same capacity of 8 was used. But if we were making a restroom with a footprint size of 6x4, since it would be 3 times bigger than the family restroom, the capacity lines would be 3 times bigger than the family restroom's capacity: 3 times 8 equals 24. You can adjust these capacity lines if it makes sense for your restroom. If anything, you would normally decrease the values if your restroom does not fill the grid tiles it uses. For example, if your restroom is "L-shaped", that means it is not filling all of the grid tiles.

cUpkeep: This tells ZT how much it costs every month to maintain the building. Both the smaller in-game restroom and the in-game family restroom have an upkeep of 50.00. But I believe that, just like for "cPurchaseCost", these lines should be based on the size of your restroom compared to the in-game restrooms, especially when more guests might be using them each month due to a higher capacity. So if we were making a restroom with a footprint size of 6x4, since it would be 3 times bigger than the family restroom, the "cUpkeep" line should be 3 times bigger than the upkeep of the in-game restrooms: 3 times 50.00 equals 150.00.

[EstheticBonus]: This section indicates how much a guest likes to look at the building. The 9503, 9504, 9505, and 9506 values represent man, woman, boy, and girl. The "0" beneath each of them means that they do not care one way or another about the looks of the above restroom. Those are the same values used for the in-game family restroom. The smaller in-game restroom uses values of "-5", which means the guests slightly do not like the looks of the smaller in-game restroom. Feel free to adjust these values slightly. If your restroom has an interesting looking appearance, feel free to use values higher than 0.

familybathroom: This line is also in the in-game family restroom. I believe ZT actually ignores the line, but I always put it in restrooms that are based on the in-game family restroom and I do not put it in restrooms that are based on the smaller in-game restroom. In all cases, though, restrooms need to have the "bathroom" line.

entrpos and exitpos: These lines tell ZT where guests are to go in and out of the restroom. The above example is for a 4x2 restroom with an opening in position 1. Use the Slot Information Guide to see how to set these lines, based on the size and appearance of your restroom. It is also possible to have restrooms for specific types of guests, such as a female restroom or a male restroom. The Slot Information Guide says how to do that as well.

Normally large dinosaurs can turn restrooms into rubble. When a restroom uses ID 8008, the rubble image includes someone sitting on a toilet. For any other restroom ID, the rubble image is just building rubble. If you want to prevent a restroom from turning into rubble, add the following line to the [Characteristics/Integers] section:

Code: Select all

cRubbleable = 0
Sometimes you will see lines in ".ucb" files that begin with ";". These lines are merely comments and are ignored by ZT. So files are more efficient without those comment lines.

A ".ztd" file can now be created containing the freeform, objects, and scenery folders. In order to have as small a ".ztd" as is possible, when I create a ".ztd", I always use maximum compression and I use an option that says not to put individual directory entries into the ".ztd". I use the 7-Zip and shrink programs to accomplish this, which are described in the Zipping/Unzipping Guides. But your compression program might not have those capabilities. Be careful not to use newer compression algorithms than what ZT understands. For example, ZT does not understand the algorithm called "Deflate64". When you are done and have the files in a ".ztd" file, the contents of the ".ztd" file will look something similar to the following:

freeform/unlockfamilyrestroom.scn
objects/12345678/idle/idle.ani
objects/12345678/idle/ne
objects/12345678/idle/ne.pal
objects/12345678/idle/nw
objects/12345678/idle/nw.pal
objects/12345678/idle/se
objects/12345678/idle/se.pal
objects/12345678/idle/sw
objects/12345678/idle/sw.pal
objects/12345678/ne/n
objects/12345678/ne/n.pal
objects/12345678/ne/ne.ani
objects/12345678/nw/n
objects/12345678/nw/n.pal
objects/12345678/nw/nw.ani
objects/12345678/se/n
objects/12345678/se/n.pal
objects/12345678/se/se.ani
objects/12345678/sw/n
objects/12345678/sw/n.pal
objects/12345678/sw/sw.ani
scenery/other/12345678.ucb

Once you have the ".ztd", you would want to test it inside ZT in a zoo that has no other restrooms or restaurants so that guests would have to use your restroom. Check the restroom's name, tooltip, and price in the purchase menu. Rotate the purchase menu to check all 4 views of your restroom's icons. Check the guest stats just before and a little after they enter your restroom to watch their "bathroom" need go from a lower number to 100 (which means their need was met fully). It might take a few seconds after they leave the restroom for their "bathroom" need to be adjusted. Make sure the guests are entering and leaving your restroom at the appropriate location. Check that the sound plays when guests use your restroom. Rotate your zoo to check all 4 views of your restroom. Check the upkeep amount in the building's info window. Move a torch slowly around your restroom without actually placing the torch. That allows you to check that the footprint is correct, since ZT will turn the torch image red if ZT believes it is at the same location as something else. Put your restroom in an animal exhibit and check that the zookeeper recommendation says that the animal dislikes it.

There is something else to know when there are more than 1 object in ZT using the same object name ID. If you select 1 of the later objects in the purchase menu, ZT will change the selection in the menu to the first one of the objects when the menu is reopened, when the icons are rotated, or when ZT checks if there are new things to unlock. This can sometimes be confusing to people until they understand what is happening. But this is a small inconvenience for being able to save on object IDs.

The above guide does not mention the Fancy Family Bathroom or the Aquatic Restroom because the messages for those do not come with the original ZT. But instead of the above 8008 and 8009 restrooms, it is also possible to use the restroom IDs and names created by other users. Here is a list of some user made restroom names, with the object ID to use for them, the ".scn" file name to create, the ".dll" files containing the object ID, and the purchase menu tooltip that will be shown for them:

Chinese Bathroom: 7914; unlockchinesebathroom.scn; langZA03.dll
Purchase a Chinese Bathroom.

Dino Restroom: 7919; unlockdinorestroom.scn; langZA03.dll
Purchase a Dino Restroom. Guests will enjoy this creative restroom.

Female Bathroom: 7921; unlockfemalebathroom.scn; LANG--ZKL.dll
Purchase a Female Bathroom. Female guests will enjoy having a separate bathroom from the male guests.

Inca Bathroom: 7749; unlockincabathroom.scn; lang--TKZTUFcombin.dll
Inca Bathroom: Your guests will be amazed and pleased to be able to use the Inca Bathroom.

Jungle Themed Small Bathroom: 7883; unlockjunglethemedsmallbathroom.scn; LANG--ZKL.dll
Purchase a Jungle Themed Small Bathroom. This bathroom will blend in nicely to a jungle area of your zoo.

Male Bathroom: 7922; unlockmalebathroom.scn; LANG--ZKL.dll
Purchase a Male Bathroom. Male guests will enjoy having a separate bathroom from the female guests.

Savannah Themed Small Bathroom: 7885; unlocksavannahthemedsmallbathroom.scn; LANG--ZKL.dll
Purchase a Savannah Themed Small Bathroom. This bathroom will blend in nicely to a savannah area of your zoo.

Shack Bathroom: 7680; unlockshackbathroom.scn; lang--TKZTUFcombin.dll or LANG--fern-Tek.dll
Shack Bathroom: Your guests will be amazed and pleased to be able to use the Shack Bathroom.

Snow Themed Small Bathroom: 7884; unlocksnowthemedsmallbathroom.scn; LANG--ZKL.dll
Purchase a Snow Themed Small Bathroom. This bathroom will blend in nicely to a wintery or ice age zoo.

There are ".dll" files with other user made restroom names. But the above ".dll" files are ones that are available for download without needing to be a member of a web site.

Note: A previous version of this guide said to create a "bldg" ".cfg" file and an ".ai" file. We now know that we can use a ".ucb" file instead and have 1 less file in the ".ztd" file. So the above guide uses a ".ucb" file. It is best to always use a ".ucb" file for new buildings. But if you are updating a building that has been released already, you should not always change it to use a ".ucb" file because that can affect saved zoos, depending on what the previous "bldg" ".cfg" file contained. When a ".ucb" file is used, ZT converts any upper case letters to lower case letters in the internal ID. For example, if ABCDEFGH.ucb is used, ZT will use "abcdefgh" as the internal ID instead of "ABCDEFGH". When a "bldg" ".cfg" file is used, ZT looks at what is used to the left of the "=" inside the "bldg" ".cfg" file and uses that as the internal ID, whether it contains upper case letters, lower case letters, or both. So when updating a released file, a "bldg" ".cfg" file should be removed and the ".ai" file renamed to a ".ucb" file only if there are no upper case letters to the left of the "=" inside the "bldg" ".cfg" file. The Zoo Object List program shows the internal ID that ZT uses for each object.

-----

The above guide may be copied to any web site. But, except for formatting changes, the contents may not be changed, including the credits. If there are any suggestions for changes, please post them at Zookeeper's Lounge. That is where this guide will be kept up-to-date.

Configuring Restrooms Using ZT IDs Guide is in the Designer Guides section at the Zookeeper's Lounge web site:
http://www.lunamanar.com/zklounge/index.php
- written by Jay
User avatar
Jay
african elephant keeper
Posts: 11552
Joined: Thu Jan 15, 2004 9:23 pm
Location: Orlando, FL (M:66)

Re: Configuring Restrooms Using ZT IDs Guide

Post by Jay »

The above guide was updated by Jay on April 29, 2016. Most of the changes were to add additional information. But there were 3 major changes: to not use dashes in ".scn" file names because that can cause ZT expansion packs to unlock more than expected; to use a ".ucb" file instead of ".ai" and ".cfg" files; and to mention some user made IDs that can be used.
Post Reply