Page 1 of 1

Upgrade Planner / Fast replace modded rails

Posted: Sun May 12, 2019 8:55 pm
by yeahtoast
I'm working on a mod that adds a new kind of rail, basically just a cosmetic change with a different recipe. I wanted the ability to use the Upgrade Planner to easily switch between rail styles, so I added these lines into the entities.lua.

Code: Select all

data.raw["straight-rail"]["straight-rail"].fast_replaceable_group = "rail"
data.raw["curved-rail"]["curved-rail"].fast_replaceable_group = "rail"
data.raw["straight-rail"]["new-straight-rail"].fast_replaceable_group = "rail"
data.raw["curved-rail"]["new-curved-rail"].fast_replaceable_group = "rail"
It works as intended. There's one strange problem, though. When building rails by hand, intersections are impossible as the rail that is crossed is fast replaced by the rail doing the crossing. This affects both vanilla and modded rails since they're all in the "rail" fast replaceable group.

20190512133719_1.jpg
20190512133719_1.jpg (457.85 KiB) Viewed 1392 times
20190512133726_1.jpg
20190512133726_1.jpg (496.2 KiB) Viewed 1392 times
20190512133732_1.jpg
20190512133732_1.jpg (519.69 KiB) Viewed 1392 times
20190512133735_1.jpg
20190512133735_1.jpg (525.96 KiB) Viewed 1392 times

The even weirder part is that I can't actually fast replace the two different rail types with each other by hand, only by upgrade planner. Is this supposed to happen? This problem doesn't exist when building with bots, so I'm thinking it might be an edge case in rail construction?

20190512133810_1.jpg
20190512133810_1.jpg (661.76 KiB) Viewed 1392 times
20190512133812_1.jpg
20190512133812_1.jpg (663.19 KiB) Viewed 1392 times

Ultimately, all I want is for the rails to be replaceable with the Upgrade Planner. Is there another way to do this that doesn't break rail building?

Re: Upgrade Planner / Fast Replace Rail Help

Posted: Mon May 13, 2019 4:46 am
by TheSAguy
I’ve run into the same issue in Bio Industries.
Was hoping to be able to upgrade wood rail to cement, but no solution yet...
Hope you have better luck.