Better handling of Legacy Rails when importing a 1.1 blueprint to 2.0

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

dgnuff
Inserter
Inserter
Posts: 22
Joined: Fri Feb 24, 2017 8:06 pm
Contact:

Better handling of Legacy Rails when importing a 1.1 blueprint to 2.0

Post by dgnuff »

If I import a blueprint saved when 1.1 was still current that contains train rails, several annoyances can happen

1. This may not be possible to fix, but it appears that 1.1 and 2.0 track grids are not aligned when using a 1.1 blueprint in 2.0. A symptom of this is that I'll put down a blueprint for a legacy station, and the inserters that remove from the wagons sometimes land in the same place as the track, as if the track has shifted by one tile.

Thew weird thing is that track in 2.0 still aligns to the same 2x2 grid as I remember it doing in 1.1. For example you can't place a track that is parallel to and spans a chunk boundary so the track has one rail in one chunk, and the other rail in an adjacent chunk. So the 2x2 grid for old and new tracks appears to be the same. I'm confused. :)

2. Legacy rails and new rails don't play nicely together. Most notably, if you have a straight section of legacy track, trying to use the rail planner to bring a curve of 2.0 track to an intersection with the straight legacy track can result in an error if you "overshoot" the connection, something I do very regularly.

Rather than try to fix this, it's been noted in one of the FFFs that support for legacy rails may be removed at some time in the future. This makes perfect sense, I suspect that keeping them working has incurred some amount of technical debt that you'd like to get rid of eventually.

So to this end I want to be proactive about removing as much legacy rail as I can. I suspect it's not at all easy to try and convert from legacy to current, and in any case that could only be done for straight tracks. Rather than try to do this, would it be possible to add a scanner that will display legacy rails on the world map and / or main game view, so we can replace them ourselves.

Take a look at the Orphan Finder mod to see the sort of UI that this might have. As an alternative, assuming that legacy rails and 2.0 rails have different names, would it be possible to write a mod that will show legacy rails, possibly based on the ideas in Orphan Finder?
Xorimuth
Filter Inserter
Filter Inserter
Posts: 730
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Better handling of Legacy Rails when importing a 1.1 blueprint to 2.0

Post by Xorimuth »

Have you tried using my Factory Search mod to find legacy rails (using Entity search mode)? I'm not 100% sure it would work as it does try to intelligently link entities that are placed by the same item, so I think search results would include all rails, but I think the results would still be clearly distinguished between legacy rails and regular rails.
I suspect it's not at all easy to try and convert from legacy to current, and in any case that could only be done for straight tracks
Indeed, and specifically only straight, non-diagonal, tracks. It would be pretty easy for someone to make a mod that converts all straight, non-diagonal tracks from legacy rails to modern rails - I'm not sure why no one has yet.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Better handling of Legacy Rails when importing a 1.1 blueprint to 2.0

Post by Muche »

A placed blueprint shifted by one tile may be related to 118896 Building preview and placement do not match / 123009 Blueprint aligns perfectly in Remote View, but once clicked, it's misaligned, especially tracks.
Unless the train station's inserters are on a curved track, where misalignment is to be expected.
User avatar
Twisted_Code
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sat Jun 06, 2015 1:15 am
Contact:

Re: Better handling of Legacy Rails when importing a 1.1 blueprint to 2.0

Post by Twisted_Code »

I just ran into this problem while trying to update one of my station blueprints. I would like to be able to filter a deconstruction planner for legacy rails, ideally for specific variants of legacy rails (curved vs. straight), so that I can deconstruct just the legacy rails once I have them replaced by "modern"/2.0 rails. As is, the filter selector only has buttons for the following:
  1. Straight rail
  2. Elevated straight rail
  3. Rail ramp
  4. Rail support
And I'm guessing that legacy rails are either considered part of the first option, or not included at all. If they are considered part of the first option, then the deconstruction planner would deconstruct both the legacy rails and legacy rails. On the other hand I might be able to work with it via a blacklist of things I want to keep if they are not included at all, I guess? But a whitelist would be preferred.
Edit: Just tested my hypothesis: Both are considered under the "straight rail", so I can't use even a blacklist for what I want.
How to report bugs effectively (archived version)because everyone should know this.
Factorio 1.0 tech tree, a visual reference guide.
Post Reply

Return to “Ideas and Suggestions”