[0.15.21] Rail_category bug?

Bugs that are actually features.
evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

[0.15.21] Rail_category bug?

Post by evildogbot100 »

Seems like rails with different rail_category are interconnected together when they are occupying exact same space.
I tried to make a second rail entity with different rail_category with collision_box = nil and collision_mask = {}.
Place both rail at the exact same place using onbuilt script.
Try to give them rail signal then they act wonky.
The rail must be at least 2 length for them to be wonky.
bug report.png
bug report.png (976.65 KiB) Viewed 2314 times
Those 2 rails type has exact same picture so it's not so clear that they are overlapping.
The weird thing is the rail signal flickering color from green yellow red.
One more thing, this doesn't happen when collision_box is unchanged in second rail.
But they still seems to interfere with the rail block. When they are built they seems to update rail block of vanilla rail.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.15.21] Rail_category bug?

Post by TruePikachu »

I can't confirm it, but I think the other rail piece is acting as a way to get between both ends of the first rail piece (effectively like a passing loop). The signal then binds to only one of the tracks, but since both sides are part of the same effective block (because of the track section bridging across the other), it errors out.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [0.15.21] Rail_category bug?

Post by evildogbot100 »

Want me to post the mod I used to help recreate the bug?
Anyway, let's just call the rail type as "modded" and "vanilla", the modded one is the one with no collision. I think rail signal search for rail in front of it based on collision box, then they succeed to separate the vanilla rail block since it is found in the search. The modded one isn't found because it has no collision box, so the signal doesn't separate that modded rail block. Now the vanilla and the modded rail is somehow interconnected when they occupy same space even though they have different rail_category. So, they make some kind of loop and it broke the signal. I think the bug can be easily solved by checking for same rail_category when 2 rail tried to connect, forming a block.

This is how I think the current mechanic is
This is what I think how it currently works
This is what I think how it currently works
What happened.png (6.88 KiB) Viewed 2286 times
This is how I think the correct implementation should be
This is what I think how it should be
This is what I think how it should be
What I think should happen.png (6.89 KiB) Viewed 2286 times
Also The bug doesn't happen when the 2 rail doesn't occupy the same space, they are completely detached if you just place them like vanilla-modded-vanilla-modded-vanilla. Only happen when it is (vanilla/modded)-(vanilla/modded).

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5246
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.15.21] Rail_category bug?

Post by Klonan »

Could you post a mod and a save game clearly demonstrating the issue?

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.15.21] Rail_category bug?

Post by kovarex »

To be honest, it was never tested to have more than one rail category, and I don't doubt that there are plenty of things we would have to change to actually make it work.
For now, I would say it is just feature that is not implemented. We might, or might not implement it in the future, but I don't consider it a bug now.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [0.15.21] Rail_category bug?

Post by evildogbot100 »

This is the mod, just create new sandbox world and use the modded rail and vanilla rail at same space
Attachments
Bugged-mod_0.1.0.zip
(1.27 KiB) Downloaded 91 times

Post Reply

Return to “Not a bug”