Vehicle variants [newgrf] #8446
Replies: 6 comments 6 replies
-
Variants using extra vehicle IDs We have 65535 vehicle IDs per grf. This is plenty. Large grfs might get through a couple of thousand IDs. Vehicle variants could be implemented by using multiple IDs, one for each vehicle. The 'same model' could have 10 liveries by using 10 different IDs, with all other properties set to the same values, and sharing all switches except the graphics chain. Why don't authors do this already?
Advantages of this route
Disadvantages of this route
Enhancement
|
Beta Was this translation helpful? Give feedback.
-
Variants per vehicle, using a subtype property on a single ID We could
We could also
We may or may not want to permit the newgrf to change the property via CB36
Advantages
Disadvantages
|
Beta Was this translation helpful? Give feedback.
-
Variants per grf, defined as list of constants, and individual vehicles can choose which variants they implement We could introduce some new vehicle grf entity, which defines all the available liveries for that grf. The implementation isn't important here, but it could be something like a table using labels, similar to cargotable and railtypetable. Vehicles would
Advantages
Disadvantages
|
Beta Was this translation helpful? Give feedback.
-
PR at #10220 |
Beta Was this translation helpful? Give feedback.
-
Done, will be in 13.0, thanks :) |
Beta Was this translation helpful? Give feedback.
-
I don't have a neat pitch for this, so here goes.
Per https://www.tt-forums.net/viewtopic.php?f=32&t=88255 and many similar suggestions / request / discussions in past.
Vehicle newgrf authors like to provide alternate liveries (paint schemes) for vehicles.
These are generally separate from company colour schemes.
So livery choices might be things like
Many newgrfs implement this using 'cargo subtypes' (callback 19).
https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Cargo_Subtype_Display_.2819.29
This use dates back to at least 2006 or so https://www.tt-forums.net/viewtopic.php?t=25144
For players, the options implemented via callback 19 are made via the refit-in-depot menu for trains.
This has survived as a solution for a long time, and is implemented in many newgrfs.
It has a few issues.
An aside, the callback 19 feature has also been used for a few other novelty examples of changing vehicle properties, e.g.
Callback 19 relies on having a cargo in the vehicle so that choices can be made about the subtype.
Sometimes vehicle grf authors introduce an extra 'magic' cargo dedicated for changing liveries or vehicle properties.
This can break industry sets, as the cargo conflicts with the ones that the industry set provides.
Background, generally industry sets work well if only one is used, or only known-compatible industry sets are used. When other entities (vehicles, houses) start defining cargos, things go wrong, resulting in broken gameplay. e.g. https://www.tt-forums.net/viewtopic.php?p=1239682#p1239682
When this happens it imposes a burden on grf authors and sometimes core developers in unpicking these cases. For example industry sets have to maintain a list of incompatible grfs.
However the industry case is a side effect and less interesting than the main case of supporting livery choices
What to do?
We have lots of evidence of what authors want to do with this:
I propose 3 different options for improving this.
I don't know if any are viable.
Other solutions may be better.
Proposals are in separate items for further commenting
Beta Was this translation helpful? Give feedback.
All reactions