Types/ModifierPrototype: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Migrated prototype doc to separate website)
(Removed old prototype docs)
Tag: Replaced
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/Modifier.html https://lua-api.factorio.com/latest/types/Modifier.html]
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/Modifier.html https://lua-api.factorio.com/latest/types/Modifier.html]


This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
 
 
The effect that is applied when a [[Prototype/Technology]] is researched. It is a [[Types/table]] that contains at least the field <code>type</code>. A modifier prototype may also have other fields depending on the type, because it is loaded as an extension of this type.
 
== Mandatory properties ==
 
=== type ===
'''Type''': [[Types/string]]
 
One of the listed strings.
 
* If this is <code>"inserter-stack-size-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"stack-inserter-capacity-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"laboratory-speed"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-logistic-trash-slots"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"maximum-following-robots-count"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"worker-robot-speed"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"worker-robot-storage"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"ghost-time-to-live"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"turret-attack"</code>, this modifier is loaded as a [[Types/TurretAttackModifierPrototype]],
* If this is <code>"ammo-damage"</code>, this modifier is loaded as a [[Types/AmmoDamageModifierPrototype]],
* If this is <code>"give-item"</code>, this modifier is loaded as a [[Types/GiveItemModifierPrototype]],
* If this is <code>"gun-speed"</code>, this modifier is loaded as a [[Types/GunSpeedModifierPrototype]],
* If this is <code>"unlock-recipe"</code>, this modifier is loaded as a [[Types/UnlockRecipeModifierPrototype]],
* If this is <code>"character-crafting-speed"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-mining-speed"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-running-speed"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-build-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-item-drop-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-reach-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-resource-reach-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-item-pickup-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-loot-pickup-distance"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-inventory-slots-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"deconstruction-time-to-live"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"max-failed-attempts-per-tick-per-construction-queue"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"max-successful-attempts-per-tick-per-construction-queue"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"character-health-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"mining-drill-productivity-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"train-braking-force-bonus"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"zoom-to-world-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"zoom-to-world-ghost-building-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"zoom-to-world-blueprint-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"zoom-to-world-deconstruction-planner-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"zoom-to-world-upgrade-planner-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"zoom-to-world-selection-tool-enabled"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]],
* If this is <code>"worker-robot-battery"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"laboratory-productivity"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"follower-robot-lifetime"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"artillery-range"</code>, this modifier is loaded as a [[Types/SimpleModifierPrototype]],
* If this is <code>"nothing"</code>, this modifier is loaded as a [[Types/NothingModifierPrototype]],
* If this is <code>"character-logistic-requests"</code>, this modifier is loaded as a [[Types/BoolModifierPrototype]].
 
== Optional properties ==
 
=== icons, icon, icon_size (IconSpecification) ===
'''Type''': [[Types/IconSpecification]]
 
=== infer_icon ===
'''Type''': [[Types/bool]]
 
If set to false, use the icon from the [[Prototype/UtilitySprites|utility sprites]] for this technology effect icon.
 
List of modifier types for which <code>infer_icon</code> = true does something<sup>[https://forums.factorio.com/91975]</sup>:
* "inserter-stack-size-bonus"
* "stack-inserter-capacity-bonus"
* "worker-robot-speed"
* "worker-robot-storage"
* "worker-robot-battery"
* "mining-drill-productivity-bonus"
* "train-braking-force-bonus"
* "laboratory-speed"
* "laboratory-productivity"
* "artillery-range"
* "maximum-following-robots-count"
* "follower-robot-lifetime"
* "turret-attack"
* "ammo-damage"
* "gun-speed"
 
=== use_icon_overlay_constant ===
'''Type''': [[Types/bool]]
 
If set to false, do not draw the small "constant" icon over the technology effect icon.
 
== Defaults for the icons ==
 
Default: <code>infer_icon</code> = false, <code>use_icon_overlay_constant</code> = true:
* "character-mining-speed"
* "character-inventory-slots-bonus"
* "character-logistic-trash-slots"
* "artillery-range"
* "maximum-following-robots-count"
* "ghost-time-to-live"
* "mining-drill-productivity-bonus"
* "character-crafting-speed"
* "character-running-speed"
* "character-build-distance"
* "character-item-drop-distance"
* "character-reach-distance"
* "character-resource-reach-distance"
* "character-item-pickup-distance"
* "character-loot-pickup-distance"
* "character-health-bonus"
* "zoom-to-world-ghost-building-enabled"
* "zoom-to-world-blueprint-enabled"
* "zoom-to-world-deconstruction-planner-enabled"
* "zoom-to-world-upgrade-planner-enabled"
* "zoom-to-world-selection-tool-enabled"
* "deconstruction-time-to-live"
* "max-failed-attempts-per-tick-per-construction-queue"
* "max-successful-attempts-per-tick-per-construction-queue"
* "inserter-stack-size-bonus"
* "stack-inserter-capacity-bonus"
 
Default: <code>infer_icon</code> = true, <code>use_icon_overlay_constant</code> = true:
* "laboratory-speed"
* "ammo-damage"
* "turret-attack"
* "gun-speed"
* "follower-robot-lifetime"
* "train-braking-force-bonus"
* "worker-robot-speed"
* "worker-robot-storage"
* "worker-robot-battery"
* "laboratory-productivity"
 
Default: <code>infer_icon</code> = false, <code>use_icon_overlay_constant</code> = false:
* "unlock-recipe"
* "give-item"
* "character-logistic-requests"
* "zoom-to-world-enabled"
* "nothing"

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/Modifier.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.