Prototype/EnemySpawner: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(1.1.51: Prototype/EntityWithOwner added)
(Removed old prototype docs)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Prototype parent|Prototype/EntityWithOwner}}
<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/prototypes/EnemySpawnerPrototype.html https://lua-api.factorio.com/latest/prototypes/EnemySpawnerPrototype.html]
Can spawn entities. Used for biter/spitter nests.


{{Prototype TOC|unit-spawner}}
</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>
 
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/EntityWithOwner]].
 
{{Prototype property|animations|[[Types/AnimationVariations|AnimationVariations]]}}
 
{{Prototype property|max_count_of_owned_units|[[Types/uint32|uint32]]}}
Count of enemies this spawner can sustain.
 
{{Prototype property|max_friends_around_to_spawn|[[Types/uint32|uint32]]}}
How many friendly units are required within the [[#spawning_radius|spawning_radius]] of this spawner for it to stop producing more units.
 
{{Prototype property|spawning_cooldown|[[Types/table|array]] of two [[Types/double|double]]}}
Ticks for cooldown after unit is spawned
 
{{Prototype property|spawning_radius|[[Types/double|double]]}}
How far from the spawner can the units be spawned.
 
{{Prototype property|spawning_spacing|[[Types/double|double]]}}
What spaces should be between the spawned units.
 
{{Prototype property|max_richness_for_spawn_shift|[[Types/double|double]]}}
Max richness to determine spawn shift. Spawn shift is linear interpolation between 0 and maxSpawnShift.
 
{{Prototype property|max_spawn_shift|[[Types/double|double]]}}
Caps how much richness can be added on top of evolution when spawning units. (See also [https://www.reddit.com/r/factorio/comments/8pjscm/friday_facts_246_the_gui_update_part_3/e0bttnp/])
 
{{Prototype property|pollution_absorption_absolute|[[Types/double|double]]}}
 
{{Prototype property|pollution_absorption_proportional|[[Types/double|double]]}}
 
{{Prototype property|call_for_help_radius|[[Types/double|double]]}}
 
{{Prototype property|result_units|[[Types/table|table]] of [[Types/UnitSpawnDefinition|UnitSpawnDefinition]]}}
Array of the [[Prototype/Entity|entities]] that this spawner can spawn and their spawn probabilities. The sum of probabilities is expected to be 1.0. The array must not be empty.
 
== Optional properties ==
 
{{Prototype property|dying_sound|[[Types/Sound|Sound]]|optional=true}}
 
{{Prototype property|integration|[[Types/SpriteVariations|SpriteVariations]]|optional=true}}
 
{{Prototype property|min_darkness_to_spawn|[[Types/float|float]]|0.0|optional=true}}
 
{{Prototype property|max_darkness_to_spawn|[[Types/float|float]]|1.0|optional=true}}
 
{{Prototype property|random_animation_offset|[[Types/bool|bool]]|true|optional=true}}
 
{{Prototype property|spawn_decorations_on_expansion|[[Types/bool|bool]]|false|optional=true}}
Whether <code>spawn_decoration</code> should be spawned when enemies [[Enemies#Expansions|expand]].
 
{{Prototype property|spawn_decoration|[[Types/CreateDecorativesTriggerEffectItem|CreateDecorativesTriggerEffectItem]] or [[Types/table|table]] of [[Types/CreateDecorativesTriggerEffectItem|CreateDecorativesTriggerEffectItem]]|optional=true}}
A single [[Types/CreateDecorativesTriggerEffectItem|CreateDecorativesTriggerEffectItem]] or an array of them. Decoratives to be created when the spawner is created by the [[map generator]]. Placed when enemies expand if <code>spawn_decorations_on_expansion</code> is set to true.
 
== Mandatory values ==
Enemy spawners have additional requirements for the properties inherited from [[Prototype/EntityWithOwner]]:
* [[Prototype/EntityWithOwner#is_military_target]] must be true.

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/prototypes/EnemySpawnerPrototype.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.