Page 1 of 1
OK, is there guide to upgrate mod to 2.0?
Posted: Mon Oct 21, 2024 6:45 pm
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?
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Mon Oct 21, 2024 7:53 pm
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.
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Mon Oct 21, 2024 9:03 pm
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
-- 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
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Mon Oct 21, 2024 10:02 pm
by picklock
Well, it is not "result", but "results". There is missung the "s" at the end of "results".
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Tue Oct 22, 2024 7:40 am
by AriKhelvi
Oh. That explains something...
Still, I have some recipe errors from "recycle" from -quality, sooooo.... I will go and steal work of someone else who is reasonable)
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Tue Oct 22, 2024 8:03 am
by Xorimuth
https://gist.github.com/tburrows13/687f ... a437e86cfa
Here’s a porting guide. Note step 1:
disable quality mod when porting!. Your errors are nothing to do with quality mod. Quality mod expects correctly defined recipes, and your recipes are not correctly defined. Disable quality mod and you’ll get actually helpful errors from the game itself.
Re: OK, is there guide to upgrate mod to 2.0?
Posted: Tue Oct 22, 2024 11:45 am
by AriKhelvi
Xorimuth wrote: Tue Oct 22, 2024 8:03 am
https://gist.github.com/tburrows13/687f ... a437e86cfa
Here’s a porting guide. Note step 1:
disable quality mod when porting!. Your errors are nothing to do with quality mod. Quality mod expects correctly defined recipes, and your recipes are not correctly defined. Disable quality mod and you’ll get actually helpful errors from the game itself.
Thank you very much!