Prototype/EntityWithHealth: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎Extensions: updated extensions)
m (→‎Extensions: formatting)
Line 4: Line 4:


== Extensions ==
== Extensions ==
** [[Prototype/Accumulator]] '''accumulator'''
* [[Prototype/Accumulator]] '''accumulator'''
** [[Prototype/Beacon]] '''beacon'''
* [[Prototype/Beacon]] '''beacon'''
** [[Prototype/Boiler]] '''boiler'''
* [[Prototype/Boiler]] '''boiler'''
** [[Prototype/Character]] '''player'''
* [[Prototype/Character]] '''player'''
** [[Prototype/Combinator]] <abstract>
* [[Prototype/Combinator]] <abstract>
** [[Prototype/ArithmeticCombinator]] '''arithmetic-combinator'''
* [[Prototype/ArithmeticCombinator]] '''arithmetic-combinator'''
** [[Prototype/DeciderCombinator]] '''decider-combinator'''
* [[Prototype/DeciderCombinator]] '''decider-combinator'''
** [[Prototype/ConstantCombinator]] '''constant-combinator'''
* [[Prototype/ConstantCombinator]] '''constant-combinator'''
** [[Prototype/Container]] '''container'''
* [[Prototype/Container]] '''container'''
** [[Prototype/LegacySmartContainer]] '''smart-container''' (unused in the base-game, but exists for migration)
* [[Prototype/LegacySmartContainer]] '''smart-container''' (unused in the base-game, but exists for migration)
** [[Prototype/LogisticContainer]] '''logistic-container'''
* [[Prototype/LogisticContainer]] '''logistic-container'''
** [[Prototype/CraftingMachine]] <abstract>
* [[Prototype/CraftingMachine]] <abstract>
** [[Prototype/AssemblingMachine]] '''assembling-machine'''
* [[Prototype/AssemblingMachine]] '''assembling-machine'''
*** [[Prototype/RocketSilo]] '''rocket-silo'''
** [[Prototype/RocketSilo]] '''rocket-silo'''
** [[Prototype/Furnace]] '''furnace'''
* [[Prototype/Furnace]] '''furnace'''
** [[Prototype/ElectricEnergyInterface]] '''electric-energy-interface'''
* [[Prototype/ElectricEnergyInterface]] '''electric-energy-interface'''
** [[Prototype/ElectricPole]] '''electric-pole'''
* [[Prototype/ElectricPole]] '''electric-pole'''
** [[Prototype/EnemySpawner]] '''unit-spawner'''
* [[Prototype/EnemySpawner]] '''unit-spawner'''
** [[Prototype/Fish]] '''fish'''
* [[Prototype/Fish]] '''fish'''
** [[Prototype/FlyingRobot]] <abstract>
* [[Prototype/FlyingRobot]] <abstract>
** [[Prototype/CombatRobot]] '''combat-robot'''
* [[Prototype/CombatRobot]] '''combat-robot'''
** [[Prototype/RobotWithLogisticInterface]] <abstract>
* [[Prototype/RobotWithLogisticInterface]] <abstract>
*** [[Prototype/ConstructionRobot]] '''construction-robot'''
** [[Prototype/ConstructionRobot]] '''construction-robot'''
*** [[Prototype/LogisticRobot]] '''logistic-robot'''
** [[Prototype/LogisticRobot]] '''logistic-robot'''
** [[Prototype/Gate]] '''gate'''
* [[Prototype/Gate]] '''gate'''
** [[Prototype/Generator]] '''generator'''
* [[Prototype/Generator]] '''generator'''
** [[Prototype/HeatPipe]] '''heat-pipe'''
* [[Prototype/HeatPipe]] '''heat-pipe'''
** [[Prototype/Inserter]] '''inserter'''
* [[Prototype/Inserter]] '''inserter'''
** [[Prototype/Lab]] '''lab'''
* [[Prototype/Lab]] '''lab'''
** [[Prototype/Lamp]] '''lamp'''
* [[Prototype/Lamp]] '''lamp'''
** [[Prototype/LandMine]] '''land-mine'''
* [[Prototype/LandMine]] '''land-mine'''
** [[Prototype/LegacyRocketDefense]] '''rocket-defense''' (unused in the base-game, but exists for migration)
* [[Prototype/LegacyRocketDefense]] '''rocket-defense''' (unused in the base-game, but exists for migration)
** [[Prototype/Market]] '''market'''
* [[Prototype/Market]] '''market'''
** [[Prototype/MiningDrill]] '''mining-drill'''
* [[Prototype/MiningDrill]] '''mining-drill'''
** [[Prototype/OffshorePump]] '''offshore-pump'''
* [[Prototype/OffshorePump]] '''offshore-pump'''
** [[Prototype/Pipe]] '''pipe'''
* [[Prototype/Pipe]] '''pipe'''
** [[Prototype/PipeToGround]] '''pipe-to-ground'''
* [[Prototype/PipeToGround]] '''pipe-to-ground'''
** [[Prototype/PlayerPort]] '''player-port'''
* [[Prototype/PlayerPort]] '''player-port'''
** [[Prototype/PowerSwitch]] '''power-switch'''
* [[Prototype/PowerSwitch]] '''power-switch'''
** [[Prototype/ProgrammableSpeaker]] '''programmable-speaker'''
* [[Prototype/ProgrammableSpeaker]] '''programmable-speaker'''
** [[Prototype/Pump]] '''pump'''
* [[Prototype/Pump]] '''pump'''
** [[Prototype/Radar]] '''radar'''
* [[Prototype/Radar]] '''radar'''
** [[Prototype/Rail]] <abstract>
* [[Prototype/Rail]] <abstract>
** [[Prototype/CurvedRail]] '''curved-rail'''
* [[Prototype/CurvedRail]] '''curved-rail'''
** [[Prototype/StraightRail]] '''straight-rail'''
* [[Prototype/StraightRail]] '''straight-rail'''
** [[Prototype/RailSignalBase]] <abstract>
* [[Prototype/RailSignalBase]] <abstract>
** [[Prototype/RailChainSignal]] '''rail-chain-signal'''
* [[Prototype/RailChainSignal]] '''rail-chain-signal'''
** [[Prototype/RailSignal]] '''rail-signal'''
* [[Prototype/RailSignal]] '''rail-signal'''
** [[Prototype/Reactor]] '''reactor'''
* [[Prototype/Reactor]] '''reactor'''
** [[Prototype/Roboport]] '''roboport'''
* [[Prototype/Roboport]] '''roboport'''
** [[Prototype/SimpleEntity]] '''simple-entity'''
* [[Prototype/SimpleEntity]] '''simple-entity'''
** [[Prototype/SimpleEntityWithOwner]] '''simple-entity-with-owner'''
* [[Prototype/SimpleEntityWithOwner]] '''simple-entity-with-owner'''
** [[Prototype/SimpleEntityWtihForce]] '''simple-entity-with-force'''
* [[Prototype/SimpleEntityWtihForce]] '''simple-entity-with-force'''
** [[Prototype/SolarPanel]] '''solar-panel'''
* [[Prototype/SolarPanel]] '''solar-panel'''
** [[Prototype/StorageTank]] '''storage-tank'''
* [[Prototype/StorageTank]] '''storage-tank'''
** [[Prototype/TrainStop]] '''train-stop'''
* [[Prototype/TrainStop]] '''train-stop'''
** [[Prototype/TransportBeltConnectable]] <abstract>
* [[Prototype/TransportBeltConnectable]] <abstract>
** [[Prototype/Loader]] '''loader'''
* [[Prototype/Loader]] '''loader'''
** [[Prototype/Splitter]] '''splitter'''
* [[Prototype/Splitter]] '''splitter'''
** [[Prototype/TransportBelt]] '''transport-belt'''
* [[Prototype/TransportBelt]] '''transport-belt'''
** [[Prototype/UndergroundBelt]] '''underground-belt'''
* [[Prototype/UndergroundBelt]] '''underground-belt'''
** [[Prototype/Tree]] '''tree'''
* [[Prototype/Tree]] '''tree'''
** [[Prototype/Turret]] '''turret'''
* [[Prototype/Turret]] '''turret'''
** [[Prototype/AmmoTurret]] '''ammo-turret'''
* [[Prototype/AmmoTurret]] '''ammo-turret'''
** [[Prototype/ElectricTurret]] '''electric-turret'''
* [[Prototype/ElectricTurret]] '''electric-turret'''
** [[Prototype/FluidTurret]] '''fluid-turret'''
* [[Prototype/FluidTurret]] '''fluid-turret'''
** [[Prototype/Unit]] '''unit'''
* [[Prototype/Unit]] '''unit'''
** [[Prototype/Vehicle]] <abstract>
* [[Prototype/Vehicle]] <abstract>
** [[Prototype/Car]] '''car'''
* [[Prototype/Car]] '''car'''
** [[Prototype/RollingStock]] <abstract>
* [[Prototype/RollingStock]] <abstract>
*** [[Prototype/CargoWagon]] '''cargo-wagon'''
** [[Prototype/CargoWagon]] '''cargo-wagon'''
*** [[Prototype/FluidWagon]] '''fluid-wagon'''
** [[Prototype/FluidWagon]] '''fluid-wagon'''
*** [[Prototype/Locomotive]] '''locomotive'''
** [[Prototype/Locomotive]] '''locomotive'''
** [[Prototype/Wall]] '''wall'''
* [[Prototype/Wall]] '''wall'''


== Properties ==
== Properties ==

Revision as of 15:50, 15 July 2017

Basics

The common properties of all entities with health in the game. Extends the Prototype/Entity

Extensions

Properties

max_health

Type: Types/float

The unit health can never go over the maxmum. Default health of units on creation is set to max.

   max_health = 50

healing_per_tick

Type: Types/float

The amount of health cured by tick naturally. Works only on active entities. (Todo explain)

  healing_per_tick = 0.01

dying_explosion

Type: Types/EntityName

Todo, this should be removed and Type/AttackResult should be used for dying event. This would allow much more variability.

loot

Type: Types/LootSpecification The loot is generated when the entity is killed.

   loot =
   {
     {
       count_max = 10,
       count_min = 2,
       item = "alien-artifact",
       probability = 1
     }
   }

resistances

Type: Types/Resistances

See: Damage

   resistances = 
   {
     {
       type = "fire",
       percent = 80
     },
     {
       type = "explosion",
       percent = 30
     }
   }

attack_reaction

Type: Types/AttackReaction

Default: Empty

corpse

Type: Types/EntityName (single value or list)

Default: Empty

Specifies the name of the Prototypes/Corpse entity to be used when this entity dies.

Example

   {
     type = "container",
     name = "wooden-chest",
     icon = "__base__/graphics/icons/wooden-chest.png",
     flags = {"placeable-neutral", "player-creation"},
     minable = {mining_time = 1, result = "wooden-chest"},
     collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
     selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
     max_health = 50,
     corpse = "small-remnants",
     fast_replaceable_group = "container",
     inventory_size = 16,
     picture =
     {
       filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
       priority = "extra-high",
       width = 46,
       height = 33,
       shift = {0.3, 0}
     }
   }