In m4nfo, towns have only one type of functions, namely functions to get information about the nearest town like location, population, town zones, number of town buildings, etc.
| Function | Description |
| townbuildings(<block>) | Number of town buildings |
| towncargo(<CargoType>, THISMONTH | LASTMONTH, <block>) | Actual number of cargo transported |
| townmaxcargo(<CargoType>, THISMONTH | LASTMONTH, <block>) | Maximum number of cargo that could be transported |
| towncargofraction(<Cargotype>, <block>) | Fraction of cargo transported last month |
| towneffect(<block>) | Larger town effect on this town |
| townflags(<block>) | Special town flags |
| townhousefunding(<block>) | Building fund active in town, for still this many months |
| townindex(<block>) | Town index |
| townlocation(<block>) | Location of town on map |
| townpopulation(<block>) | Population of town, capped at 65535 |
| townroadworks(<block>) | Road works active in town, for still this many months |
| townzonesize(<TownZone>, <block>) | Square of given town zone radius |
towncargo(<CargoType>, THISMONTH | LASTMONTH, <block>)
This function returns the actual number of cargo that has been transported, either so far this month or last month. Valid CargoType is PASS, MAIL, FOOD or WATER. In case of FOOD ("fizzy drinks" in toyland) or WATER, this function returns the units delivered to this town.
Note: in climates other than sub-tropical WATER is bogus: it would be either counted as STEL, PAPR or "bubbles" (in toyland).
townmaxcargo(<CargoType>, THISMONTH | LASTMONTH, <block>)
This function returns the maximum number of cargo that could be transported, either so far this month or last month. Valid CargoType is PASS and MAIL
towncargofraction(<CargoType>, <block>)
This function returns the fraction of cargo transported last month (0xFF means 100%). Valid CargoType is PASS or MAIL.
This function returns a value describing how the "largertowns" / "economy.larger_towns" setting affects this town:
| Value | Meaning |
| 0 | largertowns is enabled, but it won't allow this town to grow larger than usual |
| 1 | largertowns is enabled, and it allows to grow this town larger |
| 2 | largertowns is disabled, so no towns are allowed to grow larger |
This function returns miscellaneous information about the town's behaviour:
| Flag | Meaning |
| EXPANDING | Town is in expanding mode |
| HASCHURCH | Town has already built a church |
| HASSTADIUM | Town has already built a stadium |
This function returns the index of the town in the town array. You can use this value to treat some towns specially. (For example, the first town on the map can be considered the capital and you can allow a Parliament to be built there, but nowhere else)
In TTDPatch, this variable has a value between 0 and 69 (inclusive).
This function returns the x/y-coordinate of the town's center. The function requires to test its return value by using the auxiliary function coordinate(), because its return value is a packed byte containing both coordinates.
townzonesize(<TownZone>, <block>)
This function returns the square of the town zone given as parameter:
| Parameter | Meaning |
| TZ_CENTRE | Innermost zone, street lights |
| TZ_COMMERCIAL | Trees |
| TZ_RESIDENTIAL | Paved roads |
| TZ_PERIPHERY | Plain roads |
| TZ_OUTSKIRTS |
Please note that smaller towns have fewer zones.