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.
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.
[0.15.21] Rail_category bug?
-
- Fast Inserter
- Posts: 152
- Joined: Sun Dec 18, 2016 3:02 pm
- Contact:
- TruePikachu
- Filter Inserter
- Posts: 978
- Joined: Sat Apr 09, 2016 8:39 pm
- Contact:
Re: [0.15.21] Rail_category bug?
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.
-
- Fast Inserter
- Posts: 152
- Joined: Sun Dec 18, 2016 3:02 pm
- Contact:
Re: [0.15.21] Rail_category bug?
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 how I think the correct implementation should be 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).
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 how I think the correct implementation should be 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).
Re: [0.15.21] Rail_category bug?
Could you post a mod and a save game clearly demonstrating the issue?
Re: [0.15.21] Rail_category bug?
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.
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.
-
- Fast Inserter
- Posts: 152
- Joined: Sun Dec 18, 2016 3:02 pm
- Contact:
Re: [0.15.21] Rail_category bug?
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 90 times