Code Review #7227
Change variable-length MU handling
Multiple fixed-length consists are probably the worst solution.
- Length refits: Hacky even with regular-length vehicles. Not really viable.
- Variable-length MU carriages freely available and attachable, recommend length(s) in the flavor text. Easy solution, consistent with existing vehicle handling. However, due to the articulated != double-headed problem, the end carriages would need to be bought separately too. The middle carriages would also need callback/livery override handling unless absolutely everything is left to the user.
- Restrict attachability for MU carriages. Inconsistent and possibly unrealistic in many cases. Problems of the above option still apply.
- Forget about variable lengths and provide the consist that makes the most sense. Neither realistic nor user-friendly, but easiest.
#1 Updated by Eddi over 5 years ago
I'd stick with one single length for now.
What i had in mind was something along the lines of MB's "views" idea, which would allow to alternate the articulated callback during construction of the vehicle, but not change anything later on. But that needs implementing...
I discarded length refit, because of the minimum vehicle length of 1, which screws with ... basically everything. it would be easier if 0 length vehicles were allowed.
Implementing articulated and dual-headed vehicles may be an option, but it's tricky. concerning internal handling, the first articulated part of the end vehicle needs the "dual-headed" flag set, for the game to figure out where wagons would be attached to, the other parts have it not set.
#3 Updated by oberhuemer over 5 years ago
On the other hand, if the middle parts are unpowered, their impact on costs would be minimal, so just providing the longest consist with decent acceleration might be the best idea in that case. The amount of variable-length MUs with powered midsections is actually very small:
- ET 31
- ICE 3 and T
- Coradia Continental
- Talent 2
- Velaro D
- LINT 81
and they are 90% modern, when you'll probably want the highest sensible capacities anyway. So I just need to investigate the maximum sensible length for the others. (Want more? Add regular passenger wagons if you don't like being realistic, or couple a second unit if you do.)
#5 Updated by oberhuemer over 5 years ago
Well, if "during purchase" means "when buying the vehicle", then there really is no functional advantage for "views" compared to multiple lengths in the purchase list, and you're just selecting the length in a different way.
As for the articulated and dual-headed thing, are you sure that's possible? I checked again, and the specs say to set the dual-headed flag to 0 for articulated vehicles/vehicle parts. I'm not sure I understand how you're imagining it either; it sounds like extra vehicles would be inserted after the third-to-last articulated part, but would that work graphically, including the extra curve views?
#6 Updated by Eddi over 5 years ago
no, it's currently not supported, but it may be possible to implement.
the idea is this:
currently a dual-headed vehicle has the form
with both parts having the dual-headed flag set.
in my proposed spec enhancement, the vehicle would have this form:
with the A and B parts having the flag set, and the a and b parts not.
the game would then insert new vehicles before the B part, like with the current specs.
#7 Updated by Eddi over 5 years ago
what the "views" achieve is that you won't get multiple prototype previews and news items for functionally equivalent vehicles. it also would offer a more sensible UI for offering different liveries (like private railways) than the refit window
if you want a "realistic" motivation: there may be 5-part and 7-part configurations of the ICE T, but you can't just remove 2 cars from the 7-part unit to get a 5-part unit.