Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# TerritorySettings - Prototype Docs

## TerritorySettings :: struct

## Properties

- default
- sorted

units optional | :: array[EntityID] | Names of the SegmentedUnitPrototype.
Names of the SegmentedUnitPrototype.
territory_index_expression optional | :: string | Mandatory if `units` is not empty.
Mandatory if `units` is not empty.
territory_variation_expression optional | :: string | The result will be converted to integer, clamped and used as an index for `units` array. [...]
The result will be converted to integer, clamped and used as an index for `units` array. [...]
minimum_territory_size optional | :: uint32 | Minimum number of chunks a territory must have. [...]
Minimum number of chunks a territory must have. [...]

minimum_territory_size optional | :: uint32 | Minimum number of chunks a territory must have. [...]
Minimum number of chunks a territory must have. [...]
territory_index_expression optional | :: string | Mandatory if `units` is not empty.
Mandatory if `units` is not empty.
territory_variation_expression optional | :: string | The result will be converted to integer, clamped and used as an index for `units` array. [...]
The result will be converted to integer, clamped and used as an index for `units` array. [...]
units optional | :: array[EntityID] | Names of the SegmentedUnitPrototype.
Names of the SegmentedUnitPrototype.

## Properties

### units :: array[EntityID] optional

Names of the SegmentedUnitPrototype.

### territory_index_expression :: string optional

Mandatory if `units` is not empty.

### territory_variation_expression :: string optional

Default: 0

The result will be converted to integer, clamped and used as an index for `units` array. Negative values will result in empty spawn location.

### minimum_territory_size :: uint32 optional

Default: `0`

Minimum number of chunks a territory must have. Below this, it will get deleted.

Type used in

- MapGenSettings::territory_settings
- PlanetPrototypeMapGenSettings::territory_settings