TL;DR
- pointed out exact rules how the train should work with closed path overriding.
- mixing in
optional penalty-ideas (I think they are very highly tighted together), namely:
---- when no filter is set it add just penalty to the train
---- with filters you can turn off closing paths and only add penalty
---- you can change amount of penalty (by player or circuits), even negative penalty (prefer paths)
and some details.
boskid wrote: ↑Tue Nov 03, 2020 8:38 am
Lets assume those signs would be literally a rail signals "with one feature added" for the ease of implementation. Pathfinder has to look into signal state anyway when searching path so adding extra features to rail signals is the least intrusive way to add logic into rails.
Would be completly ok for me: It's might look just a bigger than the normal signals and mybe it can show it's current functionality a bit.
Trains with/without cargo condition in theory can change when traveling when player manually puts stuff into the train while riding that train. Because of this when a train would repath for any reason (let it be a signal that cannot be reserved due to another train) during a repath those conditions would have to be still checked and the train could slam the brakes just because the condition is no longer fulfilled. There is no "if no path then ignore sign" because that would mean either train remembers which signs were fulfilled at the repath when leaving train stop (or were fulfilled at the last successful repath) or it ignores all the signs, even those which were not on the path. Second approach would cause the train to possibly breach any condition.
I had added this rule, to avoid that when you change the sign/signal, so that the train has no allowed path anymore. It would end with a completly mess, because a train then stops with "no path" on your main route.
I think this danger is real and should be avoided somehow. But:
Routing low fuel trains for a refuel would not be solved by this.
Ya, Sad_Brother figured that also out. Nothing which can change during the train is running is a good idea.
This suggestion works only well with things, that cannot change during normal automated train routes - and the special case that the player changes the train during traveling can be just a special case; I mean the main issue is the above, that you change something here and you create a complete deadlock somewhere else. So the idea was, that the reachablity of the next target is checked at start of the next schedule-entry and my thought was, that this is checked just once and if such a sign/signal then changes, it should ignore this, if there is no path left then. It might take a second pathfinding for this special case.
But on the other hand I think this will lead also to "interesting game situations", where you forgot, that when you change this so that there is no route left, it will ignore any sign.
I don't know, if that is really a good idea. I would like to play with the details in some kind of beta-phase.
So, I tried to make this ideas more detailed:
- When the train is at the begin of the next schedule-entry (normally at a stop or started by the player) we do one special check: Is there a path? When yes: Is there a path, that this train is allowed yet?
---- Subidea: Because this feature can also be used to control, if a train should leave a train stop (there have been some suggestions around that), it is similar to the new max. trains feature and should be displayeed similarly, as when no free destination stop is available. I don't know yet if I need an overview of such kind of trains anywhere to find problems, so I leave that out.
- Then we do the "normal" path scan, this time we just
add a ridiculous amount of penalty, every time, when a closed sign/signal is traveled through. This enables the train to avoid this path, but if there is no other path left, it goes that way. Or if there are other signs/signals, the train uses the "shortest" path. This is to avoid that the train gets stuck somewhere during it's travel.
- This double-scan needs to be done only once per schedule-entry. I think this is affordable, but I cannot really know it. I think these scans can be done all in one turn, if clever programmed.
- When the train state is changed by the player, it could just simulate this first scan. If the state changes (path suddenly not longer allowed) we can think about not allowing this player action (not a fan of), or warn the user, that this last operation will stop the train.
Optional stuff, but highly relevant:
- Instead of setting up a filter-condition, the player can just leave it free, so that the penalty is just added to every train.
---- This changes the behavior so, that instead of disallowing a path it adds penalty to every train by the sign/signal. No pre-check is needed anymore, this spares this first check.
- Another option might be, that the player can decide to turn path blocking off, even when the filter is set. This let the train just prefer one path over another, if the condition is met.
- Next option is: The player can choose, how high this penalty is. If the player is allowed to set the added penalty himself:
---- instead of taking a ridiculous amount (dunno, by default one million?), he can set it much lower.
---- To make sense to this feature, we might need some kind of tool to measure the total penalty between two points to balance things out nicely. Would be enough if I could set a locomotive anywhere, give it a destination and when I hover over the schedule, it tells me somewhere the current total penalty.
---- I can also set a negative penalty. Endless possibilies, like prefered paths etc.
- I can set the amount of penalty by circuits. If that changes, the train will only take that into account, if he needs to repath.
Routing around busy crossings: if a crossing is busy there will be a lot of trains increasing the penalty of such intersection so the trains should already avoid such intersections if another paths are available.
I know that, but I had many situations, where I would liked to have a bit more control about that. It also give me a bit more feeling, that I have the control over my trains (which is not really true
) but I really would like it.
This idea is not mature enough to be even considered to implement.
Huh, that sounds dark.
Hope that helped a bit to bring more light into it.