Factorio Prototype DocsVersion 2.0.26

Effect :: struct Example code

When applied to modules, the resulting effect is a sum of all module effects, multiplied through calculations: (1 + sum module effects), or (0 + sum) for productivity. Quality calculations follow their own separate logic.

Properties

consumption optional :: EffectValue

Multiplier to energy used during operation (not idle/drain use). [...]

Multiplier to energy used during operation (not idle/drain use). [...]

speed optional :: EffectValue

Modifier to crafting speed, research speed, etc. [...]

Modifier to crafting speed, research speed, etc. [...]

productivity optional :: EffectValue

Multiplied against work completed, adds to the bonus results of operating. [...]

Multiplied against work completed, adds to the bonus results of operating. [...]

pollution optional :: EffectValue

Multiplier to the pollution factor of an entity's pollution during use. [...]

Multiplier to the pollution factor of an entity's pollution during use. [...]

quality optional :: EffectValue

Adds a bonus chance to increase a product's quality. [...]

Adds a bonus chance to increase a product's quality. [...]

Properties

consumption :: EffectValue optional

Multiplier to energy used during operation (not idle/drain use). The minimum possible sum is -80%.

speed :: EffectValue optional

Modifier to crafting speed, research speed, etc. The minimum possible sum is -80%.

productivity :: EffectValue optional

Multiplied against work completed, adds to the bonus results of operating. E.g. an extra crafted recipe or immediate research bonus. The minimum possible sum is 0%.

pollution :: EffectValue optional

Multiplier to the pollution factor of an entity's pollution during use. The minimum possible sum is -80%.

quality :: EffectValue optional

Adds a bonus chance to increase a product's quality. The minimum possible sum is 0%. Quality is a special case because its effect value is divided by 10 internally for actual usage. This allows for one more decimal of precision, as anything beyond two decimals of effect value is ignored.

Example

-- These are the effects of the vanilla Speed Module 3
{speed = 0.5, consumption = 0.7, quality = -0.25}

Prototypes

Types

Defines