remove the auxilary migrations example

Place to report issues and suggest improvements to the API documentation.
User avatar
Quezler
Fast Inserter
Fast Inserter
Posts: 160
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

remove the auxilary migrations example

Post by Quezler »

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)
Attachments
Screenshot 2025-02-23 at 18.58.30.png
Screenshot 2025-02-23 at 18.58.30.png (86.56 KiB) Viewed 368 times
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: remove the auxilary migrations example

Post by curiosity »

You keep linking to inaccessible messages. What's your source on Lua migrations being removed?
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: remove the auxilary migrations example

Post by Stringweasel »

Quezler wrote: Sun Feb 23, 2025 6:00 pm Also, weren't lua migrations removed or something? idk (https://discord.com/channels/1214952937 ... 5910604892)
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.
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: remove the auxilary migrations example

Post by curiosity »

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".
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: remove the auxilary migrations example

Post by Stringweasel »

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
User avatar
Quezler
Fast Inserter
Fast Inserter
Posts: 160
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: remove the auxilary migrations example

Post by Quezler »

@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.
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: remove the auxilary migrations example

Post by curiosity »

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.
User avatar
Quezler
Fast Inserter
Fast Inserter
Posts: 160
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: remove the auxilary migrations example

Post by Quezler »

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.
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: remove the auxilary migrations example

Post by curiosity »

It's right there in your screenshot.
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.
You might complain that it's not clear what "resets recipes and technologies" is supposed to mean, but in no way is it unsaid.

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.
Post Reply

Return to “Documentation Improvement Requests”