Rivens Train Speed Signs


This mod makes trains respect speed sign values through the circuit network. (youtube demo included)

Content
2 years ago
1.1
3.00K
Trains
Owner:
riven8192
Source:
https://github.com/riven8192/factorio...
Homepage:
N/A
License:
MIT
Created:
3 years ago
Latest Version:
0.1.7 (2 years ago)
Factorio version:
1.1
Downloaded by:
3.00K users

Introduction

This mod allows you to specify the maximum speed for any train passing a rail-signal.

How to set and clear the maximum velocity

Simply send the blue letter S, 'Signal-V' with the desired velocity in km/h, and the train will respect that.

A signal between 1 and 999, is used to configure the new speed limit.
A signal below 0 or 1000+, is used to indicate to clear the speed limit.
A signal of value 0 implies that the speed limit (if any) has not changed.

When the train is moving too fast when passing a speed sign, it will brake smoothly to adjust to the new limit.

It's also possible to set a global speed-limit, through the mod-settings.

Demonstration videos

Fineprint

  • If the green wire and the red wire have conflicting values of 'Signal-V', the value on the green wire is preferred.
  • The mod has no custom items to produce or other user-interface elements, it purely uses circuit-signals of 'Signal-V' (as shown in the screenshot). As a visual aid, you could add a light, configured to show different colors based on the signal value.

Two ways to control the speed of the train

This mod allows two different ways of enforcing the speed limits.

  • Applying the brakes: done whenever a train goes too fast. This is the default, but it wastes fuel.
  • Throttling the fuel: done by removing fuel when it goes to fast, and reintroducing it when we can accelerate again. Added bonus is that the locomotives makes a nice chugging sound, and the smoke comes in puffs. Obviously this makes the game think the train is out of fuel, and hence the 'no fuel' icon has been hidden. Constantly adding and removing fuel will make the train-info panel jittery. It's obvious why this is not the default... but it's nice :)

Pick either of these strategies, as a startup mod-setting named How to enforce speed-control

Changelog

  • Version 0.1.7: Bugfix: train correctly picks up speed limit when there are rail-signals on both sides of the track. Additionally the global speed limit is now actually a global cap, instead of the default speed limit.
  • Version 0.1.6: Bugfix: train 'forgot' its speed-limit in certain cases
  • Version 0.1.5: Added global speed-limit (mod-setting)
  • Version 0.1.5: Added safe-guard to prevent flipping the train-direction while train is on route
  • Version 0.1.4: Added: 'fuel-throttling' is no longer in beta (configured with startup option)
  • Version 0.1.3: Added: smoke when braking hard
  • Version 0.1.3: BETA: new speed-control strategy: 'fuel throttling', which is as beautiful as it is hilarious. Enable it by setting both 'Signal-V' with the desired speed, and 'Signal-R' with value '1337' to the rail-signal, to see the train actually chugging along. It works by removing all fuel from the locomotive when it goes too fast, or otherwise reintroducing it. This was a proof of concept and very unpractical, beware of the 'out of fuel' notifications =)

Feedback

If you have ideas on how to improve this mod, please let me know. All feedback is welcome for that matter!
My other train-mods can be found here, they play well together: https://mods.factorio.com/user/riven8192