Allow for penalty change in modded rail signal

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
th0
Inserter
Inserter
Posts: 30
Joined: Sat Mar 16, 2019 12:04 pm
Contact:

Allow for penalty change in modded rail signal

Post by th0 » Sun Sep 08, 2019 5:23 pm

Hi,
can the penalty for route calculation of the rail path finder (when a rail signal is set to red by the circuit network) please be manually modified for modded rail signals? Currently it is 1000 (if I interpret the wiki correctly).
Alternatively, please add the option to put a rail signal in a state where it disallows pathing through its segment altogether.

Reason: In large Rail networks, 1000 is an unrealistically small number and is insufficient to force a route change for trains with a certain destination. The only option known to me is to place several rail signals in a row, which is not very elegant.

-th0

slippycheeze
Filter Inserter
Filter Inserter
Posts: 557
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Allow for penalty change in modded rail signal

Post by slippycheeze » Mon Sep 09, 2019 5:43 pm

th0 wrote:
Sun Sep 08, 2019 5:23 pm
can the penalty for route calculation of the rail path finder (when a rail signal is set to red by the circuit network) please be manually modified for modded rail signals? Currently it is 1000 (if I interpret the wiki correctly).
Alternatively, please add the option to put a rail signal in a state where it disallows pathing through its segment altogether.

Reason: In large Rail networks, 1000 is an unrealistically small number and is insufficient to force a route change for trains with a certain destination. The only option known to me is to place several rail signals in a row, which is not very elegant.
The train will reevaluate the path under a well defined set of conditions, also found in the wiki. Unless your network both huge, and has no branches for extraordinarily long stretches, the local influence of the signal should be more than sufficient to control behaviour. Can you give a concrete example of the problem, rather than a hypothetical one?

You mentioned specifically adding a modded signal with a different penalty. What is the use case behind your need for multiple signals with different weights, over what the existing mods (eg: Picker Vehicles) can do by changing the weight of signals globally?

Boodals
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Allow for penalty change in modded rail signal

Post by Boodals » Tue Sep 10, 2019 7:38 pm

I think you can already do this with utility_constants.train_path_finding.train_arriving_to_signal_penalty or maybe one of the other variables in that table. You might have to do some digging to find out how each one is used, as the documentation on the wiki is a little lacking, but i'm pretty sure its possible.

th0
Inserter
Inserter
Posts: 30
Joined: Sat Mar 16, 2019 12:04 pm
Contact:

Re: Allow for penalty change in modded rail signal

Post by th0 » Thu Sep 12, 2019 10:56 am

slippycheeze wrote:
Mon Sep 09, 2019 5:43 pm
[...]
You mentioned specifically adding a modded signal with a different penalty. What is the use case behind your need for multiple signals with different weights, over what the existing mods (eg: Picker Vehicles) can do by changing the weight of signals globally?
I was unaware that this setting can be changed globally. It can, and consequently this request is obsolete. Sorry for not reading through it properly before and thanks for pointing this out. Of course, there is no real need to have signals with different weights, I was just assuming that the penalty is bound to the prototype rather than defined globally.
slippycheeze wrote:
Mon Sep 09, 2019 5:43 pm
Can you give a concrete example of the problem, rather than a hypothetical one?
I have a modular 10k SPM base with resources rather large apart and a circuit-controlled signal to prevent overfilling of resource stations. Here, a single signal with a 1000 penalty will just cause the train to wait patiently in front of the signal, rather than repathing.
Boodals wrote:
Tue Sep 10, 2019 7:38 pm
I think you can already do this with utility_constants.train_path_finding.train_arriving_to_signal_penalty or maybe one of the other variables in that table. You might have to do some digging to find out how each one is used, as the documentation on the wiki is a little lacking, but i'm pretty sure its possible.
It's signal_reserved_by_circuit_network_penalty. Thanks for your help.

-th0

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users