Greetings to you Naikoraptor.

Today we'll talk about

  • Establishing its technology
  • System migrations
  • About layers games (Collision)

(I specifically to dwell and then are put on, because their construction properties have so much that I'm afraid anything simply forget them, I'll highlight a single lesson)

And so let's start:

Establishing its technology

To begin, think, for what purpose we need it? We will unlock the recipes? Or improve anything? Because the technology is a little different in these cases.

Here are the codes from API.

  • Reload ()-this function allows you to restart the researched technology on maps, useful if you have made edits, and new map you create.
  • ForSE = LuaForse-what power applies this technology (player, porotivnik) this line missing always, no one has yet found it use, and however useless it but amiable developer just in case gave us.
  • name = string-the name of the technology
  • localised_name = string-localized name (but then we remember that we all make through locale.cfg?)
  • enabled = bool-Row locks on rows in the likeness of the recipes are, in principle, it did not enjoy. Did that unlock via script
  • upgrade = bool-Is an indication of improving it or not
  • prerequisites = dictionary string → LuaTechnology-Table technology which should be studied to this technology became available for study
  • research_unit_count = uint-what and how many jars to 1 study
  • research_unit_energy = double-how long to study 1.
  • order = string string sorting technology

Now let's try to make themselves the technology our casks from past examples.

To start with "zablokirvoat'" all of our recipes have barrels that each recipe add line: enabled = false or enabled = "false" no difference.

Then create a file Tehnology.lua

It prescribes the data: extend ({})

Technologies like everything else prescribed in individual {}, {}, {}.

Type = "technology",

name = "Aisberg"

icon = "__base__/graphics/icons/fluid/empty-crude-oil-barrel.png"[[ картинка технологии, и хоть в api про них ничего не сказано, но в игре их обязательно нужно указывать ]]

icon_size = 32,-[[ НЕ обязательно, но если картинку обрезает, указываем её размер (картинка всегда квадрат) ]]

effects =-[[Что будет делать Технология после исследования]]
Type = "unlock-recipe"
recipe = "empty-barrel-M"

Type = "unlock-recipe"
recipe = "fill-barrel"

Type = "unlock-recipe"
recipe = "empty-barrel"

prerequisites = {},

Unit =
count = 35,-number of studies
ingredients =
{"science-pack-1", 1}-[[ ресурс и количество, кстати чтобы не было ошибок я вам напомню что есть:

science-pack-1, science-pack-2,science-pack-3, alien-science-pack]]
time = 30-one time

And go in the game.1drGYQE






The technology works, recipes for not previously available.





For another, this section can be called: "Updating fashion."

After all, the first time it is not possible to do so, it eventually, right? Therefore, it can often be that recipes items will vary. But how about those phones where the recipes already researched? There they will remain the same though you tresni (Game Technology and researched recipes stores separately, to simplify loading and saving memory).


Consider the very real situation: when we realized that the balance is disturbed.

Suppose you needed a barrel for water from 10 iron is expensive. So we are changing in her recipe for 9. But going on our map where we play for several Zilionov or bromilionov hours we find that barrel all the same kraftitsja of iron 10. We think we can do something wrong saw and open the list of technologies. But there, too, the recipe will be giving out 10 sheets. What-do we do?

Create in the root of fashion folder migrations.

There are creating a file with the name of the new version of fashion "

For example I have now called MyMod_ 0.1.1 Means I create MyMod_0.1.2.lua file in the folder

This file does not need to connect!

This file is activated then, and only then when you go to the map of the old version. He Rewrites this card under the version of our fashion and activates the file.

Most often it will write here it is:

for i, player in ipairs (game. players) do
Player.. reset_technologies ()
Player.. reset_recipes ()

This updates all recipes and all the technology.

Now go to the info. json and there change to 0.1.1 to 0.1.2 and pereimenovyvaem folder the same way fashion

Finish! The mod has been updated!

Of course for the more advanced, I advise to use this file as a one-time script and if you wish you can shove and conditions and commands.


Layers of games (Collision)

The whole game though and looks single, in fact it's split into contact layers.

For example, a layer of water and a layer of buildings. After all, no building could be placed on water right?

Here is a list of layers:

  • "ground-tile-layer, move the character (1-th layer)
  • "water-tile-Layer not available la movement (0-th layer)
  • "resource-layer" layer of ores (3-th layer)
  • "floor-layer" layer of concrete or bricks (2-th layer)
  • "object-layer" layer objects (Supreme 4-th layer)
  • "player-layer" layer (the highest 4-th layer)

Notice that the 2 layers are at level 1?  Layer the character is not used by anything except character, although it is equivalent to the layers of objects.

All this while and not particularly important, but gives space to create interesting pieces for some. For example when I dabbled with these settings I created something like Blocks "bridge" that stavjat'sja the water but allow you to put anything over them. Or for example I created a "fish farm" which depend only on the water.

Line segments are at all objects and surfaces (entities and tiles) But think it is too willing to find themselves

Hello again, and immediately to the point, today we'll talk about:

  • Creating your prescription
  • Systematization of items inside the game and their team
  • Games localization

And as a bonus (decided to get ahead of the curve for the sake of one person that posted in VC):

  • How to disable or change the game elements of their

Creating your prescription

Begin perhaps with interesting features of trading posts. Remember in the inventory list of Saddam's character? This list has a speceficheskuju feature: "specify the Recipes link on the subject.

I don't get it? (And I'm sure that is not clear).

Let us explain our barrels. While she had no prescription, it is not visible in the list, however, if we open the list of items (such as in the trunk of a query), then it will be there.

But as soon as we add our cask at least 1 prescription receiving it, it immediately appears in the list in the inventory (except for a couple of moments, I'll talk about them later).

Now let's move on to the recipes, they are written the same way and itemy, i.e. data: extend ({}) and separate {}, {}


The recipe begins with

Type = "recipe"

And followed all the keywords:

  • name = string-the name of the recipe (it is better to create the recipe name is identical with the name of the subject, so it is easier)
  • string category = category recipes. There are some categories that limit access to machines or kraftam (this may be a category "smelting", which enables processing of subject in the furnace, but prohibits it or "oil-processing" which allows the craft only oil refinery, the other standard categories can be found in the recipes in the base, or you can create them yourself but more on that another time) 
  • energy_required = float-time in seconds it takes to craft (if you omit date, it will automatically be specified 0.5)
  • ingredients = array of ingredients-Specify ingredients can be 2 ways, concise and complete.

When the quick mode is enough to indicate the list of objects and their quantity. For example


ingredients = {

{"iron_plate", 5},

{"wood" 10}

}-So here we require 5 iron and 10 tree craft.


However, in Summary mode, you cannot specify the liquid (besides the special category)

Full method requires another type of ingredient declaration, i.e. our record from the last example would look like this:


ingredients = {

{type = "item", name = "iron_plate" amount = 5},

{type = "item", name = "wood", amount = 10}





  • enabled = bool-If this line does not specify, the recipe will be available to all at once, if you specify false, then you will need to unlock (e.g. study or script).
  • result = string-Specifies the result after Kraft (example result = "iron_chest")
  • result_count = int-indicates how many itemov happens after Kraft

The following lines of work both on itemy and recipes, but why recipes pictures I will tell later.

  • icon = string
  • Group = string
  • subgroup = string
  • order = string

Now comes the special strings that are only available for liquid Saddam:

The result string and replaces the single string result_count similar with full recording of ingredients


results =
{type = "fluid", name = "heavy-oil", amount = 3},
{type = "fluid" name = "light-oil", amount = 3},
{type = "fluid", name = "petroleum-gas", amount = 4}


And now I will share with you one trick: If you want to do a few things but the device lets you do only 1 at the output, you can do it through the category of oil-procesing, but ingredients and specify the output items are not liquid.

Now let's all check in practice:

Remember our keg? All that we have, is to create it, but in theory Screenshot_16it should carry the water to a more convenient location. To do this we will also, as developers have barrels of oil (2 item and 2 Kraft).

On this Quickly turn in our mod and create there a second barrel (for example with a drop on icon)

Now in the folder with the barrel create a file recipes.lua (Although you can straight here to prescribe recipes like itemy, but it is better to keep separate, it would simplify you orientation in fashion)

First, we create a recipe for the barrel. We are not going to invent a bicycle and her just 10 iron sheetsScreenshot_19

data: extend ({
Type = "recipe"
name = "empty-barrel-M"
ingredients = {{"iron-plate", 10}}
result = "WaterB"[[ Вобщето я советал вам создавать предмет и рецепт
с одинаковым именем, но кто я такой, что-бы свои советы слушать?]]

After the advent of prescription our barrel appeared in list

Now give the barrel the opportunity to take in the water and kick back, adding 2 prescription:


Type = "recipe"
name = "fill-barrel"
category = "crafting-with-fluid",
subgroup = "barrel"
order = "b"
ingredients =
{type = "fluid", name = "water", amount = 30},
{type = "item", name = "WaterB" amount = 1},
results =
{type = "item", name = "WaterBF" amount = 1}

Type = "recipe"
name = "empty-barrel"
category = "crafting-with-fluid",
subgroup = "barrel"
order = "c"
icon = "__base__/graphics/icons/fluid/empty-crude-oil-barrel.png"
ingredients =
{type = "item", name = "WaterBF" amount = 1}
results =
{type = "fluid", name = water, amount = 30},
{type = "item", name = "WaterB" amount = 1}


We go into the game and checkScreenshot_20








Systematization (Order, Group, Subgroup)

To make it easier to submit what they are talking about, remember Saddam's grid, there are marked all items and their recipes. Now let's see what works.

From recipes and items have 3 rows of systematization, This group, a subgroup of order.

Now the specifics:

Group is responsible for what is tab's recipe.

subgroup says which row will be subject

order responds to what it will be in order.

The group that no one ever uses, since the subgroup is contained in some group (subgroup Formally decides not to line number instead of just a subset, but actually goes just line breaks), the sort is alphabetical-i.e from the beginning will stand order items "a" then "aa" then for example "ab" then "b", and even if the letter is omitted, then it's okay He just put them alphabetically.

The developers of the original game is so namudrili by signing their team that much easier to create your group and there are already quietly creating its classification.

It is this now and we'll:

Create a file group.lua

Write data: extend ({})

And just remember: type = "item-group" and type = "item-subgroup"


The first creates a tab, the second string.

Let's start with the Group:

Type = "item-group"
name = "MyModItems" Name for the code
icon = "__base__/graphics/icons/big-biter.png", "Picture (its)
inventory_order = "a", Sorting in the inventory (will be the first since a first letter:] 
order = "d", is the number of tabs (4-th)

And now under the Group:

Type = "item-subgroup",
name = "MyModItems-resourses"-Code Name
Group = "MyModItems", is the number of tabs
order = "c" line number (article 3)


Now let's change the sorting in our barrelsBVgpqQW

in the SAB group recipes and items of type


but in his Order order (then themselves as more convenient)

And of course check the game (do not forget to plug this file)


Games localization

Now you only add languages and our mod will actually be deemed ready (although he adds only 1 barrel to transfer water, but it's also a MOD)

Move to the root folder of the Fashion and add there the locale folder

In it, create the folder for the language: Russian-ru, English-en, more details can be viewed in the game folder, there are a lot of options. Create a folder locale.cfg

and open our noutpadom got.

Important: this file does not need to connect, because as we remember the folder languages is reserved under the name of the locale.

the translation itself is intuitive, I just show how we rename our barrels:

in file locale.cfg write:



WaterB = water barrel

WaterBF = Filled water barrel


empty-barrel-M = water barrel

fill-barrel = Fill keg

empty-barrel = empty keg


That is in [скобках]the specified category

Before the "=" is spelled the name in code

After "=" transfer.

Important: do not put spaces before and after as well (generally better without the extra spaces) the game reads them as characters and you get blank icons instead of any items text.

ALSO important: there is a button noutpade changing encodings, always place the 8-bit encoding as UTF-8 without BOM

The name of the categories in more detail can be found in the base.

And, here is another feature:



WaterBF = on my illustration-drop!

Thus, you can make a signature for Items recipes and more.




About changing Files other mods or games. This is done through a Luqa one special command, I will not vdovatsja in details as this and so the requests section (Ala for advanced)

Create any Lua faql (I prefer changes.lua)

There write without brackets

data.raw["string"]["string"] = parameter.

In the first set of square brackets make the type of the object, the second his name in code in the paremtr line you wish to change, and its new value.


data.raw["ammo"]["flame-thrower-ammo"]. magazine_size = 500, this string will make Volume store for flamethrower equal 500 units. Or for example we need to flamethrower lying in our fashion tab. Then do so


data.raw["ammo"]["flame-thrower-ammo"]. subgroup =

data.raw["ammo"]["flame-thrower-ammo"]. order =

And so on.

Now about how you can disable Itemy altogether.

If that's iznachalen (e.g. gun)

data.ra["gun"]["pistol"]w. enabled = falseTak as there is no one technology that it unlocks, it will not.

If's with technology, in the same way we climb in technology Change that it unlocks all the same except the desired subject, thus we will not allow him to appear.

All for today

Hello everyone again. Today I would like to talk about fashion and base unit on creating the simplest of items. This lesson will be introductory and some difficult moments will be described briefly (later we'll look at them in more detail).

More precisely, we consider:

  • The overall architecture of mods
  • Sorting files in fashion
  • Connection files
  • Create a basic object


The general architecture of the mods

To begin, go to the folder mods in the root directory of the game. It is here that will contain all the fashion.

In addition to the mods there is file mod-list. json-this file is responsible for what mods incorporated at the moment, it is also possible to choose which fashion will be turned on or off (without the required entry and perezahoda in the game).



Fashion themselves can contain both folders and archives (the first is easier to edit, the second for distribution).

The important thing is that the file or folder fashion must have a name constructed from the name of fashion, an underscore, and the version of fashion. This is the root folder fashion.

Example: MyMod_ 0.1.4


Version is always written as 3 numbers through the points. Developers explain it like this:

The first major upgrade, drastic changes.

The second small renewal, adding pairs of items



Now on to the architecture of fashion:

There are "reserved" and "free" files and names, as well as the only required file.

Let's probably immediately going to create it, and will not return to this:Screenshot_21

create a folder of our fashion, and create a file "json info.".

This file is the face of fashion. He is responsible for its display in the list of mods in the game.

In the file set operator brackets {}.

Inside write row labels (in the picture you specify required) and their values in quotation marks. Do not forget that the name of the folder corresponding to the version and the name of fashion.

  • name-the name of fashion
  • version-version
  • title-the name of the fashion in the list
  • dependencies-dependency (such as Bob-series mods have dependencies on other mods)Screenshot_22
  • author-the name of the creator
  • descriprion-description of fashion


You can add and their lines, but do not forget: "brevity is the soul-sister of talent."

You can now deal with "free" and "reserved" names.

There are a number of special folders that the game will be perceived differently, and if there are not those files, you will get an error.

For example, you want all icons of objects lying in a certain place and create a folder called migration. However, the game will assume that this folder files to transfer data between versions. You will get an error.

To avoid this, here's a list of all reserved names for the root folder of the fashion:

  • campaigns
  • locale
  • Scenarios
  • migration

Otherwise, you have complete freedom in creating the folders and files but not to arrange a bacchanal in which hard work, there are easier methods of sorting. About this right now.

Sort files in fashion

This part is not mandatory and, in theory, you can do so, as you prefer. Opportunities for perversion here quite a lot. So I will tell you about the 2 convenient file storage method: first, as done by the developers, the second is purely my own.

     A method for developer3YC0bAts:

In the original game, all items, recipes, and files contained in the folder Prototypes. Graphics-Graphics folder. Sounds-Sounds. Thus, developers divide all files by type.

Inside the folder they are holding to the sub-type: for example, the folder rabienie goes Prototypes Recipes, Entity, Items, and Technologies. This guarantees you quick finding subject in folders, but if you have a lot, it would be difficult to find a specific item.

    Naikoraptor'a method (which Nick unreadable, that the text before the edits …)  (re: it is read as: Naiko Raptor) (Drug Japtor? ..)

It seems to me that when a subject all of its components are easier to keep close by, so I create a folder of all "objects", and in it under the folder for each "phenomenon"Screenshot_23

For example, the Prototypes folder Carbon lies in her lie files: Item.lua, recipe.lua, technology.lua, Carbon.png, Carbon_Tech.png.

Thus, if you change anything associated with the subject, all the files will be much closer and more convenient sorted.


Connection files.

The first thing is at the root of our fashion will create file data.luScreenshot_24a.

This file will be automatically started when you turn on fashion.

Any other lua files will be ignored.

Let us, for example, will create in our fashion Items folder and it will create Items.lua.


Now open the back our root file data.lua and store the new command:Screenshot_25



Team propisyvaet'sja at the beginning of the file.

Inside the brackets indicates the path to the plugin file in lua quotes (!) that starts from the root of fashion.

Folder names are case sensitive and are separated by periods. The file itself is spelled without an extension ".LUA".

Files can be connected anywhere (i.e. I can create technology and connect a list of recipes, etc.).

Thus you are connecting all files lua (sounds and graphics we will consider later).



Now a few of my own: how it can be beneficial to use?

Remember, I advise you ob'edenjat' files in some objects and do sort of belonging to one or another subject? So, here it is very useful.

In each folder (the same "Carbon" in the example) create data.lua, and connect all the components.Screenshot_26


And in the main file connect this data.lua file. Thus, an object with your recipe will be submitted to a single file that you can easily enable or disable if you wishScreenshot_27.






Creating your subject

Lo and behold, we smoothly switched to create something of his own.

The most important thing in creating fashion is an idea. If you don't know what you are doing-the result will be flawed. You need idea (preferably original) to write something.

For example, I will create a full barrels of water (by analogy with barrels of oil). What for? And remember, when you create a map, you can specify that the water was only in the middle of the map? And suddenly, we need water for our "station" three-nine lands, and pull back the tube-is not beneficial, and to haul the train.

Create folder assigned under this object (Yes, I'll use their sorting, but you can do as you see fit), there are creating data.lua and item.lua

Okryvaem File item.lua and set back: data: extend ({})

Within double brackets will go an enumeration of all the objects. Thus we describe their base properties.

Each object within the "data: extend" written in their own brackets {}, {}, {}.

And do not forget to put commas between the brackets, or else you will find error.

Next is the filling of the subject: it is quite simple, as you need to fill all the rows and not just the ones you need (in other words you need to fill in what you need to fill in: lol:).

Now I will give you a list and description of all possible strings, and after-example of creating our "barrels".

  • type = string-This line tells the game that before her subject (other types will learn as guides, not immediately raskazhesh').
  • icon = string-specifies the path to the picture file (and the file clip art. AGA).
  • name = string-Specifies the subject name of the INSIDE fashion, rather than in the game itself. Owned by this name we will inform other parts of the code that we want to, but don't get confused to write as it is (only in English).
  • localised_name = string-name lokalizovanoe Gives the subject (it can be seen in the game). But we will not ever use this line because there is a simple and correct way to localize (more on this in the trace. times).
  • the STACK_SIZE = uint-surely, some frightened type "Uint"? Don't worry, it's just a long 32-bit unsigned integer (32-bit unsigned integer type. number in the range from 0 to 4 294 967 295. not bad, eh?). This parameter size staka.
  • fuel_value = float if you specify this string, then tell the game that this object-fuel, and its need to poke into the slot for fuel (in the oven too). Here you can specify how many object gives energy when burned. For example, coal provides 4.0, and solid fuels-15.5 can be written and shot. (float-signed floating-point number. account value is meaningless, and the number may vary within 1.40129846432481707 e-45 … 3.40282346638528860 e +38).
  • order = string-a string that specifies the order in which to sort the items. About this the following Allstars. Until put "aaa" (Latin).
  • Group = string-string sorting by group. Also leave for later (do not fill it).
  • subgroup = string-String sorting by Strip. And it'll leave for later (specify a raw-material)
  • place_result = string is an indication of what will happen if you put an object on the ground. About the buildings we will also speak.
  • float speed =-indicates the speed of the object, if it is a weapon or tool.
  • magazine_size = float-specifies the number of cartridges in the holder, if this weapon.
  • resistance = Resistance-another "magic" data type. About it later. This line is responsible for resistance to Armor damage if the subject-armor.
  • item_to_clear = LuaItemPrototype-this line identifies the resource with which you can clean the drawing from content.
  • Stackable = bool-if false then this prohibits subject stakat'sja. However, it is easier to do this by specifying the stack_size = 1.
  • module_effects-this line does not have a type. She is responsible for the effects if the created object-module effects.
  • flags = string-the most interesting line. Gives the object properties (flags). This, like almost everyone, I will tell BW, but not now.

And now let's create our barrel:

data: extend ({

Type = "item",

name = "WaterB"

icon = "__MyMod__/Prototypes/WaterT/empty-barrel.png"

flags = {"goes-to-main-inventory"},

subgroup = "raw material"

order = "aaa"

the STACK_SIZE = 10,




Now I will tell you about missed two things: flags and picture.

To create a simple object need only 1 of the 2 flags: "goes-to-main-inventory" or "goes to the quickbar.

The first will be to transfer the subject with Kraft in inventory and second suggest to the hot bar. While that is all that you need to know (well, that and they cannot be put together).

Now about the images: the picture must be png format and size of 32 x 32. Otherwise the game will generate an error. If you are lazy to invent and draw a picture (or if you do not know how to draw)-you can plug already finished out the game.

Go to the folder base, and there's a graph in icons are looking for our barrel.

Here's to you just in case her path: __base__/graphics/icons/fluid/empty-barrel.png

Copy this file to a folder (you can add back anything) and writhe like this icon = "__MyMod__/Prototypes/WaterT/empty-barrel.png"


Tell more in detail about how to connect your pictures:

First, specify the name of the fashion with double underscores: _ _ Name _ _ fashion (without gaps, you can mount and base game and foreign fashion;))

then, through "/" folder names are specified, then the file with the extension.


Now connect our's in data.lua and go into the game (check for errors). If they do not exist Screenshot_28and the game starts, all OK. However, a subject so far we can only see, for example, in the trunk because he does not have a prescription.

Well, that's all. We created our first item (and, although he does not have a prescription, you can find it in list of items). About how to add recipes will tell the times, otherwise it will be too much information (and too much will have someone edit text … : cry:).

Greetings to you Naikoraptor and this is the first Lesson to establish its fashion.

This lesson will focus on the preparations for the establishment of fashion. Here, that there will be no eye-popping secrets, nor anything that might be in the game, however, this is precisely the part that decides whether you pour then creating another object of the same type, or a nice sipping gulls under melody, rivet the next work of art.

(and Yes, the title is not really a bug, it's Minus the first part)

So, let's start:

Step 1 "preparing the workplace"

Remove all unnecessary items from the table and pour myself a mug of elite tea.

As we know Hong you install creates 2 folder. One is the "engine" and the base game, and the second is the "library". The library is a folder with Savegames, Mods, Configs, and records errors, it is in the folder mods we will create.

Specifically, the engine be in the data folder in the root of the game. There are 2 subfolders:

Base files (games)

Core (engine, kernel, System)


And librariesScreenshot_19






The first thing we need to do is create a shortcut on your desktop to the folder Mods

There are 2 possible her location. In the zip version of a folder Mods (like everything else) is located in the folder with the game.

If there are no Mods folder in the folder with the game, then copy any shortcut on your desktop and copy writing in both fields%appdata%factorio


Either go along this path and create a shortcut

My computer > > C > > Users > > your username > > AppData > > Roaming > > Factorio



Now go to the folder of the game and find the "Base", and throw back a copy of the shortcut to the libraries and in Libraries throw label on the Base. Thereby give yourself two sided corridor, we have a lot of running back and forth, so make it nicer.

Now Software

Step Two: Software

Nothing complicated here. (Links open in a new tab, no thanks)

We Will Need:

Paint net

Notepad ++

And direct the hands

Now we will perform some manipulation. Create a new folder on the desktop Any txt file. Give it a name like * НаборБукв*.lua (example: jdjdfvdugfwuhvhf.lua)

Now click LMB and select Properties. Install notepad ++ as application for viewing

Screenshot_16  You need to install a program like Notepad ++. Otherwise, every time the Lua files through "COATINGS-> open with Notepad ++" strongly zadalbyvaet

By the way the file can delete, we need only had the program change


Perhaps, at this workplace training is finished.