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

# Factorio Prototype Docs Version 2.0.77

# Effect - Prototype Docs

## 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

- default
- sorted

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. [...]

consumption optional | :: EffectValue | Multiplier to energy used during operation (not idle/drain use). [...]
Multiplier to energy used during operation (not idle/drain use). [...]
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. [...]
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. [...]
quality optional | :: EffectValue | Adds a bonus chance to increase a product's quality. [...]
Adds a bonus chance to increase a product's quality. [...]
speed optional | :: EffectValue | Modifier to crafting speed, research speed, etc. [...]
Modifier to crafting speed, research speed, etc. [...]

## 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%. The quality effect is is multiplied by QualityPrototype::next_probability. For example, if a module's quality effect is 0.2 and the current quality's next_probability is 0.1, then the chance to get the next quality item is 2%.

## Example

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

Type used in

- EffectReceiver::base_effect
- ModulePrototype::effect