News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Train assembly corruption? [11.34]

Started by DrSuperGood, June 20, 2014, 02:29:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

Most people online know me for running a huge goods service around the map. However I also do own a number of passenger trains running an underground system.

These trains have recently become obsoleted by advances in technology so I went to replace them. However in the replacement window some of them have appeared to change their assembly order. Specifically this results in a "red" combination of carriages due to incorrect ordering.

The passenger wagons being used have 3 types of components (forget mail).
A break van start
Middle segments
A break van end

The order of original assembly...
Engine
Tender
A break van start
Middle segments
Middle segments
Middle segments
A break van end
A break van start
Middle segments
Middle segments
Middle segments
A break van end

However they have managed to become inverted at some stage to the following...

Engine
Tender
A break van end
Middle segments
Middle segments
Middle segments
A break van start
A break van end
Middle segments
Middle segments
Middle segments
A break van start

The swapping of the break van segments results in a covoy which is technically illegal (you cannot assemble it like this in a depot) yet still operates.

This is happening due to convoy reversal. I am using terminal stations at which the convoy changes direction (reverses). During the reversal process the carriage order is switched resulting in an illegal convoy assembly for one direction.

Although the convoys appear to function the same it may cause graphic bugs and certainly reduces user friendliness.
1. If the coaches have unique artwork it will appear the order visibly changes during reversal. An example would be a start and end break van that use different graphics.
2. Replacing the line has to be given in two orders. One for the correctly assembled "from depot" convoys and another order for the inverted convoys.

I understand this is probably trying to simulate the engine uncoupling from the front and attaching to the back, which is a detail people like to see. It may be best if the convoys were given a "reverse" flag instead of physically re-ordering the assembly. This flag should be used by the graphic engine only to re-order the view of the assembly to simulate the train changing sides of the convoy. The actual physical assembly should remain unchanged and always valid so a single replace order will always affect all convoys that were assembled the same.

Junna

This happens when a convoy reverses. Because of how this is handled, it creates a different order. This isn't a problem though, apart from that it becomes annoying when you have to replace (usually you have to put the convoys of a single line to replace twice, because they are not identical due to the reversal).

DrSuperGood

QuoteThis isn't a problem though, apart from that it becomes annoying when you have to replace (usually you have to put the convoys of a single line to replace twice, because they are not identical due to the reversal).
So does the art of the correctly invert? Sure it is fine with symmetrical coaches (if they are forward or backwards they look the same) but what about non-symmetrical ones (roof elements, decals etc)? They would need to be inverted so that the convoy appears to have only the engine moved and not the coaches moved and rotated.

Currently next to visuals is there even an advantage to this? It certainly is not helping usability. You might need to replace convoys as much as 4 times for the same line because of this if you have bad luck. Because they are continuously inverting (think busy line with very regular trains, such as my case) there is a chance that by the time you have assembled the new convoy one or more of the existing convoys in that orientation have swapped around and so are not included in the replacement order. Worse is there is no way to tell if all convoys in the line have been ordered to be replaced without clicking each one individually or waiting to see which convoys do not get replaced. In my opinion the visual pros do not out weigh the cons to usability.

There are a few was that the usability could be addressed without removing or changing the system.
Changing the "Replace all in line" flag to literally mean all convoys (matching and not matching) would allow you to ignore convoy invertion. A new flag "Replace same in line" could take the place of the current "Replace all in line" flag. Alternatively (and probably the best solution of this type) a new flag could be added "Include inverted" which would widen the chosen selection flag to also match convoys currently in the inverted assembly state. All these options would change the current 2-4 replacement orders down to just a single replacement order (improved command information density, less user interaction required for the same results). This change should also not require much modification, the extra flag should be easy to add and the logic for convoy tests could probably couple with the logic used to invert convoys.

A lot of the pain with "Replace" is assembling a new convoy. Especially with trains such as the example given as they are made of 5 different elements in very strict orders. Being able to "template" convoy assemblies into a list for easy access (automatically filtered to remove unavailable assemblies) would make the process easier. A replace command for long convoys could become as few as 3-5 (depending on chosen flags) presses with some time spent scanning a list for a specific entry as opposed to 20 or more presses with some chance of miss-input (double coaches from a single order?). This would not eliminate the need for multiple replacement orders but would certainly make these replacement orders more trivial as well as help in other ways (the templates could be used to assemble convoys in depots more efficiently). The disadvantage is that such a feature as convoy templates may not be trivial to implement. Questions like should the templates be local or per game or even include packset pre-defined ones need to be answered. Overall a solution best left for feature extensions and possibly even discussed for standard (as it could benefit from this as well).

The easiest is obviously to disable convoy re-ordering during invert and instead to have it change the convoy facing (like standard). Significant loss of visuals makes this unattractive sadly and certainly is not something anyone would wish for unless absolutely necessary.

Finally the best solution would be to move convoy inversion from the physical assembly to purely visual. Convoys would have a flag "inverted" which has no impact on convoy and deterministic mechanics at all and is toggled whenever the convoy currently is forced to reverse. instead the graphic component responsible for ordering the convoy would use this flag to change how it builds the trailing coaches swapping them around in the appropriate order. On the line management screen and convoy info/detail panel the convoy assembly would remain the same at all times. Overall the result will be more intuitive and mirror what people from standard are used to (the convoy order never changes although the engines do reverse).

jamespetts

Thank you for the thoughtful discussion on this topic. Firstly, the reversing is intended to alter the order of the vehicles, as this is how reversing actually takes place in many cases. Some of the suggested solutions are, as Dr. Supergood notes, non-trivial (such as convoy templates). Even an algorithm to detect whether a convoy is the same but in a reversed state is non-trivial. This is significant, as anything non-trivial will have to wait behind a very long queue of other things, on which work can only begin when I have more time for Simutrans in a few months' time after I have moved home.

One thing that might be quite straightforward, however, is to change the "replace all in line" function with one replacing all in the line of any type, rather than just all like convoys in the line. I wonder, however, whether that might be less useful overall than the current behaviour of this function.  The replace dialogue is quite crowded, so it might be difficult to fit both options into this space. If anyone has any thoughts about how to fit a second option into the space or whether a replace all of any type on the line rather than all of this type on the line feature would be more useful, or would like to code a feature to detect reversed convoys (or to replace all those with the same vehicles in any order), then that would be most helpful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Aquin

To avoid dialog overcrowding one could use two select thingies like for "append"/"put in front"/"sell".

the first one could be "This Convoy only"/"This line"/"all"
the second one could be "idenditcal"/"containing outdated"/"any" and maybe "same good"/"same engine"

While the options "all" and "any" should not be selectable at the same time.

DrSuperGood

Crowding with the replace dialog is not really a problem unless you are on a very old or small display where size is more of an issue. Adding an extra line of flags should not make it any more unusable as the user will still select only the ones he requires. The replace dialog is a very specialist tool and not something that requires over-simplification. When you use the replace dialog you expect a lot of powerful and specialized options. Obviously there should be very generic and fast to use parts of it, but there needs to be that power to cope for unusual or less common situations.

That said there are other problems with reversal I discovered since I made this. Bad graphic bugs. Coaches not rotated. Train and engine separated by huge gap.

jamespetts

The carriages not being rotated is not a bug: carriages do not rotate in real life when engines run around them. The gap problem is a very odd one for which I have failed to find a solution for some time and may be related to Pak128.Britain's orientation more than anything else (it does not occur in Pak.64).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

I think you misunderstand the problem with art facing I mentioned. The art for the carriages is not always symmetrical so simply swapping the order of the convoy changes the facing of the carriages. Well obviously if there is a flag telling them to use the inverted (180deg rotated) art this will not happen, but it does happen for the assembly window at least. This means it does not look like the engine ran around and was connected at the back, but instead some coaches were also inverted in facing with the train (even if the engine did not have an enormous gap between it and the coaches, another major visual problem).

At the moment, until the bugs are sorted, it would appear that inverting convoy order is bringing more problems than it is solving. The game would be a lot more usable with out it and visually also look better as currently the train gap and inverting coach facing (if it really exists? It looks like it from the convoy assembly window...) kind of spoil the graphic benefits it should bring.

jamespetts

Dealing with this issue will have to wait for the next major version, as any UI changes (to the convoy replacer window or elsewhere) are very difficult to merge into the latest version as the GUI has been radically overhauled between the 11.x branch and the way-improvements branch (this was a change in Standard which has been merged). There are also plans to make some general improvements to the replacer in that (or perhaps the subsequent) version, which might well need to be fitted into any means of addressing this issue.

In the meantime, if anyone can work towards a way of finding out why the gap issue occurs, that would be very helpful (I should note that it seems to occur only when the vehicles in the convoy are of dissimilar length to each other).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.