Difference between revisions of "Prototype/Technology"

From Official Factorio Wiki
Jump to: navigation, search
(overhaul to include Prototype)
(0.16)
Line 2: Line 2:
 
More in [[Research]]
 
More in [[Research]]
  
== Mandatory properties ==
+
== General properties ==
 
Inherits all properties from [[Prototype]].
 
Inherits all properties from [[Prototype]].
 +
 +
=== icon ===
 +
'''Type''': [[Types/FileName]]
 +
 +
=== icon_size ===
 +
'''Type''': [[Types/uint]]
 +
 +
The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.
 +
 +
=== icons ===
 +
Can be used instead of icon and icon_size.
 +
 +
== Technology data ==
 +
If the technology does not have a difficulty, this is located directly in the prototype. Otherwise, if the "normal" or "expensive" property exists, the technology has difficulty. Then, the technology data has to be specified for each difficulty instead of directly in the prototype. If at least one difficulty has technology data defined, the other difficulty can be set to false. This will give it the exact same properties as the difficulty that is defined.
 +
 +
=== upgrade ===
 +
'''Type''': [[Types/bool]]
 +
 +
'''Default''': false
 +
 +
When set to true, and the technology contains several levels, only the relevant one is displayed in the technology screen.
 +
<syntaxhighlight lang="lua">  {
 +
    type = "technology",
 +
    name = "rocket-damage-2",
 +
    ...
 +
    upgrade = "true"
 +
  }</syntaxhighlight>
 +
 +
=== enabled ===
 +
'''Type''': [[Types/bool]]
 +
 +
'''Default''': true
  
 
=== unit ===
 
=== unit ===
 
It contains
 
It contains
* count - How many units are needed
+
* count — [[Types/double]] — How many units are needed. Must be positive.
* time - how much time is needed per one unit, in standard laboratory without upgrades it is is count of seconds
+
* count_formula — [[Types/string]] — Formula that specifies how many units are needed per level of the infinite technology. May not be specified if count is speficied.
* ingredients - list of ingredients needed for one units
+
* time — [[Types/double]] — How much time is needed per one unit, in lab with crafting speed 1 it is the number of seconds.
 +
* ingredients list of ingredients needed for one units
 
   unit =
 
   unit =
 
   {
 
   {
Line 16: Line 49:
 
     ingredients = { ["science-pack-1"] = 1 }
 
     ingredients = { ["science-pack-1"] = 1 }
 
   }
 
   }
 +
 +
=== max_level ===
 +
'''Type''': [[Types/uint]] or [[Types/string]]
 +
 +
'''Default''': Same as the level of the technology, which is 0 for non-upgrades, and the level of the upgrade for upgrades.
 +
 +
"infinite" for infinite technologies, otherwise uint.
 +
 
=== prerequisites ===
 
=== prerequisites ===
 
List of technologies needed to be researched before this one can be researched.
 
List of technologies needed to be researched before this one can be researched.
 
   prerequisites = {"explosives", "military-2"}
 
   prerequisites = {"explosives", "military-2"}
 +
 
=== effects ===
 
=== effects ===
 
'''Type''': [http://lua-api.factorio.com/latest/Concepts.html#Modifier Modifier]
 
'''Type''': [http://lua-api.factorio.com/latest/Concepts.html#Modifier Modifier]
Line 27: Line 69:
 
     recipe = "land-mine"
 
     recipe = "land-mine"
 
   }
 
   }
 
== Optional properties ==
 
Inherits all properties from [[Prototype]].
 
 
=== upgrade ===
 
When set to true, and the technology contains several levels, only the relevant one is displayed in the technology screen.
 
<pre>  {
 
    type = "technology",
 
    name = "rocket-damage-2",
 
    ...
 
    upgrade = "true"
 
    }</pre>
 
Default value is false
 
 
note from FreeER, it is possible that I am wrong so I figured I'd put my name and that this senctence could mislead you first lol, I believe that all except for the first unresearched technology in the series are hidden, for factorio to know which technologies are in that series the technology names must be the same except for the number at the end
 
 
note from Matjojo, It is currently not possible to have more than one descriptions for a line of upgrades.
 

Revision as of 12:25, 8 May 2018

Basics

More in Research

General properties

Inherits all properties from Prototype.

icon

Type: Types/FileName

icon_size

Type: Types/uint

The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.

icons

Can be used instead of icon and icon_size.

Technology data

If the technology does not have a difficulty, this is located directly in the prototype. Otherwise, if the "normal" or "expensive" property exists, the technology has difficulty. Then, the technology data has to be specified for each difficulty instead of directly in the prototype. If at least one difficulty has technology data defined, the other difficulty can be set to false. This will give it the exact same properties as the difficulty that is defined.

upgrade

Type: Types/bool

Default: false

When set to true, and the technology contains several levels, only the relevant one is displayed in the technology screen.

  {
    type = "technology",
    name = "rocket-damage-2",
    ...
    upgrade = "true"
  }

enabled

Type: Types/bool

Default: true

unit

It contains

  • count — Types/double — How many units are needed. Must be positive.
  • count_formula — Types/string — Formula that specifies how many units are needed per level of the infinite technology. May not be specified if count is speficied.
  • time — Types/double — How much time is needed per one unit, in lab with crafting speed 1 it is the number of seconds.
  • ingredients — list of ingredients needed for one units
 unit =
 {
   count = 20,
   time = 5,
   ingredients = { ["science-pack-1"] = 1 }
 }

max_level

Type: Types/uint or Types/string

Default: Same as the level of the technology, which is 0 for non-upgrades, and the level of the upgrade for upgrades.

"infinite" for infinite technologies, otherwise uint.

prerequisites

List of technologies needed to be researched before this one can be researched.

 prerequisites = {"explosives", "military-2"}

effects

Type: Modifier List of effects of the technology (applied when the technology is researched).

 {
   type  = "unlock-recipe",
   recipe = "land-mine"
 }