Would it be possible to have a QoL mod helping with spacing rail signals akin to openttds ctrl+drag functionality?
Also important would be the ability to remove singals along a segment.
Idea
Train lenght (T): number of tracks occupied by the train. 2-4 Train would be 21, 6 for the locs, 12 for the wagons and 5/2 for the couplers, rounded up to the next integer.
Segment (S): chain of tracks from junction to junction. Dead end tracks are not valid for signaling.
Block (B): parts of the segment, at least as long as the pre-set train length.
Cases:
S < T:
chain signal on both ends
S >= T:
block signal on entry, chain signal on exit
S >= 2T:
additional block signals inside the segment to split it into more blocks
First/entry block (in direction of train travel) has the reminder included, i.e. is generally the longest.
In the ingame console I tried to walk tracks but coudn't figure out how to detect attached signals. I also don't know how long a curved or diagonal track piece is. I also don't know if it's possible to have mods use drag events. Would be nice to figure out if such a QoL mod is possible with the current API or how to bribe wube to get it there:)
spaced railsignal placer
-
- Inserter
- Posts: 45
- Joined: Thu Aug 27, 2015 4:37 pm
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: spaced railsignal placer
Nope. You'd have to link two seperate clicks. You might be able to cheat with an invisible selection tool to get two points in one "drag" but that's about it.
I've thought about this too (OTTD yay!) but as you discovered yourself, walking tracks is a pain if you've never done anything with them D:. I'd be fine even if it only worked on straight tracks....
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: spaced railsignal placer
Have a look at https://mods.factorio.com/mod/RailTools. It does a pretty good job of placing evenly spaced signals and creating exit blocks after chain signals.