[2.1.19] Upgrading rail tracks doesn't apply when train is on them

We are aware of them, but do not have solutions that don't cause other issues. They go here in order not to take space in the main bug thread list.
nasaboy007
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun May 11, 2025 5:40 pm
Contact:

[2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by nasaboy007 »

STR:

1. Have a save with Moshine mod planet neodymium rails.
2. Build a regular rail line, and place a regular train on it.
3. Create an upgrade planner that replaces regular rail lines with neodymium rails.
4. Apply upgrade to your regular rail line.

Expected: All rails are upgraded, regardless of if they have a train entity on them or not.
Actual: Only rails without a train on them are upgraded, but the rails under a train are still marked for upgrading, bots are dispatched and go there, and attempt to apply the upgrade and fail (returning the item to storage).
Rseding91
Factorio Staff
Factorio Staff
Posts: 17588
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by Rseding91 »

Thanks for the report however we won't be changing this. The way upgrading works is to remove the existing entity and built the upgraded one in place. When it comes to rails, they can't be removed when a train is on them since the train requires the rail exist. Rails were never intended to be upgraded - you'll also find issues around elevated rails and rail supports when trying to upgrade them as the rail support logic also doesn't want you to remove the supports while they're supporting rails.
If you want to get ahold of me I'm almost always on Discord.
sparr
Smart Inserter
Smart Inserter
Posts: 1574
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by sparr »

Do belts have a special case to handle upgrading in place while preserving transport line connections and contents? Could something similar be done for rails?
Rseding91
Factorio Staff
Factorio Staff
Posts: 17588
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by Rseding91 »

Belts do, but they were built from the start with being replaced in mind. Trains were not.
If you want to get ahold of me I'm almost always on Discord.
Shirasik
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Mon Apr 28, 2025 12:17 pm
Contact:

Re: [2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by Shirasik »

STR:
1. Have a save with Moshine mod planet neodymium rails.
Same applies to replacing rails under trains and elevated rail supports with rails above to another quality so you don't need community mod content to encounter the behaviour.
Rseding91 wrote: Thu Sep 17, 2026 1:43 pm The way upgrading works is to remove the existing entity and built the upgraded one in place.
Nevertheless it works as it may not happen prior to upgrade entity item being delivered already thus deconstruction is purely virtual. Do the game have to recalculate something that is hooked to construction event and can't be hooked to entity swapping event? Belts and machinery getting replaced just fine up to the point they don't need even to clear items being stored in entities.
nasaboy007
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun May 11, 2025 5:40 pm
Contact:

Re: [2.1.19] Upgrading rail tracks doesn't apply when train is on them

Post by nasaboy007 »

Thank you for the consideration!
Post Reply

Return to “Minor issues”