Hello,
I hope you're doing well. Could you please consider keeping the creation of new items out of “data-final-fixes.lua” and "data-updates.lua"? The purpose of the distinct data phases (data, data-updates, and data-final-fixes) is to ensure clear separation of responsibilities. Defining items in later phases can unintentionally lead to mod incompatibilities, particularly for mods that need to access all items generically.
For example, I encountered a recipe, cerys-science-pack, which references an item cerys-science-pack that does not (yet) exist. As a result, the recipe appears invalid in my mod, and I am forced to either ignore or delete it. Unfortunately, both actions lead to further errors and compatibility issues.
I’d like to share this thought:
"While it may sometimes be the responsibility of a mod to consolidate changes made by other mods in a later phase, it is not appropriate for a mod to monitor or wait for its own changes before acting. This approach represents an anti-pattern in modding, as it goes against the fundamental purpose of the distinct data-loading phases in Factorio, which are designed to ensure clear separation of responsibilities. Such practices can lead to chaotic dependencies and unpredictable behavior, making it harder for mods to interact consistently."
Would there be a way to resolve this, perhaps by moving item creation to data.lua? This change would ensure that all mods can interact with your items without conflicts, improving compatibility overall.
Thank you for considering this, and I appreciate your time!
Best regards,
kux