OK, is there guide to upgrate mod to 2.0?

Place to get help with not working mods / modding interface.
Post Reply
AriKhelvi
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 21, 2024 6:40 pm
Contact:

OK, is there guide to upgrate mod to 2.0?

Post by AriKhelvi »

Developer of mod I like is kinda <nowhere>, so I want to do it myself. However, I keep running into issue with -quality Base mod, there is something in recipe that need to be changed. Is there guide for changing recipes?

User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: OK, is there guide to upgrate mod to 2.0?

Post by picklock »

I haven't seen any instructions yet, but I had a similar error message when updating my mods.
For me it was the line with the result of the recipe.
I changed it to the format

Code: Select all

results = {{type="<type>", name="<name>", amount=<amount>}}  } ,
also zum Beispiel

Code: Select all

results = {{type="item", name="night-vision-equipment", amount=1}}  },
and the error was gone for me.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters

AriKhelvi
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 21, 2024 6:40 pm
Contact:

Re: OK, is there guide to upgrate mod to 2.0?

Post by AriKhelvi »

Well, here is the thing:

Code: Select all

Failed to load mods: __core__/lualib/util.lua:803: Recipe has no results: factory-1
stack traceback:
	[C]: in function 'error'
	__core__/lualib/util.lua:803: in function 'normalize_recipe_products'
	__quality__/prototypes/recycling.lua:78: in function 'add_recipe_values'
	__quality__/prototypes/recycling.lua:191: in function 'generate_recycling_recipe'
	__quality__/data-updates.lua:5: in main chunk

Mods to be disabled:
• quality (2.0.7)
And here are snippets of code (that work on 1.11):

Code: Select all

require("prototypes.recipe")

Code: Select all

-- Factory buildings
	{
		type = "recipe",
		name = "factory-1",
		enabled = false,
		energy_required = 30,
		ingredients = {
			{type = "item", name = "stone", amount = 50 * multiplier},
			{type = "item", name = "iron-plate", amount = 50 * multiplier},
			{type = "item", name = "copper-plate", amount = 10 * multiplier}
		  },
		result = {{type = "item", name = "factory-1", amount = 1}}
	},
It cannot find recipe only in 2.0, and it drives ma crazy

User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: OK, is there guide to upgrate mod to 2.0?

Post by picklock »

Well, it is not "result", but "results". There is missung the "s" at the end of "results".
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters

Post Reply

Return to “Modding help”