I wana be the dev … Part 1

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


Leave a Reply