In other languages: Русский 中文

Debug mode: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(would like if a search for the words coordinate and position found this page)
(Grammar cleanup)
Line 1: Line 1:
{{Languages}}
{{Languages}}
The debug mode is perhaps mainly thought for debuging the game from developer sight, but can be used to see much more interesting information when you play the game.


For example you can  
''Debug mode'' is used mainly by developers and modders to analyze the running state of the game. It can be enabled to show detailed information about the game world, and its information varies based on which level is active. The keys to enable debug mode are f5 through f7.
* see the path, the [[Biter]]s are coming from and where the like to target
 
* see the position / coordinates of the cursor
For example, one can:
* see an grid-overlay for the [[Tile]]s and [[Chunk]]s,
* See the path the [[Biter]]s are coming from and where they plan to target,
* see the blocks in your railway network,
* See the position / coordinates of the cursor,
* see some more information, which are not game relevant, but will quite interesting looking. :)
* See a grid-overlay for the [[Tile]]s and [[Chunk]]s,
* See the blocks in a railway network,
* See additional non-game related information, such as Updates Per Second and FPS.


== Activate the debug mode ==
== Activate the debug mode ==
Line 13: Line 14:
You have 4 debug-levels:
You have 4 debug-levels:


* '''always''' - this is the default mode, if you choose nothing
* '''Always''' - This is the default mode, if no mode is active. Keep very few things active here.
* '''basic''' - you are here by pressing F5
* '''Basic''' - The first mode, accessed by pressing {{keybinding|F5}}. What power users often use.
* '''detailed''' - press F6
* '''Detailed''' - The second mode, accessed by pressing {{keybinding|F6}}. The most commonly used for modders and developers.
* '''full''' - press F7
* '''Full''' - The second mode, accessed by pressing {{keybinding|F7}}. Shows literally everything, tends to be unreadable.


To switch back to "always" you need to press the previous key again. Example: Press F5 to go to "basic", then press F6 to watch "detailed" and then press F6 again to switch back to "always".
To switch back to "always" you need to press the previous key again. Example: Press F5 to go to "basic", then press F6 to watch "detailed" and then press F6 again to switch back to "always".
Line 22: Line 23:
== Configuring the debug mode ==
== Configuring the debug mode ==


To configure the 4 modes you need to press '''F4'''. This open up a menu with many options. You can move this menu with the mouse, if it hides some interesting underlaying thing.
To configure the 4 modes, press '''F4'''. This opens up a menu with many options. You can move this menu with the mouse, if it hides some interesting underlying thing. You can switch between 4 folders, which reflects the option for that debug-mode ("always", "basic", "detailed", "full"). The options are the same for each mode. Each mode can be configured to the user's liking, the different modes are only for convenience.
 
You can switch between 4 folders, which reflects the option for that debug-mode ("always", "basic", "detailed", "full"). The options are for each mode the same. You can switch now for every mode the options on or off, as you like.


== List of debug-options and their function ==
== List of debug-options and their function ==


* <code>show_fps</code>
* <code>show_fps</code>
: Will show the current frames-per-second. Should be normally about 60. See [[Lua/Game#speed]].
** Will show the current frames-per-second, or FPS. Should be normally about 60. See [[Lua/Game#speed]].
* <code>show_detailed_info</code>
* <code>show_detailed_info</code>
: Shows the cursor position in [[Tile]]s (and subdivisions of that), [[Chunk]]s and [[Region]]
** Shows the cursor position in [[Tile]]s (and subdivisions of that), [[Chunk]]s and [[Region]]
: Current resolution and zoom (see [[Lua/Game#takescreenshot]])
** Current resolution and zoom (see [[Lua/Game#takescreenshot]])
: How much objects are on the screen (painted by the graphic card)
** How many objects are on the screen (painted by the graphic card)
: How much entities, chunks and paths are in the game and used.
** How many entities, chunks and paths are in the game and used.
* <code>show_time_used_percent</code>
* <code>show_time_used_percent</code>
: Many important internal statistics about the timing. [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=7972 F5 debug info - how to read it?] - how to interpret that...
** Many important internal statistics about the timing. [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=7972 F5 debug info - how to read it?] - how to interpret...
* <code>show_tile_grid</code>
* <code>show_tile_grid</code>
: Quite useful to turn it on also for the "always"-mode. It shows the borders of the [[Tile]]s and [[Chunk]]s.
** Quite useful to turn it on for the "always"-mode. It shows the borders of the [[Tile]]s and [[Chunk]]s.
* <code>show_collision_rectangles</code>
* <code>show_collision_rectangles</code>
: shows the collision boxes of each entity (red).
** Shows the collision boxes of each entity (red).
* <code>show_selection_rectangles</code>
* <code>show_selection_rectangles</code>
: shows the a blue box over each entity, if you hover it, it will be selected.
** Shows the a blue box over each entity, if you hover over it, it will be selected.
* <code>show_paths</code>
* <code>show_paths</code>
: the calculated paths for the biters in different colors.
** The calculated paths for the biters in different colors.
* <code>show_next_waypoint_bb</code>
* <code>show_next_waypoint_bb</code>
: shows waypoints for biters (in green), nearly the same info as the next.
** Shows waypoints for biters (in green), nearly the same info as the next.
* <code>show_target</code>
* <code>show_target</code>
: shows the current target of the biters (red).
** Shows the current target of the biters (red).
* <code>show_unit_group_info</code>
* <code>show_unit_group_info</code>
: biter groups, which belong together (circles and lines belonging together)
** Biter groups, which belong together (circles and lines belonging together)
* <code>show_unit_stuck_info</code>
* <code>show_unit_stuck_info</code>
: should show stuck enemies (?)
** Should show stuck enemies (?)
* <code>show_last_path_detail</code>
* <code>show_last_path_detail</code>
: The A*-algorithm at work, calculating new paths.
** The A*-algorithm at work, calculating new paths.
* <code>show_path_cache</code>
* <code>show_path_cache</code>
: The source-positions of a path and about the length (?)
** The source-positions of a path and about the length (?)
* <code>show_rail_paths</code>
* <code>show_rail_paths</code>
: which path a train will follow.
** Which path a train will follow.
* <code>show_rolling_stock_count</code>
* <code>show_rolling_stock_count</code>
: shows inserter positions
** Shows inserter positions
* <code>show_rail_connections</code>
* <code>show_rail_connections</code>
: is every rail really connected?
** Shows rail connections.
* <code>show_rail_segments</code>
* <code>show_rail_segments</code>
: shows the segment borders and enables you to see easier the borders of the block
** Shows the segment borders and enables you to see the borders of the block.
* <code>show_train_stop_point</code>
* <code>show_train_stop_point</code>
: when a train slows down it shows, where it should halt
** When a train slows down it shows the calculated point where it should halt
* <code>show_network_connected_entities</code>
* <code>show_network_connected_entities</code>
: displays the network-id of the electric network, which a pole is connected to
** Displays the network-id of the electric network that a pole is connected to
* <code>show_circuit_network_numbers</code>
* <code>show_circuit_network_numbers</code>
: shows the number (and color) of circuit networks
** Shows the number (and color) of circuit networks
* <code>show_energy_sources_networks</code>
* <code>show_energy_sources_networks</code>
: which network-id an entity is connected to.
** Which network-id an entity is connected to.
* <code>show_blocked_by</code>
* <code>show_blocked_by</code>
: Shows items, which are blocked (see for example full belts)
** Shows items, which are blocked (see for example full belts)
* <code>show_active_state</code>
* <code>show_active_state</code>
: inserters, fishes, turrets are turned to passive, if not used; Red = inactive, Purple = inactive until enemies aren't around (turrets etc), Green = inactive until player isn't around (fish)
** Inserters, fish, turrets are turned to passive, if not used; Red = inactive, Purple = inactive until enemies aren't around (turrets etc), Green = inactive until player isn't around (fish). Passive entities consume less CPU power.
* <code>show_active_enemies_on_chunk_counts</code>
* <code>show_active_enemies_on_chunk_counts</code>
: not 100% clear: displays in the map view, how much biter nests (blue) are targetting to which are (red for the number of biters?), green: unknown?
** Not 100% clear: displays in the map view, how much biter nests (blue) are targeting to which are (red for the number of biters?), green: unknown?
* <code>show_active_chunks</code>
* <code>show_active_chunks</code>
: shows in the map view, which chunks are "on", unmarked chunks are not calculated
** Shows in the map view, which chunks are "on", unmarked chunks are not calculated
* <code>show_enemy_expansion_candidate_chunks</code>
* <code>show_enemy_expansion_candidate_chunks</code>
: where is space left to spread the brood?
** Where is space left to spread the brood?
* <code>show_tile_variations</code>
* <code>show_tile_variations</code>
: shows, which tile-variation (1, 2 or 4 tile sized) is painted for which area of the map quite confusing, zoom in to see the meaning.
** Shows, which tile-variation (1, 2 or 4 tile sized) is painted for which area of the map quite confusing, zoom in to see the meaning.
* <code>show_raw_tile_transitions</code>
* <code>show_raw_tile_transitions</code>
: turns the overlapping edges off, you see now clearly where is land and where is water
** Turns connected textures for land and water off, so the distinction can easily be made.
* <code>show_fluid_box_fluid_info</code>
* <code>show_fluid_box_fluid_info</code>
: how much is in a pipe/storage tank, for long pipes you see the flow, if the pipe is empty
** How much fluid is in a pipe/storage tank, shows flow of liquid in pipes.
* <code>show_environment_sound_info</code>
* <code>show_environment_sound_info</code>
: displays, which sound of which entity is played and how loud.
** Displays which sound of which entity is played and how loud.


== See also ==
== See also ==


* [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=7972 F5 debug info - how to read it?] - how to interpret show_time_used_percent
* [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=7972 F5 debug info - how to read it?] - how to interpret show_time_used_percent

Revision as of 23:30, 14 January 2017


Debug mode is used mainly by developers and modders to analyze the running state of the game. It can be enabled to show detailed information about the game world, and its information varies based on which level is active. The keys to enable debug mode are f5 through f7.

For example, one can:

  • See the path the Biters are coming from and where they plan to target,
  • See the position / coordinates of the cursor,
  • See a grid-overlay for the Tiles and Chunks,
  • See the blocks in a railway network,
  • See additional non-game related information, such as Updates Per Second and FPS.

Activate the debug mode

You have 4 debug-levels:

  • Always - This is the default mode, if no mode is active. Keep very few things active here.
  • Basic - The first mode, accessed by pressing F5. What power users often use.
  • Detailed - The second mode, accessed by pressing F6. The most commonly used for modders and developers.
  • Full - The second mode, accessed by pressing F7. Shows literally everything, tends to be unreadable.

To switch back to "always" you need to press the previous key again. Example: Press F5 to go to "basic", then press F6 to watch "detailed" and then press F6 again to switch back to "always".

Configuring the debug mode

To configure the 4 modes, press F4. This opens up a menu with many options. You can move this menu with the mouse, if it hides some interesting underlying thing. You can switch between 4 folders, which reflects the option for that debug-mode ("always", "basic", "detailed", "full"). The options are the same for each mode. Each mode can be configured to the user's liking, the different modes are only for convenience.

List of debug-options and their function

  • show_fps
    • Will show the current frames-per-second, or FPS. Should be normally about 60. See Lua/Game#speed.
  • show_detailed_info
    • Shows the cursor position in Tiles (and subdivisions of that), Chunks and Region
    • Current resolution and zoom (see Lua/Game#takescreenshot)
    • How many objects are on the screen (painted by the graphic card)
    • How many entities, chunks and paths are in the game and used.
  • show_time_used_percent
  • show_tile_grid
    • Quite useful to turn it on for the "always"-mode. It shows the borders of the Tiles and Chunks.
  • show_collision_rectangles
    • Shows the collision boxes of each entity (red).
  • show_selection_rectangles
    • Shows the a blue box over each entity, if you hover over it, it will be selected.
  • show_paths
    • The calculated paths for the biters in different colors.
  • show_next_waypoint_bb
    • Shows waypoints for biters (in green), nearly the same info as the next.
  • show_target
    • Shows the current target of the biters (red).
  • show_unit_group_info
    • Biter groups, which belong together (circles and lines belonging together)
  • show_unit_stuck_info
    • Should show stuck enemies (?)
  • show_last_path_detail
    • The A*-algorithm at work, calculating new paths.
  • show_path_cache
    • The source-positions of a path and about the length (?)
  • show_rail_paths
    • Which path a train will follow.
  • show_rolling_stock_count
    • Shows inserter positions
  • show_rail_connections
    • Shows rail connections.
  • show_rail_segments
    • Shows the segment borders and enables you to see the borders of the block.
  • show_train_stop_point
    • When a train slows down it shows the calculated point where it should halt
  • show_network_connected_entities
    • Displays the network-id of the electric network that a pole is connected to
  • show_circuit_network_numbers
    • Shows the number (and color) of circuit networks
  • show_energy_sources_networks
    • Which network-id an entity is connected to.
  • show_blocked_by
    • Shows items, which are blocked (see for example full belts)
  • show_active_state
    • Inserters, fish, turrets are turned to passive, if not used; Red = inactive, Purple = inactive until enemies aren't around (turrets etc), Green = inactive until player isn't around (fish). Passive entities consume less CPU power.
  • show_active_enemies_on_chunk_counts
    • Not 100% clear: displays in the map view, how much biter nests (blue) are targeting to which are (red for the number of biters?), green: unknown?
  • show_active_chunks
    • Shows in the map view, which chunks are "on", unmarked chunks are not calculated
  • show_enemy_expansion_candidate_chunks
    • Where is space left to spread the brood?
  • show_tile_variations
    • Shows, which tile-variation (1, 2 or 4 tile sized) is painted for which area of the map quite confusing, zoom in to see the meaning.
  • show_raw_tile_transitions
    • Turns connected textures for land and water off, so the distinction can easily be made.
  • show_fluid_box_fluid_info
    • How much fluid is in a pipe/storage tank, shows flow of liquid in pipes.
  • show_environment_sound_info
    • Displays which sound of which entity is played and how loud.

See also