Factorio Prototype DocsVersion 1.1.107

UtilityConstants - 'utility-constants'

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

Prototype limited to 1 total instances.

Inherits from PrototypeBase

Properties

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
ghost_tint :: Color
tile_ghost_tint :: Color
equipment_default_background_color :: Color
equipment_default_background_border_color :: Color
equipment_default_grabbed_background_color :: Color
turret_range_visualization_color :: Color
capsule_range_visualization_color :: Color
artillery_range_visualization_color :: Color
train_no_path_color :: Color
train_destination_full_color :: Color
chart :: ChartUtilityConstants

Chart = map + minimap.

Chart = map + minimap.

gui_remark_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
zoom_to_world_can_use_nightvision :: bool
zoom_to_world_effect_strength :: float
max_terrain_building_size :: uint8
small_area_size :: float
medium_area_size :: float
small_blueprint_area_size :: float
medium_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 optional :: dictionary[string → Vector]
default_alert_icon_scale_by_type optional :: dictionary[string → float]
daytime_color_lookup :: DaytimeColorLookupTable
zoom_to_world_daytime_color_lookup :: DaytimeColorLookupTable
checkerboard_white :: Color
checkerboard_black :: Color
item_outline_color :: Color
item_outline_radius :: float
item_outline_inset :: float
item_outline_sharpness :: float
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 optional :: 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
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 :: FileName
main_menu_background_image_location :: FileName
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
default_scorch_mark_color :: Color
train_button_hovered_tint :: Color
select_group_row_count :: uint8

Must be in range [1, 100].

Must be in range [1, 100].

select_slot_row_count :: uint32

Must be in range [1, 100].

Must be in range [1, 100].

inventory_width :: uint32

Must be in range [1, 100].

Must be in range [1, 100].

module_inventory_width :: uint32

Must be in range [1, 100].

Must be in range [1, 100].

tooltip_monitor_edge_border :: int32

Must be >= 1.

Must be >= 1.

normalised_achievement_icon_size :: uint32

Must be >= 1.

Must be >= 1.

tutorial_notice_icon_size :: uint32

Must be >= 1.

Must be >= 1.

flying_text_ttl :: uint32

Must be >= 1

Must be >= 1

bonus_gui_ordering :: BonusGuiOrdering

The base game uses more entries here that are applied via the ammo categories.

The base game uses more entries here that are applied via the ammo categories.

train_path_finding :: TrainPathFinderConstants
map_editor :: MapEditorConstants
color_filters :: array[ColorFilterData]
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. [...]

Can be set to anything from range 0 to 255, but larger values will be clamped to 160. [...]

Inherited from PrototypeBase
type :: string

Specifies the kind of prototype this is. [...]

Specifies the kind of prototype this is. [...]

name :: string

Unique textual identification of the prototype. [...]

Unique textual identification of the prototype. [...]

order optional :: Order

Used to order prototypes in inventory, recipes and GUIs. [...]

Used to order prototypes in inventory, recipes and GUIs. [...]

localised_name optional :: LocalisedString

Overwrites the name set in the locale file. [...]

Overwrites the name set in the locale file. [...]

localised_description optional :: LocalisedString

Overwrites the description set in the locale file. [...]

Overwrites the description set in the locale file. [...]

Properties

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

ghost_tint :: Color

tile_ghost_tint :: Color

equipment_default_background_color :: Color

equipment_default_background_border_color :: Color

equipment_default_grabbed_background_color :: Color

turret_range_visualization_color :: Color

capsule_range_visualization_color :: Color

artillery_range_visualization_color :: Color

train_no_path_color :: Color

train_destination_full_color :: Color

chart :: ChartUtilityConstants

Chart = map + minimap.

ChartUtilityConstants :: struct

Properties

electric_lines_color :: Color

electric_lines_color_switch_enabled :: Color

electric_lines_color_switch_disabled :: Color

electric_power_pole_color :: Color

switch_color :: Color

electric_line_width :: float

electric_line_minimum_absolute_width :: float

turret_range_color :: Color

artillery_range_color :: Color

pollution_color :: Color

default_friendly_color :: Color

default_enemy_color :: Color

rail_color :: Color

entity_ghost_color :: Color

vehicle_outer_color :: Color

vehicle_outer_color_selected :: Color

vehicle_inner_color :: Color

vehicle_wagon_connection_color :: Color

resource_outline_selection_color :: Color

chart_train_stop_text_color :: Color

chart_train_stop_disabled_text_color :: Color

chart_train_stop_full_text_color :: Color

red_signal_color :: Color

green_signal_color :: Color

blue_signal_color :: Color

yellow_signal_color :: Color

chart_deconstruct_tint :: Color

default_friendly_color_by_type :: dictionary[string → Color] optional

The strings are entity types.

default_color_by_type :: dictionary[string → Color] optional

The strings are entity types.

explosion_visualization_duration :: uint32

train_path_color :: Color

train_preview_path_outline_color :: Color

train_current_path_outline_color :: Color

chart_logistic_robot_color :: Color

chart_construction_robot_color :: Color

chart_mobile_construction_robot_color :: Color

chart_personal_construction_robot_color :: Color

zoom_threshold_to_draw_spider_path :: double optional

Default: 0.5

custom_tag_scale :: float optional

Default: 0.6

custom_tag_selected_overlay_tint :: Color

gui_remark_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

zoom_to_world_can_use_nightvision :: bool

zoom_to_world_effect_strength :: float

max_terrain_building_size :: uint8

small_area_size :: float

medium_area_size :: float

small_blueprint_area_size :: float

medium_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.

PlayerColorData :: struct

Properties

name :: string

player_color :: Color

chat_color :: Color

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] optional

default_alert_icon_scale_by_type :: dictionary[string → float] optional

daytime_color_lookup :: DaytimeColorLookupTable

zoom_to_world_daytime_color_lookup :: DaytimeColorLookupTable

checkerboard_white :: Color

checkerboard_black :: Color

item_outline_color :: Color

item_outline_radius :: float

item_outline_inset :: float

item_outline_sharpness :: float

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] optional

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

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 :: FileName

default_scorch_mark_color :: Color

train_button_hovered_tint :: Color

select_group_row_count :: uint8

Must be in range [1, 100].

select_slot_row_count :: uint32

Must be in range [1, 100].

inventory_width :: uint32

Must be in range [1, 100].

module_inventory_width :: uint32

Must be in range [1, 100].

tooltip_monitor_edge_border :: int32

Must be >= 1.

normalised_achievement_icon_size :: uint32

Must be >= 1.

tutorial_notice_icon_size :: uint32

Must be >= 1.

flying_text_ttl :: uint32

Must be >= 1

bonus_gui_ordering :: BonusGuiOrdering

The base game uses more entries here that are applied via the ammo categories.

BonusGuiOrdering :: struct

Properties

artillery_range :: Order

worker_robots :: Order

character :: Order

follower_robots :: Order

research_speed :: Order

inserter :: Order

stack_inserter :: Order

turret_attack :: Order

mining_productivity :: Order

train_braking_force :: Order

train_path_finding :: TrainPathFinderConstants

TrainPathFinderConstants :: struct

Properties

train_stop_penalty :: uint32

stopped_manually_controlled_train_penalty :: uint32

stopped_manually_controlled_train_without_passenger_penalty :: uint32

signal_reserved_by_circuit_network_penalty :: uint32

train_in_station_penalty :: uint32

train_in_station_with_no_other_valid_stops_in_schedule :: uint32

train_arriving_to_station_penalty :: uint32

train_arriving_to_signal_penalty :: uint32

train_waiting_at_signal_penalty :: uint32

train_waiting_at_signal_tick_multiplier_penalty :: float

Must be >= 0.

train_with_no_path_penalty :: uint32

train_auto_without_schedule_penalty :: uint32

map_editor :: MapEditorConstants

MapEditorConstants :: struct

Properties

clone_editor_copy_source_color :: Color

clone_editor_copy_destination_allowed_color :: Color

clone_editor_copy_destination_not_allowed_color :: Color

clone_editor_brush_source_color :: Color

clone_editor_brush_destination_color :: Color

clone_editor_brush_cursor_preview_tint :: Color

clone_editor_brush_world_preview_tint :: Color

script_editor_select_area_color :: Color

script_editor_drag_area_color :: Color

force_editor_select_area_color :: Color

cliff_editor_remove_cliffs_color :: Color

tile_editor_selection_preview_tint :: Color

tile_editor_area_selection_color :: Color

decorative_editor_selection_preview_tint :: Color

tile_editor_selection_preview_radius :: uint8

decorative_editor_selection_preview_radius :: uint8

color_filters :: array[ColorFilterData]

ColorFilterData :: struct

Properties

name :: string

localised_name :: LocalisedString

matrix :: array[array[float]]

4 arrays of 4-length float arrays, essentially a 4x4 matrix.

entity_renderer_search_box_limits :: EntityRendererSearchBoxLimits

EntityRendererSearchBoxLimits :: struct

How far (in tiles) entities should be rendered outside the visible area of the screen.

Properties

left :: uint8

Min value 6, max value 15. Min value 6 to compensate for shadows.

top :: uint8

Min value 3, max value 15.

right :: uint8

Min value 3, max value 15.

bottom :: uint8

Min value 4, max value 15. Min value 4 to compensate for tall entities like electric poles.

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).

Prototypes

Types