CHEATS FOR ANTS

Home

MAP MAKING
The Zone
DOWNLOADS
LINKS TO OTHER ANTS SITES

MAP MAKING

So you want to make maps ?

Here is the list of information you've been looking for.
The information your about to read is just that. If you can't work out what to do with it then maybe you should give up now.


Ok ... to start with you have 3 main files that are the game you know as ANTS.
There is the ants.exe, this is the actual game itself. Since it is an excutable file it has no relivant information in it you can use unless you know what it is your looking for in the first place. New codes and extreem cheats can be done, but that is beyond the scope of this web page and rather difficult. Needless to say, the last thing you would want to do is edit it. So leave it alone !

The next file is the ants.chd file. This is like the library of the ants game. It contains all the picture information and some of the rules for the game. When ants.exe runs, it loads only specific parts of this file it needs since the file is so big.
You'll find all sorts of interesting codes and objects in this file. You might like to edit certain parts of this file or even include new pieces if your very careful. The main interest in this file is the pictures themselves. If you look carefully in this file, you'll find that it is not actually just one file, but many files all clumped together. If you edit one of these files, that object will change on your screen, but only your screen, all other players will see the normal material that is still in their own ants.chd file.
An example of what is possible by modifying this file: If you have ever played quake you might have come across quake with simpson's characters instead of the usal monsters. Well, the same thing is possible in ants. You could have southpark characters instead of ants ! freaky !!
If this is your idea of some fun, then you should search the web for a file format called: BITMAP. Once you know how a bitmap file works you can compare it to the BMP files in ants.chd. They are not much different from each other, but to edit the ants pictures you will have to either convert the file formats or edit them by hand.
If somebody has the time, I'd like a list of all the .BMP filenames in ants.chd.

The final and main file you will be interested in is any file ending with .LVL that lives in your maps folder. These are the actual maps themselves. When ants.exe runs, it will load in them map file into memory. Modifying the file during the game will do nothing since the file is only loaded into memory once. From that point on... everything that happens during the game is actually saved in the map file (but only in memory not on your disk). This is how cheat-o-matic works, it is actually modifying the active file in memory.
Once the map file is loaded, the program then looks at the map file and loads in all the pieces required from the ants.chd to run that level.

Start with a fresh filename .. not a file that already exists (like tresure).
Once you have the file open you will notice that it is made up of 5 major sections. These sections will be called.. Sections - 0,1,2,3,4 for the purpose of this web page.
All addresses and values will be given in hexadecimal 0000h ( or 0000d for decimal ).

SECTION 0
This section contains the introduction to the map.
Addr 0000-0007h appear to be just a file flag.
Addr 0008h is the value for time duration in minutes.
Addr 000A-0027h is the intro
Addr 0028-0029h is a checksum - I have a working formula for this if required.

SECTION 1
This is an inclusion section. If you use anything in your map file, then it must first be defined in this section. If you know how to program even simple C++ then you will understand #include declarations.
I do not have a list of the codes used, but they are obvious. If somebody would care to email them to me, then I'll put them up here for you all to share.
Each cell in section 1 is in this format: ./level.... or 2E 5C 6C 65 76 65 6C 2E 00 00 00
for an empty cell. Pay carefull attention to alignment of cells when you add this section. You may also find that some cells are terminated with the value CD.

SECTION 2
This section controls all terrain on the map. This includes: Dirt, Sand, Ice, Mud and Water.
The first 8 bytes of section 2 control the size of the map.
XX 00 00 00 XX 00 00 00
The first value is the height of the map and he second value is the Width.
Don't just think you can change this values to make the map as big as you want, there are many other factors that you must take into account and all checksums must be correct else your map will crash. If you want the formulas for the checksums, then ask one of the Brothers Of Darkness for them, if you can find them.

You will notice in this section that the tiles are defined by 6 byte blocks.
E5 01 00 00 00 00 - defines a clear dirt tile.
DC 01 00 00 00 00 - defines a water tile.
E7 01 00 00 00 00 - defines a sand tile.

Access to tiles is also controled in this section by the 3rd byte in each tile.
E5 01 00 00 00 00 - An ant may walk on this tile.
E5 01 01 00 00 00 - an ant cannot walk on this tile.

The last two bytes appear to not be used. They may be address flags but I have not researched them closely to find out what they do. The fourth byte we haven't researched closely either, but susspect it has a control function for selective access like water or fire.

The following are descriptor codes only. (the first two bytes).
The following are codes for MUD..
B7 01, B8 01, B9 01, BA 01, BB 01
94 02, 95 02, 96 02, 97 02, 98 02, 99 02, 9A 02, 9B 02, 9C 02

The trick to making your map look good is never use the same codes next to each other.


The Following are all codes for Transition tiles and other terrain tiles.
E001, E201, E301, E401, E501, E601, E701, E801, E901, EA01, EB01, EC01, ED01, EF01
DA01, DB01, DC01, DD01, DE01, DF01, F101, F301, F501, F701, F901, FB01, FD01, FF01
B001, B101, B201, B301, B401, B501, B601, B701, B801, AF01, C201, C401, C601, C801
0102, 0302, 0502, 0702, 0902.

There are many more and I'm sorry I do not have time to describe each of what these tiles is. If you use common sense and a bit of trail and error, you'll work out which is which. If somebody would care to send me some JPG's of each tile, I'll put them on the page.
Some tiles of terrain belong beside each other. Chose your tiles carefully when making a map and your map will look really good.

SECTION 3
This section contains data on objects that sit on the surface of the map such as Grass, Flowers, Ojects, Food, Power Ups and Ant Hills.

A standard blank tile is: FE 7F 00 00 XX XX
This means that this tile has no object on it at this location. You will find a blank tile will be 00 00 but for all other objects, each item should have it's exact location in this data. It will make it easier for you to find it later on and in the case of flowers, they will not be three dimensional unless this address is exactly correct !

ANT HILLS.
F5 00 00 00 XX XX = BLACK
F6 00 00 00 XX XX = BLUE
F7 00 00 00 XX XX = RED
F8 00 00 00 XX XX = GREEN

You will note the XX are varible. They must be correct, they describe the position of the ant hill on the map. The first byte is the Row and the last byte is the Colomn.
Futher more, the ant hill may only be 4 x 4 tiles and the hole must be in the 2nd x 2nd tile and is defined as Fx 00 01 00 XX XX. (Fx is the Color descriptor byte).

POWER UPS.
3E 00 01 00 XX XX = Soldier
3F 00 01 00 XX XX = Theif
40 00 01 00 XX XX = Bomber
41 00 01 00 XX XX = Diver
42 00 01 00 XX XX = Fire

Again, the XX's describe the position of the power up on the map

FLOWERS.
These are static flowers ...
9A 01 XX 00 XX 00
9B 01 XX 00 XX 00
9C 01 XX 00 XX 00
9D 01 XX 00 XX 00
9E 01 XX 00 XX 00

A4 01 XX 00 XX 00 = Dancing Flower
A5 01 XX 00 XX 00 = Power Flower

94 01 01 00 XX XX = Clover leaning left
95 01 01 00 XX XX = 4 Leaf Clover
96 01 01 00 XX XX = Clover leaning right
97 01 01 00 XX XX = Clover leaning far right
There are other codes for clover, but I have not bothered to work them out.

2A 05 00 00 XX XX = Grass
2B 05 00 00 XX XX = Grass
2C 05 00 00 XX XX = Grass
2D 05 00 00 XX XX = Grass
2E 05 00 00 XX XX = Grass


a list of descriptor codes for objects will be put here as people supply them.

SECTION 4
In This section everything elese is included. The first two bytes are the number of ants at the start of the game. If you just ran off and changed it and found it didn't work, there's a very good reason.
Firstly, this is the TOTAL number of ants at the start. Every ant must be accounted for, any errors and the map will crash. BUT, this does not limit you in how many ants you can have, what color or where you put them to start. You can for example, have red start with 12 ants and all other colors start with only 3. Of course this would seem silly at first since red would have a very unfair advantage in the game, but if you designed a good map. You'd put the red ants hill in such a position that it would even up the game. When designing a map with numbers of ants, always ask yourself could I win if I was any color on this map. If the answer is yes, then you have a good design.
Ok, so you've changed the number of ants, but it doesn't work... why ?
Because you just changed the pointer value and didn't actually add any ants to the map !

The codes for the ants are as follows:
98 00 XX 00 XX = BLUE
99 00 XX 00 XX = BLACK
9A 00 XX 00 XX = GREEN
9B 00 XX 00 XX = RED

As per usal, the XX 's represent the starting positions of each ant.
A TIP: It is possible to make more than one ant start on the same tile. The result is quite funny, but I'm not sure if it can be programed into the map at the start of the game. Needless to say, a good map will look better if all the ants start in their own position.
There's more !! If you were clever, you might have noticed that there seems to be more than four types of ants ? At first we thought this could have been extra colored ants for competition games, but after searching the ants.chd file for other colors we realised they were not ants. A quick search of the map at those start postions revealed flowers ! In order to display flowers, they must be included in this section. (more on this later).

The Difference is in the second byte as follows:
9A 01 XX 00 XX
9B 01 XX 00 XX
9C 01 XX 00 XX
9D 01 XX 00 XX
9E 01 XX 00 XX
A4 01 XX 00 XX
A5 01 XX 00 XX


Next in Section 3 comes.. FOOD !
We know you guys have been waiting for this for a while, so here it is.
Food codes a varible in length, this is why it was so hard for the dumb ass's to find them all this time. Food appears in section 3 also, but it is a static picture. I'm not sure why section 3 has food on it. Food can be clones in section 3, but unless the parent piece of food is still active it will not work, and even then, the bites and points are still deducted from the parent food.
The main control for food is in section 4 and even if the corresponding titles are not in the 3rd section.

RR 00 CC 00 XX 00 1E 00 02 00 QQ 00 FF 01 00 00 FE 7F

This is the simplest example of a piece of food. I'll start at the begining.
RR = The Row position of the food
CC = The Column position of the food
XX = The number of bites total in the food
1E = The value of each bite. (the points each ant gets)
02 = The number of Display states.
QQ = The number of bites per display state.
FF 01 00 00 = The Food Descriptor / Display state.
FE 7F = End flag and Final Display state.

A few things to be said on these values. The Maximum value for any one byte is FF (255).
The number of display states will determine how long the array for each food block is. For a value of 02 the food block is 18 bytes long. For a value of 03 the block is 22 bytes long and for a value of 04 the block is 26 bytes long. (An extra four bytes for each state).
RR00CC00XX001E000200QQ00 FF010000 FE7F is 02 display states.
RR00CC00XX001E000300QQ00 FF010000 FE010000 FE7F is 03 display states.
RR00CC00XX001E000400QQ00 FF010000 FE010000 FD010000 FE7F is 04 display states,
and so on.

You can see the first, second and final display states.
Normally, this would be the same type of food, each state slowly being eaten away. BUT, you may have just about anything displayed, including different types of food. A hamburger may turn into a twinky after 10 bites. etc.

The most interesting effect of food is the last end flag. You will see this used in section 3. It simply means display nothing ! In this case, that is exactly what happens. When the food is gone, nothing is displayed on that tile. Of course this is not always the case. Sometimes there is something left behind, like a chicken bone, or and empty tin of potted meat. The last two bytes display this. You will see the classic example of all of this in JUNGLE. Food turns into clover when it's gone. The potted meat leaves a tin, and the best example is the top and bottom food turn into combant power ups.



TEXT EXAMPLE of what a map really looks like. If you were too dumb to work out maps before, then look at this file.
For those of you who are really stupid... continue on with what you were doing. The world needs people like you to flip their burgers !!



I will add more information here later...

There are now so many maps out there that we cannot keep track of them. Some are good, and some are not so good. In any case the best site to find these maps is http://ants.blinkk.net. This site is still the only codez site available. Any codes asked for or posted will be published.

This page is historic information. Last update was 2001. History of this site