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.
Interface for reliable rail bridges with low UPS impact
Re: Interface for reliable rail bridges with low UPS impact
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).
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.
Re: Interface for reliable rail bridges with low UPS impact
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
Sorry @Oktokolo for the false hope
Koub - Please consider English is not my native language.
Re: Interface for reliable rail bridges with low UPS impact
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.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Interface for reliable rail bridges with low UPS impact
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Interface for reliable rail bridges with low UPS impact
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...
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...
Re: Interface for reliable rail bridges with low UPS impact
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.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.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: Interface for reliable rail bridges with low UPS impact
I find your ideas intriguing, and wish to subscribe to your newsletter.darkfrei wrote: ↑Wed Jul 17, 2019 8:25 pmHey, what if we have only two hardcoded types of rails, both have hardcoded bounding boxes, both was tested good enough and have no crashes.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.
Absolutely. ...and with zero game crashing bugs with the same root cause.... oh, wait.
- MasterBuilder
- Filter Inserter
- Posts: 353
- Joined: Sun Nov 23, 2014 1:22 am
- Contact:
Re: Interface for reliable rail bridges with low UPS impact
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.
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.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: Interface for reliable rail bridges with low UPS impact
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.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?