This wiki is about 0.17, the current experimental version of Factorio.

Information about 0.16, the current stable version of Factorio, can be found on stable.wiki.factorio.com.

Prototype/UtilityConstants

From Official Factorio Wiki
Jump to: navigation, search

Prototype definitions » Prototype/UtilityConstants


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/UtilityConstants — utility-constants
bonus_gui_ordering::table
building_buildable_tint::Color
building_buildable_too_far_tint::Color
building_ignorable_tint::Color
building_no_tint::Color
building_not_buildable_tint::Color
capsule_range_visualization_color::Color
chart::table
clipboard_history_size::uint32
deconstruct_mark_tint::Color
default_alert_icon_scale::float
default_enemy_force_color::Color
default_other_force_color::Color
default_player_force_color::Color
disabled_recipe_slot_tint::Color
enabled_recipe_slot_tint::Color
entity_button_background_color::Color
entity_renderer_search_box_limits::table
filter_outline_color::Color
forced_enabled_recipe_slot_tint::Color
ghost_tint::Color
icon_shadow_color::Color
icon_shadow_inset::float
icon_shadow_radius::float
icon_shadow_sharpness::float
item_outline_color::Color
item_outline_inset::float
item_outline_radius::float
item_outline_sharpness::float
manual_rail_building_reach_modifier::double
map_editor::table
max_terrain_building_size::uint8
name::string
player_colors::table (array) of tables
rail_segment_colors::table (array) of Color
recipe_step_limit::uint32
script_command_console_chat_color::Color
server_command_console_chat_color::Color
train_inactivity_wait_condition_default::uint32
train_path_finding::table
train_temporary_stop_wait_time::uint32
train_time_wait_condition_default::uint32
turret_range_visualization_color::Color
type::string
zoom_to_world_can_use_nightvision::bool
zoom_to_world_darkness_multiplier::float
zoom_to_world_effect_strength::float
default_alert_icon_scale_by_type::table (array) of string to float (optional)
default_alert_icon_shift_by_type::table (array) of string to vector (optional)
default_trigger_target_mask_by_type::table (array) of string to TriggerTargetMask (optional)

General mandatory properties

type

Type: string
Must be "utility-constants".

name

Type: string
The base uses "default" and only one instance of UtilityConstants can be defined, so unless the base game definition is completely removed, name will have to be "default".

The constants

Every property is mandatory if not listed otherwise.

  • 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
  • turret_range_visualization_color - Color
  • capsule_range_visualization_color - Color
    • artillery_range_visualization_color - Color
  • chart - table - Table with the following key/value pairs. Note: Chart = map + minimap.
    • 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 - double
    • electric_line_minimum_absolute_width - double
    • turret_range_color - Color
    • artillery_range_color - Color
    • default_friendly_color - Color
    • default_enemy_color - Color
    • rail_color - Color
    • vehicle_outer_color - Color
    • vehicle_outer_color_selected - Color
    • vehicle_inner_color - Color
    • vehicle_cargo_wagon_color - Color
    • vehicle_fluid_wagon_color - Color
    • vehicle_wagon_connection_color - Color
    • resource_outline_selection_color - Color
    • chart_train_stop_disabled_text_color - Color
    • red_signal_color - Color
    • green_signal_color - Color
    • blue_signal_color - Color
    • yellow_signal_color - Color
    • default_friendly_color_by_type - table (array) of string to Color - Optional. The strings are entity types.
    • default_color_by_type - table (array) of string to 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
    • custom_tag_scale - float - Optional. Default 0.6
    • custom_tag_selected_overlay_tint - Color
  • default_player_force_color - Color
  • default_enemy_force_color - Color
  • default_other_force_color - Color
  • deconstruct_mark_tint - Color
  • zoom_to_world_can_use_nightvision - bool
  • zoom_to_world_darkness_multiplier - float
  • zoom_to_world_effect_strength - float
  • max_terrain_building_size - uint8
  • enabled_recipe_slot_tint - Color
  • disabled_recipe_slot_tint - Color
  • forced_enabled_recipe_slot_tint - Color
  • rail_segment_colors - table (array) of Color
  • player_colors - table (array) of tables The inner tables have the following key/value pairs. 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 - table (array) of string to vector - Optional.
  • default_alert_icon_scale_by_type - table (array) of string to float - Optional.
  • 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 - table (array) of string to TriggerTargetMask - Optional. The strings are entity types.
  • bonus_gui_ordering - table - Table with the following key/value pairs. Note that the base game uses more entries here that are applied via the ammo categories.
  • train_path_finding - table - Table with the following key/value pairs.
    • 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
  • map_editor - table - Table with the following key/value pairs.
    • clone_editor_copy_source_color - Color
    • clone_editor_copy_destination_allowed_color - Color
    • clone_editor_copy_destination_not_allowed_color - 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
    • decorative_editor_selection_preview_tint - Color
    • tile_editor_selection_preview_radius - uint8
    • decorative_editor_selection_preview_radius - uint8
  • entity_renderer_search_box_limits - table - Table with the following key/value pairs. How far (in tiles) entities should be rendered outside the visible area of the screen.
    • 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