It came up on the discord today, an user tried getting lua migrations to work so their recipes stay unlocked, but since 2.0 the technology effects reset by default:
https://discord.com/channels/1396775903 ... 1793585193
https://lua-api.factorio.com/latest/aux ... ml#example
Also, weren't lua migrations removed or something? idk (https://discord.com/channels/1214952937 ... 5910604892)
remove the auxilary migrations example
remove the auxilary migrations example
- Attachments
-
- Screenshot 2025-02-23 at 18.58.30.png (86.56 KiB) Viewed 367 times
Re: remove the auxilary migrations example
You keep linking to inaccessible messages. What's your source on Lua migrations being removed?
- Stringweasel
- Filter Inserter
- Posts: 445
- Joined: Thu Apr 27, 2017 8:22 pm
- Contact:
Re: remove the auxilary migrations example
That's something else. Early in the 2.0 beta it was possible to add lua snippets to the json migration file to replace entities smartly. And for others not having access to the link, the linked message says it had a massive performance cost, so it was removed.Quezler wrote: Sun Feb 23, 2025 6:00 pm Also, weren't lua migrations removed or something? idk (https://discord.com/channels/1214952937 ... 5910604892)
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Re: remove the auxilary migrations example
Then the example shouldn't be removed. It fulfills its purpose of showing how to use migrations. If you have an issue with the example premise being obsolete, they could simply add a note at the start, along the lines of "back before technologies reset automatically".
- Stringweasel
- Filter Inserter
- Posts: 445
- Joined: Thu Apr 27, 2017 8:22 pm
- Contact:
Re: remove the auxilary migrations example
I agree with Quezler. Ideally the example code should be changed to something that might not confuse new modders.
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Re: remove the auxilary migrations example
@curiosity note that it was just a small remark on the section as a whole, but in either case the current example does something that is no longer needed.
Re: remove the auxilary migrations example
I don't think it's fair to demand an example be practical. Most examples are contrived, but effective nevertheless.
The description spells out clearly that you don't need to manually reset recipes. If someone was confused, that means they didn't read or didn't pay attention. And that is something that can't be helped by changing the text.
The description spells out clearly that you don't need to manually reset recipes. If someone was confused, that means they didn't read or didn't pay attention. And that is something that can't be helped by changing the text.
Re: remove the auxilary migrations example
the current example leads new modders to believe that this is what they must do when they shuffle technology effects around, but since the game itself resets the technology effects now this example serves no practical purpose whatsoever, and not sure how you are seeing "it spelled out" because it is not, the text above it still very much reflects the pre 2.0 way things worked.
Re: remove the auxilary migrations example
It's right there in your screenshot.
While copypasting the docs, I've uncovered an actual problem with that example: its HTML anchor is "example", which is identical to the one for the JSON example above. Thus it can not be navigated to via URL.
You might complain that it's not clear what "resets recipes and technologies" is supposed to mean, but in no way is it unsaid.The game resets recipes and technologies any time mods, prototypes, or startup settings change, so this does not need to be done by migration scripts.
While copypasting the docs, I've uncovered an actual problem with that example: its HTML anchor is "example", which is identical to the one for the JSON example above. Thus it can not be navigated to via URL.