Page 1 of 1

Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 3:51 pm
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

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 3:57 pm
by SuperSandro2000
I think you can only do one output

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 3:59 pm
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....

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 4:00 pm
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).

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 4:56 pm
by Lee_newsum
Error None: Error while loading recipe prototype "crushed" (recipe): conversion of data to type "unsigned int" failed
Modifications: Complex


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

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 5:57 pm
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}
         }

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 6:02 pm
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"

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 7:03 pm
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

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 11:17 pm
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"
	},

}
)

Re: Prototype/Recipe, Types/table

Posted: Mon Nov 10, 2014 11:19 pm
by Boogieman14
It's probably telling you it needs an icon attribute as well.

Re: Prototype/Recipe, Types/table

Posted: Wed Nov 12, 2014 8:43 pm
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?