Factorio Runtime DocsVersion 2.1.7

UtilityConstants - Runtime Docs

UtilityConstants :: table new

Constants used by the game that are not specific to certain prototypes. See utility-constants.lua for the values used by the base game.

Note that this is actually implemented as a LuaCustomTable, not a regular table.

Table fields

chart :: ChartUtilityConstants

Chart means map and minimap.

Chart means map and minimap.

bonus_gui_ordering :: BonusUtilityConstants

The base game uses more entries here that are applied via the ammo-category.lua file.

The base game uses more entries here that are applied via the ammo-category.lua file.

map_editor :: EditorUtilityConstants
entity_button_background_color :: Color
building_buildable_too_far_tint :: Color
building_buildable_tint :: Color
building_not_buildable_tint :: Color
building_ignorable_tint :: Color
building_no_tint :: Color
tall_entity_tint :: Color

Tall entities will be tinted with this value when "Hide tall entities" mode is active.

Tall entities will be tinted with this value when "Hide tall entities" mode is active.

tall_entity_smoke_tint :: Color

All trivial smoke will be tinted with this value when "Hide tall entities" mode is active.

All trivial smoke will be tinted with this value when "Hide tall entities" mode is active.

underground_belt_max_distance_tint :: Color
underground_pipe_max_distance_tint :: Color
ghost_shader_tint :: GhostTintSet
ghost_shaderless_tint :: GhostTintSet
ghost_shimmer_settings :: GhostShimmerConfig
probability_product_count_tint :: Color
ghost_product_count_tint :: Color
zero_count_value_tint :: Color
equipment_default_background_color :: Color
equipment_default_background_border_color :: Color
equipment_default_grabbed_background_color :: Color
equipment_disabled_background_tint :: Color
equipment_disabled_tint :: Color
turret_range_visualization_color :: Color
capsule_range_visualization_color :: Color
agricultural_range_visualization_color :: Color
artillery_range_visualization_color :: Color
gui_remark_color :: Color
gui_search_match_foreground_color :: Color
gui_search_match_background_color :: Color
default_player_force_color :: Color
default_enemy_force_color :: Color
default_other_force_color :: Color
deconstruct_mark_tint :: Color
rail_planner_count_button_color :: Color
count_button_size :: int32
logistic_gui_unselected_network_highlight_tint :: Color
logistic_gui_selected_network_highlight_tint :: Color
chart_search_highlight :: Color
selected_chart_search_highlight :: Color
zoom_to_world_can_use_nightvision :: boolean
zoom_to_world_effect_strength :: float
max_logistic_filter_count :: LogisticFilterIndex
select_group_row_count :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

select_slot_row_count :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

logistic_slots_per_row :: uint8

Will be clamped to the range [2, 100].

Will be clamped to the range [2, 100].

crafting_queue_slots_per_row :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

blueprint_big_slots_per_row :: uint8

Will be clamped to the range [2, 100].

Will be clamped to the range [2, 100].

blueprint_small_slots_per_row :: uint8

Will be clamped to the range [2, 100].

Will be clamped to the range [2, 100].

inventory_width :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

module_inventory_width :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

trash_inventory_width :: uint8

Will be clamped to the range [1, 100].

Will be clamped to the range [1, 100].

max_terrain_building_size :: uint8
small_area_size :: float
medium_area_size :: float
large_area_size :: float
huge_area_size :: float
huge_platform_animation_sound_area :: float
small_blueprint_area_size :: float
medium_blueprint_area_size :: float
large_blueprint_area_size :: float
enabled_recipe_slot_tint :: Color
disabled_recipe_slot_tint :: Color
disabled_recipe_slot_background_tint :: Color
forced_enabled_recipe_slot_background_tint :: Color
rail_segment_colors :: array[Color]
player_colors :: array[PlayerColorData]

The table with name = "default" must exist and be the first member of the array.

The table with name = "default" must exist and be the first member of the array.

server_command_console_chat_color :: Color
script_command_console_chat_color :: Color
default_alert_icon_scale :: float
default_alert_icon_shift_by_type :: dictionary[string → Vector]?
default_alert_icon_scale_by_type :: dictionary[string → float]?
merge_bonus_gui_production_bonuses :: boolean?

If not set, defaults to true when modded and false when vanilla.

If not set, defaults to true when modded and false when vanilla.

daytime_color_lookup :: DaytimeColorLookupTable
zoom_to_world_daytime_color_lookup :: DaytimeColorLookupTable
frozen_color_lookup :: ColorLookupTable
default_platform_surface_render_parameters :: SurfaceRenderParameters
drop_item_radius :: double
checkerboard_white :: Color
checkerboard_black :: Color
item_outline_color :: Color
item_outline_radius :: float
item_outline_inset :: float
item_outline_sharpness :: float
item_default_random_tint_strength :: Color
spawner_evolution_factor_health_modifier :: float
item_health_bar_colors :: array[ItemHealthColorData]

There must be one array item with a threshold of 0.

There must be one array item with a threshold of 0.

item_ammo_magazine_left_bar_color :: Color
item_tool_durability_bar_color :: Color
filter_outline_color :: Color
icon_shadow_radius :: float
icon_shadow_inset :: float
icon_shadow_sharpness :: float
icon_shadow_color :: Color
clipboard_history_size :: uint32
recipe_step_limit :: uint32
manual_rail_building_reach_modifier :: double
train_temporary_stop_wait_time :: uint32
train_time_wait_condition_default :: uint32
train_inactivity_wait_condition_default :: uint32
default_trigger_target_mask_by_type :: dictionary[string → TriggerTargetMask]?

The strings are entity types.

The strings are entity types.

unit_group_pathfind_resolution :: int8
unit_group_max_pursue_distance :: double
dynamic_recipe_overload_factor :: double
minimum_recipe_overload_multiplier :: uint32
maximum_recipe_overload_multiplier :: uint32
entity_renderer_search_box_limits :: EntityRendererSearchBoxLimits
light_renderer_search_distance_limit :: uint8

Can be set to anything from range 0 to 255, but larger values will be clamped to 160. Setting it to larger values can have performance impact (growing geometrically).

Can be set to anything from range 0 to 255, but larger values will be clamped to 160. Setting it to larger values can have performance impact (growing geometrically).

far_away_chunk_generation_radius :: uint8
tree_leaf_distortion_strength_far :: Vector
tree_leaf_distortion_distortion_far :: Vector
tree_leaf_distortion_speed_far :: Vector
tree_leaf_distortion_strength_near :: Vector
tree_leaf_distortion_distortion_near :: Vector
tree_leaf_distortion_speed_near :: Vector
tree_shadow_roughness :: float
tree_shadow_speed :: float
missing_preview_sprite_location :: string
main_menu_background_image_location :: string
main_menu_simulations :: dictionary[string → SimulationDefinition]?

The strings represent the names of the simulations.

The strings represent the names of the simulations.

main_menu_background_vignette_intensity :: float
main_menu_background_vignette_sharpness :: float
feedback_screenshot_subfolder_name :: string
feedback_screenshot_file_name :: string
default_scorch_mark_color :: Color
color_filters :: array[ColorFilterData]?
clear_cursor_volume_modifier :: float
weapons_in_simulation_volume_modifier :: float
explosions_in_simulation_volume_modifier :: float
enemies_in_simulation_volume_modifier :: float
low_energy_robot_estimate_multiplier :: double
asteroid_spawning_offset :: SimpleBoundingBox
asteroid_fading_range :: float
asteroid_spawning_with_random_orientation_max_speed :: double
asteroid_position_offset_to_speed_coefficient :: double
asteroid_collector_navmesh_refresh_tick_interval :: uint32
asteroid_collector_blockage_update_tile_distance :: uint32
asteroid_collector_max_nurbs_control_point_separation :: double
asteroid_collector_static_head_swing_strength_scale :: float
asteroid_collector_static_head_swing_segment_count :: uint32
space_platform_acceleration_expression :: MathExpression

Variables: speed, thrust, weight, width, height

Variables: speed, thrust, weight, width, height

space_platform_relative_speed_factor :: double
space_platform_starfield_movement_vector :: Vector
space_platform_max_size :: SimpleBoundingBox
space_platform_dump_cooldown :: uint32

Determines how fast space platforms will send items in drop slots to the surface. Each item type has its own cooldown.

Determines how fast space platforms will send items in drop slots to the surface. Each item type has its own cooldown.

space_platform_manual_dump_cooldown :: uint32

Delay after manual transfer until space platform sends items in drop slots to the surface. Overrides remaining space_platform_dump_cooldown in this instance.

Delay after manual transfer until space platform sends items in drop slots to the surface. Overrides remaining space_platform_dump_cooldown in this instance.

space_platform_max_relative_speed_deviation_for_asteroid_chunks_update :: float

Space platform remembers relative speed range which asteroids use while it moves. When the range is larger than the specified deviation, the platform will start updating cached trajectories of all asteroid chunks over multiple ticks.

Space platform remembers relative speed range which asteroids use while it moves. When the range is larger than the specified deviation, the platform will start updating cached trajectories of all asteroid chunks over multiple ticks.

space_platform_asteroid_chunk_trajectory_updates_per_tick :: uint32

How many asteroid chunks should be processed per tick, see space_platform_max_relative_speed_deviation_for_asteroid_chunks_update.

How many asteroid chunks should be processed per tick, see space_platform_max_relative_speed_deviation_for_asteroid_chunks_update.

default_item_weight :: Weight
default_rocket_lift_weight :: Weight

Used for "Rocket capacity" item tooltip and for comparing rocket silo lift weight in GUI to this value.

Used for "Rocket capacity" item tooltip and for comparing rocket silo lift weight in GUI to this value.

factoriopedia_recycling_recipe_categories :: array[RecipeCategoryID]
default_pipeline_extent :: double

The default value of FluidBox::max_pipeline_extent.

The default value of FluidBox::max_pipeline_extent.

default_platform_procession_set :: ProcessionSet

Must contain arrival and departure with procession_style containing 0.

Must contain arrival and departure with procession_style containing 0.

default_planet_procession_set :: ProcessionSet

Must contain arrival and departure with procession_style containing 0.

Must contain arrival and departure with procession_style containing 0.

landing_area_clear_zone_radius :: float

Radius of area where cargo pods won't land.

Radius of area where cargo pods won't land.

landing_area_max_radius :: float

Max radius where cargo pods will land.

Max radius where cargo pods will land.

lightning_attractor_collection_range_color :: Color
lightning_attractor_protection_range_color :: Color
landing_squash_immunity :: MapTick
ejected_item_lifetime :: MapTick

Silently clamped to be between 1 tick and 5 minutes (5 * 60 * 60 ticks).

Silently clamped to be between 1 tick and 5 minutes (5 * 60 * 60 ticks).

ejected_item_speed :: double

Silently clamped to be between 0 and 1/60.

Silently clamped to be between 0 and 1/60.

ejected_item_direction_variation :: double

Silently clamped to be between 0 and 0.99.

Silently clamped to be between 0 and 0.99.

ejected_item_friction :: double

Silently clamped to be between 0 and 1.

Silently clamped to be between 0 and 1.

train_visualization :: TrainVisualizationConstants
default_collision_masks :: dictionary[string → CollisionMask]

The strings can be entity types or custom strings.

The strings can be entity types or custom strings.

show_chunk_components_collision_mask :: CollisionMask
building_collision_mask :: CollisionMask
water_collision_mask :: TileCollisionMask
ghost_layer :: CollisionLayerID
train_pushed_by_player_max_speed :: double
train_pushed_by_player_max_acceleration :: double
train_pushed_by_player_ignores_friction :: boolean
tooltip_monitor_edge_border :: int32

Must be >= 1.

Must be >= 1.

flying_text_ttl :: int32

Must be >= 1.

Must be >= 1.

train_path_finding :: TrainPathFinderConstants
freezing_temperature :: double

Will be clamped to a positive number, starting at 0.

Will be clamped to a positive number, starting at 0.

train_on_elevated_rail_shadow_shift_multiplier :: Vector
max_belt_stack_size :: uint8

Must be >= 1.

Must be >= 1.

inserter_hand_stack_items_per_sprite :: ItemCountType

Must be >= 1.

Must be >= 1.

inserter_hand_stack_max_sprites :: ItemCountType

Must be >= 1.

Must be >= 1.

remote_view_LPF_min_cutoff_frequency :: float
remote_view_LPF_max_cutoff_frequency :: float
space_LPF_min_cutoff_frequency :: float
space_LPF_max_cutoff_frequency :: float
walking_sound_count_reduction_rate :: float

Silently clamped to be between 0 and 1.

Silently clamped to be between 0 and 1.

moving_sound_count_reduction_rate :: float

Silently clamped to be between 0 and 1.

Silently clamped to be between 0 and 1.

environment_sounds_transition_fade_in_ticks :: uint32
sound_fade_ticks :: uint32
starmap_orbit_default_color :: Color
starmap_orbit_hovered_color :: Color
starmap_orbit_clicked_color :: Color
starmap_orbit_disabled_color :: Color
time_to_show_full_health_bar :: MapTick

The number of ticks to show a segmented unit's health bar after fully regenerating.

The number of ticks to show a segmented unit's health bar after fully regenerating.

capture_water_mask_at_layer :: uint8

Layer within ground-natural tile render layer group, before which terrain lightmap alpha channel is copied into water mask. Decals, which need to be masked by water should have their DecorativePrototype::tile_layer set to only slightly larger value than capture_water_mask_at_layer, to avoid risk of undefined behavior caused by rendering tiles into layers between capture_water_mask_at_layer and decal's tile_layer.

Layer within ground-natural tile render layer group, before which terrain lightmap alpha channel is copied into water mask. Decals, which need to be masked by water should have their DecorativePrototype::tile_layer set to only slightly larger value than capture_water_mask_at_layer, to avoid risk of undefined behavior caused by rendering tiles into layers between capture_water_mask_at_layer and decal's tile_layer.

logistic_robots_use_busy_robots_queue :: boolean
construction_robots_use_busy_robots_queue :: boolean
quality_selector_dropdown_threshold :: uint8
maximum_quality_jump :: uint8

Cap for how many steps of quality the output of something (miner/crafter) may be higher than the input (resource/ingredients). Must be >= 1.

Cap for how many steps of quality the output of something (miner/crafter) may be higher than the input (resource/ingredients). Must be >= 1.

Fulltext search

Classes

Concepts

Events

Defines

Fulltext search for