Prototype/Recipe, Types/table

Place to get help with not working mods / modding interface.
Post Reply
Lee_newsum
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jan 15, 2014 9:41 am
Contact:

Prototype/Recipe, Types/table

Post by Lee_newsum »

result what am I not doing/missing?

Code: Select all

	{
		type = "recipe",
		name = "crushed",
		category = "Complex-crushing",
		energy_required = 5,
		ingredients = {{"iron-ore",1}},
		result = {
				{name = "iron-nuggets", result_count = 9},
				{name = "gold-nuggets", result_count = 1}
			}
		enabled = "true"
	},
thanks for your help

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: Prototype/Recipe, Types/table

Post by SuperSandro2000 »

I think you can only do one output

Lee_newsum
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jan 15, 2014 9:41 am
Contact:

Re: Prototype/Recipe, Types/table

Post by Lee_newsum »

Code: Select all

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

Liquius
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Tue Nov 04, 2014 12:01 pm
Contact:

Re: Prototype/Recipe, Types/table

Post by Liquius »

Lee_newsum wrote:

Code: Select all

results=
    {
      {type="fluid", name="heavy-oil", amount=3},
      {type="fluid", name="light-oil", amount=3},
      {type="fluid", name="petroleum-gas", amount=4}
    },
well this works....
Then carefully look at how it differs (hint: result/results).

Lee_newsum
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jan 15, 2014 9:41 am
Contact:

Re: Prototype/Recipe, Types/table

Post by Lee_newsum »

Error None: Error while loading recipe prototype "crushed" (recipe): conversion of data to type "unsigned int" failed
Modifications: Complex


??????????????????

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Prototype/Recipe, Types/table

Post by L0771 »

conversion of data to type "unsigned int" failed
falta type

Code: Select all

      result = {
            {type = "item", name = "iron-nuggets", result_count = 9},
            {type = "item", name = "gold-nuggets", result_count = 1}
         }
Last edited by L0771 on Mon Nov 10, 2014 6:04 pm, edited 3 times in total.

cartmen180
Filter Inserter
Filter Inserter
Posts: 358
Joined: Fri Jul 25, 2014 2:53 pm
Contact:

Re: Prototype/Recipe, Types/table

Post by cartmen180 »

L0771 wrote:
conversion of data to type "unsigned int" failed
falta type

Code: Select all

      result = {
            {type = "item", name = "iron-nuggets", result_count = 9},
            {type = "item", name = "gold-nuggets", result_count = 1}
         }
result only for a single item or fluid, results is for multiple items and expects a table.
I will give you 2 examples for the table.

Code: Select all

results = {
            {type = "item", name = "iron-nuggets", amount = 9},
            {type = "item", name = "gold-nuggets", amount = 1}
        },

Code: Select all

results = {
            {"iron-nuggets", 9},
            {"gold-nuggets", 1}
        },
Not specifying a type only works with normal items, for fluids you have to use type="fluid"
Check out my mods

Lee_newsum
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jan 15, 2014 9:41 am
Contact:

Re: Prototype/Recipe, Types/table

Post by Lee_newsum »

cartmen180 wrote:
L0771 wrote:
conversion of data to type "unsigned int" failed
falta type

Code: Select all

      result = {
            {type = "item", name = "iron-nuggets", result_count = 9},
            {type = "item", name = "gold-nuggets", result_count = 1}
         }
result only for a single item or fluid, results is for multiple items and expects a table.
I will give you 2 examples for the table.

Code: Select all

results = {
            {type = "item", name = "iron-nuggets", amount = 9},
            {type = "item", name = "gold-nuggets", amount = 1}
        },

Code: Select all

results = {
            {"iron-nuggets", 9},
            {"gold-nuggets", 1}
        },
Not specifying a type only works with normal items, for fluids you have to use type="fluid"
Thanks you cartmen180
add it to the wiki https://forums.factorio.com/wiki/inde ... pe#results

Lee_newsum
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jan 15, 2014 9:41 am
Contact:

Re: Prototype/Recipe, Types/table

Post by Lee_newsum »

Error None: Error while loading recipe prototype "iron-ore-i9g1" (recipe): No such node (icon) Modifications: Complex

Code: Select all

data:extend(
{
	-- CRUSHED
	{
		type = "recipe",
		name = "gold-ore-nuggets",
		category = "Complex-crushing",
		energy_required = 5,
		ingredients = {{"gold-ore",1}},
		result = "gold-nuggets",
		result_count = 10,
		enabled = "true"
	},

	{
		type = "recipe",
		name = "iron-ore-i9g1",
		category = "Complex-crushing",
		energy_required = 5,
		ingredients = {{"iron-ore",1}},
		results = {

   		         {"iron-nuggets", 9},
       		     	 {"gold-nuggets", 1}
       			  },
		enabled = "true"
	},

}
)

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Prototype/Recipe, Types/table

Post by Boogieman14 »

It's probably telling you it needs an icon attribute as well.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

Turtle
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat May 31, 2014 9:45 pm
Contact:

Re: Prototype/Recipe, Types/table

Post by Turtle »

Multiple results for non-fluid outputs is, as far as I know, still not possible. See kovarex's post: Recipes with multiple output?

Post Reply

Return to “Modding help”