Recycling recipes

Place to get help with not working mods / modding interface.
Vano0o0o
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Mar 14, 2026 3:16 pm
Contact:

Recycling recipes

Post by Vano0o0o »

Hello everyone. I need help changing the recipes for recycling some items. In my modification, I create many additional categories of recipes, and at the same time, items created in these categories give the wrong output during recycling. I found a way to change this on my client's side: in the file "data\quality\prototypes\recycling.lua", in the function "local default_can_recycle = function(recipe)" on line 158, you need to enter the necessary categories that will not be taken into account during processing (like "smelting" and "chemistry"). However, this only works on my side, so for the person who downloaded my mod, everything will not work correctly. How do I write a change to a local function in another file in the code?
P.S. Yes, there is an option to simply copy this entire file into my mod and change what is needed there, however, in this case I will have duplicate recipes, which then I need to disable everything and change a bunch of other lines of code (or somehow disable the execution file "data\quality\prototypes\recycling.lua" entirely).
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4567
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Recycling recipes

Post by boskid »

You should not modify game files or other mod files. If you want your recipe to opt-out of default recycling, you should set an `auto_recycle` to false on the recipe prototype.
Vano0o0o
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Mar 14, 2026 3:16 pm
Contact:

Re: Recycling recipes

Post by Vano0o0o »

Yes, it helped. Thanks!
Post Reply

Return to “Modding help”