Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# LuaQualityPrototype - Runtime Docs

## Class LuaQualityPrototype extends LuaPrototypeBase

Prototype of a quality.

Inherits from LuaPrototypeBase

## Members

color | :: R Color | The color of the prototype
The color of the prototype
level | :: R uint32 | Level basically specifies the stat-increasing value of this quality level.
Level basically specifies the stat-increasing value of this quality level.
next | :: R LuaQualityPrototype | The next higher level of the quality
The next higher level of the quality
next_probability | :: R double | The probability multiplier of getting the next level of quality.
The probability multiplier of getting the next level of quality.
draw_sprite_by_default | :: R boolean |
beacon_power_usage_multiplier | :: R float |
mining_drill_resource_drain_multiplier | :: R float |
science_pack_drain_multiplier | :: R float |
default_multiplier | :: R double |
inserter_speed_multiplier | :: R double |
fluid_wagon_capacity_multiplier | :: R double |
inventory_size_multiplier | :: R double |
lab_research_speed_multiplier | :: R double |
crafting_machine_speed_multiplier | :: R double |
crafting_machine_energy_usage_multiplier | :: R double |
logistic_cell_charging_energy_multiplier | :: R double |
tool_durability_multiplier | :: R double |
accumulator_capacity_multiplier | :: R double |
flying_robot_max_energy_multiplier | :: R double |
range_multiplier | :: R double |
equipment_grid_width_bonus | :: R int16 |
equipment_grid_height_bonus | :: R int16 |
electric_pole_wire_reach_bonus | :: R float |
electric_pole_supply_area_distance_bonus | :: R float |
beacon_supply_area_distance_bonus | :: R float |
mining_drill_mining_radius_bonus | :: R float |
logistic_cell_charging_station_count_bonus | :: R uint32 |
asteroid_collector_collection_radius_bonus | :: R uint32 |
beacon_module_slots_bonus | :: R ItemStackIndex |
crafting_machine_module_slots_bonus | :: R ItemStackIndex |
mining_drill_module_slots_bonus | :: R ItemStackIndex |
lab_module_slots_bonus | :: R ItemStackIndex |
valid | :: R boolean | Is this object valid? [...]
Is this object valid? [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

Inherited from LuaPrototypeBase

type | :: R string | Type of this prototype.
Type of this prototype.
name | :: R string | Name of this prototype.
Name of this prototype.
order | :: R string | The string used to alphabetically sort these prototypes. [...]
The string used to alphabetically sort these prototypes. [...]
localised_name | :: R LocalisedString |
localised_description | :: R LocalisedString |
factoriopedia_description | :: R LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
group | :: R LuaGroup | Group of this prototype.
Group of this prototype.
subgroup | :: R LuaGroup | Subgroup of this prototype.
Subgroup of this prototype.
hidden | :: R boolean |
hidden_in_factoriopedia | :: R boolean |
parameter | :: R boolean |
custom_tooltip_fields | :: R array[CustomTooltipField]? | Extra description items in the tooltip and Factoriopedia.
Extra description items in the tooltip and Factoriopedia.

## Attributes

### color :: Read Color

The color of the prototype

### level :: Read uint32

Level basically specifies the stat-increasing value of this quality level.

### next :: Read LuaQualityPrototype

The next higher level of the quality

### next_probability :: Read double

The probability multiplier of getting the next level of quality.

### draw_sprite_by_default :: Read boolean

### beacon_power_usage_multiplier :: Read float

### mining_drill_resource_drain_multiplier :: Read float

### science_pack_drain_multiplier :: Read float

### default_multiplier :: Read double

### inserter_speed_multiplier :: Read double

### fluid_wagon_capacity_multiplier :: Read double

### inventory_size_multiplier :: Read double

### lab_research_speed_multiplier :: Read double

### crafting_machine_speed_multiplier :: Read double

### crafting_machine_energy_usage_multiplier :: Read double

### logistic_cell_charging_energy_multiplier :: Read double

### tool_durability_multiplier :: Read double

### accumulator_capacity_multiplier :: Read double

### flying_robot_max_energy_multiplier :: Read double

### range_multiplier :: Read double

### equipment_grid_width_bonus :: Read int16

### equipment_grid_height_bonus :: Read int16

### electric_pole_wire_reach_bonus :: Read float

### electric_pole_supply_area_distance_bonus :: Read float

### beacon_supply_area_distance_bonus :: Read float

### mining_drill_mining_radius_bonus :: Read float

### logistic_cell_charging_station_count_bonus :: Read uint32

### asteroid_collector_collection_radius_bonus :: Read uint32

### beacon_module_slots_bonus :: Read ItemStackIndex

### crafting_machine_module_slots_bonus :: Read ItemStackIndex

### mining_drill_module_slots_bonus :: Read ItemStackIndex

### lab_module_slots_bonus :: Read ItemStackIndex

### valid :: Read boolean

Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.

### object_name :: Read string

The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

Class used in

- LuaAchievementPrototype::limit_quality
- LuaAchievementPrototype::limit_equip_quality
- LuaAchievementPrototype::quality
- LuaEntity::get_recipe()
- LuaEntity::get_upgrade_target()
- LuaEntity::result_quality
- LuaEntity::quality
- LuaEquipment::quality
- LuaGuiElement::quality
- LuaItem::quality
- LuaItemStack::quality
- LuaPrototypes::quality
- LuaQualityPrototype::next
- QualityID
- on_cancelled_upgrade
- on_marked_for_upgrade
- on_mod_item_opened
- on_player_built_tile
- on_player_pipette
- on_player_used_capsule
- on_post_entity_died
- on_post_segmented_unit_died
- on_pre_ghost_upgraded
- on_pre_robot_exploded_cliff
- on_robot_built_tile
- on_robot_exploded_cliff
- on_space_platform_built_tile