How to add crafting categories to recipes that can be crafted by hand.

Place to get help with not working mods / modding interface.
Post Reply
User avatar
yaim904
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

How to add crafting categories to recipes that can be crafted by hand.

Post by yaim904 »

Hello,

I hope you are well,

I need help with the following:
Create a few categories for the mod recipes, and all is well.
I want players to be able to craft the recipes of a category, but I can't find a way to do it.
The following code worked but not well

Code: Select all

local CharacterCategories = data.raw[ 'character' ][ 'character' ]
CharacterCategories = CharacterCategories[ 'crafting_categories' ]
table.insert( CharacterCategories, 1, 'xXx' )

local GodCategories = data.raw[ 'god-controller' ][ 'default' ]
GodCategories = GodCategories[ 'crafting_categories' ]
table.insert( GodCategories, 1, 'xXx' )
In the red circle you can see an object that is equivalent to 1K iron plate, in the yellow circle you can see the recipe that does the conversion.
Captura de pantalla (216).png
Captura de pantalla (216).png (136.96 KiB) Viewed 1202 times

The iron chests that can be created with the materials that you have, are calculated including my recipe, but you can see in the blue circle, the recipes of my category are not included in the calculations.

And in the green circle the calculations ignore my recipes again.
Captura de pantalla (218).png
Captura de pantalla (218).png (152.89 KiB) Viewed 1202 times

And even if I use the recipe and increase iron plate the recipes are not updated.
Captura de pantalla (219).png
Captura de pantalla (219).png (131.16 KiB) Viewed 1202 times

The following is the result when the above code is not executed.
Captura de pantalla (220).png
Captura de pantalla (220).png (131.91 KiB) Viewed 1202 times
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by google.
:D

User avatar
yaim904
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: How to add crafting categories to recipes that can be crafted by hand.

Post by yaim904 »

Hello, there is no way to do what I want?
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by google.
:D

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: How to add crafting categories to recipes that can be crafted by hand.

Post by Bilka »

Make sure that the recipes that should be queued automatically have https://wiki.factorio.com/Prototype/Rec ... termediate set to true.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
yaim904
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: How to add crafting categories to recipes that can be crafted by hand.

Post by yaim904 »

Bilka wrote:
Sat Oct 08, 2022 12:26 pm
Thanks for your answer.
I tried with that property and it didn't work.
Captura de pantalla (281).png
Captura de pantalla (281).png (248.58 KiB) Viewed 1080 times
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by google.
:D

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: How to add crafting categories to recipes that can be crafted by hand.

Post by Bilka »

yaim904 wrote:
Sun Oct 09, 2022 1:22 pm
Bilka wrote:
Sat Oct 08, 2022 12:26 pm
Thanks for your answer.
I tried with that property and it didn't work.

Captura de pantalla (281).png
In that screenshot your character doesnt seem to have the crafting categories. You need that and the other property.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
yaim904
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: How to add crafting categories to recipes that can be crafted by hand.

Post by yaim904 »

Bilka wrote:
Sun Oct 09, 2022 4:10 pm
What you say is true.
I created the category is for specific machines.

In this example the category I created is xXx
yaim904 wrote:
Sat Oct 01, 2022 8:09 pm

Code: Select all

local CharacterCategories = data.raw[ 'character' ][ 'character' ]
CharacterCategories = CharacterCategories[ 'crafting_categories' ]
table.insert( CharacterCategories, 1, 'xXx' )

local GodCategories = data.raw[ 'god-controller' ][ 'default' ]
GodCategories = GodCategories[ 'crafting_categories' ]
table.insert( GodCategories, 1, 'xXx' )

But I want some of those recipes to be able to be made by hand, but not on other machines.

I know that if I remove the "category" property, the recipes can be made by hand, but they can also be made on machines other than the ones I want.

If I am not making myself understood, please ask the questions you need to understand.
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by google.
:D

Post Reply

Return to “Modding help”