<?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=Nallaj</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=Nallaj"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Nallaj"/>
	<updated>2026-04-24T23:31:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Localisation&amp;diff=205767</id>
		<title>Tutorial:Localisation</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Localisation&amp;diff=205767"/>
		<updated>2024-11-10T13:27:42Z</updated>

		<summary type="html">&lt;p&gt;Nallaj: Fix broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}Mods should define human readable names for prototypes that they add. They can also define descriptions for items or custom strings for usage in GUIs etc. This is called &#039;&#039;&#039;localisation&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Translations are stored as .cfg files, with the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;welcome-message=Hello world&lt;br /&gt;
[category]&lt;br /&gt;
title=Category related title&lt;br /&gt;
# Comment&lt;br /&gt;
; Another comment&amp;lt;/pre&amp;gt;&lt;br /&gt;
Any whitespace after or before &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; is included in the key or string, so &amp;lt;code&amp;gt;title =Category related title&amp;lt;/code&amp;gt; will give an unknown key error if you are looking for the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; key, since it is the &amp;lt;code&amp;gt;title&amp;amp;nbsp;&amp;lt;/code&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; can be one of the existing locale categories, which permits implicit search mechanisms to find translations, but may also be another key, such as &amp;lt;code&amp;gt;[my-mod-messages]&amp;lt;/code&amp;gt;. These are accessible the same as other translations, e.g. &amp;lt;code&amp;gt;{&amp;quot;my-mod-messages.hello&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are located within the language code of the language in the locale folder of the mod, so as an English example &amp;lt;code&amp;gt;__mod__/locale/en/any_name_here.cfg&amp;lt;/code&amp;gt;. There can be more than 1 file per language, all of them will be read.&lt;br /&gt;
&lt;br /&gt;
== Localising simple strings ==&lt;br /&gt;
The simplest localisation is of items, entities etc. If we say the item is &amp;lt;code&amp;gt;iron-plate&amp;lt;/code&amp;gt;, the game will then search all loaded locale files for &amp;lt;code&amp;gt;item-name.iron-plate&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;item-description.iron-plate&amp;lt;/code&amp;gt;, which in the locale file looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[item-name]&lt;br /&gt;
iron-plate=Iron plate&lt;br /&gt;
[item-description]&lt;br /&gt;
iron-plate=A plate made of iron.&amp;lt;/pre&amp;gt;&lt;br /&gt;
If found in the locale, the label is set to this string. If not found, the game will instead show: &amp;lt;code&amp;gt;Unknown key: &amp;amp;quot;item-name.iron-plate&amp;amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In script, the localised string is formatted as &amp;lt;code&amp;gt;{&amp;amp;quot;category.name&amp;amp;quot;}&amp;lt;/code&amp;gt;, so &amp;lt;code&amp;gt;game.print({&amp;amp;quot;item-name.iron-plate&amp;amp;quot;})&amp;lt;/code&amp;gt; prints &#039;&#039;Iron plate&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It is possible to use [[rich text]] features in the localised text if the location where the text is shown supports it, e.g. in the chat, prototype names and prototype tooltips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; can be used for line breaks if the location where the text is shown supports multiline text.&lt;br /&gt;
&lt;br /&gt;
The list of all localization categories used by the base game is:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Localization categories &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[achievement-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[achievement-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[ammo-category-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[autoplace-control-names]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[controls]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[damage-type-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[decorative-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[entity-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[entity-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[equipment-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[fluid-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[fuel-category-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[item-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[item-group-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[item-limitation]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[item-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[map-gen-preset-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[map-gen-preset-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[mod-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[mod-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[modifier-description]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[programmable-speaker-instrument]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[programmable-speaker-note]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[recipe-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[shortcut]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[story]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[string-mod-setting]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[technology-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[technology-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[tile-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[tips-and-tricks-item-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[tips-and-tricks-item-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[virtual-signal-description]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[virtual-signal-name]&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Localising with parameters ==&lt;br /&gt;
For more complex strings, localisation parameters can be used. For instance we want to show &#039;&#039;Time left: 10 minutes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
So a key with a placeholder is defined, which is replaced by the first parameter after the locale key.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;time-left=Time left: __1__ minutes.&amp;lt;/pre&amp;gt;&lt;br /&gt;
So it is used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;game.print({&amp;quot;time-left&amp;quot;, 10})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
It also works with multiple parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;game.print({&amp;quot;time-left&amp;quot;, 10, 45})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;time-left=Time left: __1__ minutes and __2__ seconds.&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which results in &#039;&#039;Time left: 10 minutes and 45 seconds.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Built-in parameters ===&lt;br /&gt;
For some situations, we use localisation to show control schemes. For instance we want to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;technology-prompt=Use T to open the technology screen&amp;lt;/pre&amp;gt;&lt;br /&gt;
However the player may have rebound the key, but we can’t figure out which key as it would not be deterministic. So instead we use the built-in replacement functionality&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;technology-prompt=Use __CONTROL__open-technology-gui__ to open the technology screen.&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can also use this for items and entities:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;big-iron-plate=Big __ITEM__iron-plate__&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;tiny-gun-turret=Tiny __ENTITY__gun-turret__&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== List of built-in parameters ====&lt;br /&gt;
&amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is the name of an internal game control or a prototype name, depending on context. &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; can be 1 or 2, it&#039;s used in parameters that control [[#Localising_alternate_input_names|alternate input names]]. For a list of internal game control names, see [https://lua-api.factorio.com/latest/types/LinkedGameControl.html CustomInputPrototype::linked_game_control].&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL__name__&amp;lt;/code&amp;gt; - The combination of modifiers and input, such as &amp;quot;Control + Alt + Left-click&amp;quot;, or &amp;quot;Not set&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_MODIFIER__name__&amp;lt;/code&amp;gt; - The modifiers, such as &amp;quot;ControlShift&amp;quot;, or, &amp;quot;No modifier selected.&amp;quot;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_STYLE_BEGIN__&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_STYLE_END__&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_LEFT_CLICK__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.mouse-button-1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-b&amp;lt;/code&amp;gt;[https://crowdin.com/project/factorio/discussions/214]&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_RIGHT_CLICK__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.mouse-button-2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_KEY_SHIFT__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.shift&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-leftshoulder&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_KEY_CTRL__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.control&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-rightshoulder&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__ALT_CONTROL_LEFT_CLICK__n__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.mouse-button-1-alt-n&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-button-alt-n&amp;lt;/code&amp;gt; (with parameter &amp;lt;code&amp;gt;control-keys.controller-b&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;__ALT_CONTROL_RIGHT_CLICK__n__&amp;lt;/code&amp;gt; is replaced with &amp;lt;code&amp;gt;control-keys.mouse-button-2-alt-n&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;control-keys.controller-button-alt-n&amp;lt;/code&amp;gt; (with parameter &amp;lt;code&amp;gt;control-keys.controller-x&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;__REMARK_COLOR_BEGIN__&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__REMARK_COLOR_END__&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__ALT_CONTROL__n__name__&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;__CONTROL_MOVE__&amp;lt;/code&amp;gt; - The Movement keys, squished together. Example: &amp;quot;WASD&amp;quot;, from a conventional QWERTY English keyboard.&lt;br /&gt;
* &amp;lt;code&amp;gt;__ENTITY__name__&amp;lt;/code&amp;gt; - The localised name of the [https://lua-api.factorio.com/latest/prototypes/EntityPrototype.html EntityPrototype] subclass.&lt;br /&gt;
* &amp;lt;code&amp;gt;__ITEM__name__&amp;lt;/code&amp;gt; - The localised name of the [https://lua-api.factorio.com/latest/prototypes/ItemPrototype.html ItemPrototype] or subclass.&lt;br /&gt;
* &amp;lt;code&amp;gt;__TILE__name__&amp;lt;/code&amp;gt; - The localised name of the [https://lua-api.factorio.com/latest/prototypes/TilePrototype.html TilePrototype].&lt;br /&gt;
* &amp;lt;code&amp;gt;__FLUID__name__&amp;lt;/code&amp;gt; - The localised name of the [https://lua-api.factorio.com/latest/prototypes/FluidPrototype.html FluidPrototype].&lt;br /&gt;
&lt;br /&gt;
=== Plurals ===&lt;br /&gt;
Pluralization can be used in any string that uses a parameter (e.g. __1__) that is numeric, so something like an amount of minutes. It can be used multiple times per string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;format-days=__1__ __plural_for_parameter__1__{1=day|rest=days}__&amp;lt;/pre&amp;gt;&lt;br /&gt;
This results in &amp;quot;1 day&amp;quot; and &amp;quot;2 days&amp;quot; / &amp;quot;500 days&amp;quot; etc.&lt;br /&gt;
&lt;br /&gt;
The number after &amp;lt;code&amp;gt;__plural_for_parameter__&amp;lt;/code&amp;gt; denotes which parameter is used to determine the plural. This is the parameter 1 in the above example. Anything inside the {} is used to make the plural. Each plural form is separated by a |.&lt;br /&gt;
The text in front of the = determines for what the plural form is used. Options for this are:&lt;br /&gt;
* a simple number, e.g. &amp;quot;1&amp;quot;.&lt;br /&gt;
* Multiple numbers, e.g. &amp;quot;2,3,4&amp;quot;.&lt;br /&gt;
* What the number ends with, e.g. &amp;quot;ends in 11&amp;quot; or &amp;quot;ends in 1&amp;quot;&lt;br /&gt;
* Multiple ends with, e.g. &amp;quot;ends in 1,ends in 2,ends in 12&amp;quot;.&lt;br /&gt;
* &amp;quot;rest&amp;quot; to give the default plural.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Starting with version 2.0&#039;&#039;&#039;, there have to be two underscores surrounding the number that denotes which parameter is used to determine the plural: &amp;lt;code&amp;gt;__plural_for_parameter__1__{1=day|rest=days}__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plural forms may be empty or contain other keys such as __1__ or spaces. This allows rather large plural forms:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;__plural_for_parameter__1__{1=__1__ player is|rest=__1__ players are}__ connecting&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The system chooses the first fitting plural that it encounters when multiple would fit:&lt;br /&gt;
&amp;lt;pre&amp;gt;__plural_for_parameter__1__{ends in 12=option 1|ends in 2=option 2|rest=option 3}__&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will result in &amp;quot;option 1&amp;quot; for 12 and in &amp;quot;option 2&amp;quot; for 22 and in &amp;quot;option 3&amp;quot; for numbers not ending with 2.&lt;br /&gt;
&lt;br /&gt;
=== Concatenating localised strings ===&lt;br /&gt;
The special locale key: &amp;lt;code&amp;gt;&amp;amp;quot;&amp;amp;quot;&amp;lt;/code&amp;gt; is used to concatenate, as the table format does not support concatenation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;game.print({&amp;quot;&amp;quot;, {&amp;quot;item-name.iron-plate&amp;quot;}, &amp;quot;: &amp;quot;, 60})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Will result in: &#039;&#039;Iron plate: 60&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Localising alternate input names ===&lt;br /&gt;
&lt;br /&gt;
In the introduction campaign, a special locale system is used for informing players how to do certain actions with their mouse.&lt;br /&gt;
The normal form is to use eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;how-to-build=Use __CONTROL__build__ to place a building&amp;lt;/pre&amp;gt;&lt;br /&gt;
which results in &amp;quot;Use Left mouse button to place a building&amp;quot;. A more natural phrasing would be &amp;quot;Left-click to place a building&amp;quot;, which can be achieved by using the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;how-to-build=__ALT_CONTROL__1__build__ to place a building&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These &amp;quot;alt&amp;quot; versions are controlled by a few special locale keys, mouse-button-X-alt-1 and mouse-button-X-alt-2. In English, form 1 produces eg &amp;quot;Left-click&amp;quot;, and form 2 produces eg &amp;quot;Left-clicking&amp;quot;.  Only two alt forms (&amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;) are available at the moment, but if this a problem for some languages, more forms may be added in the future.&lt;br /&gt;
Extra mouse buttons, mouse scroll and keyboard keys are handled through the mouse-button-n-alt-1/2, mouse-wheel-alt-1/2 and keyboard-alt-1/2 keys, which just take the normal name and prepend something like &amp;quot;Press/Pressing&amp;quot;, or &amp;quot;Scroll/Scrolling&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When translating to another language, you can use whatever forms you want here, but the important part is that you are consistent when you use the alt-forms everywhere else. It does not necessarily make sense to just copy the usages of alt forms from the English locale, and for some languages it may be more natural to simply not use this system at all.&lt;br /&gt;
&lt;br /&gt;
== Accessing the localised result in code ==&lt;br /&gt;
While usually unneeded, it is possible to read the resulting localised text in code, for example to search in localised names.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[https://lua-api.factorio.com/latest/classes/LuaPlayer.html#request_translation LuaPlayer::request_translation],&lt;br /&gt;
[https://lua-api.factorio.com/latest/classes/LuaPlayer.html#request_translations LuaPlayer::request_translations] and&lt;br /&gt;
[https://lua-api.factorio.com/latest/events.html#on_string_translated on_string_translated event].&lt;br /&gt;
&lt;br /&gt;
== Default Behavior(s) for finding an Unspecified Localised String ==&lt;br /&gt;
If a localised_string is not defined in the prototype for certain prototype classes, e.g. entity, item, Factorio may have a default search behavior.&lt;br /&gt;
&lt;br /&gt;
Determining an item&#039;s localised name:&lt;br /&gt;
Note: the angle brackets are meant to mean a generic term, they are not part of the actual string. Also, place_result and placed_as_equipment_result are strings, and Factorio fetches the matching prototype to examine.&lt;br /&gt;
&lt;br /&gt;
# if localised_name is provided in the item prototype and it is not empty {}, use the provided value&lt;br /&gt;
# else if there is place_result and it has localised_name that is not an empty table: {}, use the localised_name of place_result&lt;br /&gt;
# else if there is place_result with an empty localised_name, use {&amp;quot;entity-name.&amp;lt;entity prototype name&amp;gt;&amp;quot;}&lt;br /&gt;
# else if there is placed_as_equipment_result and it has a localised_name that is not an empty table: {}, use the localised_name of placed_as_equipment_result&lt;br /&gt;
# else if there is placed_as_equipment_result with empty localised_name, use {&amp;quot;equipment-name.&amp;lt;equipment name&amp;gt;&amp;quot;}&lt;br /&gt;
# else use default {&amp;quot;item-name.&amp;lt;item name&amp;gt;&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Reference: [https://forums.factorio.com/viewtopic.php?p=494243#p494243]&lt;br /&gt;
&lt;br /&gt;
Example: The transport-belt item does not have a localised_name, so 1-&amp;gt;2. There is a place result, but not localised_name in the entity prototype. 2-&amp;gt;3. The place result lacks a localised_name. Use the localised string {&amp;quot;entity-name.transport-belt&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
Such defaults often include a &amp;quot;leading key&amp;quot; using [&amp;lt;group&amp;gt;-name] or [&amp;lt;group&amp;gt;-description] (such as [recipe-name], [mod-setting-description]). However, each prototype may have a distinct search behavior before using those, based on presence/absence of values in the prototype. [[Prototype/Recipe]] for example may use the first product&#039;s localised_name, or the main_product&#039;s localised_name, or the localised string found in {&amp;quot;recipe-name.&amp;lt;recipe name&amp;gt;&amp;quot;], depending on values provided (and lacking) in the prototype.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Types/LocalisedString|LocalisedString data stage doc]]&lt;br /&gt;
* [https://lua-api.factorio.com/latest/Concepts.html#LocalisedString LocalisedString control stage doc]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Nallaj</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Command_line_parameters&amp;diff=199530</id>
		<title>Command line parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Command_line_parameters&amp;diff=199530"/>
		<updated>2024-09-04T12:49:13Z</updated>

		<summary type="html">&lt;p&gt;Nallaj: Separate arg type from arg name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}__TOC__&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;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+General options&lt;br /&gt;
|-&lt;br /&gt;
| -h, --help&lt;br /&gt;
|&lt;br /&gt;
| display help&lt;br /&gt;
|-&lt;br /&gt;
| --version&lt;br /&gt;
|&lt;br /&gt;
|show version information&lt;br /&gt;
|-&lt;br /&gt;
| -v, --verbose&lt;br /&gt;
|&lt;br /&gt;
|enable verbose logging&lt;br /&gt;
|-&lt;br /&gt;
| -c, --config&lt;br /&gt;
| PATH&lt;br /&gt;
|config file to use&lt;br /&gt;
|-&lt;br /&gt;
| --no-log-rotation&lt;br /&gt;
|&lt;br /&gt;
|don&#039;t rotate log file&lt;br /&gt;
|-&lt;br /&gt;
| --mod-directory &lt;br /&gt;
| PATH&lt;br /&gt;
|Mod directory to use&lt;br /&gt;
|-&lt;br /&gt;
| --check-unused-prototype-data&lt;br /&gt;
|&lt;br /&gt;
|Print a warning for all prototype values that were not accessed. Note for mod authors: If an entry is unused and is a table that contains the key/value pair &#039;ignore&#039; with the value &#039;true&#039; then the entire entry is ignored.&lt;br /&gt;
|-&lt;br /&gt;
| --executable-path &lt;br /&gt;
| PATH&lt;br /&gt;
|Override autodetected __PATH__executable. Usually not needed except on very weird systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Running options&lt;br /&gt;
|-&lt;br /&gt;
| -s, --map2scenario&lt;br /&gt;
| arg&lt;br /&gt;
|map to scenario conversion&lt;br /&gt;
|-&lt;br /&gt;
| -m, --scenario2map &lt;br /&gt;
| arg&lt;br /&gt;
|scenario to map conversion&lt;br /&gt;
|-&lt;br /&gt;
| --apply-update &lt;br /&gt;
| arg&lt;br /&gt;
|immediately apply update package&lt;br /&gt;
|-&lt;br /&gt;
| --create &lt;br /&gt;
| FILE&lt;br /&gt;
|create a new map&lt;br /&gt;
|-&lt;br /&gt;
| --map-gen-settings&lt;br /&gt;
| FILE&lt;br /&gt;
|Map generation settings for use with &amp;lt;code&amp;gt;--create&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--start-server-load-scenario&amp;lt;/code&amp;gt; or --generate-map-preview. See data/map-gen-settings.example.json&lt;br /&gt;
|-&lt;br /&gt;
| --map-gen-seed&lt;br /&gt;
| SEED&lt;br /&gt;
|Map generation seed for use with --create, --start-server-load-scenario or --generate-map-preview. Will override seed specified in map gen settings&lt;br /&gt;
|-&lt;br /&gt;
| --map-gen-seed-max &lt;br /&gt;
| SEED&lt;br /&gt;
|Map generation seed for use with --generate-map-preview to generate multiple previews using every second seed in the interval from map-gen-seed to map-gen-seed-max.&lt;br /&gt;
|-&lt;br /&gt;
| --map-settings &lt;br /&gt;
| FILE&lt;br /&gt;
|Map settings for use with --create or --start-server-load-scenario. See data/base/prototypes/map-settings.lua&lt;br /&gt;
|-&lt;br /&gt;
| --preset &lt;br /&gt;
| arg&lt;br /&gt;
|Name of the map generation preset to be used.&lt;br /&gt;
|-&lt;br /&gt;
| --generate-map-preview&lt;br /&gt;
| PATH&lt;br /&gt;
|Generate preview images of the map; PATH should name a PNG file or end with a &#039;/&#039; or &#039;\&#039; to indicate a directory.&lt;br /&gt;
|-&lt;br /&gt;
| --generate-map-preview-random&lt;br /&gt;
| COUNT&lt;br /&gt;
|Number of maps to generate with a random seed using --generate-map-preview.&lt;br /&gt;
|-&lt;br /&gt;
| --map-preview-size&lt;br /&gt;
| SCALE&lt;br /&gt;
|Size (in pixels) of map preview (default: 1024)&lt;br /&gt;
|-&lt;br /&gt;
| --map-preview-scale&lt;br /&gt;
| SCALE&lt;br /&gt;
|Scale (meters per pixel) of map preview (default: 1)&lt;br /&gt;
|-&lt;br /&gt;
| --map-preview-offset&lt;br /&gt;
| X,Y&lt;br /&gt;
|Offset of the center of the map, in meters (default: 0,0)&lt;br /&gt;
|-&lt;br /&gt;
| --noise-outputs&lt;br /&gt;
| TAG,TAG...&lt;br /&gt;
|Indicate which variables of noise program to output&lt;br /&gt;
|-&lt;br /&gt;
| --slope-shading&lt;br /&gt;
| SHADEAMOUNT&lt;br /&gt;
|Apply elevation shading to map preview&lt;br /&gt;
|-&lt;br /&gt;
| --slope-shade-property&lt;br /&gt;
| SHADEPROP&lt;br /&gt;
|Property to apply slope shading to (default: elevation)&lt;br /&gt;
|-&lt;br /&gt;
| --report-quantities&lt;br /&gt;
| PROTOTYPE,...&lt;br /&gt;
|When generating map preview, report approximate quantities of the named entity prototypes&lt;br /&gt;
|-&lt;br /&gt;
| --threads&lt;br /&gt;
| THREADCOUNT&lt;br /&gt;
|Number of threads to use when generating map previews&lt;br /&gt;
|-&lt;br /&gt;
| --disable-migration-window&lt;br /&gt;
|&lt;br /&gt;
|Disables the gui that is shown when opening a save with migrated content&lt;br /&gt;
|-&lt;br /&gt;
| --instrument-mod&lt;br /&gt;
|&lt;br /&gt;
|Name of a mod to enable [https://lua-api.factorio.com/latest/Instrument.html Instrument Mode]&lt;br /&gt;
|-&lt;br /&gt;
| --start-server &lt;br /&gt;
| FILE&lt;br /&gt;
|start a multiplayer server&lt;br /&gt;
|-&lt;br /&gt;
| --start-server-load-scenario&lt;br /&gt;
| [MOD/]NAME&lt;br /&gt;
|start a multiplayer server and load the specified scenario. The scenario is looked for inside the given mod. If no mod is given, it is looked for in the top-level scenarios directory.&lt;br /&gt;
|-&lt;br /&gt;
| --start-server-load-latest&lt;br /&gt;
|&lt;br /&gt;
|start a multiplayer server and load the latest available save&lt;br /&gt;
|-&lt;br /&gt;
| --until-tick&lt;br /&gt;
| TICK&lt;br /&gt;
|run a save until given map tick&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark &lt;br /&gt;
| FILE&lt;br /&gt;
|load save and run benchmark&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-ticks&lt;br /&gt;
| N&lt;br /&gt;
|number of ticks for benchmarking. Default is 1000&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-runs&lt;br /&gt;
| N&lt;br /&gt;
|how often the number of ticks will be run, map will reload after each run. Default is 1&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-verbose&lt;br /&gt;
| timings&lt;br /&gt;
|comma separated list of Update timings to output each tick. &amp;quot;all&amp;quot;, &amp;quot;timestamp&amp;quot; as well as all other values seen in the debug show-time-usage view&#039;s Update section are allowed here. An empty string disabled verbose benchmarking. Timings are returned in nanoseconds.&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-sanitize&lt;br /&gt;
|&lt;br /&gt;
|only output the final benchmark results&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-ignore-paused&lt;br /&gt;
|&lt;br /&gt;
|leaves the game paused if it was paused when saved. By default the game is unpaused when a benchmark starts.&lt;br /&gt;
|-&lt;br /&gt;
| --output-perf-stats &lt;br /&gt;
| FILE&lt;br /&gt;
|path of file to which rendering performance statistics measurements should be saved. Special tags {api}, {hw}, {time} and {tag} will be replaced.&lt;br /&gt;
|-&lt;br /&gt;
| --dump-data&lt;br /&gt;
|&lt;br /&gt;
|dumps data.raw as JSON to the script output folder and exits.&lt;br /&gt;
|-&lt;br /&gt;
| --dump-icon-sprites&lt;br /&gt;
|&lt;br /&gt;
|dumps all icon sprites as png files to the script output folder and exits.&lt;br /&gt;
|-&lt;br /&gt;
| --dump-prototype-locale&lt;br /&gt;
|&lt;br /&gt;
|dumps all prototypes name and description (if they have a valid value) to the script output folder and exits.&lt;br /&gt;
|-&lt;br /&gt;
| --mp-connect&lt;br /&gt;
| ADDRESS&lt;br /&gt;
|start factorio and connect to address&lt;br /&gt;
|-&lt;br /&gt;
| --password&lt;br /&gt;
| PASSWORD&lt;br /&gt;
|the password to use when using mp-connect (if any)&lt;br /&gt;
|-&lt;br /&gt;
| --heavy&lt;br /&gt;
|&lt;br /&gt;
|run the game in heavy mode if singleplayer with graphics (heavy mode is related to investigating desyncs, see [[Desynchronization#Using_heavy_mode_command]])&lt;br /&gt;
|-&lt;br /&gt;
| --load-game &lt;br /&gt;
| FILE&lt;br /&gt;
|start Factorio and load a game in singleplayer&lt;br /&gt;
|-&lt;br /&gt;
| --load-scenario&lt;br /&gt;
| [MOD/]NAME&lt;br /&gt;
|start Factorio and load the specified scenario in singleplayer. The scenario is looked for inside the given mod. If no mod is given, it is looked for in the top-level scenarios directory.&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-graphics &lt;br /&gt;
| FILE&lt;br /&gt;
|load save and run it with graphics for benchmark-ticks number of ticks as normal game would&lt;br /&gt;
|-&lt;br /&gt;
| --benchmark-frame &lt;br /&gt;
| FILE&lt;br /&gt;
|load save and benchmark graphics rendering of single frame (prepare + render) without updating the game&lt;br /&gt;
|-&lt;br /&gt;
| --force-opengl&lt;br /&gt;
|&lt;br /&gt;
|use OpenGL for rendering (windows only)&lt;br /&gt;
|-&lt;br /&gt;
| --force-d3d&lt;br /&gt;
|&lt;br /&gt;
|use Direct3D for rendering (windows only)&lt;br /&gt;
|-&lt;br /&gt;
| --d3d-adapter&lt;br /&gt;
| ID&lt;br /&gt;
|adapter which should be used to initialized Direct3D (windows only)&lt;br /&gt;
|-&lt;br /&gt;
| --d3d-feature-level&lt;br /&gt;
|&lt;br /&gt;
|override feature level (11, 10.1, 10) (windows only)&lt;br /&gt;
|-&lt;br /&gt;
| --dxgi-blit-model&lt;br /&gt;
|&lt;br /&gt;
|force Blit presentation mode (windows only)&lt;br /&gt;
|-&lt;br /&gt;
| --audio-driver&lt;br /&gt;
|&lt;br /&gt;
|default = sdl = SDL&#039;s WASAPI driver (windows)/SDL&#039;s PulseAudio or ALSA driver (linux)/SDL&#039;s CoreAudio driver (mac); allegro = Allegro&#039;s DirectSound8 driver (windows)/Allegro&#039;s PulseAudio, ALSA or OSS driver (linux)/Allegro&#039;s OpenAL driver (mac); allegro-via-sdl = Allegro mixer with SDL&#039;s WASAPI driver (windows)/not supported (linux + mac)&lt;br /&gt;
|-&lt;br /&gt;
| --debug-graphics&lt;br /&gt;
|&lt;br /&gt;
|enables debugging layer for graphics API. If DirectX is used DirectX SDK needs to be installed for this to work.&lt;br /&gt;
|-&lt;br /&gt;
| --fullscreen&lt;br /&gt;
| BOOL&lt;br /&gt;
|start game in windowed mode (saved to configuration)&lt;br /&gt;
|-&lt;br /&gt;
| --max-texture-size&lt;br /&gt;
| N&lt;br /&gt;
|maximal size of texture that the game can use (saved to configuration). Should be power of two greater than 2048&lt;br /&gt;
|-&lt;br /&gt;
| --graphics-quality &lt;br /&gt;
| arg&lt;br /&gt;
|accepted values: high, normal, low, very-low. low and very-low are deprecated and are migrated to normal.&lt;br /&gt;
|-&lt;br /&gt;
| --video-memory-usage &lt;br /&gt;
| arg&lt;br /&gt;
|accepted values: all, high, medium, low&lt;br /&gt;
|-&lt;br /&gt;
| --force-graphics-preset &lt;br /&gt;
| arg&lt;br /&gt;
|accepted values: very-low, low, mac-with-low-ram, medium-with-low-vram, medium, high, very-high, extreme&lt;br /&gt;
|-&lt;br /&gt;
| --gfx-safe-mode&lt;br /&gt;
|&lt;br /&gt;
|resets some graphics settings to values that should work on most configurations&lt;br /&gt;
|-&lt;br /&gt;
| --low-vram&lt;br /&gt;
|&lt;br /&gt;
|sprites that are not put into sprite atlases won&#039;t be allocated as texture objects&lt;br /&gt;
|-&lt;br /&gt;
| --shader&lt;br /&gt;
|&lt;br /&gt;
|enable/disable shader postprocessing (saved to configuration)&lt;br /&gt;
|-&lt;br /&gt;
| --disable-audio&lt;br /&gt;
|&lt;br /&gt;
|Disable audio. Mainly for faster startup during development.&lt;br /&gt;
|-&lt;br /&gt;
| --window-size &lt;br /&gt;
| arg&lt;br /&gt;
|Desired window resolution. For example &amp;quot;1680x1050&amp;quot;. Or &amp;quot;maximized&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| --single-thread-loading&lt;br /&gt;
|&lt;br /&gt;
|Disables loading of sprites in multiple threads.&lt;br /&gt;
|-&lt;br /&gt;
| --cache-sprite-atlas &lt;br /&gt;
| BOOL&lt;br /&gt;
|Enable/disable sprite atlas cache.&lt;br /&gt;
|-&lt;br /&gt;
| --nogamepad&lt;br /&gt;
|&lt;br /&gt;
|Disable gamepad(controller) support&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Server options&lt;br /&gt;
|-&lt;br /&gt;
| --port&lt;br /&gt;
| N&lt;br /&gt;
|network port to use&lt;br /&gt;
|-&lt;br /&gt;
| --bind&lt;br /&gt;
| ADDRESS[:PORT]&lt;br /&gt;
|IP address (and optionally port) to bind to&lt;br /&gt;
|-&lt;br /&gt;
| --rcon-port&lt;br /&gt;
| N&lt;br /&gt;
|Port to use for RCON&lt;br /&gt;
|-&lt;br /&gt;
| --rcon-bind&lt;br /&gt;
| ADDRESS:PORT&lt;br /&gt;
|IP address and port to use for RCON&lt;br /&gt;
|-&lt;br /&gt;
| --rcon-password&lt;br /&gt;
| PASSWORD&lt;br /&gt;
|Password for RCON&lt;br /&gt;
|-&lt;br /&gt;
| --server-settings &lt;br /&gt;
| FILE&lt;br /&gt;
|Path to file with server settings. See data/server-settings.example.json&lt;br /&gt;
|-&lt;br /&gt;
| --use-authserver-bans &lt;br /&gt;
| BOOL&lt;br /&gt;
|Verify that connecting players are not banned from multiplayer and inform Factorio.com about ban/unban commands.&lt;br /&gt;
|-&lt;br /&gt;
| --use-server-whitelist &lt;br /&gt;
| BOOL&lt;br /&gt;
|If the whitelist should be used.&lt;br /&gt;
|-&lt;br /&gt;
| --server-whitelist &lt;br /&gt;
| FILE&lt;br /&gt;
|Path to file with server whitelist.&lt;br /&gt;
|-&lt;br /&gt;
| --server-banlist &lt;br /&gt;
| FILE&lt;br /&gt;
|Path to file with server banlist.&lt;br /&gt;
|-&lt;br /&gt;
| --server-adminlist &lt;br /&gt;
| FILE&lt;br /&gt;
|Path to file with server adminlist.&lt;br /&gt;
|-&lt;br /&gt;
| --console-log &lt;br /&gt;
| FILE&lt;br /&gt;
|Path to file where a copy of the server&#039;s log will be stored&lt;br /&gt;
|-&lt;br /&gt;
| --server-id &lt;br /&gt;
| FILE&lt;br /&gt;
|Path where server ID will be stored or read from&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Boolean options ===&lt;br /&gt;
&lt;br /&gt;
Parameters shown above with a BOOL option must be formatted as &amp;lt;code&amp;gt;[parameter]=true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[parameter]=false&amp;lt;/code&amp;gt;. For example,&lt;br /&gt;
&lt;br /&gt;
  --fullscreen=false&lt;br /&gt;
&lt;br /&gt;
will start the game in windowed (not fullscreen) mode.&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;
=== Creating a map from custom settings ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it&#039;s useful to create a new game with map and/or map generator settings stored in a JSON file rather than going through the in-game map settings screen.&lt;br /&gt;
One reason is that by editing the settings directly it is possible to set settings outside the range normally available from the GUI.&lt;br /&gt;
&lt;br /&gt;
To do this, Factorio is run from the command-line, and a JSON file containing the map generator settings and a JSON file containing map settings (if customizing them) are needed.&lt;br /&gt;
&lt;br /&gt;
Example for custom generator settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
    &amp;quot;terrain_segmentation&amp;quot;: 0.5,&lt;br /&gt;
    &amp;quot;water&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;width&amp;quot;: 0,&lt;br /&gt;
    &amp;quot;height&amp;quot;: 0,&lt;br /&gt;
    &amp;quot;starting_area&amp;quot;: &amp;quot;normal&amp;quot;,&lt;br /&gt;
    &amp;quot;peaceful_mode&amp;quot;: false,&lt;br /&gt;
    &amp;quot;autoplace_controls&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;coal&amp;quot;: {&amp;quot;frequency&amp;quot;: 1, &amp;quot;size&amp;quot;: 2, &amp;quot;richness&amp;quot;: 0.5},&lt;br /&gt;
        &amp;quot;copper-ore&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;low&amp;quot;, &amp;quot;size&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;richness&amp;quot;: &amp;quot;high&amp;quot;},&lt;br /&gt;
        &amp;quot;crude-oil&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;size&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;richness&amp;quot;: &amp;quot;normal&amp;quot;},&lt;br /&gt;
        &amp;quot;enemy-base&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;size&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;richness&amp;quot;: &amp;quot;normal&amp;quot;},&lt;br /&gt;
        &amp;quot;iron-ore&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;size&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;richness&amp;quot;: &amp;quot;normal&amp;quot;},&lt;br /&gt;
        &amp;quot;stone&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;size&amp;quot;: 0, &amp;quot;richness&amp;quot;: &amp;quot;normal&amp;quot;},&lt;br /&gt;
        &amp;quot;uranium-ore&amp;quot;: {&amp;quot;frequency&amp;quot;: &amp;quot;normal&amp;quot;, &amp;quot;size&amp;quot;: &amp;quot;none&amp;quot;, &amp;quot;richness&amp;quot;: &amp;quot;normal&amp;quot;}&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;cliff_settings&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;cliff&amp;quot;,                &lt;br /&gt;
        &amp;quot;cliff_elevation_0&amp;quot;: 30,        &lt;br /&gt;
        &amp;quot;cliff_elevation_interval&amp;quot;: 20, &lt;br /&gt;
        &amp;quot;richness&amp;quot;: 1                   &lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;property_expression_names&amp;quot;:&lt;br /&gt;
    {&lt;br /&gt;
        &amp;quot;elevation&amp;quot;: &amp;quot;0_16-elevation&amp;quot;,&lt;br /&gt;
        &amp;quot;temperature&amp;quot;: &amp;quot;35&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    &amp;quot;seed&amp;quot;: null&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this is the same format as [https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings MapGenSettings] that are modifiable from Lua. Everything in the file is optional.&lt;br /&gt;
&lt;br /&gt;
Creating a custom save:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;C:\Program Files\Factorio\bin\x64\Factorio.exe&amp;quot; --create stuff-seed123.zip --map-gen-settings map-gen-settings.json --map-gen-seed 123&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generating a map preview:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;C:\Program Files\Factorio\bin\x64\Factorio.exe&amp;quot; --generate-map-preview preview-seed123.png --map-gen-settings map-gen-settings.json --map-gen-seed 123&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating the JSON files from a map exchange string ====&lt;br /&gt;
&lt;br /&gt;
It can be useful to create the initial JSON files from a known map exchange string instead of creating them from scratch. To convert the map exchange string to JSON, open the game and run the following command with your map exchange string:&lt;br /&gt;
&lt;br /&gt;
 /c game.write_file(&#039;map.txt&#039;, game.table_to_json(game.parse_map_exchange_string(&amp;quot;&amp;lt;your exchange string here&amp;gt;&amp;quot;)))&lt;br /&gt;
&lt;br /&gt;
Then open the script_output folder in the [[user data directory]] and open map.txt - it will look like this:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;map_settings&amp;quot;:{ ...&amp;lt;MAP_SETTINGS&amp;gt; ... },&amp;quot;map_gen_settings&amp;quot;:{ ...&amp;lt;MAP_GEN_SETTINGS&amp;gt;... }}&lt;br /&gt;
&lt;br /&gt;
Copy the { ...&amp;lt;MAP_SETTINGS&amp;gt; ... } section into a new file called &#039;map-settings.json&#039; in the desired location. Copy the { ...&amp;lt;MAP_GEN_SETTINGS&amp;gt; ... } section section into a new file called &#039;map-gen-settings.json&#039; in the desired location.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Console]]&lt;br /&gt;
&lt;br /&gt;
{{C|Modding}}&lt;/div&gt;</summary>
		<author><name>Nallaj</name></author>
	</entry>
</feed>