<?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=Joelverhagen</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=Joelverhagen"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Joelverhagen"/>
	<updated>2026-04-26T00:50:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Blueprint_string_format&amp;diff=203206</id>
		<title>Blueprint string format</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Blueprint_string_format&amp;diff=203206"/>
		<updated>2024-10-26T14:55:34Z</updated>

		<summary type="html">&lt;p&gt;Joelverhagen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:blueprint_string_preview.png|thumb|340px|right|Preview of a blueprint string.]]This is a technical description of the blueprint string format, used to share blueprints with other users.&lt;br /&gt;
&lt;br /&gt;
A blueprint string is a JSON representation of the blueprint, compressed with zlib deflate using compression level 9 and then encoded using base64 with a version byte in front of the encoded string. The version byte is currently 0 (for all Factorio versions through 1.1).&lt;br /&gt;
So to get the JSON representation of a blueprint from a blueprint string, skip the first byte, base64 decode the string, and finally decompress using zlib inflate.&lt;br /&gt;
&lt;br /&gt;
== Json representation of a blueprint/blueprint book ==&lt;br /&gt;
&lt;br /&gt;
The json representation of a blueprint or blueprint book is one large object inside another &amp;quot;wrapping&amp;quot; object, its key inside that object is either blueprint or blueprint-book.&lt;br /&gt;
&lt;br /&gt;
=== Blueprint book object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| item&lt;br /&gt;
| String, the name of the item that was saved (&amp;quot;blueprint-book&amp;quot; in vanilla).&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| String, the name of the blueprint set by the user.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| label_color&lt;br /&gt;
| The color of the label of this blueprint. Optional. [[#Color object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| blueprints&lt;br /&gt;
| The actual content of the blueprint book, array of objects containing an &amp;quot;index&amp;quot; key and 0-based value and a &amp;quot;blueprint&amp;quot; key with a [[#Blueprint object]] as the value.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| active_index&lt;br /&gt;
| Index of the currently selected blueprint, 0-based.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| icons&lt;br /&gt;
| The icons of the blueprint book set by the user, array of [[#Icon object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| The description of the blueprint book. Optional.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| version&lt;br /&gt;
| The map version of the map the blueprint was created in, see [[Version string format]].&lt;br /&gt;
| Integer (long)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blueprint object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| item&lt;br /&gt;
| String, the name of the item that was saved (&amp;quot;blueprint&amp;quot; in vanilla).&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| label&lt;br /&gt;
| String, the name of the blueprint set by the user.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| label_color&lt;br /&gt;
| The color of the label of this blueprint. Optional. [[#Color object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| entities&lt;br /&gt;
| The actual content of the blueprint, array of [[#Entity object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| tiles&lt;br /&gt;
| The tiles included in the blueprint, array of [[#Tile object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| icons&lt;br /&gt;
| The icons of the blueprint set by the user, array of [[#Icon object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| schedules&lt;br /&gt;
| The schedules for trains in this blueprint, array of [[#Schedule object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| The description of the blueprint. Optional.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| snap-to-grid&lt;br /&gt;
| The dimensions of the grid to use for snapping. Optional. [[#Position object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| absolute-snapping&lt;br /&gt;
| Whether the blueprint uses absolute or relative snapping. Optional.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| position-relative-to-grid&lt;br /&gt;
| Offset relative to the global absolute snapping grid. Optional. [[#Position object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| version&lt;br /&gt;
| The map version of the map the blueprint was created in.&lt;br /&gt;
| Integer (long)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Icon object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| index&lt;br /&gt;
| Index of the icon, 1-based.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| signal&lt;br /&gt;
| The icon that is displayed, [[#SignalID object]].&lt;br /&gt;
| Object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SignalID object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Name of the signal prototype this signal is set to.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| Type of the signal. Either &amp;quot;item&amp;quot;, &amp;quot;fluid&amp;quot; or &amp;quot;virtual&amp;quot;. &amp;lt;br&amp;gt; &#039;&#039;&#039;Note for 2.x:&#039;&#039;&#039; property appears to be optional&lt;br /&gt;
| String&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entity object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| entity_number&lt;br /&gt;
| Index of the entity, 1-based.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Prototype name of the entity (e.g. &amp;quot;offshore-pump&amp;quot;).&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| position&lt;br /&gt;
| [[#Position object]], position of the entity within the blueprint.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| direction&lt;br /&gt;
| Direction of the entity, uint (optional).&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| orientation&lt;br /&gt;
| Orientation of cargo wagon or locomotive, value 0 to 1 (optional).&lt;br /&gt;
| Floating Point&lt;br /&gt;
|-&lt;br /&gt;
| connections&lt;br /&gt;
| Circuit connection, object with keys starting from 1, values are [[#Connection object]]s (optional).&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| neighbours&lt;br /&gt;
| Copper wire connections, array of entity_numbers (optional).&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| control_behavior&lt;br /&gt;
| [[#Control behavior object]] of this entity (optional).&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| items&lt;br /&gt;
| Item requests by this entity, this is what defines the item-request-proxy when the blueprint is placed, optional. [[#Item request object]]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| recipe&lt;br /&gt;
| Name of the recipe prototype this assembling machine is set to, optional, string.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| bar&lt;br /&gt;
| Used by [[Prototype/Container]], optional. The index of the first inaccessible item slot due to limiting with the red &amp;quot;bar&amp;quot;. 0-based [[Types/ItemStackIndex]].&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| inventory&lt;br /&gt;
| Cargo wagon inventory configuration, optional. [[#Inventory object]]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| infinity_settings&lt;br /&gt;
| Used by [[Prototype/InfinityContainer]], optional. [[#Infinity settings object]]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| Type of the underground belt or loader, optional. Either &amp;quot;input&amp;quot; or &amp;quot;output&amp;quot;.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| input_priority&lt;br /&gt;
| Input priority of the splitter, optional. Either &amp;quot;right&amp;quot; or &amp;quot;left&amp;quot;, &amp;quot;none&amp;quot; is omitted.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| output_priority&lt;br /&gt;
| Output priority of the splitter, optional. Either &amp;quot;right&amp;quot; or &amp;quot;left&amp;quot;, &amp;quot;none&amp;quot; is omitted.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| Filter of the splitter, optional. Name of the item prototype the filter is set to, string.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| filters&lt;br /&gt;
| Filters of the filter inserter or loader, optional. Array of [[#Item filter object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| filter_mode&lt;br /&gt;
| Filter mode of the filter inserter, optional. Either &amp;quot;whitelist&amp;quot; or &amp;quot;blacklist&amp;quot;.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| override_stack_size&lt;br /&gt;
| The stack size the inserter is set to, optional. [[Types/uint8]].&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| drop_position&lt;br /&gt;
| The drop position the inserter is set to, optional. [[#Position object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| pickup_position&lt;br /&gt;
| The pickup position the inserter is set to, optional. [[#Position object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| request_filters&lt;br /&gt;
| Used by [[Prototype/LogisticContainer]], optional. [[#Logistic filter object]].&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| request_from_buffers&lt;br /&gt;
| Boolean. Whether this requester chest can request from buffer chests.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| parameters&lt;br /&gt;
| Used by [[Programmable speaker]], optional. [[#Speaker parameter object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| alert_parameters&lt;br /&gt;
| Used by [[Programmable speaker]], optional. [[#Speaker alert parameter object]]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| auto_launch&lt;br /&gt;
| Used by the rocket silo, optional. Boolean, whether auto launch is enabled.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| variation&lt;br /&gt;
| Used by [[Prototype/SimpleEntityWithForce]] or [[Prototype/SimpleEntityWithOwner]], optional. [[Types/GraphicsVariation]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| color&lt;br /&gt;
| Color of the [[Prototype/SimpleEntityWithForce]], [[Prototype/SimpleEntityWithOwner]], or train station, optional. [[#Color object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| station&lt;br /&gt;
| The name of the train station, optional.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| manual_trains_limit&lt;br /&gt;
| The manually set train limit of the train station, optional.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| switch_state&lt;br /&gt;
| The current state of the power switch, optional.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| tags&lt;br /&gt;
| Dictionary of arbitrary data, optional. [https://lua-api.factorio.com/latest/concepts.html#Tags Tags].&lt;br /&gt;
| Object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Inventory object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| filters&lt;br /&gt;
| Array of [[#Item filter object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| bar&lt;br /&gt;
| The index of the first inaccessible item slot due to limiting with the red &amp;quot;bar&amp;quot;. 0-based, optional.  [[Types/ItemStackIndex]].&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Schedule object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| schedule&lt;br /&gt;
| Array of [[#Schedule Record object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| locomotives&lt;br /&gt;
| Array of entity numbers of locomotives using this schedule.&lt;br /&gt;
| Array&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Schedule Record object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| station&lt;br /&gt;
| The name of the stop for this schedule record.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| wait_conditions&lt;br /&gt;
| Array of [[#Wait Condition object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| temporary&lt;br /&gt;
| Whether this is a temporary schedule record. Optional.&lt;br /&gt;
| Boolean&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wait Condition object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| One of &amp;quot;time&amp;quot;, &amp;quot;inactivity&amp;quot;, &amp;quot;full&amp;quot;, &amp;quot;empty&amp;quot;, &amp;quot;item_count&amp;quot;, &amp;quot;circuit&amp;quot;, &amp;quot;robots_inactive&amp;quot;, &amp;quot;fluid_count&amp;quot;, &amp;quot;passenger_present&amp;quot;, &amp;quot;passenger_not_present&amp;quot;.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| compare_type&lt;br /&gt;
| Either &amp;quot;and&amp;quot;, or &amp;quot;or&amp;quot;. Tells how this condition is to be compared with the preceding conditions in the corresponding wait_conditions array.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| ticks&lt;br /&gt;
| Number of ticks to wait or of inactivity. Only present when type is &amp;quot;time&amp;quot; or &amp;quot;inactivity&amp;quot;. Optional.&lt;br /&gt;
| uint&lt;br /&gt;
|-&lt;br /&gt;
| condition&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#CircuitCondition CircuitCondition object], only present when type is &amp;quot;item_count&amp;quot;, &amp;quot;circuit&amp;quot; or &amp;quot;fluid_count&amp;quot;.&lt;br /&gt;
| Object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tile object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Prototype name of the tile (e.g. &amp;quot;concrete&amp;quot;)&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| position&lt;br /&gt;
| [[#Position object]], position of the entity within the blueprint.&lt;br /&gt;
| Object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| x&lt;br /&gt;
| X position within the blueprint, 0 is the center.&lt;br /&gt;
| Floating point&lt;br /&gt;
|-&lt;br /&gt;
| y&lt;br /&gt;
| Y position within the blueprint, 0 is the center.&lt;br /&gt;
| Floating point&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Connection object ===&lt;br /&gt;
Object containing information about the connections to other entities formed by red or green wires.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| First connection point. The default for everything that doesn&#039;t have multiple connection points.[[#Connection point object]]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Second connection point. For example, the &amp;quot;output&amp;quot; part of an arithmetic combinator.[[#Connection point object]]&lt;br /&gt;
| Object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Connection point object ===&lt;br /&gt;
The actual point where a wire is connected to. Contains information about where it is connected to.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| red&lt;br /&gt;
| An array of [[#Connection data object]] containing all the connections from this point created by red wire.&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| green&lt;br /&gt;
| An array of [[#Connection data object]] containing all the connections from this point created by green wire.&lt;br /&gt;
| Array&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Connection data object ===&lt;br /&gt;
Information about a single connection between two connection points.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| entity_id&lt;br /&gt;
| ID of the entity this connection is connected with.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| circuit_id&lt;br /&gt;
| The circuit connector id of the entity this connection is connected to, see [https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id defines.circuit_connector_id].&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Item request object ===&lt;br /&gt;
1 or more instances of key/value pairs.&lt;br /&gt;
Key is the name of the item, string.&lt;br /&gt;
Value is the amount of items to be requested, [[Types/ItemCountType]].&lt;br /&gt;
&lt;br /&gt;
=== Item filter object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Name of the item prototype this filter is set to.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| index&lt;br /&gt;
| Index of the filter, 1-based. &lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Infinity settings object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| remove_unfiltered_items&lt;br /&gt;
| Boolean. Whether the &amp;quot;remove unfiltered items&amp;quot; checkbox is checked.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| filters&lt;br /&gt;
| Filters of the infinity container, optional. Array of [[#Infinity filter object]]s.&lt;br /&gt;
| Array&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Infinity filter object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Name of the item prototype the filter is set to, string.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number the filter is set to, [[Types/ItemCountType]].&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| mode&lt;br /&gt;
| Mode of the filter. Either &amp;quot;at-least&amp;quot;, &amp;quot;at-most&amp;quot;, or &amp;quot;exactly&amp;quot;.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| index&lt;br /&gt;
| Index of the filter, 1-based.&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logistic filter object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| Name of the item prototype this filter is set to.&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| index&lt;br /&gt;
| Index of the filter, 1-based.&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number the filter is set to, [[Types/ItemCountType]]. Is 0 for storage chests.&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Speaker parameter object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| playback_volume&lt;br /&gt;
| [[Types/double]]. Volume of the speaker.&lt;br /&gt;
| Floating point&lt;br /&gt;
|-&lt;br /&gt;
| playback_globally&lt;br /&gt;
| Boolean, whether global playback is enabled.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| allow_polyphony&lt;br /&gt;
| Boolean, whether polyphony is allowed.&lt;br /&gt;
| Boolean&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Speaker alert parameter object ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| show_alert&lt;br /&gt;
| Boolean, whether an alert is shown.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| show_on_map&lt;br /&gt;
| Boolean, whether an alert icon is shown on the map.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| icon_signal_id&lt;br /&gt;
| The icon that is displayed with the alert, [[#SignalID object]].&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| alert_message&lt;br /&gt;
| String, message of the alert.&lt;br /&gt;
| String&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Color object ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Description !! Data type&lt;br /&gt;
|-&lt;br /&gt;
| r&lt;br /&gt;
| red, number from 0 to 1.&lt;br /&gt;
| Floating point&lt;br /&gt;
|-&lt;br /&gt;
| g&lt;br /&gt;
| green, number from 0 to 1.&lt;br /&gt;
| Floating point&lt;br /&gt;
|-&lt;br /&gt;
| b&lt;br /&gt;
| blue, number from 0 to 1.&lt;br /&gt;
| Floating point&lt;br /&gt;
|-&lt;br /&gt;
| a&lt;br /&gt;
| transparency, number from 0 to 1.&lt;br /&gt;
| Floating point&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Control behavior object ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ALL fields are optional&#039;&#039;&#039; and depend on the type of the entity.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data type &lt;br /&gt;
|-&lt;br /&gt;
| logistic_condition&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#CircuitCondition CircuitCondition]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| connect_to_logistic_network&lt;br /&gt;
| Whether this entity is connected to the logistic network and enables/disables based on logistic_condition.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| circuit_close_signal&lt;br /&gt;
| Whether this rail signal can be closed by circuit_condition.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| circuit_read_signal&lt;br /&gt;
| Whether or not to read the state of this rail/chain signal.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| red_output_signal&lt;br /&gt;
| [[#SignalID]] to use if the rail/chain signal is currently red.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| orange_output_signal&lt;br /&gt;
| [[#SignalID]] to use if the rail/chain signal is currently orange.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| green_output_signal&lt;br /&gt;
| [[#SignalID]] to use if the rail/chain signal is currently green.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| blue_output_signal&lt;br /&gt;
| [[#SignalID]] to use if the chain signal is currently blue.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_condition&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#CircuitCondition CircuitCondition]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_enable_disable&lt;br /&gt;
| Enable or disable based on circuit_condition.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| send_to_train&lt;br /&gt;
| Send circuit values to the train to use in schedule conditions.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| read_from_train&lt;br /&gt;
| Get the currently stopped trains cargo.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| read_stopped_train&lt;br /&gt;
| Get the currently stopped trains ID.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| train_stopped_signal&lt;br /&gt;
| [[#SignalID]] to output the train ID on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| set_trains_limit&lt;br /&gt;
| Whether this stations trains limit will be set through circuit values.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| trains_limit_signal&lt;br /&gt;
| [[#SignalID]] to use to set the trains limit.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| read_trains_count&lt;br /&gt;
| Whether to read this stations currently on route trains count.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| trains_count_signal&lt;br /&gt;
| [[#SignalID]] to output the on route trains count on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| read_logistics&lt;br /&gt;
| Whether this roboport should output the contents of its network.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| read_robot_stats&lt;br /&gt;
| Whether this roboport should output the robot stats of its network.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| available_logistic_output_signal&lt;br /&gt;
| [[#SignalID]] to output available logistic robots on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| total_logistic_output_signal&lt;br /&gt;
| [[#SignalID]] to output the total count of logistic robots on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| available_construction_output_signal&lt;br /&gt;
| [[#SignalID]] to output available construction robots on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| total_construction_output_signal&lt;br /&gt;
| [[#SignalID]] to output the total count of construction robots on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_open_gate&lt;br /&gt;
| Whether to limit the gate opening with circuit_condition.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| circuit_read_sensor&lt;br /&gt;
| Whether to send the wall-gate proximity sensor to the circuit network.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| output_signal&lt;br /&gt;
| [[#SignalID]] to output the wall-gate sensor / accumulator charge on.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_read_hand_contents&lt;br /&gt;
| Whether to read this belts content or inserters hand.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| circuit_contents_read_mode&lt;br /&gt;
| [https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt.content_read_mode defines.control_behavior.transport_belt.content_read_mode]&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| circuit_mode_of_operation&lt;br /&gt;
| &lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| circuit_hand_read_mode&lt;br /&gt;
| [https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.hand_read_mode defines.control_behavior.inserter.hand_read_mode]&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| circuit_set_stack_size&lt;br /&gt;
| Whether to set the inserters stack size from a circuit signal.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| stack_control_input_signal&lt;br /&gt;
| [[#SignalID]] to use to set the inserters stack size.&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_read_resources&lt;br /&gt;
| Whether this miner should output its remaining resource amounts to the circuit network.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| circuit_resource_read_mode&lt;br /&gt;
| [https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill.resource_read_mode defines.control_behavior.mining_drill.resource_read_mode]&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| is_on&lt;br /&gt;
| Whether this constant combinator is currently on or off.&lt;br /&gt;
| Boolean&lt;br /&gt;
|-&lt;br /&gt;
| filters&lt;br /&gt;
| Array of [https://lua-api.factorio.com/latest/concepts.html#ConstantCombinatorParameters ConstantCombinatorParameters].&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| arithmetic_conditions&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#ArithmeticCombinatorParameters ArithmeticCombinatorParameters]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| decider_conditions&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#DeciderCombinatorParameters DeciderCombinatorParameters]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| circuit_parameters&lt;br /&gt;
| [https://lua-api.factorio.com/latest/concepts.html#ProgrammableSpeakerCircuitParameters ProgrammableSpeakerCircuitParameters]&lt;br /&gt;
| Object&lt;br /&gt;
|-&lt;br /&gt;
| use_colors&lt;br /&gt;
| Whether this lamp should use colors or not.&lt;br /&gt;
| Boolean&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
&lt;br /&gt;
On a typical Bash command line, the blueprint can be decoded like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;echo &amp;quot;$blueprint_string&amp;quot; | cut -c2- | base64 -d | pigz -d&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to decode a string to lua table:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local str=&amp;quot;$blueprint_string&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
local bp_to_table=function(instr)&lt;br /&gt;
  &lt;br /&gt;
  --[[version and the body part]]&lt;br /&gt;
  local version=string.sub(instr,1,1);&lt;br /&gt;
  local body=string.sub(instr,2);&lt;br /&gt;
  --[[then decode it]]&lt;br /&gt;
  local json_str=game.decode_string(body);&lt;br /&gt;
  --[[then turn it into table]]&lt;br /&gt;
  local output=game.json_to_table(json_str);&lt;br /&gt;
  &lt;br /&gt;
  return output;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[and this could test if it print properly]]&lt;br /&gt;
game.print( serpent.block( bp_to_table(str) ) );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joelverhagen</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Talk:Blueprint_string_format&amp;diff=203205</id>
		<title>Talk:Blueprint string format</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Talk:Blueprint_string_format&amp;diff=203205"/>
		<updated>2024-10-26T14:51:28Z</updated>

		<summary type="html">&lt;p&gt;Joelverhagen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Decode snippets ==&lt;br /&gt;
&lt;br /&gt;
Since there are some short snippets to decode blueprint strings to JSON / Lua tables I think it would make sense to also have snippets for the inverse operation. -- [[User:Fgardt|fgardt]] ([[User talk:Fgardt|talk]]) 03:35, 3 August 2024 (CEST)&lt;br /&gt;
&lt;br /&gt;
== v2.x introduced new &amp;quot;wires&amp;quot; array of uncertain structure ==&lt;br /&gt;
&lt;br /&gt;
I am observing a new &amp;quot;wires&amp;quot; blueprint root entry - this is an example of two electric poles connected by copper, red, and green wires. The format of the &amp;quot;wires&amp;quot; seem to be a list of connections, with each sub-array always having 4 numbers:&lt;br /&gt;
&lt;br /&gt;
* source entity_number&lt;br /&gt;
* color of the wire at the source&lt;br /&gt;
* destination entity_number&lt;br /&gt;
* color of the wire at the destination&lt;br /&gt;
&lt;br /&gt;
I guess the developers were trying to allow color-changing in the wire, e.g. starts as green, but ends as red?  For now, I only saw same color on both sides (2nd and 4th value is always the same).  The color indexes are:  5 - copper, 1 - red, 2 - green.&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;blueprint&amp;quot;: {&lt;br /&gt;
    &amp;quot;icons&amp;quot;: [{&amp;quot;signal&amp;quot;: {&amp;quot;name&amp;quot;: &amp;quot;big-electric-pole&amp;quot;}, &amp;quot;index&amp;quot;: 1}],&lt;br /&gt;
    &amp;quot;entities&amp;quot;: [&lt;br /&gt;
      {&amp;quot;entity_number&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;big-electric-pole&amp;quot;, &amp;quot;position&amp;quot;: {&amp;quot;x&amp;quot;: 163, &amp;quot;y&amp;quot;: -240}},&lt;br /&gt;
      {&amp;quot;entity_number&amp;quot;: 2, &amp;quot;name&amp;quot;: &amp;quot;big-electric-pole&amp;quot;, &amp;quot;position&amp;quot;: {&amp;quot;x&amp;quot;: 195, &amp;quot;y&amp;quot;: -240}}&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;wires&amp;quot;: [[1, 1, 2, 1], [1, 2, 2, 2], [1, 5, 2, 5]],&lt;br /&gt;
    &amp;quot;item&amp;quot;: &amp;quot;blueprint&amp;quot;,&lt;br /&gt;
    &amp;quot;version&amp;quot;: 562949954076673&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== v2.X SignalID has optional &amp;quot;type&amp;quot; now ==&lt;br /&gt;
&lt;br /&gt;
Blueprint:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;0eNqVkd1uhCAQhd9lrnGzWm2ir9JsDOLEnRQGC2hrDO9e0Dbbqza9Y5hzvvnbYdALzo44QLcDKcseupcdPE0sdf5jaRA6kN6jGTTxVBip7sRYVBAFEI/4AV0ZbwKQAwXCk3AEW8+LGdAlgfiVJGC2Ppkt55oZeL00Ajboni5NKuNQ0Zzd5CwXE0pXvN8RNXyn+rdF6lQwSdg6I3OGApqzGRp/jDI7Oy4q0JrkhUlvjcckpzqJuSdeU//Wbaf7EdUCfJDq9Zg4RvE3+mtN/4NfM/yWd5qNCfw4k4AVnT8W1TxXbd22TV3WVVWWMX4CClCeDw==&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Beginning of JSON:&lt;br /&gt;
&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;blueprint&amp;quot;: {&lt;br /&gt;
            &amp;quot;icons&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;signal&amp;quot;: {&lt;br /&gt;
                        &amp;quot;name&amp;quot;: &amp;quot;assembling-machine-2&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;index&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
            ],&lt;br /&gt;
&lt;br /&gt;
Notice there is no &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;: &amp;quot;item&amp;quot;&amp;lt;/code&amp;gt; property.&lt;/div&gt;</summary>
		<author><name>Joelverhagen</name></author>
	</entry>
</feed>