The way things work right now, getting a train to be compatible with multiple voltages is a bloody pain. Let's say I have a train that's compatible with only 1.5kV DC, and 15kV AC. The way it's currently done is as such:
In the train you define a tracktype:
Code: Select all
track_type: [SAAE, ELRL];
Code: Select all
This is dumb, and creates a massive headache for everyone involved, especially having had the displeasure of having to fix a related issue, because "powered_railtype_list" isn't as intuitive as I'd like.
So I propose a solution to allow for train-side multi-system compatibility
Currently the track_type label works as follows:
You put an array in, say [AAAA,BBBB,CCCC], it'll then check for AAAA, if there is none, then it'll check for BBBB, and if there's none it defaults to checking for CCCC, and if that isn't provided either, the train becomes unavailable. If there's a tracktype with label AAAA, then the train will never run on BBBB or CCCC, assuming no powered_railtype_list shenanigans.
What if we allow arrays in this?
Say [[AAAA,AABB],BBBB,CCCC]. It'll check for AAAA and AABB, and regardless of whether the other is available, it'll run on AAAA and/or AABB if they are defined. Only if neither is available, will it default to BBBB etc.
So in the example at the top, you would have [[SAAa,SAAd],SAAE,ELRL], so if there's 1.5kV DC tracks, it'll run on that, and if there's 15kV AC tracks, it'll run on that as well. If neither is available, it'll look for SAAE, which can be a legacy universal track, or the electrified rails of an unrelated trackset that just never bothered with voltages, and if that's not available it may default to ELRL, like normal.
+ It makes multi-system trains, which are becoming more common IRL, easier to implement for trainset developers.
+ It's backwards compatible.
+ It frees up railtype slots.
+ This makes it a lot easier to implement multi-system trains that are compatible with a different set of voltages.
Why bother with adding voltage-related complexity?
Why add new features to the base-game for things that can be done with NewGRFs already?
The existing way to do things is very inflexible, and can create a lot of problems and headaches for developers and players alike.
Players will have trouble understanding what the problem is, and who to report it to - should they choose to report it at all. - After all, if the train isn't compatible then it's the trainset's fault, right? Well not necessarily. For NewGRF developers, it can cost hours to figure out, what exactly causes the issue, and how to fix the issue, because of all the things that can go wrong, and sometimes it's a very specific issue that arises only when you use some train or tracksets with other train or tracksets.