Abstract base of all entities with health in the game.
EntityPrototypefloattruefalseThe unit health can never go over the maximum. Default health of units on creation is set to max. Must be greater than 0.
max_health = 50
floattruefalseThe amount of health automatically regenerated per tick. The entity must be active for this to work.
healing_per_tick = 0.01
floattruefalseMultiplier of RepairToolPrototype::speed for this entity prototype.
ExplosionDefinition | Array<ExplosionDefinition>truefalseThe entities that are spawned in place of this one when it dies.
TriggerEffecttruefalseTriggerEffecttruefalseArray<LootItem>truefalseThe loot is dropped on the ground when the entity is killed.
loot =
{
{
count_max = 10,
count_min = 2,
item = "stone",
probability = 1
}
}
Array<Resistance>truefalseSee damage.
resistances =
{
{
type = "fire",
percent = 80
},
{
type = "explosion",
percent = 30
}
}
AttackReactionItem | Array<AttackReactionItem>truefalseSoundtruefalsePlayed when this entity is repaired with a RepairToolPrototype.
booleantruefalsebooleantruefalseWhether the resistances of this entity should be hidden in the entity tooltip.
booleantruefalsebooleantruefalseRenderLayertruefalseMay also be defined inside graphics_set instead of directly in the entity prototype. This is useful for entities that use a graphics_set property to define their graphics, because then all graphics can be defined in one place.
EntityID | Array<EntityID>truefalseSpecifies the names of the CorpsePrototype to be used when this entity dies.
Sprite4WaytruefalseMay also be defined inside graphics_set instead of directly in the entity prototype. This is useful for entities that use a graphics_set property to define their graphics, because then all graphics can be defined in one place.
Sprite drawn on ground under the entity to make it feel more integrated into the ground.
floattruefalseFraction of health by which predicted damage must be exceeded before entity is considered as "predicted to die" causing turrets (and others) to stop shooting more projectiles. If entity is healing it is better to keep larger margin to avoid cases where not enough projectiles goes towards a target and it heals causing it to survive all the incoming projectiles. If entity does not heal, margin may be reduced. Must be >= 0.