Request: Move recycling recipe generation to data-final-fixes

Things that we aren't going to implement
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 281
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Request: Move recycling recipe generation to data-final-fixes

Post by KiwiHawk »

It is common for mods to to update recipe ingredients in data-updates stage (we do it to almost every recipe in Bob's & Angel's, depending on which mods / settings are enabled). However this is after the recycling recipes have been generated (as official mods run first). Moving the recycling recipe generation to data-final-fixes seems like the obvious solution. This would still leave the possibility of mods changing the recipes after in their own data-final-fixes.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee
thesixthroc
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Wed Apr 29, 2020 9:53 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by thesixthroc »

+1
User avatar
Quezler
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by Quezler »

at the very least some better documentation about how to regenerate it from your own mod
Last edited by Quezler on Wed Dec 18, 2024 4:51 pm, edited 1 time in total.
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 833
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by IsaacOscar »

I agree, however you can just put:

Code: Select all

if mods["quality"] then require("__quality__.data-updates") end
In your own mods data-final-fixes (data, data-updates, or anywhere else after you've added or changed recipes)
Last edited by IsaacOscar on Wed Dec 18, 2024 12:14 pm, edited 2 times in total.
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

IsaacOscar wrote: Wed Dec 18, 2024 11:08 am you can just put:

Code: Select all

require("__quality__.data-updates")
In your own mods data-final-fixes
Furthermore, you can put it in your data-updates even, after you change the recipes.
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 833
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by IsaacOscar »

curiosity wrote: Wed Dec 18, 2024 11:59 am Furthermore, you can put it in your data-updates even, after you change the recipes.
Sure, I've updated my post to with more possibilities, and I added an 'if' check.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14775
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by Rseding91 »

I do not believe we will be doing this. Next someone will ask for a final final fixes because they want to add recipes in final fixes and then have recycling recipes made.

And then a request to move it to final final final fixes.
If you want to get ahold of me I'm almost always on Discord.
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 833
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by IsaacOscar »

Rseding91 wrote: Wed Dec 18, 2024 12:21 pm I do not believe we will be doing this. Next someone will ask for a final final fixes because they want to add recipes in final fixes and then have recycling recipes made.

And then a request to move it to final final final fixes.
Ok, creating more 'final fixes' is probably not a good idea, but 'data-final-fixes.lua' already exists.
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

You know, turns out you can call the recycling recipe generator for specific items, just like __quality__/data-updates.lua itself does. What is this request even about then?
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 833
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by IsaacOscar »

curiosity wrote: Wed Dec 18, 2024 12:41 pm You know, turns out you can call the recycling recipe generator for specific items, just like __quality__/data-updates.lua itself does. What is this request even about then?
Automating it! In particular, so modders don't need to know about the recycling generator, and players can get them automatically (unless they make recipe changes in data-final-fixes.lua, hence why they'd need a data-final-final-fixes)
In fact this behaviour even caused one not-a-bug report, 122635.
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 114
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by micromario »

I agree with rseding here. It's convenient for mods to modify the recycling recipes in data updates instead of having to perform recycling modification in final fixes.
What's the reason that B+A recipes must be defined in data updates?
User avatar
Khazul
Fast Inserter
Fast Inserter
Posts: 175
Joined: Fri Sep 03, 2021 4:47 am
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by Khazul »

Barrelling auto recipe generation should probably more there as well for the same reason.
lyvgbfh
Fast Inserter
Fast Inserter
Posts: 170
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by lyvgbfh »

Rseding91 wrote: Wed Dec 18, 2024 12:21 pm I do not believe we will be doing this. Next someone will ask for a final final fixes because they want to add recipes in final fixes and then have recycling recipes made.

And then a request to move it to final final final fixes.
I disagree with this line of reasoning; the requested change is in context of the issue being discussed. As the author states that Wube mods are given precedence in the load order, the simplest suggestion is the one given. It could also be done by excluding recycling from the load-first logic and allowing the regular order to take place, or any number of other hacks that would being the desired result without moving recycling to final-fixes.

This is not to say that a hacky workaround is worth considering, but that in responding to a request it's worth addressing the whole. The interface request is much more about saying x behavior is undesirable than y fix is the One True Way to resolve it.
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

micromario wrote: Wed Dec 18, 2024 7:11 pm It's convenient for mods to modify the recycling recipes in data updates instead of having to perform recycling modification in final fixes.
Why would a mod want to programmatically transform the recycling recipes while not specifically targeting them (and thus depending on Quality)?
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 833
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by IsaacOscar »

curiosity wrote: Thu Dec 19, 2024 12:17 pm
micromario wrote: Wed Dec 18, 2024 7:11 pm It's convenient for mods to modify the recycling recipes in data updates instead of having to perform recycling modification in final fixes.
Why would a mod want to programmatically transform the recycling recipes while not specifically targeting them (and thus depending on Quality)?
Whether or not you depend on quality won't make a difference: Wube mods are always loaded first,
Also you might only want an optional dependency so people who haven't bought space age can still use your mod.
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

IsaacOscar wrote: Thu Dec 19, 2024 12:23 pm Whether or not you depend on quality won't make a difference: Wube mods are always loaded first,
Also you might only want an optional dependency so people who haven't bought space age can still use your mod.
Both points irrelevant to the case. While the second is an obvious nitpick (optional dependency is dependency) and you are missing the point with the first, I'll tell you why the first argument is not valid in any context since it's raised in here so often: there is no way to specify loading before another mod. Any name hacks you might employ is exactly that: hacks. The load order outside of dependencies is unspecified and can't (read shouldn't) be relied on.
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 281
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by KiwiHawk »

curiosity wrote: Thu Dec 19, 2024 12:17 pm Why would a mod want to programmatically transform the recycling recipes while not specifically targeting them (and thus depending on Quality)?
Real example:

Bob's and Angel's mods modify a LOT of recipes, swapping out ingredients. This happens in data-updates stage. Recycling recipes have already been generated so the recycling recipe would need to be modified too or regenerated.

1. Angel's Smelting adds items, techs and recipes for smelting Aluminum Plate (data).
2. At least one other mod tells Angel's Smelting that Aluminum Plate should be enabled (data).
3. Recycling recipes are generated (data-updates).
4. Recipes are modified, adding Aluminum Plate (data-updates).
5. Recycling recipes are modified, adding Aluminum Plate (data-updates).

I want 4. to happen before 3. so that 5. doesn't need to happen! And no, 4. can't happen in data stage as it needs to happen after 2.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

KiwiHawk wrote: Thu Dec 19, 2024 7:22 pm Real example:

Bob's and Angel's mods modify a LOT of recipes, swapping out ingredients. This happens in data-updates stage. Recycling recipes have already been generated so the recycling recipe would need to be modified too or regenerated.

1. Angel's Smelting adds items, techs and recipes for smelting Aluminum Plate (data).
2. At least one other mod tells Angel's Smelting that Aluminum Plate should be enabled (data).
3. Recycling recipes are generated (data-updates).
4. Recipes are modified, adding Aluminum Plate (data-updates).
5. Recycling recipes are modified, adding Aluminum Plate (data-updates).

I want 4. to happen before 3. so that 5. doesn't need to happen! And no, 4. can't happen in data stage as it needs to happen after 2.
Not a valid example. Not only you are specifically targeting recycling recipes, but it's also something you want to avoid. Moving the recycling generation to data-final-fixes won't make this harder for you (look what I replied to!).
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 281
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by KiwiHawk »

curiosity wrote: Thu Dec 19, 2024 7:54 pm Not a valid example. Not only you are specifically targeting recycling recipes, but it's also something you want to avoid. Moving the recycling generation to data-final-fixes won't make this harder for you (look what I replied to!).
I realize that it's different to what you were replying to. However it's a valid example of why I would like this change. The purpose of this thread.

You're correct, moving recycling generation to data-final-fixes won't make things harder. It'll make things easier. That's the whole point!
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee
curiosity
Filter Inserter
Filter Inserter
Posts: 553
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Request: Move recycling recipe generation to data-final-fixes

Post by curiosity »

KiwiHawk wrote: Thu Dec 19, 2024 8:38 pm I realize that it's different to what you were replying to. However it's a valid example of why I would like this change. The purpose of this thread.

You're correct, moving recycling generation to data-final-fixes won't make things harder. It'll make things easier. That's the whole point!
If you wanted to reply to my earlier post, you should have done so directly instead of beating around the bush. Then I'd have told you that recycling does seem like something "final", i.e. what data-final-fixes is for. And if it really is common practice to finish defining your recipes in data-updates, then it should be moved.
Post Reply

Return to “Won't implement”