Prototype/EnemySpawner: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.17)
(Removed old prototype docs)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basics ==
<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]
Prototype type: '''unit-spawner'''


Extends [[Prototype/EntityWithHealth]].
</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/EntityWithHealth]].
 
=== dying_sound ===
'''Type''': [[Types/Sound]]
 
=== animations ===
'''Type''': [[Types/AnimationVariations]]
 
=== max_count_of_owned_units ===
'''Type''': [[Types/uint32]]
 
Count of enemies this spawner can sustain.
 
=== max_friends_around_to_spawn ===
'''Type''': [[Types/uint32]]
 
How many friendly units are required within the [[#spawning_radius|spawning_radius]] of this spawner for it to stop producing more units.
 
=== spawning_cooldown ===
'''Type''': [[Types/Range]]
 
Ticks for cooldown after unit is spawned
 
=== spawning_radius ===
'''Type''': [[Types/double]]
 
How far from the spawner can the units be spawned.
 
=== spawning_spacing ===
'''Type''': [[Types/double]]
 
What spaces should be between the spawned units.
 
=== max_richness_for_spawn_shift ===
'''Type''': [[Types/double]]
 
Max richness to determine spawn shift. Spawn shift is linear interpolation between 0 and maxSpawnShift.
 
=== max_spawn_shift ===
'''Type''': [[Types/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/])
 
=== pollution_absorption_absolute ===
'''Type''': [[Types/double]]
 
=== pollution_absorption_proportional ===
'''Type''': [[Types/double]]
 
=== call_for_help_radius ===
'''Type''': [[Types/double]]
 
=== result_units ===
'''Type''': [[Types/table]] of [[Types/UnitSpawnDefinition]]
 
Array of the [[Prototype/Unit]]s 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 ==
 
=== integration ===
'''Type''': [[Types/SpriteVariations]]
 
=== random_animation_offset ===
'''Type''': [[Types/bool]]
 
'''Default''': true
 
=== min_darkness_to_spawn ===
'''Type''': [[Types/float]]
 
'''Default''': 0.0
 
=== max_darkness_to_spawn ===
'''Type''': [[Types/float]]
 
'''Default''': 1.0

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.