Factorio Prototype DocsVersion 2.0.26

AmmoType :: struct

Definition of actual parameters used in attack.

Properties

action optional :: Trigger

Describes actions taken upon attack happening.

Describes actions taken upon attack happening.

clamp_position optional :: bool

When true, the gun will be able to shoot even when the target is out of range. [...]

When true, the gun will be able to shoot even when the target is out of range. [...]

energy_consumption optional :: Energy

Energy consumption of a single shot, if applicable.

Energy consumption of a single shot, if applicable.

range_modifier optional :: double

Affects the range value of the shooting gun prototype's BaseAttackParameters to give a modified maximum range. [...]

Affects the range value of the shooting gun prototype's BaseAttackParameters to give a modified maximum range. [...]

cooldown_modifier optional :: double
consumption_modifier optional :: float
target_type optional :: "entity" or "position" or "direction"

"entity" fires at an entity, "position" fires directly at a position, "direction" fires in a direction. [...]

"entity" fires at an entity, "position" fires directly at a position, "direction" fires in a direction. [...]

source_type optional :: AmmoSourceType

Only exists (and is then mandatory) if the AmmoItemPrototype::ammo_type this AmmoType is defined on has multiple ammo types. [...]

Only exists (and is then mandatory) if the AmmoItemPrototype::ammo_type this AmmoType is defined on has multiple ammo types. [...]

target_filter optional :: array[EntityID]

List of entities that can be targeted by this ammo type.

List of entities that can be targeted by this ammo type.

Properties

action :: Trigger optional

Describes actions taken upon attack happening.

clamp_position :: bool optional

Default: false

When true, the gun will be able to shoot even when the target is out of range. Only applies when target_type equals "position". The gun will fire at the maximum range in the direction of the target position.

energy_consumption :: Energy optional

Energy consumption of a single shot, if applicable.

range_modifier :: double optional

Default: 1

Affects the range value of the shooting gun prototype's BaseAttackParameters to give a modified maximum range. The min_range value of the gun is unaffected.

This has no effect on artillery turrets and wagons even though the bonus appears in the GUI. Forum thread.

cooldown_modifier :: double optional

Default: 1

consumption_modifier :: float optional

Default: 1

target_type :: "entity" or "position" or "direction" optional

Default: "entity"

"entity" fires at an entity, "position" fires directly at a position, "direction" fires in a direction.

If this is "entity", clamp_position is forced to be false.

source_type :: AmmoSourceType optional

Only exists (and is then mandatory) if the AmmoItemPrototype::ammo_type this AmmoType is defined on has multiple ammo types.

Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array.

target_filter :: array[EntityID] optional

List of entities that can be targeted by this ammo type.

Prototypes

Types

Defines