Hello,
I'm trying to create an item which would ONLY be craftable in a special machine (so cannot be crafted in hand).
This machine is based on an assembling machine.
In order to do so, i'm using the category "advanced-crafting" but i would like the item not to be craftable in Assembling machine 2 and 3 but only in mine new special machine.
I thought i could create a new category with the characteristic of the "advanced-crafting" and assign this category only to my machine.
How to do so ?
Or is there an other way to do so ?
Thanks in advance,
Sydney R
Create new (crafting) category like "advanced-crafting"
Re: Create new (crafting) category like "advanced-crafting"
Vanilla has 9 recipe categories, but you can make a new one.Alwin4you wrote: Mon Aug 24, 2020 2:25 pm Hello,
I'm trying to create an item which would ONLY be craftable in a special machine (so cannot be crafted in hand).
This machine is based on an assembling machine.
In order to do so, i'm using the category "advanced-crafting" but i would like the item not to be craftable in Assembling machine 2 and 3 but only in mine new special machine.
I thought i could create a new category with the characteristic of the "advanced-crafting" and assign this category only to my machine.
How to do so ?
Or is there an other way to do so ?
Thanks in advance,
Sydney R
Code: Select all
data:extend({
{type = "recipe-category", name = "my-awesome-recipe-category"}
})
Recipes without category have "crafting" recipe category by default.
Code: Select all
data.raw.recipe["refined-hazard-concrete"].category = "crafting"
Re: Create new (crafting) category like "advanced-crafting"
Thank you for your quick answer,
Where should i write the new line(s) according to the model you sent me ?
In the file : data.lua ? or in a prototype (recipies)
Thanks again,
Sydney R
Where should i write the new line(s) according to the model you sent me ?
In the file : data.lua ? or in a prototype (recipies)
Thanks again,
Sydney R
Re: Create new (crafting) category like "advanced-crafting"
All code will be played once: data.lua, all "required" files in data.lua and all "required" files deeper.Alwin4you wrote: Mon Aug 24, 2020 3:14 pm Thank you for your quick answer,
Where should i write the new line(s) according to the model you sent me ?
In the file : data.lua ? or in a prototype (recipies)
Thanks again,
Sydney R
There is no difference at all.
Here is example:
data.lua:
Code: Select all
require('prototypes.recipe-category')
Code: Select all
data:extend({
{type = "recipe-category", name = "my-awesome-recipe-category"}
})
Short version: First will be started file data.lua from every mod, than data-updates.lua from every mod, than data-final-fixes.lua from every mod.
Vanilla is actually is a mod and you must set this as prerequisite to start it before your mod.