Prototype/AmmoItem

From Official Factorio Wiki
Revision as of 19:05, 9 October 2019 by Bilka (talk | contribs) (Mandatory properties: typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Prototype definitions » PrototypeBase » Prototype/Item » Prototype/AmmoItem


Ammo used for a gun.


Prototype/AmmoItem — ammo
ammo_type::table of AmmoType or AmmoType
magazine_size::float (optional)
reload_time::float (optional)
Inherited from Prototype/Item
icons, icon, icon_size (IconSpecification)::IconSpecification
stack_size::ItemCountType
burnt_result::string (optional)
can_be_mod_opened::bool (optional)
dark_background_icons, dark_background_icon, icon_size (IconSpecification)::IconSpecification (optional)
default_request_amount::ItemCountType (optional)
flags::ItemPrototypeFlags (optional)
fuel_acceleration_multiplier::double (optional)
fuel_category::string (optional)
fuel_emissions_multiplier::double (optional)
fuel_glow_color::Color (optional)
fuel_top_speed_multiplier::double (optional)
fuel_value::Energy (optional)
pictures::SpriteVariations (optional)
place_as_tile::PlaceAsTile (optional)
place_result::string (optional)
placed_as_equipment_result::string (optional)
primary_place_result_item::bool (optional)
rocket_launch_product::ItemProductPrototype (optional)
rocket_launch_products::Types/table (array) of ItemProductPrototype (optional)
stackable::bool (optional)
subgroup::string (optional)
wire_count::ItemCountType (optional)
Inherited from PrototypeBase
name::string
type::string
localised_description::LocalisedString (optional)
localised_name::LocalisedString (optional)
order::Order (optional)

Mandatory properties

Inherits all properties from Prototype/Item.

ammo_type

Type: table of AmmoType or AmmoType
When using an array of AmmoType, the AmmoType has an extra property:

  • source_type - AmmoSourceType - Mandatory. - Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array.

When using a plain AmmoType, the ammo type applies to everything ("default").

Optional properties

magazine_size

Type: float
Default: 1
Number of shots before ammo item is consumed. Must be >= 1.

reload_time

Type: float
Default: 0
Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. Must be >= 0.