Question regarding JSON migrations

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
Pi-C
Smart Inserter
Smart Inserter
Posts: 1639
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Question regarding JSON migrations

Post by Pi-C »

I have a default recipe and an alternative recipe for the same product in my mod. For some reason, the default recipe was named something like "recipe-2" and the additional recipe "recipe-1". That didn't seem logical, so I exchanged the names. Of course, now I also need a migration:

Code: Select all

{
  "recipe":
  [
    ["recipe-1", "recipe-2"],
    ["recipe-2", "recipe-1"]
  ]
}
Would that cause problems if both recipes are used in a game?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Modding discussion”