Author Topic: Constraint-Groups  (Read 120 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin

« on: May 18, 2017, 08:42:37 PM »
There is a thread for improved constraints, but it became very complicated fairly quickly. I'd like to pick a suggestion I made in it, since it should be a lot simpler than other stuff from that thread:

Improved constraint features that are really useful, in my mind, would be to make vehicles belong to one or more groups, and the option to restrict to that group rather than a specific vehicle. Eg. the Adler locomotive, rather than specifying its three possible wagons, would just constrain next to the "Adler"-group, which it would belong to itself. Then, each wagon would do the same, but with previous as well. Now, if someone created an additional wagon for the Adler, even if it's fantastic and never existed in reality, they only need to name the group. Nobody needs to go back to all existing vehicles and change the constraints for the new one to work.

So, to be more clear:
Add a new parameter "Group" for vehicles, which can contain an array of strings - the groups.
Currently, the string used in Constraints means a vehicle with a name equal to that constraint string can be connected. Change this so any vehicle with a group equal to that string can be connected as well.

Something similar could be achieved with a different method:
Add a parameter "Is_hidden" to vehicles, which is boolean and off by default. If on, this vehicle will not be displayed anywhere in the game. It will not be listed in the depot, it will not be listed in a convoy info. Anywhere vehicle information could be displayed, add a check for the "is_hidden" parameter and skip the vehicle if that's on. This way, one could simply create a hidden vehicle instead of a group, and use that in constraints.
Alternatively to "Is_hidden=1", perhaps a subclass of vehicles could be used. An object=coupling which inherits everything from vehicles, but lacks cost, lenght, load, power,... but will be part of a convoy.

(obviously, this is already possible, except that it would be visible to players while it should really work in the background.)

Online Vladki

Re: Constraint-Groups
« Reply #1 on: May 18, 2017, 09:18:55 PM »
I support the groups constraints.