<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Quyxkh</id>
	<title>Official Factorio Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Quyxkh"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Quyxkh"/>
	<updated>2026-08-21T12:04:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Glossary&amp;diff=164851</id>
		<title>Glossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Glossary&amp;diff=164851"/>
		<updated>2018-10-15T03:17:16Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: /* B */ Add backpressure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This page acts as a general glossary of all terms used in Factorio and its community. We recommend searching the page with {{keybinding|CTRL|F}} to find specific terms. The page is also organized alphabetically.&lt;br /&gt;
&lt;br /&gt;
Additionally, you can click a letter below to be taken to that letter in the list, if you wish to search manually.&lt;br /&gt;
&lt;br /&gt;
[[##|#]] [[#A|A]] [[#B|B]] [[#C|C]] [[#D|D]] [[#E|E]] [[#F|F]] [[#G|G]] [[#H|H]] [[#I|I]] [[#J|J]] [[#K|K]] [[#L|L]] [[#M|M]] [[#N|N]] [[#O|O]] [[#P|P]] [[#Q|Q]] [[#R|R]] [[#S|S]] [[#T|T]] [[#U|U]] [[#V|V]] [[#W|W]] [[#X|X]] [[#Y|Y]] [[#Z|Z]]&lt;br /&gt;
&lt;br /&gt;
== # ==&lt;br /&gt;
&lt;br /&gt;
;1-1, 1-2-1, 2-4, 4-8-4 and similar : A somewhat ambiguous shorthand notation for train configurations. The first number is usually the number of locomotives at the head of the train, followed by the number of cargo wagons or fluid wagons, and optionally followed by the number of tail locomotives if it&#039;s a double-headed train. In general, the smaller numbers are the number of locomotives.&lt;br /&gt;
&lt;br /&gt;
== A ==&lt;br /&gt;
&lt;br /&gt;
; AP : Armor piercing, refers to [[Piercing rounds magazine]].&lt;br /&gt;
;Ammo : Ammunition, used for guns/rocket launchers/turrets, etc.&lt;br /&gt;
;Angel&#039;s mods : A term referring to the mods made by user &#039;&#039;Arch666Angel&#039;&#039;, a popular modder who makes extremely popular difficulty/complexity mods that complement bob&#039;s mods.&lt;br /&gt;
;Angelbobs : A community term that means a game with both Angel&#039;s mods and Bob&#039;s mods installed.&lt;br /&gt;
;Assembly : Another word for an [[Assembling machine]].&lt;br /&gt;
&lt;br /&gt;
== B ==&lt;br /&gt;
&lt;br /&gt;
;BP : Short for [[Blueprint]].&lt;br /&gt;
;Backed-up : Refers to a machine having no output, and so the input channel fills up. Can also refer to belts being backlogged due to low consumption. This is not necessarily a bad thing.&lt;br /&gt;
;Backpressure : What a machine, usually a belt segment or inserter, experiences when delivery stalls because its target is backed up.&lt;br /&gt;
;Belt balancer : This is a belt setup that balances multiple belts to contain the same amount of resources, to maximize throughput. See [[Balancers]].&lt;br /&gt;
;Belt compression : This term refers to ensuring that all items on a belt are right after each other, to ensure no space is wasted and highest throughput.&lt;br /&gt;
;Blackout : When your factory completely loses power. This typically happens at night when relying on solar+accumulator power, enemies destroying vital electric poles, or after a prolonged brownout when using electric mining drills and/or electric inserters (instead of their burner variants).&lt;br /&gt;
;Bob&#039;s mods : A term referring to the mods made by user &#039;&#039;bobingabout&#039;&#039;, a popular modder who makes extremely popular difficulty/complexity mods that complement Angel&#039;s mods.&lt;br /&gt;
;Bootstrap factory : A factory that&#039;s made at the start of a new game in order to jump-start automation of basic equipment, climb the tech tree, and ultimately produce construction materials for a bigger, more organized factory, such as a megabase. The purpose of this factory is to allow you to grow your production to a decent size and then have a fresh start with all of the tech at your disposal, rather than building a giant factory from the ground up and then having to refactor parts of it.&lt;br /&gt;
;Bots : Shorthand version for [[Construction robot]] or [[Logistic robot]]. Sometimes also refers to the combat robots created from capsules (unlocked by researching Combat robotics 1–3).&lt;br /&gt;
;Bottleneck : A term that means a single point where resources are constrained, such as a slow part of a belt that slows down everything.&lt;br /&gt;
;Braiding : The space-saving technique of alternating between two or more different underground belt types (basic, fast and express) in a straight line, one tile wide. The different types of underground belts don&#039;t interfere with each other, and inserters can interact with the belt entrance and exit entities.&lt;br /&gt;
;Brownout : When your factory&#039;s machines are running slower than normal because you&#039;re not generating enough electricity.&lt;br /&gt;
;Buffer: A place where a stockpile of items is stored to be available when the production stops. Typically a chest.&lt;br /&gt;
;Bus : Short for [[#M|Main bus]].&lt;br /&gt;
&lt;br /&gt;
== C ==&lt;br /&gt;
&lt;br /&gt;
;Capacity : Maximum amount of items/fluid that can exist within something.&lt;br /&gt;
;Catchup : Period where a player joining a game is required to replay recent changes quickly, so they can be merged into the running game smoothly. Often happens on slow connections, or on servers with a lot going on.&lt;br /&gt;
;Chokepoint : Artificial or natural geography that funnels attackers into a narrow, movement-constricting area, making it more difficult for them to breach fortifications. Examples: peninsulas with narrow connections to the mainland, artificial land bridges to islands, nearby lakes, corridors through thick forests.&lt;br /&gt;
;Coin : An item used in the Tight Spot campaign.&lt;br /&gt;
;Compression : Like Capacity but applies to belts only.&lt;br /&gt;
;Computer : An item used in the New Hope campaign. (No further spoilers.)&lt;br /&gt;
;Contaminated : A belt with incorrect items on it (such as coal on an iron belt). Can also refer to pipes with mixed liquids.&lt;br /&gt;
;Cracktorio : A community term referring to the addictive qualities of Factorio, jokingly comparing the game to crack cocaine.&lt;br /&gt;
&lt;br /&gt;
== D ==&lt;br /&gt;
&lt;br /&gt;
;Daisy chaining : Some entities allow inserters to insert and remove items from the same slots, including fuel in boilers, ammo in gun turrets, science packs in labs, modules in beacons, robots in roboports, and any items in chests. &#039;Daisy chaining&#039; is a technique that makes use of this mechanic in order to supply some machines with consumables (i.e. fuel, ammo or science packs) without having to use belts. You simply chain multiple machines together with inserters that take the items out of the previous machine and insert them directly into the next. It&#039;s sometimes referred to as &#039;stealing&#039;, as in &#039;coal stealing&#039; or &#039;ammo stealing&#039;.&lt;br /&gt;
;Death world : A world generation configuration that results in a large quantity of [[Enemies]], to increase the game&#039;s difficulty.&lt;br /&gt;
;Double header : This is a term that refers to a train with [[locomotive]]s on both ends, making the train capable of driving in both directions. Opposite of a single header, or standard train.&lt;br /&gt;
;Dragon&#039;s teeth : A series of alternating stone wall pillars outside the main wall fortification with the purpose of delaying the biters from reaching the wall. Named after the similar fortification wall from the 1997 game [[Wikipedia:Total Annihilation|Total Annihilation]].&lt;br /&gt;
&lt;br /&gt;
== E ==&lt;br /&gt;
&lt;br /&gt;
;Entity : Anything that can be manipulated in-game. Nearly everything in factorio is an entity. Any device, items, trees... Even the player is just an entity.&lt;br /&gt;
;Evolution : The development and growth of the native population. Over the course of a game, biters and spitters become bigger and more powerful. See [[Enemies#Evolution]].&lt;br /&gt;
&lt;br /&gt;
== F ==&lt;br /&gt;
&lt;br /&gt;
;FFF : The weekly blog that the developers make to talk about the development of Factorio. Expanded, it is Factorio Friday Facts, posted every Friday.&lt;br /&gt;
;FPS : Visual rendering speed, &amp;quot;Frames per second&amp;quot;. When this is reduced beneath 60, the game may stutter visually, jitter, or otherwise appear unstable. Low FPS will not necessarily result in low UPS, but they are loosely tied together.&lt;br /&gt;
;Factorissimo : A popular mod that allows for factories to be built within buildings added by the mod.&lt;br /&gt;
;Fuel : Refers to any burnable item that can be used to fuel burner devices, such as [[wood]], [[coal]], etc.&lt;br /&gt;
&lt;br /&gt;
== G ==&lt;br /&gt;
&lt;br /&gt;
; GJ : Giga joule, a measurement of energy.&lt;br /&gt;
;Ghost : A translucent preview image that designates a position for the construction of an entity. Ghosts are created when you shift+click with an entity under your cursor, when you use the [[Rail_planner#Ghost_Planner|ghost rail planner]], when an entity is destroyed after you&#039;ve researched construction robotics, and when you place a blueprint. Construction robots automatically attempt to construct ghosts within their logistic or personal roboport network, and if unable will create an alert for missing construction materials.&lt;br /&gt;
;Gigabase : An even larger megabase, typically has RPM counts &amp;gt; 10.&lt;br /&gt;
&lt;br /&gt;
== I ==&lt;br /&gt;
&lt;br /&gt;
;Inventory : The ability for an entity to hold items within it. Almost all entities have inventories.&lt;br /&gt;
;Item : An item is another form of entity, representing the un-built version of a machine, tools, etc. Typically, items are found on belts, in the player&#039;s inventory, and inside machines. Items can be provided to recipes to create other items.&lt;br /&gt;
;Item Explosion : A phenomenon when a lot of items are spilled on the ground in a square-like fashion. Usually due to accidentally removing power armor when having a full inventory.&lt;br /&gt;
;Item request slot : A special request slot for machines with module slots that allows them to request the modules in the blueprint from which they were constructed. The deconstruction planner has a filter for canceling these requests.&lt;br /&gt;
&lt;br /&gt;
== K ==&lt;br /&gt;
&lt;br /&gt;
; kJ : Kilojoule, a measurement of energy.&lt;br /&gt;
;Kovarex : The founding father of Factorio and where [[Kovarex enrichment process]] gets its name from.&lt;br /&gt;
&lt;br /&gt;
== L ==&lt;br /&gt;
;Lane : One side of a transport belt.  Each belt has two lanes.&lt;br /&gt;
;Lane balancer : This is a belt setup that balances the two lanes on a belt to be equal, to maximize throughput. See [[Balancers]].&lt;br /&gt;
;Legs : [[Exoskeleton]]&lt;br /&gt;
;Loader : An abandoned concept for a belt-based mechanism that continuously loads and unloads machines, as an alternative to inserters. Functional loader entities can still be found in the editor, and some mods give them a proper texture and make them available in regular games. Loaders are used in the official Team Production scenario.&lt;br /&gt;
&lt;br /&gt;
== M ==&lt;br /&gt;
&lt;br /&gt;
; MW : Mega watt, a measurement of power.&lt;br /&gt;
;Main bus : The opposite of spaghetti, this refers to placing multiple belts side by side containing one resource, and branching off of it in order to create setups. Allows for organized layout of resource transportation.&lt;br /&gt;
;Mall: Also known as store. A location in a factory that produces many types of different items that the player needs but in relatively small amounts.&lt;br /&gt;
;Map exchange string : A long piece of text that encodes the settings used to generate a map. See [[World generator#Map Exchange String]].&lt;br /&gt;
;Market : A building where you can buy items using coins. It&#039;s available in the editor and used in the Tight Spot campaign.&lt;br /&gt;
;Mats : Shorthand for materials.&lt;br /&gt;
;Megabase : A community term referring to a significantly large base that has been built over a significant time/effort. Often, these bases are quantified in terms of rockets per minute, or &amp;quot;RPM&amp;quot;. A base typically is considered a megabase when it can maintain 1 RPM.&lt;br /&gt;
;Mod : This term refers to a script or collection of scripts that change how the game acts, adds new items/entities, etc.&lt;br /&gt;
;Modpack : A community term referring to a collection of mods that work well together.&lt;br /&gt;
&lt;br /&gt;
== N ==&lt;br /&gt;
&lt;br /&gt;
;Night steam : The strategy of relying on solar panels to generate electricity during the day and steam engines during the night.&lt;br /&gt;
;No path : A common error that means that a train cannot find a valid route to a train stop. See [[Railway#No_path]].&lt;br /&gt;
&lt;br /&gt;
== O ==&lt;br /&gt;
&lt;br /&gt;
; Outpost : A small base created far away from a [[#B|Bootstrap base]], usually to serve a single purpose like mining or production of a specific resource.&lt;br /&gt;
&lt;br /&gt;
== P ==&lt;br /&gt;
&lt;br /&gt;
;Priority splitter : A splitter design that directs as many resources as possible from a bus to an offshoot before letting excess items flow past. This is in contrast to a splitter that always distributes some percentage of items to both sides (depending on the particular arrangement of splitters).&lt;br /&gt;
;PAX (train) : Short for passenger train or player access station, another name for the [[Glossary#S|Shuttle]].&lt;br /&gt;
&lt;br /&gt;
== Q ==&lt;br /&gt;
;QOL : Quality of life, often refers to mods that increase ease of play.&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
&lt;br /&gt;
;RORO : Abbreviation for &amp;quot;Roll on, roll off&amp;quot; in the context of train station design. It means that trains arrive at the station at one end and leave the station at the other end (driving past the train stop), as opposed to terminus stations.&lt;br /&gt;
;RPM : Shorthand for rockets per minute, usually used to meassure the size of very big bases, see [[#M|Megabase]] and [[#G|Gigabase]].&lt;br /&gt;
;Rainbow belt : A transport belt with many different types of items on it, rather than the easier-to-manage one or two types of items. See [[#S|Sushi belt]].&lt;br /&gt;
;Ribbon world : A world which has been set up to have limited space in one dimension (width or height), adding a new challenge. The smallest ribbon world in which you can launch a rocket is a map limited to a width of 9 tiles, the width of the rocket silo.&lt;br /&gt;
;Roundabout : This term refers to a type of path for trains, to allow the trains to enter the circle, and exit onto the exit rail that they path to. Generally recommended against, due to throughput and self collision issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== S ==&lt;br /&gt;
&lt;br /&gt;
;Scenario : A map that has been saved via the [[Map editor]]. Special scripting can be added to make simple &amp;quot;events&amp;quot;.&lt;br /&gt;
;Seed : A number associated with each map that determines the outcome of certain pseudo-random processes, like terrain generation. All other settings being equal, different seeds result in vastly different terrain features. The seed is included in [[#M|Map exchange strings]].&lt;br /&gt;
;Shuttle : A train for personal transportation around the factory. Sometimes called a taxi.&lt;br /&gt;
;Sideloading : This is a commonly used term that refers to running the end of a [[Transport belt]] into the side of another, so that only the lane on the side of the belt that the other belt is on is filled. This is typically done to create a belt that carries two different resources side-by-side on the same belt.&lt;br /&gt;
;Small plane : An item from the New Hope campaign. (No further spoilers.)&lt;br /&gt;
;Smart furnace : A smelting setup that can process multiple materials (e.g. iron ore, copper ore, iron plates, stone).&lt;br /&gt;
;Spaghetti : A community term referring to the &amp;quot;spaghetti&amp;quot; look of many belts/entities placed in a disorganized fashion. Typically created by new players to Factorio. Generally, it will be moved away from as soon as the player realizes the logistical problems it causes. Note that not all &amp;quot;spaghetti&amp;quot; factories are necessarily inefficient.&lt;br /&gt;
;Speedrun : A term referring to attempting to quickly finish the game as soon as possible. At the time of this writing, the record is just over an hour.&lt;br /&gt;
;Stacker : Also known as &#039;&#039;&#039;Parking lot&#039;&#039;&#039;. A waiting bay for trains, allowing them to wait on different parallel tracks and not block each other until their destination becomes free. Recommended in front of large, multi-platform stations.&lt;br /&gt;
;Supply train: A train that usually for personal use that is used to carry mostly building materials like rails, conveyor belts, inserters, assembly machines etc..&lt;br /&gt;
;Sushi belt : The strategy of mixing many different types of items on transport belts to supply machines that need some or all of those items. It sacrifices throughput for compactness (and beauty). It looks colorful and diverse like a tray of sushi. Its perhaps most popular application is supplying labs with science packs. Sometimes called sushi bar or rainbow belt.&lt;br /&gt;
&lt;br /&gt;
== T ==&lt;br /&gt;
&lt;br /&gt;
;TINS : Abbreviation of &amp;quot;There Is No Spoon&amp;quot;, the name of the in-game achievement.&lt;br /&gt;
;Terminus : A train station design where trains come in and leave from the same side, thus requiring double-headed trains, unlike RORO stations.&lt;br /&gt;
;Throughput : A term that refers to the maximum amount of resources that can travel through something (such as a belt) in a certain amount of time. Usually quantified in items per second.&lt;br /&gt;
;Tick : The smallest measurable amount of time in Factorio. There are 60 ticks per second (when running at 60 UPS), and 3600 ticks in a minute.&lt;br /&gt;
;Tile : A piece of map. It is not really known how big it is, but for simplifying things we can assume that a tile is a quadratic with side of 1 meter.&lt;br /&gt;
;Time : Game time is normally identical with real time, one second in the game is one second in reality, but it can be faster or slower. For example, when the calculations for an update takes longer than a tick, the game slows down (aka UPS). Alternatively, a mod can provide ways to let the game run faster.&lt;br /&gt;
;Train bus : A popular alternative to the [[#M|main bus]] pattern. Instead of using a belt bus to provide materials for various production cells, a large rail system allows many trains to route materials between more distant cells, sometimes called subfactories. It&#039;s a UPS-friendlier strategy for large factories such as megabases.&lt;br /&gt;
;Trash can : A simple &#039;public utility&#039; of sorts, which is an active provider that players can dump unwanted items into. Logistic robots pick them up and store them away. It&#039;s useful if you need to get rid of large quantities of items (such as wood or landfill) and your logistic trash slots are full.&lt;br /&gt;
;Turret : Stationary defense weapon. There are three types of turrets in Factorio, the [[Laser turret]], [[Gun turret]], and [[Flamethrower turret]].&lt;br /&gt;
;Turret creep : The tactic of leap-frogging with turrets into hostile territory. It&#039;s very effective due to the strength and range of turrets. Typically done with laser turrets, blueprints and personal roboports, but can also be done by manually placing gun turrets and inserting ammo.&lt;br /&gt;
&lt;br /&gt;
== U ==&lt;br /&gt;
&lt;br /&gt;
;UPS : Internal clock speed, &amp;quot;Updates Per Second&amp;quot;. The game tries its best to maintain the ideal 60 UPS, but it is affected by the size and complexity of the game world and your computer hardware. A lower UPS means that the simulation runs slower. At 30 UPS everything would take twice as long as under ideal conditions. This is a common concern on megabases or when playing with many mods active. It can be set to more than 60 UPS by changing the game speed via script, processing power permitting. The Transport Belt Madness and Tight Spot campaigns are examples where the game speed can be increased.&lt;br /&gt;
&lt;br /&gt;
== V ==&lt;br /&gt;
;Vanilla : Regular version of the game with no mods.&lt;br /&gt;
&lt;br /&gt;
== W ==&lt;br /&gt;
&lt;br /&gt;
;Wube : The company based in the Czech Republic that develops Factorio.&lt;br /&gt;
&lt;br /&gt;
== Z ==&lt;br /&gt;
&lt;br /&gt;
;Zoo : A group of biter or spitter nests around which the player has built a safe containment zone, i.e. a circle of turrets. Reasons for doing this include exploiting the nests&#039; pollution absorption and automating the destruction of items (using requester chests near the nests).&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Heat_exchanger&amp;diff=164665</id>
		<title>Heat exchanger</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Heat_exchanger&amp;diff=164665"/>
		<updated>2018-10-05T01:33:43Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: Heat exchangers convert 10MJ/s heat to steam, not steam engines.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Heat exchanger}}&lt;br /&gt;
The &#039;&#039;&#039;heat exchanger&#039;&#039;&#039; exchanges heat between a heat connection and [[water]] to produce [[steam]].&lt;br /&gt;
&lt;br /&gt;
Heat exchangers produce ~103 steam with a temperature of 500°C every second. &lt;br /&gt;
&lt;br /&gt;
Heat exchangers will not produce steam until they reach 500°C. The steam produced is exactly 500°C hot, even if the exchanger is hotter. Heat exchangers have a heat capacity of 1 MJ/°C. Thus, they can buffer 500 MJ of heat energy across their working range of 500°C to 1000°C, and require 485 MJ of energy to warm up from 15°C to 500°C when initially placed. &lt;br /&gt;
&lt;br /&gt;
== Calculating steam production rate ==&lt;br /&gt;
&lt;br /&gt;
Heat exchangers produce 103 steam/second.This can be calculated by relying on [[steam turbine]] data:  A steam turbine consumes 60 steam/second and produces 5.82MW (assuming 500°C steam). This means a single unit of 500°C steam has &amp;lt;code&amp;gt;5.8MW / 60/s = 0.097 MJ&amp;lt;/code&amp;gt; of energy. A heat exchanger produces 10 MJ a second, therefore it produces &amp;lt;code&amp;gt;10MJ / 0.097MJ = 103.0927835 &amp;lt;/code&amp;gt; steam per second.&lt;br /&gt;
&lt;br /&gt;
The steam production rate can also be calculated using the energy consumption: 1 Heat exchanger consumes 10MW, so it&#039;s putting 10,000,000 joule of energy into heating water/steam per second. To heat up 1 unit of water 1 degree, 200 joules are needed, so the heat exchanger is heating up water by 50,000°C in total. But the water only gets heated up from 15°C to 500°C, so by 485°C. So the 50,000°C are enough to heat up 103 units of steam per second, since &amp;lt;code&amp;gt;50,000 / 485 = 103.09&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Introduced&lt;br /&gt;
* Doubled the heat capacity of water from 0.1kJ per degree per liter to 0.2kJ}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Power production#Nuclear power|Nuclear power]]&lt;br /&gt;
* [[Steam turbine]]&lt;br /&gt;
* [[Nuclear reactor]]&lt;br /&gt;
* [[Heat pipe]]&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Energy}}&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164663</id>
		<title>Railway/Train path finding</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164663"/>
		<updated>2018-10-04T20:03:56Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{sublinks}}&lt;br /&gt;
Before a train moves to a target (In this case, a [[Train stop]]), it calculates the best route based on the railway network at that time.&lt;br /&gt;
&lt;br /&gt;
For calculation it uses a simple [[WIKIPEDIA:A*_search_algorithm|A*-algorithm]]: The pathfinder first builds a list of non-disabled stops that match the name in the schedule, then searches outward from both ends of the train at once, if applicable, in segments. A segment is an uninterrupted plain sequence of rails, with no intersections, stops, or signals (all of which define segment borders). The cost (distance) is caluclated using the following weighting rules:&lt;br /&gt;
* Base cost for a block/segment is the length of the segment (linear grid length along the center of the rail).&lt;br /&gt;
* When the rail block is occupied by a train -&amp;gt; Add a penalty of 2 * length of the block divided by block distance from the start, so the far away occupied paths don&#039;t matter much.&lt;br /&gt;
* When the rail block is guarded by a [[rail signal]] set to red by the [[circuit network]] -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a train stop that is not the destination -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it -&amp;gt; Add a penalty of 500.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it that doesnt have other valid stops in its schedule -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a manually controlled stopped train -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a manually controlled stopped train without a passenger -&amp;gt; Add a penalty of 7000.&lt;br /&gt;
* When the path includes a train currently arriving to a train stop -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently arriving to a rail signal -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently waiting at a rail signal -&amp;gt; Add a penalty of 100 + 0.1 for every tick the train has already waited.&lt;br /&gt;
&lt;br /&gt;
The route (possibly including the destination) is recalculated if the train needs to stop at a signal or if is current destination is disabled or destroyed. There is an invisible front point internally called the train_stop_point which is used to determine if the train needs to stop. See [[Debug mode]] and turn show_train_stop_point on to see that point.  The route also recalculated when leaving a stop, and after a train has stopped at a chain signal (if the initial repath didn&#039;t find any exits), and every five seconds after that. This is to make pathing as dynamic as possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{History|0.16.0|&lt;br /&gt;
* The specifc penalties can now be found in the utility constants, which allows mods to change them. (Undocumented)}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Train station adds 2000 tiles penalty when path finding, so trains try to avoid stations not related to their path.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.17|&lt;br /&gt;
* Increased the pathing penalty for non-moving train in manual mode from 200 to 1000.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.13|&lt;br /&gt;
* Stopped, manually controlled train adds additional penalty (related to train path finding) of 200 tiles to the block it occupies.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.11|&lt;br /&gt;
* The pathfinding is based on penalties for blocked segments now. For trains waiting in station, the more remaining time in the station, the bigger penalty.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 Train pathfinding as of version 0.16 (Code)]&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-68 FFF #68]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=4834 bug ticket]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=2237#p62195 Bug ticket explained]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164659</id>
		<title>Railway/Train path finding</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164659"/>
		<updated>2018-10-04T18:58:05Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{sublinks}}&lt;br /&gt;
Before a train moves to a target (In this case, a [[Train stop]]), it calculates the best route based on the railway network at that time.&lt;br /&gt;
&lt;br /&gt;
For calculation it uses a simple [[WIKIPEDIA:A*_search_algorithm|A*-algorithm]]: The pathfinder first builds a list of non-disabled stops that match the name in the schedule, then searches outward from both ends of the train at once, if applicable, in segments. A segment is an uninterrupted plain sequence of rails, with no intersections, stops, or signals (all of which define segment borders). The cost (distance) is caluclated using the following weighting rules:&lt;br /&gt;
* Base cost for a block/segment is the length of the segment (linear grid length along the center of the rail).&lt;br /&gt;
* When the rail block is occupied by a train -&amp;gt; Add a penalty of 2 * length of the block divided by block distance from the start, so the far away occupied paths don&#039;t matter much.&lt;br /&gt;
* When the rail block is guarded by a [[rail signal]] set to red by the [[circuit network]] -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a train stop that is not the destination -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it -&amp;gt; Add a penalty of 500.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it that doesnt have other valid stops in its schedule -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a manually controlled stopped train -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a manually controlled stopped train without a passenger -&amp;gt; Add a penalty of 7000.&lt;br /&gt;
* When the path includes a train currently arriving to a train stop -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently arriving to a rail signal -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently waiting at a rail signal -&amp;gt; Add a penalty of 100 + 0.1 for every tick the train has already waited.&lt;br /&gt;
&lt;br /&gt;
The route (possibly including the destination) is recalculated if the train needs to stop at a signal or if is current destination is disabled or destroyed. There is an invisible front point internally called the train_stop_point which is used to determine if the train needs to stop. See [[Debug mode]] and turn show_train_stop_point on to see that point.  The route also recalculated after a train has stopped at a chain signal (if the initial repath didn&#039;t find any exits), and every five seconds after that. This is to make pathing as dynamic as possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{History|0.16.0|&lt;br /&gt;
* The specifc penalties can now be found in the utility constants, which allows mods to change them. (Undocumented)}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Train station adds 2000 tiles penalty when path finding, so trains try to avoid stations not related to their path.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.17|&lt;br /&gt;
* Increased the pathing penalty for non-moving train in manual mode from 200 to 1000.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.13|&lt;br /&gt;
* Stopped, manually controlled train adds additional penalty (related to train path finding) of 200 tiles to the block it occupies.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.11|&lt;br /&gt;
* The pathfinding is based on penalties for blocked segments now. For trains waiting in station, the more remaining time in the station, the bigger penalty.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 Train pathfinding as of version 0.16 (Code)]&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-68 FFF #68]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=4834 bug ticket]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=2237#p62195 Bug ticket explained]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164657</id>
		<title>Railway/Train path finding</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164657"/>
		<updated>2018-10-04T17:08:36Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{sublinks}}&lt;br /&gt;
Before a train moves to a target (In this case, a [[Train stop]]), it calculates the best route based on the railway network at that time.&lt;br /&gt;
&lt;br /&gt;
For calculation it uses a simple [[WIKIPEDIA:A*_search_algorithm|A*-algorithm]]: The pathfinder first builds a list of non-disabled stops that match the name in the schedule, then searches outward from both ends of the train at once, if applicable, in segments. A segment is an uninterrupted plain sequence of rails, with no intersections, stops, or signals (all of which define segment borders). The cost (distance) is caluclated using the following weighting rules:&lt;br /&gt;
* Base cost for a block/segment is the length of the segment (linear grid length along the center of the rail).&lt;br /&gt;
* When the rail block is occupied by a train -&amp;gt; Add a penalty of 2 * length of the block divided by block distance from the start, so the far away occupied paths don&#039;t matter much.&lt;br /&gt;
* When the rail block is guarded by a [[rail signal]] set to red by the [[circuit network]] -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a train stop that is not the destination -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it -&amp;gt; Add a penalty of 500.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it that doesnt have other valid stops in its schedule -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a manually controlled stopped train -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a manually controlled stopped train without a passenger -&amp;gt; Add a penalty of 7000.&lt;br /&gt;
* When the path includes a train currently arriving to a train stop -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently arriving to a rail signal -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently waiting at a rail signal -&amp;gt; Add a penalty of 100 + 0.1 for every tick the train has already waited.&lt;br /&gt;
&lt;br /&gt;
The route is recalculated if the train needs to stop at a signal. There is an invisible front point internally called the train_stop_point which is used to determine if the train needs to stop. See [[Debug mode]] and turn show_train_stop_point on to see that point.  The route also recalculated after a train has stopped at a chain signal (if the initial repath didn&#039;t find any exits), and every five seconds after that. This is to make pathing as dynamic as possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{History|0.16.0|&lt;br /&gt;
* The specifc penalties can now be found in the utility constants, which allows mods to change them. (Undocumented)}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Train station adds 2000 tiles penalty when path finding, so trains try to avoid stations not related to their path.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.17|&lt;br /&gt;
* Increased the pathing penalty for non-moving train in manual mode from 200 to 1000.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.13|&lt;br /&gt;
* Stopped, manually controlled train adds additional penalty (related to train path finding) of 200 tiles to the block it occupies.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.11|&lt;br /&gt;
* The pathfinding is based on penalties for blocked segments now. For trains waiting in station, the more remaining time in the station, the bigger penalty.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 Train pathfinding as of version 0.16 (Code)]&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-68 FFF #68]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=4834 bug ticket]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=2237#p62195 Bug ticket explained]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164656</id>
		<title>Railway/Train path finding</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=164656"/>
		<updated>2018-10-04T17:02:40Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{sublinks}}&lt;br /&gt;
Before a train moves to a target (In this case, a [[Train stop]]), it calculates the best route based on the railway network at that time.&lt;br /&gt;
&lt;br /&gt;
For calculation it uses a simple [[WIKIPEDIA:A*_search_algorithm|A*-algorithm]]: The pathfinder first builds a list of non-disabled stops that match the name in the schedule, then searches outward from both ends of the train at once, if applicable, in segments. A segment is an uninterrupted plain sequence of rails, with no intersections, stops, or signals (all of which define segment borders). The cost (distance) is caluclated using the following weighting rules:&lt;br /&gt;
* Base cost for a block/segment is the length of the segment (linear grid length along the center of the rail).&lt;br /&gt;
* When the rail block is occupied by a train -&amp;gt; Add a penalty of 2 * length of the block divided by block distance from the start, so the far away occupied paths don&#039;t matter much.&lt;br /&gt;
* When the rail block is guarded by a [[rail signal]] set to red by the [[circuit network]] -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a train stop that is not the destination -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it -&amp;gt; Add a penalty of 500.&lt;br /&gt;
* When the path includes a train stop with a train stopped in it that doesnt have other valid stops in its schedule -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When the path includes a manually controlled stopped train -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
* When the path includes a manually controlled stopped train without a passenger -&amp;gt; Add a penalty of 7000.&lt;br /&gt;
* When the path includes a train currently arriving to a train stop -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently arriving to a rail signal -&amp;gt; Add a penalty of 100.&lt;br /&gt;
* When the path includes a train currently waiting at a rail signal -&amp;gt; Add a penalty of 100 + 0.1 for every tick the train has already waited.&lt;br /&gt;
&lt;br /&gt;
The route is recalculated if the train needs to stop at a chain signal. There is an invisible front point internally called the train_stop_point which is used to determine if the train needs to stop. See [[Debug mode]] and turn show_train_stop_point on to see that point.  The route also recalculated after a train has stopped at a chain signal (if the initial repath didn&#039;t find any exits), and every five seconds after that. This is to make pathing as dynamic as possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{History|0.16.0|&lt;br /&gt;
* The specifc penalties can now be found in the utility constants, which allows mods to change them. (Undocumented)}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Train station adds 2000 tiles penalty when path finding, so trains try to avoid stations not related to their path.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.17|&lt;br /&gt;
* Increased the pathing penalty for non-moving train in manual mode from 200 to 1000.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.13|&lt;br /&gt;
* Stopped, manually controlled train adds additional penalty (related to train path finding) of 200 tiles to the block it occupies.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.11|&lt;br /&gt;
* The pathfinding is based on penalties for blocked segments now. For trains waiting in station, the more remaining time in the station, the bigger penalty.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 Train pathfinding as of version 0.16 (Code)]&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-68 FFF #68]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=4834 bug ticket]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=2237#p62195 Bug ticket explained]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway&amp;diff=152209</id>
		<title>Railway</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway&amp;diff=152209"/>
		<updated>2017-12-09T06:26:26Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: /* Automated transport */  Testing says trains waiting at a chain signal for ~5 seconds repath regardless of how many stops they could path to&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
:&#039;&#039;For the research see [[Railway (research)]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than [[Belt transport system|belts]] and [[Logistic network|robot logistics]], especially over large distances.&lt;br /&gt;
&lt;br /&gt;
Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the [[Rail planner]], but can also be done manually. Bear in mind that rails can rails are placed on a two-tile grid, so you cannot move a rail by only one tile.&lt;br /&gt;
&lt;br /&gt;
=== Minimum manually operated railway ===&lt;br /&gt;
As a minimum a manually operated railway has to consist of:&lt;br /&gt;
* [[Rail]]s (tracks)&lt;br /&gt;
* [[Locomotive]]s&lt;br /&gt;
&lt;br /&gt;
Locomotives can be entered and then manually operated by standing next to them and pressing the {{Key|RETURN}} button.&lt;br /&gt;
&lt;br /&gt;
=== Switches ===&lt;br /&gt;
* There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a [[rail]] overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.&lt;br /&gt;
* The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect [[Rail signal| signal blocks]] which helps prevent collisions.&lt;br /&gt;
* Parallel tracks do not interact with each other and generally have no problems. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)&lt;br /&gt;
&lt;br /&gt;
[[File:fff-140-controlled-gates.gif|thumb|An example of a safe railway crossing.]]&lt;br /&gt;
=== Crossing tracks ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A checklist of proper track crossing etiquette:&lt;br /&gt;
&lt;br /&gt;
# Zoom out, so that you can see a train coming.&lt;br /&gt;
# Look left, then right.&lt;br /&gt;
# Check for signals nearby: If a [[rail signal]] suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.&lt;br /&gt;
# Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.&lt;br /&gt;
# While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.&lt;br /&gt;
# Heavy [[Energy shield|shields]] can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit&#039;s energy.&lt;br /&gt;
# All entities with health will take damage getting hit by a train, so take care not to leave a [[Car]] or [[Tank]] on the tracks. However, this includes hostile forces!&lt;br /&gt;
# Trains far from a [[train stop]] will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a [[train stop]] or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.&lt;br /&gt;
&lt;br /&gt;
A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the [[circuit network]], and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can&#039;t get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Trains ==&lt;br /&gt;
Train components:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{imagelink|locomotive|Locomotive}} || {{Imagelink|Cargo wagon|Cargo wagon}} || {{imagelink|Fluid_wagon|Fluid wagon}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Railway-assemble-train.png|thumb|left|300px|Placing a [[Cargo wagon]] so it is attached to the train.]]&lt;br /&gt;
&lt;br /&gt;
* A train consists of at least one locomotive.&lt;br /&gt;
* Trains can have more than one locomotive, and any number of [[Wagon]]s.&lt;br /&gt;
* Locomotives can be &#039;&#039;&#039;manually&#039;&#039;&#039; driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.&lt;br /&gt;
* Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.&lt;br /&gt;
* A train needs [[fuel]] to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.&lt;br /&gt;
* A common way to refuel trains is using a [[requester chest]] that requests [[fuel]], and then having a [[burner inserter]] loading the fuel into the locomotive.&lt;br /&gt;
&lt;br /&gt;
The locomotives&#039; inventory is only used for [[Fuel]]. To transport items [[cargo wagon]]s and/or [[fluid wagon]]s have to be attached to the train. To attach rolling stock, whether a wagon or a locomotive, the player may either prepare to place one near an existing train, where a green graphic will show the player that the stock will be attached, showing a connection between the train and the new stock. Alternatively, the player may manually connect rolling stock to trains with the rolling stock connect key, if the cargo wagon was placed far away from a train. Rolling stock can likewise be disconnected with the rolling stock disconnect key. The cargo wagons can be filled or emptied manually or by up to twelve adjacent [[Inserters]] (six on each side), while fluid wagons can be filled or emptied with up to three [[pump]]s, which will automatically connect to the nipples on top.&lt;br /&gt;
&lt;br /&gt;
* [[Railway/Train path finding]] - How trains find their path.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Stations ==&lt;br /&gt;
[[File:station-example-1.png|thumb|right|256px|A very minimal train station.]]&lt;br /&gt;
[[File:station-example-2.png|thumb|400px|High-performance train station for short trains. Highest possible unload rate, waiting spots, refueling, defended, multi-train capable, modular, extendable.]]&lt;br /&gt;
Station Components:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{Imagelink|Train stop|Train stop}} || {{Imagelink|Straight rail|Rail|Rails}} || {{Imagelink|Inserter|Inserters}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;train station&#039;&#039;&#039; is a combination of at least one [[train stop]] plus a [[storage]] and/or distribution system, used to fill or empty [[cargo wagon]]s and/or [[fluid wagon]]s, load [[fuel]] into the [[Locomotive|locomotive(s)]], or repair trains.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t mix up &#039;&#039;train stations&#039;&#039; with &#039;&#039;train stops&#039;&#039;.&#039;&#039;&#039; A train station is a concept, whereas a [[train stop]] is an item.&lt;br /&gt;
&lt;br /&gt;
[[Inserter]]s placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to get items off and onto cargo wagons; pumps are the only way to get fluids into and out of fluid wagons.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
The two types of signals in Factorio:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| {{imagelink|rail-signal|Rail signal}} || {{Imagelink|Rail chain signal|Rail chain signal}} |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Understanding rail signals can be difficult. Several terms critical to understanding them are below:&lt;br /&gt;
*Rail segment&lt;br /&gt;
: A piece of track (one item).&lt;br /&gt;
*Segment&lt;br /&gt;
: A single path of continuous track without intersections or switches. This becomes important when signals are employed. The player may mouse over a segment to see its number. It&#039;s number is unique within the world, however does not start from 0 or 1.&lt;br /&gt;
*Block&lt;br /&gt;
: A set of segments defined by rail signals. By default every connected segment belongs to one block, no matter whether a train can drive on it or not, and even if it can be driven only in one direction (e.g. at a switch, both segments of the switch belong to the same block). The player can see the current block numbers of a rail piece in the info section on mouse-over.&lt;br /&gt;
&lt;br /&gt;
Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player&#039;s movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See [https://forums.factorio.com/viewtopic.php?f=18&amp;amp;t=3811#p28310 this forum post]&#039;&#039;&#039; for a good explanation about blocks.&lt;br /&gt;
&lt;br /&gt;
=== Basic Signaling Rules ===&lt;br /&gt;
* There is at most one Train in a block at any time. A train spanning multiple blocks occupies them all.&lt;br /&gt;
* A red signal means that the following block is occupied by a train.&lt;br /&gt;
* A yellow signal means that a train is approaching and already has the approval to enter the following block.&lt;br /&gt;
* [[Rail signal]]s separate a new block and reflect its state: green - free, yellow - reserved, red - occupied, blue - one of the paths is blocked&lt;br /&gt;
* [[Rail chain signal]]s separate a new block and reflect the state of the next [[Rail signal]]&lt;br /&gt;
* A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Deadlocks ==&lt;br /&gt;
A deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train.&lt;br /&gt;
&lt;br /&gt;
=== Deadlock occurrence ===&lt;br /&gt;
Deadlocks occur when two or more trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:&lt;br /&gt;
&lt;br /&gt;
# Temporary - These are caused by a temporary hiccup in a train&#039;s path, such as a loading train being in the way, or created by closing a signal with the [[circuit network]]. These often resolve themselves.&lt;br /&gt;
# Semi-permanent - These are the result of a problem with pathing, often created by a fuel-less train or broken rail, and may require player interaction to resolve, or (in the case of broken rails) may be corrected automatically by construction robots.&lt;br /&gt;
# Permanent - This type is the worst, and cannot be resolved automatically, often requiring the player to manually drive several trains to get them out of the intersection. These often are caused by incorrect signal placement or unreachable stations.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of signaling, however.&lt;br /&gt;
&lt;br /&gt;
=== Factors that influence the deadlock chance ===&lt;br /&gt;
* Train length (shorter trains will have a lower chance with the same rail/signal layout, due to having less effect on the rails they&#039;re on.)&lt;br /&gt;
* Size of the blocks: More space for the blocks means lower chance of deadlock.&lt;br /&gt;
* Track layout: Some layouts have a higher chance of locking, than others.&lt;br /&gt;
* Quantity of trains - More trains trying to use an intersection will result in higher chance of deadlock.&lt;br /&gt;
* The chance is also much higher if trains need to wait often in areas with rail-crossings.&lt;br /&gt;
&lt;br /&gt;
Knowing the factors, how can deadlocks be reduced?&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t use 4-way junctions or roundabouts (circles) to create junctions.&lt;br /&gt;
* Use better 3-way junctions. See [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=9044 A Detailed Look at a Bidirectional Three-way Train Intersection]&lt;br /&gt;
* Use roundabouts only for changing direction of train, and never for high traffic intersections.&lt;br /&gt;
* Build more tracks around junctions. Don&#039;t have one junction be the only way to reach a place, add redundancy. This keeps a small problem a small problem.&lt;br /&gt;
&lt;br /&gt;
== Automated transport ==&lt;br /&gt;
[[File:train-schedule-gui.png|thumb|300px|The new train GUI since 0.13 (schedule tab): 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition]]&lt;br /&gt;
&lt;br /&gt;
Trains set on &amp;quot;Automatic&amp;quot; choose their destination stop and route on departure, and after waiting at a chain signal for five seconds, and when their destination stop disables itself by circuit condition. They choose the shortest route using a [[Railway/Train_path_finding|path finding algorithm]] that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the stop and go on to the next.&lt;br /&gt;
&lt;br /&gt;
This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.&lt;br /&gt;
&lt;br /&gt;
First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the  expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).&lt;br /&gt;
&lt;br /&gt;
When you set up the train schedule (see below) and fuel the train, you can start the train on it&#039;s schedule by switching from manual to automatic driving mode.&lt;br /&gt;
&lt;br /&gt;
=== Train schedule ===&lt;br /&gt;
The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it&#039;s at the end it will continue with the first. Currently, it&#039;s not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.&lt;br /&gt;
&lt;br /&gt;
Wait conditions are used to tell the train when to leave the station. There are 6 types of wait conditions:&lt;br /&gt;
* &#039;&#039;&#039;Time passed&#039;&#039;&#039; - the only one available until version 0.12.&lt;br /&gt;
* &#039;&#039;&#039;Inventory full&#039;&#039;&#039; - All inventories of the train are full.&lt;br /&gt;
* &#039;&#039;&#039;Inventory empty&#039;&#039;&#039; - Same as above, but empty.&lt;br /&gt;
* &#039;&#039;&#039;Item count&#039;&#039;&#039; - The train (all cargoes summed) contains a specific amount of a certain item.&lt;br /&gt;
* &#039;&#039;&#039;Circuit condition&#039;&#039;&#039; - The train stop is connectable to the [[Circuit network]], so the signals can used for wait conditions.&lt;br /&gt;
* &#039;&#039;&#039;Inactivity&#039;&#039;&#039; - No items were added or removed for the specified amount of seconds.&lt;br /&gt;
&lt;br /&gt;
Hereafter the word &amp;quot;term&amp;quot; is used to describe &#039;&#039;one&#039;&#039; type of wait condition, and the words &amp;quot;wait condition&amp;quot; are used to describe the whole set of terms (it turns a bit into maths).&lt;br /&gt;
&lt;br /&gt;
If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.&lt;br /&gt;
&lt;br /&gt;
When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Expand for examples&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Wait until full, up to 30 seconds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until cargo full, &#039;&#039;or&#039;&#039; circuit condition Oil &amp;gt; 3000:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR Circuit condition - Oil &amp;gt; 3000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until empty, &#039;&#039;and&#039;&#039; 30 seconds passed, &#039;&#039;and&#039;&#039; 5 seconds of inactivity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Empty cargo inventory&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
AND 5 seconds of inactivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until iron ore is low, &#039;&#039;or&#039;&#039; copper ore is low &#039;&#039;and&#039;&#039; at least 30 seconds passed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cargo: Iron ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
OR Cargo: Copper ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s wait condition logic is read as disjunctive normal form ([https://en.wikipedia.org/wiki/Disjunctive_normal_form DNF]), and so this last example is processed as (note the parenthesis):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 AND 30 seconds passed) OR (Cargo: Copper ore &amp;lt; 500 AND 30 seconds passed))&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which is the same as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 OR Cargo: Copper ore &amp;lt; 500) AND 30 seconds passed)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there is &#039;&#039;&#039;no&#039;&#039;&#039; way to write that shorter form in the current UI.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
Below are some things to verify if a rail system or train is not working.&lt;br /&gt;
&lt;br /&gt;
* Is the train fueled? Ensure that the locomotive has [[fuel]] of some kind.&lt;br /&gt;
* Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.&lt;br /&gt;
* Another train on the same [[Railway#Segment|segment]] or [[Railway#Block|block]]? Make sure the path of the train is unobstructed.&lt;br /&gt;
* Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.&lt;br /&gt;
* Is the train allowed to enter signals from the right direction? Are the signals set correctly?&lt;br /&gt;
* If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.&lt;br /&gt;
&lt;br /&gt;
==== No path ====&lt;br /&gt;
When trains cannot reach the target, a &amp;quot;no path&amp;quot; symbol pops up over the locomotive. Check:&lt;br /&gt;
* Can the train reach its current destination by &#039;&#039;&#039;only driving forward&#039;&#039;&#039;? Build turning slopes or place a locomotive at both ends of a train!&lt;br /&gt;
* Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.&lt;br /&gt;
* If you use rail signals, check that the signals are all allowing traffic in the correct direction.&lt;br /&gt;
* Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, consider:&lt;br /&gt;
* Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.&lt;br /&gt;
[http://imgur.com/a/Nq2Yk A pictorial summary of typical problems].&lt;br /&gt;
&lt;br /&gt;
A vague issue exists (at least in 0.15.9) where the following steps helped:&lt;br /&gt;
* Remove the unreachable stop from the train schedule&lt;br /&gt;
* Re-create (mine and place) the unreachable train stop&lt;br /&gt;
* Add the train stop back in the schedule.&lt;br /&gt;
&lt;br /&gt;
No bug report was created because the issue was non-reproducible.&lt;br /&gt;
&amp;lt;!-- These tutorials are no longer included because they are outdated. However, this section can be put back into the article when there are newer or in-wiki tutorials&lt;br /&gt;
&lt;br /&gt;
== User tips and tricks ==&lt;br /&gt;
This section contains further links to in-depth knowledge. As a general advisory, tips given in this section detail the more intricate mechanics in the game and can be dangerous to the experience of players who wish to discover better methods on their own. &#039;&#039;&#039;&#039;&#039;Be warned that much of the info below could be outdated/incorrect.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
==== Videos ====&lt;br /&gt;
We recommend viewing some videos of how to build a simple railway, which makes the basic steps very simple.&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=mXr7y02ZG00 Rail Signaling - Easy Rules for Placing Signals]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=54&amp;amp;t=6984 Factorio Tutorial: Signals and Multi-train Networks] by Gepwin (read the whole article!)&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&amp;amp;t=5451 Factorio Traintorial, all about trains] by Gepwin.&lt;br /&gt;
* &#039;&#039;v0.10, English [http://www.youtube.com/watch?v=XSGYSbEPpbM Rail basics tutorial] by MangledPork Gaming.&lt;br /&gt;
** And the second part of the tutorial [http://www.youtube.com/watch?v=k6wxl4FdSuQ Factorio Rail Tutorial Part 2: Signals]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[http://www.reddit.com/r/factorio/comments/26igal/train_signal_tutorial/ A train-signal tutorial with pictures].&lt;br /&gt;
* v0.8, English [http://www.youtube.com/watch?v=RmyOdxi5hR4 Inzainia Plays: Factorio ver 0.8.0 EP:8 (Trains, Trains, Trains!!!)]&lt;br /&gt;
* v0.6, German [http://www.youtube.com/watch?v=idOaZpX8lnA Silver&#039;s Factorio Basic Train Tutorial]&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
{{Achievement|trans-factorio-express}}&lt;br /&gt;
&lt;br /&gt;
== Connection to [http://www.openttd.org/ OpenTTD] ==&lt;br /&gt;
Factorio&#039;s railway system works basically exactly like [http://wiki.openttd.org/Signals#Block_signals≈ the block signals in Open Traffic Tycoon Deluxe]. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Vehicles]]&lt;br /&gt;
* [[Locomotive]]&lt;br /&gt;
* [[Cargo wagon]]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=151830</id>
		<title>Railway/Train path finding</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway/Train_path_finding&amp;diff=151830"/>
		<updated>2017-11-09T22:51:58Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{sublinks}}&lt;br /&gt;
Before a train moves to a target (In this case, a [[Train stop]]), it calculates the best route based on the railway network at that time.&lt;br /&gt;
&lt;br /&gt;
For calculation it uses a simple A*-algorithm, with the following special weighting-rules (see [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 the posted path-finding code]):&lt;br /&gt;
* When the rail block is occupied by a train -&amp;gt; Add a penalty of 2 * length of the block divided by block distance from the start, so the far away occupied paths don&#039;t matter much.&lt;br /&gt;
* When the rail block is guarded by a rail signal set to red by the circuit network -&amp;gt; Add a penalty of 1000.&lt;br /&gt;
* When there is a train waiting in the station -&amp;gt; Add a penalty of 6 tiles per every remaining second in the station. (This also helps the train to choose the best station to queue up for even when all of them are occupied, it picks the one with least time remaining).&lt;br /&gt;
* When the path includes a train stop that is not the destination -&amp;gt; Add a penalty of 2000.&lt;br /&gt;
&lt;br /&gt;
The route is recalculated if the train needs to stop. There is an invisible front point internally called the train_stop_point which is used to determine if the train needs to stop. See [[Debug mode]] and turn show_train_stop_point on to see that point.  The route also recalculated after a train has stopped on a signal. This is to make pathing as dynamic as possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{History|0.15.0|&lt;br /&gt;
* Train station adds 2000 tiles penalty when path finding, so trains try to avoid stations not related to their path.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.17|&lt;br /&gt;
* Increased the pathing penalty for non-moving train in manual mode from 200 to 1000.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.13|&lt;br /&gt;
* Stopped, manually controlled train adds additional penalty (related to train path finding) of 200 tiles to the block it occupies.}}&lt;br /&gt;
&lt;br /&gt;
{{History|0.11.11|&lt;br /&gt;
* The pathfinding is based on penalties for blocked segments now. For trains waiting in station, the more remaining time in the station, the bigger penalty.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gist.github.com/Rseding91/c0d4d08d6feaed618ed4a03f6c6a8fe6 Train pathfinding as of version 0.15 (Code)]&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-68 FFF #68]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=4834 bug ticket]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=30&amp;amp;t=2237#p62195 Bug ticket explained]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway&amp;diff=151203</id>
		<title>Railway</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway&amp;diff=151203"/>
		<updated>2017-10-12T00:16:56Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
:&#039;&#039;For the research see [[Railway (research)]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than [[Belt transport system|belts]] and [[Logistic network|robot logistics]], especially over large distances.&lt;br /&gt;
&lt;br /&gt;
Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the [[Rail planner]], but can also be done manually. Bear in mind that rails can rails are placed on a two-tile grid, so you cannot move a rail by only one tile.&lt;br /&gt;
&lt;br /&gt;
=== Minimum manually operated railway ===&lt;br /&gt;
As a minimum a manually operated railway has to consist of:&lt;br /&gt;
* [[Rail]]s (tracks)&lt;br /&gt;
* [[Locomotive]]s&lt;br /&gt;
&lt;br /&gt;
Locomotives can be entered and then manually operated by standing next to them and pressing the {{Key|RETURN}} button.&lt;br /&gt;
&lt;br /&gt;
=== Switches ===&lt;br /&gt;
* There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a [[rail]] overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.&lt;br /&gt;
* The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect [[Rail signal| signal blocks]] which helps prevent collisions.&lt;br /&gt;
* Parallel tracks do not interact with each other and generally have no problems. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)&lt;br /&gt;
&lt;br /&gt;
[[File:fff-140-controlled-gates.gif|thumb|An example of a safe railway crossing.]]&lt;br /&gt;
=== Crossing tracks ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A checklist of proper track crossing etiquette:&lt;br /&gt;
&lt;br /&gt;
# Zoom out, so that you can see a train coming.&lt;br /&gt;
# Look left, then right.&lt;br /&gt;
# Check for signals nearby: If a [[rail signal]] suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.&lt;br /&gt;
# Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.&lt;br /&gt;
# While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.&lt;br /&gt;
# Heavy [[Energy shield|shields]] can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit&#039;s energy.&lt;br /&gt;
# All entities with health will take damage getting hit by a train, so take care not to leave a [[Car]] or [[Tank]] on the tracks. However, this includes hostile forces!&lt;br /&gt;
# Trains far from a [[train stop]] will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a [[train stop]] or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.&lt;br /&gt;
&lt;br /&gt;
A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the [[circuit network]], and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can&#039;t get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Trains ==&lt;br /&gt;
Train components:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{imagelink|locomotive|Locomotive}} || {{Imagelink|Cargo wagon|Cargo wagon}} || {{imagelink|Fluid_wagon|Fluid wagon}} |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Railway-assemble-train.png|thumb|left|300px|Placing a [[Cargo wagon]] so it is attached to the train.]]&lt;br /&gt;
&lt;br /&gt;
* A train consists of at least one locomotive.&lt;br /&gt;
* Trains can have more than one locomotive, and any number of [[Wagon]]s.&lt;br /&gt;
* Locomotives can be &#039;&#039;&#039;manually&#039;&#039;&#039; driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.&lt;br /&gt;
* Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.&lt;br /&gt;
* A train needs [[fuel]] to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.&lt;br /&gt;
* A common way to refuel trains is using a [[requester chest]] that requests [[fuel]], and then having a [[burner inserter]] loading the fuel into the locomotive.&lt;br /&gt;
&lt;br /&gt;
The locomotives&#039; inventory is only used for [[Fuel]]. To transport items [[Cargo wagon]]s have to be attached to the train. To attach a Cargo wagon, the player may either prepare to place one near an existing train, where a green graphic will show the player that the cargo wagon will be attached, showing a connection between the train and the new wagon. Alternatively, the player may manually connect cargo wagons to trains with the stock connect key, if the cargo wagon was placed far away from a train. The cargo wagons can be filled manually or by adjacent [[Inserters]].&lt;br /&gt;
&lt;br /&gt;
* [[Railway/Train path finding]] - How trains find their path.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Stations ==&lt;br /&gt;
[[File:station-example-1.png|thumb|right|256px|A very minimal train station.]]&lt;br /&gt;
[[File:station-example-2.png|thumb|400px|High-performance train station for short trains. Highest possible unload rate, waiting spots, refueling, defended, multi-train capable, modular, extend-able.]]&lt;br /&gt;
Station Components:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{imagelink|train-stop|Train stop}} || {{Imagelink|Straight rail|Rail|Rails}} || {{Imagelink|Inserter|Inserters}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;train station&#039;&#039;&#039; is a combination of at least one [[train stop]] plus a [[storage]] and/or distribution system, used to fill or empty [[Cargo wagon]]s, load [[fuel]] into the [[Locomotive|locomotive(s)]], or repair trains.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t mix up &#039;&#039;train stations&#039;&#039; with &#039;&#039;train stops&#039;&#039;.&#039;&#039;&#039; A train station is a concept, whereas a [[train stop]] is an item.&lt;br /&gt;
&lt;br /&gt;
[[Inserter]]s placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to get items off and onto cargo wagons.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
The two types of signals in Factorio:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| {{imagelink|rail-signal|Rail signal}} || {{Imagelink|Rail chain signal|Rail chain signal}} |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Understanding rail signals can be difficult. Several terms critical to understanding them are below:&lt;br /&gt;
*Rail segment&lt;br /&gt;
: A piece of track (one item).&lt;br /&gt;
*Segment&lt;br /&gt;
: A single path of continuous track without intersections or switches. This becomes important when signals are employed. The player may mouse over a segment to see its number. It&#039;s number is unique within the world, however does not start from 0 or 1.&lt;br /&gt;
*Block&lt;br /&gt;
: A set of segments defined by rail signals. By default every connected segment belongs to one block, no matter whether a train can drive on it or not, and even if it can be driven only in one direction (e.g. at a switch, both segments of the switch belong to the same block). The player can see the current block numbers of a rail piece in the info section on mouse-over.&lt;br /&gt;
&lt;br /&gt;
Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player&#039;s movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See [https://forums.factorio.com/viewtopic.php?f=18&amp;amp;t=3811#p28310 this forum post]&#039;&#039;&#039; for a good explanation about blocks.&lt;br /&gt;
&lt;br /&gt;
=== Basic Signaling Rules ===&lt;br /&gt;
* There is at most one Train in a block at any time. A train spanning multiple blocks occupies them all.&lt;br /&gt;
* A red signal means that the following block is occupied by a train.&lt;br /&gt;
* A yellow signal means that a train is approaching and already has the approval to enter the following block.&lt;br /&gt;
* [[Rail signal]]s separate a new block and reflect its state: green - free, yellow - reserved, red - occupied, blue - one of the paths is blocked&lt;br /&gt;
* [[Rail chain signal]]s separate a new block and reflect the state of the next [[Rail signal]]&lt;br /&gt;
* A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Deadlocks ==&lt;br /&gt;
A deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train.&lt;br /&gt;
&lt;br /&gt;
=== Deadlock occurrence ===&lt;br /&gt;
Deadlocks occur when two+ trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:&lt;br /&gt;
&lt;br /&gt;
# Temporary - These are caused by a Temporary hiccup in a train&#039;s path, such as a loading train being in the way, or created by closing a signal with the [[circuit network]]. These often resolve themselves.&lt;br /&gt;
# Semi-Permanent - These are the result of a problem with pathing, often created by a fuel-less train or broken rail, and may require player interaction in order to free.&lt;br /&gt;
# Permanent - This type is the worst, and cannot be resolved automatically, often requiring the player to manually drive several trains to get them out of the intersection. These often are caused by incorrect signal placement or unreachable stations.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of Signaling, however.&lt;br /&gt;
&lt;br /&gt;
=== Factors that influence the deadlock chance ===&lt;br /&gt;
* Train length (shorter trains will have a lower chance with the same rail/signal layout, due to having less effect on the rails they&#039;re on.)&lt;br /&gt;
* Size of the blocks: More space for the blocks means lower chance of deadlock.&lt;br /&gt;
* Track layout: Some layouts have a higher chance of locking, than others.&lt;br /&gt;
* Quantity of trains - More trains trying to use an intersection will result in higher chance of deadlock.&lt;br /&gt;
* The chance is also much higher if trains need to wait often in areas with rail-crossings.&lt;br /&gt;
&lt;br /&gt;
Knowing the factors, how can deadlocks be reduced?&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t use 4-way junctions or roundabouts (circles) to create junctions.&lt;br /&gt;
* Use better 3-way junctions. See [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=9044 A Detailed Look at a Bidirectional Three-way Train Intersection]&lt;br /&gt;
* Use roundabouts only for changing direction of train, and never for high traffic intersections.&lt;br /&gt;
* Build more tracks around junctions. Don&#039;t have one junction be the only way to reach a place, add redundancy. This keeps a small problem a small problem.&lt;br /&gt;
&lt;br /&gt;
== Automated transport ==&lt;br /&gt;
[[File:train-schedule-gui.png|thumb|300px|The new train GUI since 0.13 (schedule tab): 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition]]&lt;br /&gt;
&lt;br /&gt;
Trains set on &amp;quot;Automatic&amp;quot; choose their destination stop and route on departure, and after waiting at a chain signal for five seconds if their destination is a multi-stop, and when their destination stop disables itself by circuit condition. They choose the shortest route that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the station and go on to the next.&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s world doesn&#039;t include a central scheduling office communicating with train engineers.  There is no built-in coordination among multiple trains beyond &amp;quot;try to avoid places that were red-signaled or otherwise occupied when you left&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.&lt;br /&gt;
&lt;br /&gt;
First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the  expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).&lt;br /&gt;
&lt;br /&gt;
When you set up the train schedule (see below) and fuel the train, you can start the train on it&#039;s schedule by switching from manual to automatic driving mode.&lt;br /&gt;
&lt;br /&gt;
=== Train schedule ===&lt;br /&gt;
The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it&#039;s at the end it will continue with the first. Currently, it&#039;s not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.&lt;br /&gt;
&lt;br /&gt;
Wait conditions are used to tell the train when to leave the station. There are 6 types of wait conditions:&lt;br /&gt;
* &#039;&#039;&#039;Time passed&#039;&#039;&#039; - the only one available until version 0.12.&lt;br /&gt;
* &#039;&#039;&#039;Inventory full&#039;&#039;&#039; - All inventories of the train are full.&lt;br /&gt;
* &#039;&#039;&#039;Inventory empty&#039;&#039;&#039; - Same as above, but empty.&lt;br /&gt;
* &#039;&#039;&#039;Item count&#039;&#039;&#039; - The train (all cargoes summed) contains a specific amount of a certain item.&lt;br /&gt;
* &#039;&#039;&#039;Circuit condition&#039;&#039;&#039; - The train stop is connectable to the [[Circuit network]], so the signals can used for wait conditions.&lt;br /&gt;
* &#039;&#039;&#039;Inactivity&#039;&#039;&#039; - No items were added or removed for the specified amount of seconds.&lt;br /&gt;
&lt;br /&gt;
Hereafter the word &amp;quot;term&amp;quot; is used to describe &#039;&#039;one&#039;&#039; type of wait condition, and the words &amp;quot;wait condition&amp;quot; are used to describe the whole set of terms (it turns a bit into maths).&lt;br /&gt;
&lt;br /&gt;
If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.&lt;br /&gt;
&lt;br /&gt;
When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Expand for examples&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Wait until full, up to 30 seconds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until cargo full, &#039;&#039;or&#039;&#039; circuit condition Oil &amp;gt; 3000:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR Circuit condition - Oil &amp;gt; 3000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until empty, &#039;&#039;and&#039;&#039; 30 seconds passed, &#039;&#039;and&#039;&#039; 5 seconds of inactivity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Empty cargo inventory&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
AND 5 seconds of inactivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until iron ore is low, &#039;&#039;or&#039;&#039; copper ore is low &#039;&#039;and&#039;&#039; at least 30 seconds passed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cargo: Iron ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
OR Cargo: Copper ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s wait condition logic is read as disjunctive normal form ([https://en.wikipedia.org/wiki/Disjunctive_normal_form DNF]), and so this last example is processed as (note the parenthesis):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 AND 30 seconds passed) OR (Cargo: Copper ore &amp;lt; 500 AND 30 seconds passed))&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which is the same as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 OR Cargo: Copper ore &amp;lt; 500) AND 30 seconds passed)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there is &#039;&#039;&#039;no&#039;&#039;&#039; way to write that shorter form in the current UI.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
Below are some things to verify if a rail system or train is not working.&lt;br /&gt;
&lt;br /&gt;
* Is the train fueled? Ensure that the locomotive has [[fuel]] of some kind.&lt;br /&gt;
* Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.&lt;br /&gt;
* Another train on the same [[Railway#Segment|segment]] or [[Railway#Block|block]]? Make sure the path of the train is unobstructed.&lt;br /&gt;
* Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.&lt;br /&gt;
* Is the train allowed to enter signals from the right direction? Are the signals set correctly?&lt;br /&gt;
* If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.&lt;br /&gt;
&lt;br /&gt;
==== No path ====&lt;br /&gt;
When trains cannot reach the target, a &amp;quot;no path&amp;quot; symbol pops up over the locomotive. Check:&lt;br /&gt;
* Can the train reach it&#039;s current destination by &#039;&#039;&#039;only driving forward&#039;&#039;&#039;? Build turning slopes or place a locomotive at both ends of a train!&lt;br /&gt;
* Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.&lt;br /&gt;
* If you use rail signals, check that the signals are all allowing traffic in the correct direction.&#039;&#039; &lt;br /&gt;
* Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, consider:&lt;br /&gt;
* Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.&lt;br /&gt;
[http://imgur.com/a/Nq2Yk A pictorial summary of typical problems].&lt;br /&gt;
&lt;br /&gt;
A vague issue exists (at least in 0.15.9) where the following steps helped:&lt;br /&gt;
* Remove the unreachable stop from the train schedule&lt;br /&gt;
* Re-create (mine and place) the unreachable train stop&lt;br /&gt;
* Add the train stop back in the schedule.&lt;br /&gt;
&lt;br /&gt;
No bug report was created because the issue was non-reproducible.&lt;br /&gt;
&amp;lt;!-- These tutorials are no longer included because they are outdated. However, this section can be put back into the article when there are newer or in-wiki tutorials&lt;br /&gt;
&lt;br /&gt;
== User tips and tricks ==&lt;br /&gt;
This section contains further links to in-depth knowledge. As a general advisory, tips given in this section detail the more intricate mechanics in the game and can be dangerous to the experience of players who wish to discover better methods on their own. &#039;&#039;&#039;&#039;&#039;Be warned that much of the info below could be outdated/incorrect.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
==== Videos ====&lt;br /&gt;
We recommend viewing some videos of how to build a simple railway, which makes the basic steps very simple.&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=mXr7y02ZG00 Rail Signaling - Easy Rules for Placing Signals]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=54&amp;amp;t=6984 Factorio Tutorial: Signals and Multi-train Networks] by Gepwin (read the whole article!)&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&amp;amp;t=5451 Factorio Traintorial, all about trains] by Gepwin.&lt;br /&gt;
* &#039;&#039;v0.10, English [http://www.youtube.com/watch?v=XSGYSbEPpbM Rail basics tutorial] by MangledPork Gaming.&lt;br /&gt;
** And the second part of the tutorial [http://www.youtube.com/watch?v=k6wxl4FdSuQ Factorio Rail Tutorial Part 2: Signals]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[http://www.reddit.com/r/factorio/comments/26igal/train_signal_tutorial/ A train-signal tutorial with pictures].&lt;br /&gt;
* v0.8, English [http://www.youtube.com/watch?v=RmyOdxi5hR4 Inzainia Plays: Factorio ver 0.8.0 EP:8 (Trains, Trains, Trains!!!)]&lt;br /&gt;
* v0.6, German [http://www.youtube.com/watch?v=idOaZpX8lnA Silver&#039;s Factorio Basic Train Tutorial]&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
{{Achievement|trans-factorio-express}}&lt;br /&gt;
&lt;br /&gt;
== Connection to [http://www.openttd.org/ OpenTTD] ==&lt;br /&gt;
Factorio&#039;s railway system works basically exactly like [http://wiki.openttd.org/Signals#Block_signals≈ the block signals in Open Traffic Tycoon Deluxe]. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Vehicles]]&lt;br /&gt;
* [[Locomotive]]&lt;br /&gt;
* [[Cargo wagon]]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Railway&amp;diff=151202</id>
		<title>Railway</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Railway&amp;diff=151202"/>
		<updated>2017-10-11T21:11:30Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: /* Automated transport */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
:&#039;&#039;For the research see [[Railway (research)]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than [[Belt transport system|belts]] and [[Logistic network|robot logistics]], especially over large distances.&lt;br /&gt;
&lt;br /&gt;
Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the [[Rail planner]], but can also be done manually. Bear in mind that rails can rails are placed on a two-tile grid, so you cannot move a rail by only one tile.&lt;br /&gt;
&lt;br /&gt;
=== Minimum manually operated railway ===&lt;br /&gt;
As a minimum a manually operated railway has to consist of:&lt;br /&gt;
* [[Rail]]s (tracks)&lt;br /&gt;
* [[Locomotive]]s&lt;br /&gt;
&lt;br /&gt;
Locomotives can be entered and then manually operated by standing next to them and pressing the {{Key|RETURN}} button.&lt;br /&gt;
&lt;br /&gt;
=== Switches ===&lt;br /&gt;
* There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a [[rail]] overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.&lt;br /&gt;
* The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect [[Rail signal| signal blocks]] which helps prevent collisions.&lt;br /&gt;
* Parallel tracks do not interact with each other and generally have no problems. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)&lt;br /&gt;
&lt;br /&gt;
[[File:fff-140-controlled-gates.gif|thumb|An example of a safe railway crossing.]]&lt;br /&gt;
=== Crossing tracks ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A checklist of proper track crossing etiquette:&lt;br /&gt;
&lt;br /&gt;
# Zoom out, so that you can see a train coming.&lt;br /&gt;
# Look left, then right.&lt;br /&gt;
# Check for signals nearby: If a [[rail signal]] suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.&lt;br /&gt;
# Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.&lt;br /&gt;
# While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.&lt;br /&gt;
# Heavy [[Energy shield|shields]] can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit&#039;s energy.&lt;br /&gt;
# All entities with health will take damage getting hit by a train, so take care not to leave a [[Car]] or [[Tank]] on the tracks. However, this includes hostile forces!&lt;br /&gt;
# Trains far from a [[train stop]] will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a [[train stop]] or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.&lt;br /&gt;
&lt;br /&gt;
A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the [[circuit network]], and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can&#039;t get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Trains ==&lt;br /&gt;
Train components:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{imagelink|locomotive|Locomotive}} || {{Imagelink|Cargo wagon|Cargo wagon}} || {{imagelink|Fluid_wagon|Fluid wagon}} |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Railway-assemble-train.png|thumb|left|300px|Placing a [[Cargo wagon]] so it is attached to the train.]]&lt;br /&gt;
&lt;br /&gt;
* A train consists of at least one locomotive.&lt;br /&gt;
* Trains can have more than one locomotive, and any number of [[Wagon]]s.&lt;br /&gt;
* Locomotives can be &#039;&#039;&#039;manually&#039;&#039;&#039; driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.&lt;br /&gt;
* Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.&lt;br /&gt;
* A train needs [[fuel]] to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.&lt;br /&gt;
* A common way to refuel trains is using a [[requester chest]] that requests [[fuel]], and then having a [[burner inserter]] loading the fuel into the locomotive.&lt;br /&gt;
&lt;br /&gt;
The locomotives&#039; inventory is only used for [[Fuel]]. To transport items [[Cargo wagon]]s have to be attached to the train. To attach a Cargo wagon, the player may either prepare to place one near an existing train, where a green graphic will show the player that the cargo wagon will be attached, showing a connection between the train and the new wagon. Alternatively, the player may manually connect cargo wagons to trains with the stock connect key, if the cargo wagon was placed far away from a train. The cargo wagons can be filled manually or by adjacent [[Inserters]].&lt;br /&gt;
&lt;br /&gt;
* [[Railway/Train path finding]] - How trains find their path.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Stations ==&lt;br /&gt;
[[File:station-example-1.png|thumb|right|256px|A very minimal train station.]]&lt;br /&gt;
[[File:station-example-2.png|thumb|400px|High-performance train station for short trains. Highest possible unload rate, waiting spots, refueling, defended, multi-train capable, modular, extend-able.]]&lt;br /&gt;
Station Components:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{{imagelink|train-stop|Train stop}} || {{Imagelink|Straight rail|Rail|Rails}} || {{Imagelink|Inserter|Inserters}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;train station&#039;&#039;&#039; is a combination of at least one [[train stop]] plus a [[storage]] and/or distribution system, used to fill or empty [[Cargo wagon]]s, load [[fuel]] into the [[Locomotive|locomotive(s)]], or repair trains.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t mix up &#039;&#039;train stations&#039;&#039; with &#039;&#039;train stops&#039;&#039;.&#039;&#039;&#039; A train station is a concept, whereas a [[train stop]] is an item.&lt;br /&gt;
&lt;br /&gt;
[[Inserter]]s placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to get items off and onto cargo wagons.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
The two types of signals in Factorio:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| {{imagelink|rail-signal|Rail signal}} || {{Imagelink|Rail chain signal|Rail chain signal}} |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Understanding rail signals can be difficult. Several terms critical to understanding them are below:&lt;br /&gt;
*Rail segment&lt;br /&gt;
: A piece of track (one item).&lt;br /&gt;
*Segment&lt;br /&gt;
: A single path of continuous track without intersections or switches. This becomes important when signals are employed. The player may mouse over a segment to see its number. It&#039;s number is unique within the world, however does not start from 0 or 1.&lt;br /&gt;
*Block&lt;br /&gt;
: A set of segments defined by rail signals. By default every connected segment belongs to one block, no matter whether a train can drive on it or not, and even if it can be driven only in one direction (e.g. at a switch, both segments of the switch belong to the same block). The player can see the current block numbers of a rail piece in the info section on mouse-over.&lt;br /&gt;
&lt;br /&gt;
Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player&#039;s movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See [https://forums.factorio.com/viewtopic.php?f=18&amp;amp;t=3811#p28310 this forum post]&#039;&#039;&#039; for a good explanation about blocks.&lt;br /&gt;
&lt;br /&gt;
=== Basic Signaling Rules ===&lt;br /&gt;
* There is at most one Train in a block at any time. A train spanning multiple blocks occupies them all.&lt;br /&gt;
* A red signal means that the following block is occupied by a train.&lt;br /&gt;
* A yellow signal means that a train is approaching and already has the approval to enter the following block.&lt;br /&gt;
* [[Rail signal]]s separate a new block and reflect its state: green - free, yellow - reserved, red - occupied, blue - one of the paths is blocked&lt;br /&gt;
* [[Rail chain signal]]s separate a new block and reflect the state of the next [[Rail signal]]&lt;br /&gt;
* A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Deadlocks ==&lt;br /&gt;
A deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train.&lt;br /&gt;
&lt;br /&gt;
=== Deadlock occurrence ===&lt;br /&gt;
Deadlocks occur when two+ trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:&lt;br /&gt;
&lt;br /&gt;
# Temporary - These are caused by a Temporary hiccup in a train&#039;s path, such as a loading train being in the way, or created by closing a signal with the [[circuit network]]. These often resolve themselves.&lt;br /&gt;
# Semi-Permanent - These are the result of a problem with pathing, often created by a fuel-less train or broken rail, and may require player interaction in order to free.&lt;br /&gt;
# Permanent - This type is the worst, and cannot be resolved automatically, often requiring the player to manually drive several trains to get them out of the intersection. These often are caused by incorrect signal placement or unreachable stations.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of Signaling, however.&lt;br /&gt;
&lt;br /&gt;
=== Factors that influence the deadlock chance ===&lt;br /&gt;
* Train length (shorter trains will have a lower chance with the same rail/signal layout, due to having less effect on the rails they&#039;re on.)&lt;br /&gt;
* Size of the blocks: More space for the blocks means lower chance of deadlock.&lt;br /&gt;
* Track layout: Some layouts have a higher chance of locking, than others.&lt;br /&gt;
* Quantity of trains - More trains trying to use an intersection will result in higher chance of deadlock.&lt;br /&gt;
* The chance is also much higher if trains need to wait often in areas with rail-crossings.&lt;br /&gt;
&lt;br /&gt;
Knowing the factors, how can deadlocks be reduced?&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t use 4-way junctions or roundabouts (circles) to create junctions.&lt;br /&gt;
* Use better 3-way junctions. See [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=9044 A Detailed Look at a Bidirectional Three-way Train Intersection]&lt;br /&gt;
* Use roundabouts only for changing direction of train, and never for high traffic intersections.&lt;br /&gt;
* Build more tracks around junctions. Don&#039;t have one junction be the only way to reach a place, add redundancy. This keeps a small problem a small problem.&lt;br /&gt;
&lt;br /&gt;
== Automated transport ==&lt;br /&gt;
[[File:train-schedule-gui.png|thumb|300px|The new train GUI since 0.13 (schedule tab): 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition]]&lt;br /&gt;
&lt;br /&gt;
Trains set on &amp;quot;Automatic&amp;quot; choose their destination stop and route on departure, and after waiting at a chain signal for five seconds if their destination is a multi-stop. They choose the shortest route that will get them to a train stop with the right name, taking penalties for any apparent-at-the-time delays into account.&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s world doesn&#039;t include a central scheduling office communicating with train engineers.  There is no built-in coordination among multiple trains beyond &amp;quot;try to avoid places that were red-signaled or otherwise occupied when you left&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.&lt;br /&gt;
&lt;br /&gt;
First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the  expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).&lt;br /&gt;
&lt;br /&gt;
When you set up the train schedule (see below) and fuel the train, you can start the train on it&#039;s schedule by switching from manual to automatic driving mode.&lt;br /&gt;
&lt;br /&gt;
=== Train schedule ===&lt;br /&gt;
The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it&#039;s at the end it will continue with the first. Currently, it&#039;s not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.&lt;br /&gt;
&lt;br /&gt;
Wait conditions are used to tell the train when to leave the station. There are 6 types of wait conditions:&lt;br /&gt;
* &#039;&#039;&#039;Time passed&#039;&#039;&#039; - the only one available until version 0.12.&lt;br /&gt;
* &#039;&#039;&#039;Inventory full&#039;&#039;&#039; - All inventories of the train are full.&lt;br /&gt;
* &#039;&#039;&#039;Inventory empty&#039;&#039;&#039; - Same as above, but empty.&lt;br /&gt;
* &#039;&#039;&#039;Item count&#039;&#039;&#039; - The train (all cargoes summed) contains a specific amount of a certain item.&lt;br /&gt;
* &#039;&#039;&#039;Circuit condition&#039;&#039;&#039; - The train stop is connectable to the [[Circuit network]], so the signals can used for wait conditions.&lt;br /&gt;
* &#039;&#039;&#039;Inactivity&#039;&#039;&#039; - No items were added or removed for the specified amount of seconds.&lt;br /&gt;
&lt;br /&gt;
Hereafter the word &amp;quot;term&amp;quot; is used to describe &#039;&#039;one&#039;&#039; type of wait condition, and the words &amp;quot;wait condition&amp;quot; are used to describe the whole set of terms (it turns a bit into maths).&lt;br /&gt;
&lt;br /&gt;
If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.&lt;br /&gt;
&lt;br /&gt;
When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Expand for examples&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Wait until full, up to 30 seconds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until cargo full, &#039;&#039;or&#039;&#039; circuit condition Oil &amp;gt; 3000:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Full cargo inventory&lt;br /&gt;
OR Circuit condition - Oil &amp;gt; 3000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until empty, &#039;&#039;and&#039;&#039; 30 seconds passed, &#039;&#039;and&#039;&#039; 5 seconds of inactivity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Empty cargo inventory&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
AND 5 seconds of inactivity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wait until iron ore is low, &#039;&#039;or&#039;&#039; copper ore is low &#039;&#039;and&#039;&#039; at least 30 seconds passed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cargo: Iron ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
OR Cargo: Copper ore &amp;lt; 500&lt;br /&gt;
AND 30 seconds passed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s wait condition logic is read as disjunctive normal form ([https://en.wikipedia.org/wiki/Disjunctive_normal_form DNF]), and so this last example is processed as (note the parenthesis):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 AND 30 seconds passed) OR (Cargo: Copper ore &amp;lt; 500 AND 30 seconds passed))&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which is the same as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;((Cargo: Iron ore &amp;lt; 500 OR Cargo: Copper ore &amp;lt; 500) AND 30 seconds passed)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there is &#039;&#039;&#039;no&#039;&#039;&#039; way to write that shorter form in the current UI.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
Below are some things to verify if a rail system or train is not working.&lt;br /&gt;
&lt;br /&gt;
* Is the train fueled? Ensure that the locomotive has [[fuel]] of some kind.&lt;br /&gt;
* Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.&lt;br /&gt;
* Another train on the same [[Railway#Segment|segment]] or [[Railway#Block|block]]? Make sure the path of the train is unobstructed.&lt;br /&gt;
* Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.&lt;br /&gt;
* Is the train allowed to enter signals from the right direction? Are the signals set correctly?&lt;br /&gt;
* If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.&lt;br /&gt;
&lt;br /&gt;
==== No path ====&lt;br /&gt;
When trains cannot reach the target, a &amp;quot;no path&amp;quot; symbol pops up over the locomotive. Check:&lt;br /&gt;
* Can the train reach it&#039;s current destination by &#039;&#039;&#039;only driving forward&#039;&#039;&#039;? Build turning slopes or place a locomotive at both ends of a train!&lt;br /&gt;
* Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.&lt;br /&gt;
* If you use rail signals, check that the signals are all allowing traffic in the correct direction.&#039;&#039; &lt;br /&gt;
* Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.&lt;br /&gt;
&lt;br /&gt;
If you are still having problems, consider:&lt;br /&gt;
* Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.&lt;br /&gt;
[http://imgur.com/a/Nq2Yk A pictorial summary of typical problems].&lt;br /&gt;
&lt;br /&gt;
A vague issue exists (at least in 0.15.9) where the following steps helped:&lt;br /&gt;
* Remove the unreachable stop from the train schedule&lt;br /&gt;
* Re-create (mine and place) the unreachable train stop&lt;br /&gt;
* Add the train stop back in the schedule.&lt;br /&gt;
&lt;br /&gt;
No bug report was created because the issue was non-reproducible.&lt;br /&gt;
&amp;lt;!-- These tutorials are no longer included because they are outdated. However, this section can be put back into the article when there are newer or in-wiki tutorials&lt;br /&gt;
&lt;br /&gt;
== User tips and tricks ==&lt;br /&gt;
This section contains further links to in-depth knowledge. As a general advisory, tips given in this section detail the more intricate mechanics in the game and can be dangerous to the experience of players who wish to discover better methods on their own. &#039;&#039;&#039;&#039;&#039;Be warned that much of the info below could be outdated/incorrect.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
==== Videos ====&lt;br /&gt;
We recommend viewing some videos of how to build a simple railway, which makes the basic steps very simple.&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=mXr7y02ZG00 Rail Signaling - Easy Rules for Placing Signals]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=54&amp;amp;t=6984 Factorio Tutorial: Signals and Multi-train Networks] by Gepwin (read the whole article!)&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&amp;amp;t=5451 Factorio Traintorial, all about trains] by Gepwin.&lt;br /&gt;
* &#039;&#039;v0.10, English [http://www.youtube.com/watch?v=XSGYSbEPpbM Rail basics tutorial] by MangledPork Gaming.&lt;br /&gt;
** And the second part of the tutorial [http://www.youtube.com/watch?v=k6wxl4FdSuQ Factorio Rail Tutorial Part 2: Signals]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[http://www.reddit.com/r/factorio/comments/26igal/train_signal_tutorial/ A train-signal tutorial with pictures].&lt;br /&gt;
* v0.8, English [http://www.youtube.com/watch?v=RmyOdxi5hR4 Inzainia Plays: Factorio ver 0.8.0 EP:8 (Trains, Trains, Trains!!!)]&lt;br /&gt;
* v0.6, German [http://www.youtube.com/watch?v=idOaZpX8lnA Silver&#039;s Factorio Basic Train Tutorial]&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
{{Achievement|trans-factorio-express}}&lt;br /&gt;
&lt;br /&gt;
== Connection to [http://www.openttd.org/ OpenTTD] ==&lt;br /&gt;
Factorio&#039;s railway system works basically exactly like [http://wiki.openttd.org/Signals#Block_signals≈ the block signals in Open Traffic Tycoon Deluxe]. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Vehicles]]&lt;br /&gt;
* [[Locomotive]]&lt;br /&gt;
* [[Cargo wagon]]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=136349</id>
		<title>Multiplayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=136349"/>
		<updated>2017-05-01T02:32:03Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: /* Setting Up a Multiplayer Game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
Factorio supports multiplayer games in additional to the single-player campaign and scenarios. By default, multiplayer games run the CO-OP [[Game modes and options|freeplay scenario]] where all players work together to launch a rocket with a satellite into space. Other scenarios, including PvP maps, are available for download from the [https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 Maps and Scenarios forum].&lt;br /&gt;
&lt;br /&gt;
As of version 0.13, players no longer necessarily have to port-forward to play with others. Players may join each other through Steam, or by just the port-forwarded host.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Because of the potentially immense amount of activity on a map, the game engine utilizes a [https://www.factorio.com/blog/post/fff-76 lock step architecture]. All instances of the game run full simulations of the entire world and only player actions are transferred across the network.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games were introduced to Factorio with version 0.11.0. The only connection method available was peer-to-peer mode which meant every player had to be able to directly communicate with every other player. In version 0.12.4, a client-server mode of communication was introduced in which the server (either a dedicated one or the player who hosted the game) relays messages to all peers. This means that direct connection between all players is no longer necessary. As of version 0.13, P2P connecting is completely removed.&lt;br /&gt;
&lt;br /&gt;
As of version 0.12.0, the game features &amp;quot;latency hiding&amp;quot; mechanics where the game simulates some of the player&#039;s actions locally to make some common interactions (such as moving the player&#039;s character) more fluid. Latency hiding is enabled by default, but it can be enabled or disabled in Options → Other → Enable multiplayer latency hiding. Not every action is a part of latency hiding – most notably, car or train driving and shooting are not a part of it. It is recommended to keep this on, as many actions will be very stuttery on a low end internet connection. &lt;br /&gt;
&lt;br /&gt;
== Setting Up a Multiplayer Game ==&lt;br /&gt;
&lt;br /&gt;
Multiplayer games can be joined, hosted while playing, or hosted by a dedicated server.  Multiplayer games can be advertised to other players on the same LAN or worldwide.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;Multiplayer&#039;&#039; button in the &#039;&#039;Play&#039;&#039; menu to start playing a multiplayer game, choose &#039;&#039;New&#039;&#039; or &#039;&#039;Load&#039;&#039; or &#039;&#039;Custom&#039;&#039; to host and play, or &#039;&#039;Browse&#039;&#039; or &#039;&#039;Play on LAN&#039;&#039; to connect to an already-running game. The host can also choose not to advertise the game at all, in which case you&#039;ll need the server&#039;s (public or otherwise reachable) IP address; you can then &#039;&#039;Connect&#039;&#039; directly to that to join the game.&lt;br /&gt;
&lt;br /&gt;
To start a dedicated server, that&#039;s available whether anyone&#039;s playing or not, [[#Dedicated.2FHeadless_server|see below]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notes and tips:&lt;br /&gt;
&lt;br /&gt;
* All game instances need the installation of &#039;&#039;exactly the same&#039;&#039; game-versions and mods.&lt;br /&gt;
* Factorio servers use port &#039;&#039;&#039;34197&#039;&#039;&#039;. The port can be changed in the [[Application Directory|config]] file.&lt;br /&gt;
* Factorio uses &#039;&#039;&#039;UDP only&#039;&#039;&#039;. Make sure you configure your router&#039;s port forwarding correctly. (The game builds its own &amp;quot;reliable delivery&amp;quot; layer built on UDP to deal with packet loss and reordering issues.)&lt;br /&gt;
** Make sure there is no firewall or anti-virus blocking the UDP-packets.&lt;br /&gt;
* See the [[#Connecting to a Server Behind NAT|section below]] for help configuring your networking set up.&lt;br /&gt;
* The hard limit for the number of players is [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]. :) &lt;br /&gt;
&lt;br /&gt;
=== Voice Chat ===&lt;br /&gt;
* It is recommended that players use voice chat (TeamSpeak, Discord, Mumble) because you need to talk a lot to coordinate connections, building, handling attacks, etc. TeamSpeak servers are posted in the [https://forums.factorio.com/viewforum.php?f=53 multiplayer forum].&lt;br /&gt;
&lt;br /&gt;
=== Finding Other Players ===&lt;br /&gt;
&lt;br /&gt;
* Use the [https://forums.factorio.com/viewforum.php?f=53 multiplayer board in the forum].&lt;br /&gt;
* Many players use other software like Evolve to meet other players. This also has the &amp;quot;advantage&amp;quot; of creating a virtual LAN among the players. See down under software.&lt;br /&gt;
* Some also use [https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=9136 Steam] to find other players.&lt;br /&gt;
* There is an external [http://serverlist.lgms.nl/ server browser] with various search options.&lt;br /&gt;
* Tell your friends to buy Factorio, then play with them!&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a Server Behind NAT ===&lt;br /&gt;
&lt;br /&gt;
Factorio requires that the server (in client-server mode) have a publicly accessible IP address or that all players are on the same LAN. If you are behind NAT, you must set up port forwarding ([[Multiplayer#Playing_over_LAN_.2F_Internet|see above]] for port number) or use virtual LAN software such as Hamachi or Evolve.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games will be launched in client-server mode (also [http://www.factorio.com/blog/post/fff-99 multiplayer forwarding] mode). In this mode, all clients send their network traffic to the server and the server forwards the traffic to the other clients. The advantage of this is that it allows games where some players are inside a LAN and others are outside. The disadvantage may be slightly more lag as packets must travel an extra hop (through the server).&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6393 Forwarding ports without logging into your router]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with Evolve]&lt;br /&gt;
* [http://steamcommunity.com/sharedfiles/filedetails/?id=653628496 A guide for connecting with Hamachi]&lt;br /&gt;
&lt;br /&gt;
== Game Types ==&lt;br /&gt;
&lt;br /&gt;
=== Co-op ===&lt;br /&gt;
&lt;br /&gt;
In co-op mode, all players are on the same force which means all players share the same research progression, any player can access items stored in a container built by any other player, and defensive structures built by any player will not target any other player.&lt;br /&gt;
&lt;br /&gt;
To start a co-op game:&lt;br /&gt;
&lt;br /&gt;
v# Launch Factorio&lt;br /&gt;
# Click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Multiplayer&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;New game&#039;&#039;&lt;br /&gt;
# Select map generator options, then click &#039;&#039;Generate&#039;&#039;&lt;br /&gt;
# Choose latency and other settings, then click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Other players can now join the game&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
In PvP mode, players can be on different forces. Each force can have one (free-for-all) or more players (teams). Each force has its own independent research progression. Additionally, each force&#039;s [[Turret|turrets]] and [[Combat Robot Capsules|combat bots]] will attack other players as enemies, unless a cease fire is set. Note that, depending on the scenario, cease fires may be unidirectional — setting a cease fire with an opposing force does not guarantee a cease fire from them in return.&lt;br /&gt;
&lt;br /&gt;
To start a PvP game, you must have a PvP-compatible scenario downloaded (or use the console commands to manually assign players to different forces, [[#Forces|see below]]). PvP scenarios can be found in the [https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 Maps and Scenarios forum].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example PvP scenarios:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=36&amp;amp;t=21023 PvP_Ruins by Siapran]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=36&amp;amp;t=15052 Various scenarios by Klonan]&lt;br /&gt;
&lt;br /&gt;
After downloading a PvP scenario, you need to move it to your application directory, and create the multiplayer game using the scenario.&lt;br /&gt;
&lt;br /&gt;
# Download the scenario and place the scenario directory in the &#039;&#039;scenarios&#039;&#039; directory within your [[Application_directory#Directory_locations_by_OS_and_installation_method|user data directory]].&lt;br /&gt;
# Launch Factorio&lt;br /&gt;
# Click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Multiplayer&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Custom scenario&#039;&#039;&lt;br /&gt;
# Choose the PvP scenario you want under &#039;&#039;User scenarios&#039;&#039; and click &#039;&#039;Create&#039;&#039;&lt;br /&gt;
# Choose latency and other settings, then click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Other players can now join the game&lt;br /&gt;
&lt;br /&gt;
== Forces ==&lt;br /&gt;
&lt;br /&gt;
Forces can be manually created via the console. This allows any map/scenario to be used for PvP. This may not be as convenient as a pre-made PvP scenario, as there will be no way for players to turn on/off cease fires other than through the console.&lt;br /&gt;
&lt;br /&gt;
Each created force has its own research progression and different forces may attack each other.&lt;br /&gt;
&lt;br /&gt;
The console commands for setting up and controlling forces are below:&lt;br /&gt;
&lt;br /&gt;
  game.create_force(&amp;quot;Name&amp;quot;)&lt;br /&gt;
  --Creates the force &amp;quot;Name&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  game.players[&amp;quot;Player_name&amp;quot;].force = game.forces[&amp;quot;Name&amp;quot;]&lt;br /&gt;
  --Sets this player to the new force&lt;br /&gt;
  &lt;br /&gt;
  game.forces[&amp;quot;Name&amp;quot;].set_cease_fire(&amp;quot;Other_force_name&amp;quot;, true)&lt;br /&gt;
  --Sets the new force ceasefire to the &amp;quot;other force&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  game.forces[&amp;quot;Name&amp;quot;].set_spawn_position({x = 10, y = 20}, game.surfaces[1])&lt;br /&gt;
  --Sets the spawn position of the force&lt;br /&gt;
  &lt;br /&gt;
  game.print(#game.forces)&lt;br /&gt;
  --Prints the number of forces&lt;br /&gt;
  &lt;br /&gt;
  for name, force in pairs (game.forces) do&lt;br /&gt;
    game.print(name)&lt;br /&gt;
  end&lt;br /&gt;
  --Prints the name of all the forces&lt;br /&gt;
&lt;br /&gt;
== Dedicated/Headless server ==&lt;br /&gt;
As of Factorio version 0.12.0 onwards, a dedicated (or headless) server can be started using the --start-server command line option. You can run factorio --help to get a list of all command-line arguments that Factorio accepts.&lt;br /&gt;
&lt;br /&gt;
In the headless mode:&lt;br /&gt;
* Graphics are not initialized (faster start up, less memory usage, works on completely headless servers)&lt;br /&gt;
* Game starts immediately and loads a save given as a parameter to the command&lt;br /&gt;
* The server has no character in game&lt;br /&gt;
* Game is paused while there are no players connected (though this can be overridden using the --no-auto-pause option)&lt;br /&gt;
* Saves the game on exit (and autosaves normally)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that there has been a slight change between 0.12, 0.13 and 0.14 in how --start-server (and others) interpret the given parameter. Version 0.12 expected --start-server to be followed by a save name, that was to be found in the saves directory. 0.13 instead expects --start-server to be followed by a path to a save file. I.e. if you did &#039;&#039;&#039;factorio --start-server foo&#039;&#039;&#039; in 0.12, you probably want to use &#039;&#039;&#039;factorio --start-server saves/foo.zip&#039;&#039;&#039; in 0.13.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You will need to create your save file before you start the server, as the dedicated server REQUIRES a save file to be provided. This can easily be done using the --create command-line argument. For example:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;./bin/x64/factorio --create ./saves/my-save.zip       # This creates a new save, as if by clicking the New Game button in the GUI&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # This starts a server that will host the file created on the previous line&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.13, --create also accepts --map-gen-settings if you want to use non-default map generation. To use it, create a file with the desired map settings (see the file data/map-gen-settings.example.json for an example), and run:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;factorio --create saves/my-save.zip --map-gen-settings path-to-file-with-desired-map-generation-settings.json&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.14.12, factorio has moved some command-line options into the server-settings.json file. Starting factorio server requires you to specify the location of the server-settings.json file. By default this is in the factorio data folder. For example to start factorio using the most recent saved map, you would run: &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;./factorio  --start-server-load-latest --server-settings ./data/server-settings.json&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are basic instructions for starting a dedicated server on Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
* Go to your Factorio.exe folder (Probably &#039;C:\Program Files\Factorio\bin\x64\&#039;)&lt;br /&gt;
* Create a text document, paste the following and make appropriate entries:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Expand for script&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;@echo off&lt;br /&gt;
::==============================================================================================================&lt;br /&gt;
::	Replace the appropriate entries below to suit your installation (Default install example shown)&lt;br /&gt;
::==============================================================================================================&lt;br /&gt;
&lt;br /&gt;
set FactorioExeLocation=C:\Program Files\Factorio\bin\x64\&lt;br /&gt;
&lt;br /&gt;
set SaveFileName=YOURSAVENAME.zip&lt;br /&gt;
set SaveLocation=C:\Users\YOURWINDOWSUSERACCOUNT\AppData\Roaming\Factorio\saves\&lt;br /&gt;
&lt;br /&gt;
set ServerSettingsFileName=server-settings.json&lt;br /&gt;
set ServerSettingsLocation=C:\Program Files\Factorio\data\&lt;br /&gt;
::==============================================================================================================&lt;br /&gt;
&lt;br /&gt;
cd %FactorioExeLocation%&lt;br /&gt;
&lt;br /&gt;
echo.&lt;br /&gt;
echo.&lt;br /&gt;
echo PREPARING TO LAUNCH FACTORIO SERVER...&lt;br /&gt;
echo.&lt;br /&gt;
echo 	Save to be loaded:&lt;br /&gt;
echo 		%SaveLocation%%SaveFileName% &lt;br /&gt;
echo.&lt;br /&gt;
echo 	Server Settings to load: &lt;br /&gt;
echo 		%ServerSettingsLocation%%ServerSettingsFileName%&lt;br /&gt;
echo.&lt;br /&gt;
echo.&lt;br /&gt;
echo *** Remember to use Ctrl+C to ensure saving when finished instead of simply closing this window ***&lt;br /&gt;
echo.&lt;br /&gt;
echo.&lt;br /&gt;
pause 3&lt;br /&gt;
&lt;br /&gt;
::==============================================================================================================&lt;br /&gt;
:: ***NOTE: The line below launches factorio in headless mode with desired server settings, add any other&lt;br /&gt;
::          desired arguments to end of the line. Use &amp;quot;factorio.exe --help&amp;quot; for a list of all supported arguments.&lt;br /&gt;
::==============================================================================================================&lt;br /&gt;
factorio.exe --start-server &amp;quot;%SaveLocation%%SaveFileName%&amp;quot; --server-settings &amp;quot;%ServerSettingsLocation%%ServerSettingsFileName%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
pause 3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Save the file as server.bat. Important: At &#039;Save as type:&#039; select &#039;All Files&#039; By default, windows will append the filetype automatically, so disabling this in order to provide your own is necessary.&lt;br /&gt;
** Reminder: Be sure to have replaced YOURSAVENAME and YOURWINDOWSACCOUNTNAME with correct information.&lt;br /&gt;
* Use the server.bat to start your server.&lt;br /&gt;
* The console log will be shown in the window.&lt;br /&gt;
* To close the server, select the console window press Control+C. If you just close it without pressing this, it will not save your game.&lt;br /&gt;
* Forward Ports: You will find detailed instructions for your specific router on the web&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
This step-by-step guide has been verified on fresh CentOS 7 and RHEL 7 installs but should be applicable with little to no changes on most distributions.&lt;br /&gt;
&lt;br /&gt;
The guide assumes you will install the headless server under &#039;&#039;&#039;/opt/factorio&#039;&#039;&#039;, adjust paths according to your own setup. We will also suggest that you run the Factorio server as a separate user to harden security of your setup.&lt;br /&gt;
&lt;br /&gt;
Note that there are two distinct packages for Linux that can be used to run a headless server. First is the usual Linux download, that contains the full game. The other is the special  [https://www.factorio.com/download-headless/stable headless package]. The headless package does not contain any files irrelevant for a pure server, such as graphics and sounds. It is also not linked against libraries that may not be present on a server machine, such as Xlib, libGL or libasound. This option should be selected if running in a 3rd party hosted server.&lt;br /&gt;
&lt;br /&gt;
This guide does not handle firewall/port forwarding since this can be done in various ways on Linux (make sure to read up how this is done as a Linux admin on your particular distribution)&lt;br /&gt;
&lt;br /&gt;
You can use the [https://github.com/Bisa/factorio-init Linux factorio-init script] to start/stop your headless server in a much better way. The script will ensure you only ever use the most recent save when your server starts (even if that was an auto-save) while also letting you set a number of other settings like Autosave frequency and Latency settings. This script will also simplify updating the server when combined with the [https://github.com/narc0tiq/factorio-updater Linux factorio-updater script].&lt;br /&gt;
&lt;br /&gt;
* Download the selected package -- either full game or the headless package -- and upload the linux tar.gz package to your server /tmp&lt;br /&gt;
* Extract the package in /tmp to /opt/factorio&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # Use the correct filename. It includes the factorio version number.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a new user to your system and assign ownership of the factorio dir to it (please, do not run as the root user, sudo may be needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try the binary&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory, or use the --create ./saves/newgame.zip argument.&lt;br /&gt;
&lt;br /&gt;
== How to List Your Server-Hosted Game on the Matching Server ==&lt;br /&gt;
&lt;br /&gt;
In order to publish the game to the matching server, Factorio needs to be given some more information than just the save file location. These information are provided in a &#039;&#039;server settings file&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To create a server settings file, look at the example file located in &#039;&#039;&#039;data/server-settings.example.json&#039;&#039;&#039; in the Factorio [[Application Directory]]. The recommended way is to make a copy of this example file and edit the copy.&lt;br /&gt;
&lt;br /&gt;
The following values can be changed:&lt;br /&gt;
* Name: This will be the name under which the server will be listed in the server browser&lt;br /&gt;
* Description: A brief description of your server&lt;br /&gt;
* Tags: A list of game tags&lt;br /&gt;
* Max Players: Allows you to limit the number of players that can be connected to the server at the same time. If you want no limit, just set max_players to 0.&lt;br /&gt;
* Visibility for server browser: May be either public, lan or hidden.&lt;br /&gt;
** Public: The server will appear in the public server list. This requires the login credentials below to be filled in.&lt;br /&gt;
** LAN: The server will not appear in the public server list, but will be available through the Play On LAN button&lt;br /&gt;
** Hidden: Clients will have to connect using the server&#039;s IP address&lt;br /&gt;
* User credentials using a username and password or authentication token: These are necessary if you wish to make the server public. Otherwise, they can be left empty.&lt;br /&gt;
** For security reasons it is recommended to use authentication token as this document is stored as plaintext. Though it should be noted that an authentication token is a sensitive piece of information as well, and you are well-advised to keep it secret.&lt;br /&gt;
* Server Password&lt;br /&gt;
** Field name is game_password&lt;br /&gt;
* Whether to verify user identity&lt;br /&gt;
(There are additional values in v0.14 of factorio.)&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
Notes about some technical details surrounding multiplayer have been published by the development team in several Friday Facts blog posts:&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Lock step architecture]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 Client-server connections]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT punching, introduced in 0.13]&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ How to set up Factorio server with cookbook] &lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Tips ==&lt;br /&gt;
* The key for [[Console|Console commands]] is also used initiate chat in multiplayer. To execute a command instead of chatting, you need to type &#039;&#039;/c&#039;&#039; before the command. Commands executed are &#039;&#039;visible to all players&#039;&#039;. Additionally, the multiplayer game must have been started with commands allowable for commands to work.&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php to convert colors to rgb numbers). a is alpha channel aka transparency of the color to the base texture.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Maintainer note: The following history may not be fully up to date, or comprehensive. Factorio&#039;s multiplayer has undergone a great deal of small changes since its inception, however this history will provide a rough overview.&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.14|&lt;br /&gt;
* Added multiplayer server option &amp;quot;Autosave only on server&amp;quot;.&lt;br /&gt;
* Deconstructing/canceling deconstruction sets the &amp;quot;last user&amp;quot; on an entity.&lt;br /&gt;
* Decreased the size of connection accept message with lot of mod which could help some people with 50+ mod multiplayer games.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.13|&lt;br /&gt;
* Reconnecting to multiplayer game that the player is already in (due to being dropped, most often) instantly closes the previous connection and connects the player.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.11|&lt;br /&gt;
* Multiplayer usernames can only consist of letters, and &amp;lt;code&amp;gt; -_. &amp;lt;/code&amp;gt; characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.10|&lt;br /&gt;
* Disabled 32bit (x86) multiplayer. All hosts and members must be running the 64bit (x86_64) version of the game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.8|&lt;br /&gt;
* More than 10 players in one game will reduce the rate the game is saved to the server.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.6|&lt;br /&gt;
* Username is now set to username setting, not email.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.5|&lt;br /&gt;
* Added AFK Auto kick interval to multiplayer host settings (with never as default).}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.3|&lt;br /&gt;
* When save of scenario is loaded in multiplayer, it&#039;s scenario is saved in user scenarios.&lt;br /&gt;
* Added &amp;lt;code&amp;gt;/time&amp;lt;/code&amp;gt; command to print the current map age.&lt;br /&gt;
* Added option to host multiplayer game with scenario (it only had new game/load game there).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.2|&lt;br /&gt;
* Can specify limit of upload speed when hosting.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.0|&lt;br /&gt;
* Server doesn&#039;t stop/slow down the game when some client is too slow, stops communicating or saves the game longer than the server.&lt;br /&gt;
* Players automatically quit game after 3 desyncs.&lt;br /&gt;
* Removed the option to enable/disable latency hiding, it is always on on clients (and off on the server).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.10|&lt;br /&gt;
* Server stdout messages now contain timestamps and message-type tags}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.2|&lt;br /&gt;
* Limit multiplayer player name to 60 characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Improved Multiplayer game UX&lt;br /&gt;
* Server games are published to the server and clients can browse existing games.&lt;br /&gt;
* Removed multiplayer peer-to-peer mode.&lt;br /&gt;
* Building sound is played also for other players in multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.31|&lt;br /&gt;
* Human readable error notice when multiplayer connection wasn&#039;t successful. (https://forums.factorio.com/23132)&lt;br /&gt;
* Improved map download speed when connecting to multiplayer game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.30|&lt;br /&gt;
* Mod checksums are calculated when the game starts and are compared with other peers when joining a multiplayer game. This is to ensure everyone has exactly the same mod in order to prevent desyncs caused by local changes made to mod files.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.28|&lt;br /&gt;
* Added --port to specify which network port the game should use, when hosting with --start-server or --mp-load-game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.27|&lt;br /&gt;
* The report of different mods when trying to connect to multiplayer game is now scrollable when needed.&lt;br /&gt;
* Better message when the server leaves a multiplayer game}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.11|&lt;br /&gt;
* Added --no-auto-pause: When running as a server, --no-auto-pause will prevent stopping the game when no players are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.9|&lt;br /&gt;
* Added resume button to multiplayer game menu}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.7|&lt;br /&gt;
*New command line options for the headless server: --disallow-commands and --peer-to-peer}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Multiplayer broadcast (heartbeats) is done via a single message when not using peer2peer.&lt;br /&gt;
* Further optimizations in size of the Multiplayer heartbeat (message sent every tick).&lt;br /&gt;
* LatencyState is suspended when player is killed (and waiting for respawn) in Multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.4|&lt;br /&gt;
* Simple mechanism for multiplayer relaying via the server.&lt;br /&gt;
* Less annoying glitches when running and shooting in multiplayer with latency hiding.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Multiplayer latency hiding (gives impression that some common tasks are performed immediately)&lt;br /&gt;
* Factorio can run as a dedicated server without graphics (http://www.factorioforums.com/wiki/index.php?title=Multiplayer#Headless_server).&lt;br /&gt;
* Basic PvP: New forces can now be created and merged back together; a cease-fire can be agreed upon between forces&lt;br /&gt;
* IPv6 support for multiplayer.&lt;br /&gt;
* DNS names can be used when connecting to multiplayer game.&lt;br /&gt;
* Player&#039;s logistic filters are now remembered after respawn in multiplayer&lt;br /&gt;
* Smaller multiplayer heartbeat packet size.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.19|&lt;br /&gt;
* Multiplayer dropping threshold is doubled during map upload / download.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.17|&lt;br /&gt;
* Autosaves in multiplayer are performed at the same time by all clients (interval is set by hosting player).&lt;br /&gt;
* Progress bar is shown when non-responsive peers are about to be dropped from the game in the Multiplayer.&lt;br /&gt;
* Progress bar is shown when other peers in multiplayer are saving map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.16|&lt;br /&gt;
* Revived character (after dying in multiplayer) are placed on the spawn point instead of the center of the map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.2|&lt;br /&gt;
*  Mods that don&#039;t affect game state are not needed to be synchronised when playing multiplayer game or replaying game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.0|&lt;br /&gt;
* Introduced}}&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Server&amp;diff=136342</id>
		<title>Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Server&amp;diff=136342"/>
		<updated>2017-05-01T01:10:10Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: Redirect to Multiplayer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Multiplayer]]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136254</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136254"/>
		<updated>2017-04-30T00:18:26Z</updated>

		<summary type="html">&lt;p&gt;Quyxkh: /* Add items to the player&amp;#039;s inventory */ add the energy interface&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;Scripting/Cheating&#039;&#039;&#039; - run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command). This not only closes the console, but it also hides all the recent messages/commands. In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32389 Factorio 0.14.5 and later], you can clear the console with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Note that the console can also accept raw Lua code as well as game commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32389 Factorio 0.14.5 and later], the &#039;&#039;&#039;Tab&#039;&#039;&#039; key will auto-complete commands and player ids.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
These are just the main chat features - there are also options for banning, ignoring and muting players; see the console &#039;&#039;&#039;/help&#039;&#039;&#039; for a full list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
This is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 /c for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
 /c game.map_settings.enemy_evolution.time_factor = 0&lt;br /&gt;
 /c game.map_settings.enemy_evolution.pollution_factor = game.map_settings.enemy_evolution.pollution_factor * 2&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get Player Position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &lt;br /&gt;
 /color COLOR&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&lt;br /&gt;
 /c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
 /c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Quyxkh</name></author>
	</entry>
</feed>