Page 1 of 1

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

Posted: Thu Sep 17, 2026 4:43 am
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).

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

Posted: Thu Sep 17, 2026 1:43 pm
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.

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

Posted: Thu Sep 17, 2026 3:39 pm
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?

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

Posted: Thu Sep 17, 2026 3:49 pm
by Rseding91
Belts do, but they were built from the start with being replaced in mind. Trains were not.

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

Posted: Thu Sep 17, 2026 4:18 pm
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.

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

Posted: Tue Sep 22, 2026 8:50 pm
by nasaboy007
Thank you for the consideration!