Factorio Prototype DocsVersion 1.1.107

AutoplaceSpecification :: struct or AutoplacePeak

Autoplace specification is used to determine which entities are placed when generating map. Currently it is used for enemy bases, tiles, resources and other entities (trees, fishes, etc.).

Autoplace specification describe conditions for placing tiles, entities, and decoratives during surface generation. Autoplace specification defines probability of placement on any given tile and richness, which has different meaning depending on the thing being placed.

There are two entirely separate ways to specify the probability and richness:

  • The newer noise expression-based system using probability_expression and richness_expression.

  • The older peaks-based system using peaks and the properties listed below it.

Properties

control optional :: AutoplaceControlID

Name of the AutoplaceControl (row in the map generator GUI) that applies to this entity.

Name of the AutoplaceControl (row in the map generator GUI) that applies to this entity.

default_enabled optional :: bool

Indicates whether the thing should be placed even if MapGenSettings do not provide frequency/size/richness for it. [...]

Indicates whether the thing should be placed even if MapGenSettings do not provide frequency/size/richness for it. [...]

force optional :: "enemy" or "player" or "neutral" or string

Force of the placed entity. [...]

Force of the placed entity. [...]

order optional :: Order

Order for placing the entity (has no effect when placing tiles). [...]

Order for placing the entity (has no effect when placing tiles). [...]

placement_density optional :: uint32

For entities and decoratives, how many times to attempt to place on each tile. [...]

For entities and decoratives, how many times to attempt to place on each tile. [...]

tile_restriction optional :: array[TileIDRestriction]

Restricts tiles or tile transitions the entity can appear on.

Restricts tiles or tile transitions the entity can appear on.

probability_expression optional :: NoiseExpression

If specified, provides a noise expression that will be evaluated at every point on the map to determine probability. [...]

If specified, provides a noise expression that will be evaluated at every point on the map to determine probability. [...]

richness_expression optional :: NoiseExpression

If specified, provides a noise expression that will be evaluated to determine richness. [...]

If specified, provides a noise expression that will be evaluated to determine richness. [...]

peaks optional :: array[AutoplacePeak]
sharpness optional :: double

Parameter of the sharpness filter for post-processing probability of entity placement. [...]

Parameter of the sharpness filter for post-processing probability of entity placement. [...]

max_probability optional :: double

Multiplier for output of the sharpness filter. [...]

Multiplier for output of the sharpness filter. [...]

richness_base optional :: double

Base Richness. [...]

Base Richness. [...]

richness_multiplier optional :: double

See richness_base.

See richness_base.

richness_multiplier_distance_bonus optional :: double

Bonus to richness multiplier per tile of distance from starting point. [...]

Bonus to richness multiplier per tile of distance from starting point. [...]

random_probability_penalty optional :: double

A random value between 0 and this number is subtracted from a probability after sharpness filter. [...]

A random value between 0 and this number is subtracted from a probability after sharpness filter. [...]

coverage optional :: double

Sets a fraction of surface that should be covered by this item.

Sets a fraction of surface that should be covered by this item.

starting_area_amount optional :: uint32

If this value is non zero, influence of this entity will be calculated differently in starting area: For each entity with this parameter a position in starting area is selected and a blob is placed centered on this position. [...]

If this value is non zero, influence of this entity will be calculated differently in starting area: For each entity with this parameter a position in starting area is selected and a blob is placed centered on this position. [...]

starting_area_size optional :: uint32

See starting_area_amount. [...]

See starting_area_amount. [...]

Properties

control :: AutoplaceControlID optional

Default: ""

Name of the AutoplaceControl (row in the map generator GUI) that applies to this entity.

default_enabled :: bool optional

Default: true

Indicates whether the thing should be placed even if MapGenSettings do not provide frequency/size/richness for it. (either for the specific prototype or for the control named by AutoplaceSpecification.control).

If true, normal frequency/size/richness (value=1) are used in that case. Otherwise it is treated as if 'none' were selected.

force :: "enemy" or "player" or "neutral" or string optional

Default: "neutral"

Force of the placed entity. Can be a custom force name. Only relevant for EntityWithOwnerPrototype.

order :: Order optional

Default: ""

Order for placing the entity (has no effect when placing tiles). Entities whose order compares less are placed earlier (this influences placing multiple entities which collide with itself), from entities with equal order string only one with the highest probability is placed.

placement_density :: uint32 optional

Default: 1

For entities and decoratives, how many times to attempt to place on each tile. Probability and collisions are taken into account each attempt.

tile_restriction :: array[TileIDRestriction] optional

Restricts tiles or tile transitions the entity can appear on.

TileIDRestriction :: TileID or {TileID, TileID}

Name of an allowed tile, or a list of two tile names for entities allowed on transitions.

probability_expression :: NoiseExpression optional

If specified, provides a noise expression that will be evaluated at every point on the map to determine probability.

If left blank, probability is determined by the peaks system based on the properties listed below.

richness_expression :: NoiseExpression optional

If specified, provides a noise expression that will be evaluated to determine richness.

If probability_expression is specified and richness_expression is not, then probability_expression will be used as the richness expression.

If neither are specified, then probability and richness are both determined by the peaks system based on the properties listed below.

peaks :: array[AutoplacePeak] optional

sharpness :: double optional

Example of sharpness filter with value 0.5.Example of sharpness filter with value 0.5.

Default: 0

Parameter of the sharpness filter for post-processing probability of entity placement. Value of 0 disables the filter, with value 1, the filter is a step function centered around 0.5.

max_probability :: double optional

Default: 1

Multiplier for output of the sharpness filter.

Probability is calculated as max_probability * sharpness_filter(sum of influences and size modifier from GUI) - random(0, random_probability_penalty).

richness_base :: double optional

Default: 0

Base Richness. It is calculated as sum of influences * (richness_multiplier + distance * richness_multiplier_distance_bonus) + richness_base.

Note, that when calculating richness, influences of individual peaks use AutoplacePeak::richness_influence bonus.

richness_multiplier :: double optional

Default: 0

See richness_base.

richness_multiplier_distance_bonus :: double optional

Default: 0

Bonus to richness multiplier per tile of distance from starting point. See richness_base.

random_probability_penalty :: double optional

Default: 0

A random value between 0 and this number is subtracted from a probability after sharpness filter. Only works for entities.

coverage :: double optional

Default: Calculated from existing peaks.

Sets a fraction of surface that should be covered by this item.

starting_area_amount :: uint32 optional

Default: 0

If this value is non zero, influence of this entity will be calculated differently in starting area: For each entity with this parameter a position in starting area is selected and a blob is placed centered on this position. The central tile of this blob will have approximately amount of resources selected by this value.

See AutoplacePeak::influence for the general influence calculation.

starting_area_size :: uint32 optional

Default: 10

See starting_area_amount. Controls approximate radius of the blob in tiles.

Prototypes

Types