Types/ModifierPrototype: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "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...")
 
(Removed old prototype docs)
Tag: Replaced
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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.
<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]


== Mandatory properties ==
</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>
 
=== 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 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>:
* InserterStackSizeBonus
* StackInserterCapacityBonus
* WorkerRobotsSpeed
* WorkerRobotsStorage
* WorkerRobotsBattery
* MiningDrillProductivityBonus
* TrainBrakingForceBonus
* LaboratorySpeed
* LaboratoryProductivity
* ArtilleryRange
* MaximumFollowingRobotsCount
* FollowingRobotsLifetime
* TurretAttack
* AmmoDamage
* GunSpeed
 
=== 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:
* CharacterMiningSpeed
* CharacterInventorySlotsBonus
* CharacterLogisticTrashSlots
* ArtilleryRange
* MaximumFollowingRobotsCount
* GhostTimeToLive
* MiningDrillProductivityBonus
* CharacterCraftingSpeed
* CharacterRunningSpeed
* CharacterBuildDistance
* CharacterItemDropDistance
* CharacterReachDistance
* CharacterResourceReachDistance
* CharacterItemPickupDistance
* CharacterLootPickupDistance
* CharacterHealthBonus
* ZoomToWorldGhostBuildingEnabled
* ZoomToWorldBlueprintEnabled
* ZoomToWorldDeconstructionPlannerEnabled
* ZoomToWorldUpgradePlannerEnabled
* ZoomToWorldSelectionToolEnabled
* DeconstructionTimeToLive
* MaxFailedAttemptsPerTickPerConstructionQueue
* MaxSuccessfulAttempsPerTickPerConstructionQueue
* InserterStackSizeBonus
* StackInserterCapacityBonus
 
Default: <code>infer_icon</code> = true, <code>use_icon_overlay_constant</code> = true:
* LaboratorySpeed
* AmmoDamage
* TurretAttack
* GunSpeed
* FollowingRobotsLifetime
* TrainBrakingForceBonus
* WorkerRobotsSpeed
* WorkerRobotsStorage
* WorkerRobotsBattery
* LaboratoryProductivity
 
Default: <code>infer_icon</code> = false, <code>use_icon_overlay_constant</code> = false:
* UnlockRecipe
* GiveItem
* CharacterLogisticRequests
* ZoomToWorldEnabled
* Nothing
* CharacterAdditionalMiningCategories

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.