City Plan (CTY) Files

You read
the title. Your first question is: What is this City Plan file?!
The answer can be found anywhere on Age of Empires Heaven, yet
there are many misbeliefs about them; so let’s get it straight.

City Plan files can be found in the data folder
of Age of Empires (for Rise of Rome, it is data2, like in case
of AI and Personality), with a cty extension. Open up default.cty
in Notepad – this is what you’ll see:

0.000000 0.000000 0 2 2
2 109 Town_Center1

-2.500000 -12.500000 0 2 2
2 69 Guard_Tower

2.500000 -12.500000 0 2 2
2 69 Guard_Tower

12.500000 -2.500000 0 2 2
2 69 Guard_Tower

12.500000 2.500000 0 2 2
2 69 Guard_Tower

2.500000 12.500000 0 2 2
2 69 Guard_Tower

-2.500000 12.500000 0 2 2
2 69 Guard_Tower

-12.500000 2.500000 0 2 2
2 69 Guard_Tower

-12.500000 -2.500000 0 2 2
2 69 Guard_Tower

Getting confused? Yes, the misbeliefs with the
CTY file can be explained with the fact that of the 3 Computer
Player Tuning File Types - AI, Personality and City Plan - this
is the newest to be explored.

Z coordinate? Flying buildings in AoE? It was
probably part of a beta version, the best is to leave it at zero
for now. For better description, take a look at the other articles
available.

What do you use this file for? For tuning computer
players. It needs to work in conjunction with an AI file, however.
The AI file tells the computer what to build, than it looks at
the CTY, picks the first possible location for the building, and
builds it there. The CTY file does not function as an AI; it tells
the computer WHERE to build WHAT, but it won’t command it to build.
It is just a map for the computer.

CTY files are lines with coordinates, you can’t
see through them unless you waste all your precious time drawing
cities into a coordinate system. I recommend everyone who wants
to create his own City Plan file to use CTY Editor, which can
be found in the Utilities section. This article will also explain
the use of the editor.

There are some buildings however, which the City
Plan file has no control over. These are the following: House,
Dock, Granary, Storage Pit, Wall, Tower. Why? Because Ensemble
Studios decided to make the construction of these buildings dynamic.
What does that mean? For example, if there is elevation on the
eastern side of the town, the computer will build its walls and
towers there. Docks are built on water, houses next to other buildings
and dropsites near resources. Basically those, whose location
can not be defined.

CTY files also have a serious problem: They don’t
include places where the computer can’t build. For example if
you define place for one Barracks, but that place is covered by
forests in-game, the Barracks won’t be built and your computer
will remain in a maximum of Tool Age. (It is impossible to advance
to Bronze Age without Barracks)

One more thing should be noted: Even though you
have no control over them, the CTY file must have at least one
block of wall, one tower, one house, one granary, one storage
pit and one dock. Otherwise these buildings won’t be constructed.

CTY Editor v1.0

I made CTY Editor to allow people to edit City
Plan files easily and without a strong headache. The Documentation
included, however will only tell you the basic usage, it won’t
give you much more help than how to start the program.

Installation of CTY Editor:

1. First download
the file from Age of Empires Heaven’s Granary’s Utilities section

2. Unzip the files
to a folder you want, for example C:\Tools\CTY Editor

3. Now, try to
run Configure.exe – if it starts, skip to line 5. If not, read
on.

4. You must copy
the included cncs232.dll to the C:\Windows\system32 folder

5. Use Configure.exe
to set up some of the options of the editor that will suit you.

6. Click Save
and Exit, than start Cty Editor.exe

Usage of CTY Editor:

The tool looks like this:

To the right you can see the map of your future
town, the Town Center is in the middle.

To the right is the options panel with which
you can modify some options, a clock and a minimap.

To the bottom is the raw CTY file, the credits
screen and some buttons for loading, saving, starting a new file
and closing the application.

Disabling the grid:

If the grid irritates you, click the grid drop-down
list and select no.

Placing a building:

Select your building from the drop-down list,
drag the mouse over the map and click.

Removing a building:

Enable the checkbox Delete/Find enabled

Select the building you wish to delete in the
raw CTY file list (at the bottom)

If you don’t find your building, enable the checkbox
Area Marker

Press Delete

Backup options:

Backup file on exit – saves your file when you
exit. Don’t use this as a save option, only as an option for security.

AutoBackup – Automatically saves your file every
given second (you speciy this in the Configuration Tool).

Advanced stuff:

Frame/Second counter – hold down the F key.

Dragging walls – select the option from the drop-down
list when placing a building of size 1 (wall or disabled). Note:
This option has several drawbacks. Backup your file, and even
if you drag walls, do as the application tells you. If your walls
disappear, you’ve reached the limit of active objects; something
I couldn’t get round whilst making the application. Use at your
own risk.

Special Buildings:

Any_type – any kind of building can be built
here (of size 3). Watch out, as this building can be a blessing
or a curse.

Disabled_place – the computer player won’t build
anything here (this is just a concept based on an idea found in
one of the articles)

When creating a CTY file, watch out for the viewpoint
of AoE (isometric view) and the viewpoint of the editor (bird’s
eye, rotated). Also, it is often wise to create the CTY file first
and build the scenario around it. It saves you a headache.