Semantic ordering for mod migration files

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Neutrality
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Jan 31, 2020 5:10 am
Contact:

Semantic ordering for mod migration files

Post by Neutrality »

If I have these 3 files:
  • migration-1.1.lua
  • migration-1.2.lua
  • migration-1.10.lua
they are loaded in this order, assuming they are all run at once for a save:
  • migration-1.1.lua
  • migration-1.10.lua
  • migration-1.2.lua
because they are run in lexicographical order. It's possible to work around this if you add prefix 0s but only up to the set number of digits.

It would be helpful to be able to order migrations with the same semantic version number orderings used by mods and the main game. I do acknowledge that it's harder to sort files like this than with lexicographical ordering.

Post Reply

Return to “Ideas and Suggestions”