Prototype/EnemySpawner: Difference between revisions
(1.0.0: added spawn_decorations_on_expansion, spawn_decoration) |
(mandatory value for Prototype/EntityWithOwner#allow_run_time_change_of_is_military_target) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/ | {{Prototype parent|Prototype/EntityWithOwner}} | ||
Can spawn entities. Used for biter/spitter nests. | Can spawn entities. Used for biter/spitter nests. | ||
Line 5: | Line 5: | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|animations|[[Types/AnimationVariations|AnimationVariations]]}} | {{Prototype property|animations|[[Types/AnimationVariations|AnimationVariations]]}} | ||
Line 56: | Line 56: | ||
{{Prototype property|spawn_decoration|[[Types/CreateDecorativesTriggerEffectItem|CreateDecorativesTriggerEffectItem]] or [[Types/table|table]] of [[Types/CreateDecorativesTriggerEffectItem|CreateDecorativesTriggerEffectItem]]|optional=true}} | {{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. | 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. | |||
* [[Prototype/EntityWithOwner#allow_run_time_change_of_is_military_target]] must be false. |
Latest revision as of 21:00, 21 January 2022
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/EnemySpawner
Can spawn entities. Used for biter/spitter nests.
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
animations
Type: AnimationVariations
max_count_of_owned_units
Type: uint32
Count of enemies this spawner can sustain.
max_friends_around_to_spawn
Type: uint32
How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
spawning_cooldown
Type: array of two double
Ticks for cooldown after unit is spawned
spawning_radius
Type: double
How far from the spawner can the units be spawned.
spawning_spacing
Type: double
What spaces should be between the spawned units.
max_richness_for_spawn_shift
Type: double
Max richness to determine spawn shift. Spawn shift is linear interpolation between 0 and maxSpawnShift.
max_spawn_shift
Type: double
Caps how much richness can be added on top of evolution when spawning units. (See also [1])
pollution_absorption_absolute
Type: double
pollution_absorption_proportional
Type: double
call_for_help_radius
Type: double
result_units
Type: table of UnitSpawnDefinition
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
dying_sound
Type: Sound
integration
Type: SpriteVariations
min_darkness_to_spawn
Type: float
Default: 0.0
max_darkness_to_spawn
Type: float
Default: 1.0
random_animation_offset
Type: bool
Default: true
spawn_decorations_on_expansion
Type: bool
Default: false
Whether spawn_decoration
should be spawned when enemies expand.
spawn_decoration
Type: CreateDecorativesTriggerEffectItem or table of CreateDecorativesTriggerEffectItem
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.