Prototype/EnemySpawner: Difference between revisions
m (Protected "Prototype/EnemySpawner": Migrated prototype doc to separate website ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(Updated styling of prototype doc migration note) |
||
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/prototypes/EnemySpawnerPrototype.html https://lua-api.factorio.com/latest/prototypes/EnemySpawnerPrototype.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/prototypes/EnemySpawnerPrototype.html 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 [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> | ||
Revision as of 10:43, 21 September 2023
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.
Template:Prototype parent Can spawn entities. Used for biter/spitter nests.
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
Template:Prototype property Count of enemies this spawner can sustain.
Template:Prototype property How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
Template:Prototype property Ticks for cooldown after unit is spawned
Template:Prototype property How far from the spawner can the units be spawned.
Template:Prototype property What spaces should be between the spawned units.
Template:Prototype property Max richness to determine spawn shift. Spawn shift is linear interpolation between 0 and maxSpawnShift.
Template:Prototype property Caps how much richness can be added on top of evolution when spawning units. (See also [1])
Template:Prototype property Array of the 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
Template:Prototype property
Whether spawn_decoration
should be spawned when enemies expand.
Template:Prototype property
A single CreateDecorativesTriggerEffectItem or an array of them. Decoratives to be created when the spawner is created by the map generator. Placed when enemies expand if spawn_decorations_on_expansion
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.
- Prototype/EntityWithOwner#allow_run_time_change_of_is_military_target must be false.