Types/BaseAttackParameters: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎fire_penalty: description)
(Removed old prototype docs)
 
(28 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The abstract base of all attack parameters.
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/BaseAttackParameters.html https://lua-api.factorio.com/latest/types/BaseAttackParameters.html]


== Extensions ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
* [[Types/ProjectileAttackParameters]]
* [[Types/BeamAttackParameters]]
* [[Types/StreamAttackParameters]]
 
== Mandatory properties ==
=== range ===
'''Type''': [[Types/float]]
 
=== cooldown ===
'''Type''': [[Types/float]]
 
Number of ticks in which it will be possible to shoot again. If < 1, multiple shots can be performed in one tick.
 
== Optional properties ==
=== min_range ===
'''Type''': [[Types/float]]
 
'''Default''': 0
 
=== turn_range ===
'''Type''': [[Types/float]]
 
'''Default''': 1
 
If this is <= 0, it is set to 1.
 
=== fire_penalty ===
'''Type''': [[Types/float]]
 
'''Default''': 0
 
Used when searching for the nearest enemy, when this is > 0, enemies that aren't burning are preferred over burning enemies. Definition of "burning" for this: Entity has sticker attached to it, and the sticker has a [[Prototype/Sticker#spread_fire_entity|fire_spread_entity]] set.
 
=== min_attack_distance ===
'''Type''': [[Types/float]]
 
'''Default''': <code>range</code>
 
=== damage_modifier ===
'''Type''': [[Types/float]]
 
'''Default''': 1
 
=== warmup ===
'''Type''': [[Types/uint32]]
 
'''Default''': 0
 
Number of ticks it takes for the weapon to actually shoot after the order for shooting has been made. This also allows to "adjust" the shooting animation to the effect of shooting.
 
=== movement_slow_down_factor ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
=== movement_slow_down_cooldown ===
'''Type''': [[Types/float]]
 
'''Default''': <code>cooldown</code>
 
=== ammo_type ===
'''Type''': [[Types/AmmoType]]
 
Can be mandatory.
 
=== ammo_category ===
'''Type''': [[Types/string]]
 
The name of a [[Prototype/AmmoCategory]]. Mandatory if <code>ammo_type</code> is not given, otherwise ignored.
 
=== sound ===
'''Type''': [[Types/Sound]]
 
=== animation ===
'''Type''': [[Types/RotatedAnimation]]
 
=== cyclic_sound ===
'''Type''': [[Types/CyclicSound]]

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/BaseAttackParameters.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.