NML documentation

# Houses

## House variables

## House properties

property | value range | comment
--- | --- | ---
name | string | for example string(STR_NAME_EIFFEL_TOWER)
substitute | 0 ... 109 | Number of the default house that replaces this one, if this house is not available for some reason. This property must be set first, before any other properties or graphics. All properties of the old type are copied to your new house.
override | 0 ... 109 | id of the default house which this house replaces. This will cause your house to be placed instead of the default house. This is ignored, if the default house has already been overridden. You can define this property multiple times
building_flags |  | HOUSE_FLAG_XX with XX = [SIZE_1x1, SIZE_2x1, SIZE_1x2, SIZE_2x2, NOT_SLOPED, ANIMATE, CHURCH, STADIUM, ONLY_SE, PROTECTED, SYNC_CALLBACK, RANDOM_ANIMATION]
population | 0 ... 255 | number of inhabitants the building adds to the town, if present
mail_multiplier | 0 ... 255 |
pax_acceptance | 0 ... 1 | Can be increased in steps of 0.125. A station accepts a cargo, if the combined acceptance of all houses in range is at least 1.
mail_acceptance | 0 ... 1 |
cargo_acceptance | 0 ... 1 | Like passenger acceptance. Additionally flag can be added which defines one of the cargo type: HOUSE_ACCEPT_GOODS, HOUSE_ACCEPT_FOOD, HOUSE_ACCEPT_FIZZY_DRINKS; FIZZY_DRINKS has in toyland the same meaning as FOOD in other climates.
accepted_cargo |  | up to three cargo labels, e.g. MAIL, PASS, COAL
local_authority_impact | 0 ... 65525 | amount of happiness increase of the city council, if the building is destroyed
removal_cost_multiplier | 0 ... 255 |
probability | 0 ... 16 | Probability with respect to the default houses (=1). Mind that these are relative probabilities with respect to all houses defined. If all probabilities are defined as 16, they'll all have the same probability as if they had all a probability of 1.
years_available | array of two int | [xx, yy] where xx and yy indicate the introduction year and the last year the building can be built
minimum_lifetime | 0 ... 255 | number of years the building will remain at least
availability_mask | [bitmask(town zones), bitmask(CLIMATE_XXX, ...)] | An array with two bitmasks, the first bitmask is a mask of town zones where this house is available. The second bitmask is a mask of climates combined with the special value ABOVE_SNOWLINE which you need to set for houses available in the arctic climate above the snowline. Examples: Available in the centre town zone in toyland only: `[bitmask(TOWNZONE_CENTRE), bitmask(CLIMATE_TOYLAND)]` Available in all town zones in the arctic climate both above and below the snowline: `[ALL_TOWNZONES, bitmask(CLIMATE_ARCTIC, ABOVE_SNOWLINE)]` Available everywhere except on the town edge: `[ALL_TOWNZONES & ~bitmask(TOWNZONE_EDGE), ALL_CLIMATES | bitmask(ABOVE_SNOWLINE)`
callback_flags |  | bitmask(HOUSE_CBF_XX) with XX = [BUILD, ANIM_NEXT_FRAME, ANIM_STARTSTOP, CONSTRUCTION_ANIM, COLOUR, CARGO_AMOUNT_ACCEPT, ANIM_FRAME_LENGTH, DESTRUCTION, CARGO_TYPE_ACCEPT, CARGO_PRODUCTION, PROTECTION, FOUNDATION, AUTOSLOPE]
random_colours | array of 4, each 0 ... 15 | colour values in an array.
refresh_multiplier | 0 ... 63 | Defines the frequency with which the tile will be re-randomized which has an impact for random animation.
animation_info | Array [ANIMATION_XXX, frame-count] | XXX = [LOOPING | NON_LOOPING], 1..128 frames
animation_speed | 2 ... 16 | Speed of animation, see animation speed table for the meaning of the values.
building_class | 0 .. 255 | An arbitrary number. You can check for the presence of buildings of the same class when building new buildings or using animation