TL;DR
Pressing copy or paste while in the train schedule UI should export/import the train schedule using plain text and the clipboard.What ?
Borrowing from Path of Exile, in that game highly complex items with statistics and enchantments allow you to hit control-c (copy) with the cursor on an item to get a plain text representation of the item into the clipboard. Other planning tools (ie: Path of Building) allow you to paste that human readable text to create the same item.I often have quite complex train schedules in Factorio, and the ability to copy the existing schedule and paste it to Notepad, make a few changes, and paste it back would be fantastic. This also avoids adding excess new UI elements into the game. For instance, the following is a circuit controlled mixed item route.
If with my cursor over the schedule, I hit control-c (copy), I'd want the following copied into the clipboard as plain text:
Code: Select all
- Station: Mixed-C-[Item: Stainless Steel]
- OR
- Item count: [Item: Copper Plate] = 0
- Item count: [Item: Sulfur] = 0
- Item count: [Item: Niobium Plate] = 0
- Item count: [Item: Cobalt Extract] = 0
- Item count: [Item: Ferrochrome] = 0
- Item count: [Item: Phosphorous Rock] = 0
- Item count: [Item: Nickel Plate] = 0
- Station: Mixed-C-[Item: Stainless Steel]
- AND
- Inactivity: 5 seconds
- Circuit signal: [Item: Copper Plate] > 0
- Circuit signal: [Item: Sulfur] > 0
- Circuit signal: [Item: Niobium Plate] > 0
- Circuit signal: [Item: Cobalt Extract] > 0
- Circuit signal: [Item: Ferrochrome] > 0
- Circuit signal: [Item: Phosphorous Rock] > 0
- Circuit signal: [Item: Nickel Plate] > 0
- Station: [Item: Copper Plate]-P
- OR
- Item count: [Item: Copper Plate] >= 200
- Time passed: 30 seconds
- Station: [Item: Sulfur]-P
- OR
- Item count: [Item: Sulfur] >= 100
- Time passed: 30 seconds
- Station: [Item: Niobium Plate]-P
- OR
- Item count: [Item: Niobium Plate] >= 200
- Time passed: 30 seconds
- Station: [Item: Cobalt Extract]-P
- OR
- Item count: [Item: Cobalt Extract] >= 100
- Time passed: 30 seconds
- Station: [Item: Ferrochrome]-P
- OR
- Item count: [Item: Ferrochrome] >= 500
- Time passed: 30 seconds
- Station: [Item: Phosphorous Rock]-P
- OR
- Item count: [Item: Phosphorous Rock] >= 400
- Time passed: 30 seconds
- Station: [Item: Nickel Plate]-P
- OR
- Item count: [Item: Nickel Plate] >= 500
- Time passed: 30 seconds
To paste back, I'd expect to have the text in my clipboard and when the mouse hovers over the schedule if I hit paste it replaces the entire schedule.
Alternatively UI buttons could be added to export/import to the clipboard. Not in an encoded format, but a human readable one.
Errors should return line number failure info on the console, and not make changes.