Use of Product Categories

TrainzDev

New member
The Trainz community seems to have a pretty good grasp of products. Many 3rd party content creators have made products, and there are over 2000 separate products now available in Trainz. However, there have been very few product-categories created, and those that have seem to have been broadly ignored, and are restricted to use on only a few wagons and industries. Because of this, it can be difficult for users to find the right wagon or industry for a particular product.

A product-category is intended as a useful logical grouping to allow a wagon or industry to accept a large number of similar products without needing to specify them all in the config file. Proper use of product-categories will bring greater compatibility between industries, wagons and products, meaning users need to spend less time searching for the right wagon to load that product, or the right industry to deliver it to.

It will also mean a wagon can be created with a large range of product support without causing a large initial download from the DLS by requiring lots of product dependencies, and that when a new product is created it will already be able to be loaded onto many wagons that support the product category without anyone having to update all the old wagons.

The four original Auran product categories are "Passenger", "Bulk Load", "Liquid Load" and "Container".

The "Passenger" category is a great example of a useful category. Correctly used, it allows a variety of different passenger sets to be created and used. A passenger carriage queue should be configured like this:

Code:
queues
{
  passengers
  {
    size                                24
    initial-count                       10
    passenger-queue                     1
    product-kuid                        <kuid:-3:11061>
    
    allowed-categories
    {
      0                                 <kuid:-3:10091>
    }
    
    attachment-points
    {
      0                                 "a.sitpoint0a"
      ( ... )
    }
  }
}

With the category specified in this way, any type of passengers can board the train.

You can change the KUID of the passenger product to any type of passengers to change the default passengers, or if you don't want any default passengers (initial-count set to zero), you can even omit it altogether.

A good example of a passenger coach configured in this way is asset 'BR Mk1 BFK Blue'. This is a built-in asset in TS12.


A station should have queues configured like this:

Code:
queues
{
  passengers_on_0
  {
    passenger-queue                     1
    size                                178
    initial-count                       10
    product-kuid                        <kuid:-3:11061>
    
    allowed-categories
    {
      0                                 <kuid:-3:10091>
    }
    
    attachment-points
    {
      0                                 "a.pass_t1_on_18"
      ( ... )
    }
  }
  
  passengers_off_0
  {
    passenger-queue                     1
    size                                140
    initial-count                       10
    product-kuid                        <kuid:-3:11061>
    
    allowed-categories
    {
      0                                 <kuid:-3:10091>
    }
    
    attachment-points
    {
      0                                 "a.pass_t1_off_79"
      ( ... )
    }
  }
}

The type of passengers that appear at your station waiting to board a train is set by changing the KUID of the passenger asset. But because of the product-category, any type of passengers that arrive at the station on a train can be handled.

If you are making a new set of passengers, remember to set the "allows-mixing" tag to 1 in the product definition - otherwise your passengers will refuse to join a train that already has a different type of passengers on it.

A good example of a station configured in this way is 'Station Wallangarra'. This is a built-in asset in TS12.


The Bulk and Liquid categories are useful, but are not necessarily definitive. They are useful for 'general purpose' hoppers, gondolas and tank wagons. But tighter definitions might be useful in specific circumstances, where a wagon has been designed for a specific group of commodities - and those commodities wouldn't be loaded into a standard wagon.


However, the Auran 'Container' category was defined to include all mesh-based products, which is far too wide a definition to be useful. It does serve a limited purpose in that each product must specify a product category in its config file (this is required by validation), and it gives a fall-back option for mesh-based products to use. It does not provide any useful function beyond that, however, so there is much to be gained in Trainz by creating and using much more tightly defined categories.

A useful category would define a set of compatible products that a wagon could carry, or that an industry might be able to handle. It should clearly define a specific type of goods and any required size measurements.

A good example of this would be an ISO standard shipping container, 20ft long, 8ft wide, and 8ft6 high. In fact, this one already exists as "Container 20ft x 8ft x 8ft6, Stackable", <kuid2:60850:99021:2>. It is built-in to TS12. There are several other similar categories for other sized containers in this series too. To see an example of a wagon using these categories, have a look at "BR Blue FGA (Disc) Loaded Container flat", <kuid2:60850:15112:2>. It is also built-in to TS12. This wagon also specifies a number of other products directly by KUID - a reasonable strategy to adopt while waiting for the proper categories to be widely adopted.

Another good example of a category would be a 45ft semi-trailer. While there are two different categories for semi-trailers on the DLS so far, it is unclear if a maximum length has been specified for either, or if there are any other requirements on the trailers for the wagon type that is listed in the asset description. One also appears to be a cut'n'paste of the other, which is likely to be unhelpful.

Another subject matter that would be ideal for the creation of some well-defined categories is palletised goods. There are a large range of "X on a pallet" type products available, and many of them share the same size pallets. It would benefit Trainz greatly if there were a few standard categories to cover all the "X on a pallet" type of products, one per pallet size in common use. If you are going to create one, please remember to specify in the category exactly which pallet standard it is for - there are many such standards.

When defining a new category, try to provide only important specifications. The length of the semitrailer is important, as we don't want to load an over-long trailer onto too short a wagon. Or load two long trailers onto wagon which could take either one long or two shorter trailers. The height of a container is important, as we routinely stack them on top of each other, and an industry creator will need to know what height to set their attachment points apart.
However, we don't care about the exact width of a semi-trailer. It doesn't vary all that much, and we don't park them close enough together for any small variations to matter. And we don't care how tall the goods are on the pallet, because we don't stack them on top of each other or load them onto restricted height shelves.

A good category definition should also define attachment location expectations. As a general rule, most products are attached in the middle centre of the underside, but that is not universal. It may make more sense to attach semi-trailers at the fifth wheel as this will make them position better on wagons that secure them by the fifth wheel pin. This needs to be defined at the category level so that creators can easily make products, wagons and industries that work with the category.


If you are making a product, look for an existing suitable category for it, either built-in or on the DLS. If you do find a suitable category, please reference it directly. Do not duplicate an existing category. If there isn't a suitable category, now would be a great time to make one. If you do make a category, be prepared to share it very widely - to be a useful category it needs to be as widely available as possible. Make sure you upload it to the Download Station. Consider adding translations to it if you are able to. Also think about your license terms. Don't include anything that would discourage another content creator from using your category - no matter how they prefer to release their own creations.
 
Back
Top