Interface for reliable rail bridges with low UPS impact

Things that we aren't going to implement
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Interface for reliable rail bridges with low UPS impact

Post by Oktokolo »

Currently, rail bridge/tunnel mods need to do all sorts of ugly hacks to teleport trains and get araound pathfinding and/or train collision behaviour.
Would be nice to have some API wich would allow implementing reliable Rail bridges/tunnels with low UPS impact.

Some ideas:
- Allow disabling of train collisions on a tile or while beeing in the bounding/collision box of a modded entity.
- Allow trains seamlessly switch surfaces without breaking the pathfinder.
- Allow trains skipping (teleporting over) a small distance without breaking the pathfinder.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14403
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by Rseding91 »

I don't think you understand the magnitude of your request. That's not something that can just be quick whipped up in a day for mod support. That's like 1-2 months work and a complete re-write of the rail system.

It's just not going to happen any time soon (if ever).
If you want to get ahold of me I'm almost always on Discord.
Koub
Global Moderator
Global Moderator
Posts: 7807
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by Koub »

TBH @Rsendig, the idea was from me : there was quite some cringe with the change on rail bounding boxes, and I suggested a modding interface request, because playing with bounding boxes might not be possible anymore, but maybe there could be a way to give modders a way to get bridges that wouldn't break the game.
Sorry @Oktokolo for the false hope :?
Koub - Please consider English is not my native language.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by darkfrei »

But this interface must be requested as soon as possible and after some versions it can be (probably) done. Bridges and tunnels can have the same mechanics, don't forget tunnels too.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5210
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by eradicator »

Rseding91 wrote: Tue Jul 16, 2019 11:41 pm I don't think you understand the magnitude of your request.
On that matter, what would be the magnitude of somehow supporting only exactly the "bug" nessecary for a minimal rail bridge mod. I.e. the ability to spawn in a second rail that - for the purpose of pathfinding - does not collide with "normal" rail (a flag maybe?). As far as i understand the engine already allows for trains to not physically collide as long as they're on different logical paths, even if these paths physically collide (or is this going to change as well?).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by Oktokolo »

Rseding91 wrote: Tue Jul 16, 2019 11:41 pm I don't think you understand the magnitude of your request.
The magnitude is that high - it has already been implemented by accident and allowed reliable zero-UPS-cost rail bridges until version 0.17.55 (yep, the bounding box "bug"). Obviously it was of such a high magnitude that it came for free as a side effect...
Koub wrote: Wed Jul 17, 2019 5:36 am Sorry @Oktokolo for the false hope :?
Well, it is their game and they explicitly decided against keeping the support for bridges in the engine.
Most hope was gone after i first read their shallow explanation of changing bounding boxes crashing maps on load - as if you wouldn'd be better off not storing the rail graph in saves anyway as that obviously is data that is fully derived from the map's rail and signal entities.
I just had to try regardless because even on the internet there always is a tiny chance of people changing their mind when confronted with the obvious...
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by darkfrei »

Oktokolo wrote: Wed Jul 17, 2019 7:42 pmMost hope was gone after i first read their shallow explanation of changing bounding boxes crashing maps on load - as if you wouldn'd be better off not storing the rail graph in saves anyway as that obviously is data that is fully derived from the map's rail and signal entities.
Hey, what if we have only two hardcoded types of rails, both have hardcoded bounding boxes, both was tested good enough and have no crashes.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by slippycheeze »

darkfrei wrote: Wed Jul 17, 2019 8:25 pm
Oktokolo wrote: Wed Jul 17, 2019 7:42 pmMost hope was gone after i first read their shallow explanation of changing bounding boxes crashing maps on load - as if you wouldn'd be better off not storing the rail graph in saves anyway as that obviously is data that is fully derived from the map's rail and signal entities.
Hey, what if we have only two hardcoded types of rails, both have hardcoded bounding boxes, both was tested good enough and have no crashes.
I find your ideas intriguing, and wish to subscribe to your newsletter.
Oktokolo wrote: Wed Jul 17, 2019 7:42 pm
Rseding91 wrote: Tue Jul 16, 2019 11:41 pm I don't think you understand the magnitude of your request.
The magnitude is that high - it has already been implemented by accident and allowed reliable zero-UPS-cost rail bridges until version 0.17.55 (yep, the bounding box "bug"). Obviously it was of such a high magnitude that it came for free as a side effect...
Absolutely. ...and with zero game crashing bugs with the same root cause.... oh, wait.
User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 353
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by MasterBuilder »

If the issue is the bboxs changing via mods, what about hard-coding a second rail item, hidden like loaders, that has no bbox?
This wouldn't be changable via mods so it shouldn't cause a crash on loading. Then a mod like rail-bridge could make use of the hidden type without issue?

Forgive me if I'm wrong, I don't know too much about why it was changed or how much work my suggestion entails.
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Interface for reliable rail bridges with low UPS impact

Post by slippycheeze »

MasterBuilder wrote: Tue Jul 30, 2019 11:05 pm If the issue is the bboxs changing via mods, what about hard-coding a second rail item, hidden like loaders, that has no bbox?
This wouldn't be changable via mods so it shouldn't cause a crash on loading. Then a mod like rail-bridge could make use of the hidden type without issue?
Ultimately, because the developers have decided they are not interested in that capability. Their reasons are complex, but bugs and crashes are, I must imagine, a definite part of it ... but so is, well, the same logic that means they didn't build the "rail bridge" aka non-colliding trains right into the base game when they built trains in the first place.
Post Reply

Return to “Won't implement”