Understanding and Editing ATTs
Creatures' genetics tell them which breed slot to use for each body part, and sprites give the breeds their appearance. But the information that tells the game where the body parts connect to one another is housed in ATTs.

ATTs can look daunting at first glance, but the information they contain is actually very simple, and once you know how they work they are quite easy to edit. This is tutorial is designed to help you understand how ATTs work, and what to do if you want to edit them.



What an ATT file does
An ATT, also called a body data file, shares the exact same name with the sprite file it corresponds to (see an explanation for how sprite files are named here). So, for instance, a head sprite file named a04a.c16 has a matching a04a.att file. The game engine itself tells a Creature which body parts are linked to one another and links the sprite to the appropriate body data file.

Knowing this, we can assume that the information contained within the .att file consists solely of coordinates, because all of the other data needed to put a Creature together is already covered somewhere else. So we can be fairly sure of what the numbers are. The next question is, how do the numbers affect the sprites?



What the numbers mean
Take a look at an .att file for a Norn's head--file "a04a.att" or "a04d.att", which correspond to the Bruin and Chichi heads, are good examples. You can open them right up in a basic word processor, such as Notepad. As you can see, there are 16 lines, each with 10 numbers separated by spaces. The last six numbers on a line are all zeroes. Only the first four are "regular" numbers and they typically range from 40-60.


What "a04d.att" looks like in Notepad

Each line in the .att refers to a specific image. So line 1 refers to the first image in each set, in which the Creature is facing right, head angled downward. Line 2 refers to the next image after that, where the head is angled up a little more, line 3 the next image after that, and so on. This is exactly the same as the order of the sprites in the matching .c16 file.

For both heads and bodies, "duplicates" share one line for each angle, because joints remain the same place no matter how pregnant a Creature is or what their facial expression is. For a Norns' head, sprites 0, 16, 32 and so on all refer to line 1 on the .att file, because even though those sprites are all variations of expression and whether the eyes are open/closed, they all show the head at the same angle.

Each number on the line is only half of a coordinate. Two numbers together map one complete coordinate. ATTs use an X-Y formula; so the first pair on the first line, which reads "43 61", refers to a point which is 43 pixels away from the left side of the sprite, and 61 pixels down from the top.


How to plot the location of a point on a sprite, using #0 from a04d.c16 as an example.

On figure 1 (above) we see a sprite with arrows indicating the directions of X (horizontal) and Y (vertical) coordinates. Nnumbers increase as you move in the direction that the arrow is pointing; adult Norn head sprites are 100 x 100 pixels so you count from 0 to 100 as you move from left to right or top to bottom.

Now see figure 2. The horizontal coordinate for this sprite is 43, so I have counted 43 pixels from left to right and placed a reference point with an arrow to show you where exactly that is.

In figure 3 I have used the same method to determine the vertical distance from the top. For this sprite/line the distance is 61 pixels. I have moved the reference point down to that location. You can now see that this pair of coordinates marks the base of the Norn's skull.


The .att file displayed in Notepad, with the locations of the coordinates indicated on the corresponding sprites in SpriteBuilder.

Naturally, joint coordinates are listed in the same order on each line. So we know the first pair of numbers on every line marks the neck joint in the corresponding image. The second pair of numbers marks the mouth. The third, fourth and fifth are unused in C3 and DS--these are where ears and hair would attach in Creatures Village-style Norns; C3/DS inherited the engine used by Creatures Adventures and there are still a few "vestigial" features like this that can be found in various parts of the game.



The layout of ATTs
I have successfully mapped the coordinates within the .att files for an entire Norn, and this is the data that was gleaned from doing so. At long last, this is the key to what all those funky numbers mean!

Just like the sprites, the .atts for all body parts follow a sequence:
Lines 1-4 correspond to sprites facing right
Lines 5-8 correspond to sprites facing left
Lines 9-12 correspond to sprites facing front
Lines 13-16 correspond to sprites facing back


Below are the joints that the number pairs correspond to within a single line. Note that, with the exception of the hip and shoulder joints on the body, joints are always ordered from closest to furthest from the body, ie. hip then knee, knee then ankle, ankle then toe, and so on.

Head [a---]
Numbers 1 + 2 indicate the neck
Numbers 3 + 4 indicate the mouth
Numbers 5 + 6 are unused
Numbers 7 + 8 are unused
Numbers 9 + 10 are unused

Body [b---]
Numbers 1 + 2 indicate the neck
Numbers 3 + 4 indicate the left hip
Numbers 5 + 6 indicate the right hip
Numbers 7 + 8 indicate the left shoulder
Numbers 9 + 10 indicate the right shoulder
Numbers 11 + 12 indicate the tail

Thighs [left and right: c--- and f---]
Numbers 1 + 2 indicate the hip
Numbers 3 + 4 indicate the knee

Shins [left and right: d--- and g---]
Numbers 1 + 2 indicate the knee
Numbers 3 + 4 indicate the ankle

Feet [left and right: e--- and h---]
Numbers 1 + 2 indicate the ankle
Numbers 3 + 4 indicate the toe

Humeri [left and right: i--- and k---]
Numbers 1 + 2 indicate the shoulder
Numbers 3 + 4 indicate the elbow

Radii [left and right: j--- and l---]
Numbers 1 + 2 indicate the elbow
Numbers 3 + 4 indicate the hand

Tail root [m---]
Numbers 1 + 2 indicate the tail base
Numbers 3 + 4 indicate the tuft base

Tail tip [n---]
Numbers 1 + 2 indicate the tuft base
Numbers 3 + 4 indicate the tuft tip



With this information, you should now be able to edit .att files for new breeds, or fix problems with existing breeds. Or if you'd like to know more, Embri has also written an ATT tutorial which covers similar topics and has some additional information. As always, happy coding!

--Ghosthande
With thanks to my excellent beta reader, Malkin.


Back to BBW