Types/AttackParameters: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
Line 29: Line 29:
Mandatory for [[Prototype/Gun]] and [[Prototype/AmmoTurret]].
Mandatory for [[Prototype/Gun]] and [[Prototype/AmmoTurret]].
Describes which ammo should be used in attack.
Describes which ammo should be used in attack.
Defines whether the attack will be affected by upgrades.


=== ammo_type ===
=== ammo_type ===

Revision as of 12:47, 4 October 2015

Basics

Definition of combat actions performed by combat robots, units, turrets and weapons.


Mandatory properties

type

Type: Types/string

Specification of the type. Values are:

   "projectile"
   "beam"

cooldown

Type: Types/int

Interval between consecutive attacks.

range

Type: Types/double

Distance of attack. Overrides one defined in ammo.

Semi-mandatory properties

Depending on actual type of entity the following might or might not be needed.

ammo_category

Type: Prototype/AmmoCategory

Mandatory for Prototype/Gun and Prototype/AmmoTurret. Describes which ammo should be used in attack.

ammo_type

Type: Types/AmmoType

Mandatory for Prototype/ElectricTurret, Prototype/CombatRobot and Prototype/Unit. Defines the ammo entities of those types use when attacking.

Optional properties

projectile_center

Type: Types/Position

projectile_creation_distance

Type: Types/double

Distance from the attacking entity, at which effects of ammo are applied (source_effects).

damage_modifier

Type: Types/double

Provides damage multiplier forPrototype/Gun and Prototype/AmmoTurret.

sound

Type: Lua/table

Sound the entity emits when it attacks. Table fields:

Filename Types/FileName
volume Types/double