"Queues" container
The "queues" Container is a top-level config.txt file entry used by various Content Types.
The "queues" Container is a list of queue subcontainers (Queues) with no standalone tags. Queues are used by certain asset types (such as KIND Industry and KIND Traincar) to 'hold' KIND Product instances. Queues can make use of animated meshes or custom attachments to visually represent the amount of product they hold in game. Each queue subcontainer uses the following format.
Instances of queue subcontainers are represented in TrainzScript via Class ProductQueue.
Contents |
Supported Tags
Each queue subcontainer supports the following tags. Each tag is shown here with its default value.
size 0 product-kuid <KUID:0:0> initial-count 0 passenger-queue 0 per-hour 120 animated-mesh "" attachment-points { } allowed-products { } allowed-categories { } conflicts-with-queues { }
size
- Type: Positive Integer
- Desc: The maximum size of the queue, in other words this is the maximum amount of product the queue can 'hold'.
product-kuid
- Type: KUID
- Desc: Used in conjuntion with the 'initial-count' tag, product-kuid specifies the initial KIND Product type in the queue.
initial-count
- Type: Positive Integer
- Desc: Used in conjuntion with the 'product-kuid' tag, initial-count specifies the initial amount of product in the queue.
passenger-queue
- Type: Boolean
- Desc: Specifies that the queue can hold passengers.
per-hour
- Type: Positive Integer
- Desc: This flag is used for passenger stations and sets the base number of passengers that will accumulate over the period of one hour.
animated-mesh
- Type: String
- Desc: Specifies the name of an animated mesh from the mesh table. This mesh is used to visually represent the amount of product in the queue while in game and should animate from empty to full. An attachment named "load" must exist in the queue for the animation to work.
attachment-points
- Type: String Container
- Desc: The 'attachment-points' container lists all of the mesh attachment points used to visually represent the amount of product in the queue. When the queue is empty the meshes attached on these points will be invisible, as the queue fills they will be progressively shown. The number of attachment points cannot exceed the total queue size.
allowed-products
- Type: KUID Container
- Desc: Lists the KUIDs of all of the various KIND Product assets that can accumulate in the queue.
allowed-categories
- Type: KUID Container
- Desc: Lists the KUIDs of all of the KIND Product-category assets that can accumulate in the queue. Allowing a product category means that all products of this category are allowed, they therefore do not need to be specified in the 'allowed-products' container.
conflicts-with-queues
- Type: String Container
- Desc: Sets a number of queues that this queue conlicts with. If any of the conflicting queues have product in them, then product cannot be added to this queue.
Examples in rolling stock
Queues in a Stock Car
queues { prod0 { size 15 initial-count 0 product-kuid <kuid2:30671:90102101:1> attachment-points { 0 "a.load0" 1 "a.load1" 2 "a.load2" 3 "a.load3" 4 "a.load4" 5 "a.load5" 6 "a.load6" 7 "a.load7" 8 "a.load8" 9 "a.load9" 10 "a.load10" 11 "a.load11" 12 "a.load12" 13 "a.load13" 14 "a.load14" } allowed-products { 0 <kuid2:30671:90102101:1> 1 <kuid2:68213:60038:1> 2 <kuid2:68213:60037:1> } } }
Queues in a Locomotive
queues { locomotive_diesel_fuel_queue { size 18571 initial-count 1000 product-kuid <kuid2:86105:60600:1> allowed-products { 0 <kuid2:86105:60600:1> } } locomotive_sand_queue { size 1585 initial-count 1000 product-kuid <kuid2:86105:60601:1> allowed-products { 0 <kuid2:86105:60601:1> } } }
Queues in a Boxcar
kuid <kuid:58422:1053> username "40ft Southern AAR DD boxcar" kind "traincar" mass 23012 engine 0 enginespec <kuid:-1:42004201> description "AAR 1937 design standard 40ft 50ton automobile boxcar as used by CNO&TP(Southern)." author "Randall (Whitepass) White" organisation "TPR"
queues { load { size 7 initial-count 0 product-kuid <kuid:-3:10013> allowed-products { 0 <kuid:-3:10013> 2 <kuid2:30671:9040690:1> 3 <kuid2:30671:9080810:1> 4 <kuid2:30671:9080510:1> 5 <kuid2:30671:98702901:1> 6 <kuid2:30671:9840820:1> 7 <kuid2:124017:27009:1> 8 <kuid2:30671:9870899:1> 9 <kuid2:30671:9870190:1> } } }
Examples in industries
- These example may have to be placed in a sub-page because of length:
Industry types involve a companion or sister container: "Processes" container which are presented as well below to best demonstrate the interworkings and associations.
Consumption only Industry
This meat packing industry outputs nothing, acting as a livestock consumer.
kuid <kuid2:69695:106:3> trainz-build 2.4 light 1 type "industrial" region "GP&W" category-region-0 "US" category-era-0 "1990s" category-era-1 "1950s" category-era-2 "1940s" category-class "BC" script "meatworks" class "meatworks"
queues { cattle_q { size 256 initial-count 256 product-kuid <kuid2:30671:90102101:1> attachment-points { 0 "a.gen_goods0" 1 "a.gen_goods1" 2 "a.gen_goods2" ... yes a list of 256 attachment points for cattle 254 "a.gen_goods254" 255 "a.gen_goods255" } } } processes { multi_consumer_producer { start-enabled 1 duration 60 inputs { 0 { amount 1 queue "cattle_q" } } outputs { } } } attached-track { cattledepot { track <kuid:-1:15> vertices { 0 "a.track0a" 1 "a.track0b" 2 "a.track0c" 3 "a.track0d" } } } attached-trigger { cattletrig1 { att "a.trig0" radius 6.5 } }
Multiplatform Train Station
kuid <kuid2:316:28003:1> kind "industry" script "Station" class "Station" category-class "BR" username "Austin Large Station" category-region "CA;US" category-era "1890s;1900s;1910s;1920s;1930s;1940s;1950s;1960s;1970s" trainz-build 2.5
queues { passengers_on_0 { passenger-queue "1" size 30 initial-count 8 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passon01" 1 "a.passon02" 2 "a.passon03" 3 "a.passon04 ... 28 "a.passon29" 29 "a.passon30" } } passengers_on_1 { passenger-queue "1" size 30 initial-count 8 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passon31" 1 "a.passon32" 2 "a.passon33 ... 28 "a.passon59" 29 "a.passon60" } } passengers_on_2 { passenger-queue "1" size 20 initial-count 8 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passon61" 1 "a.passon62" ... 18 "a.passon79" 19 "a.passon80" } } passengers_off_0 { passenger-queue "1" size 18 initial-count 0 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passoff01" 1 "a.passoff02" ... 16 "a.passoff17" 17 "a.passoff18" } } passengers_off_1 { passenger-queue "1" size 17 initial-count 0 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passoff19" 1 "a.passoff20" ... 16 "a.passoff35" } } passengers_off_2 { passenger-queue "1" size 18 initial-count 0 product-kuid <kuid:-3:10060> attachment-points { 0 "a.passoff36" 1 "a.passoff37" ... 15 "a.passoff51" 16 "a.passoff52" } } } processes { passenger_spawn_0 { start-enabled 1 duration 20 outputs { 0 { amount 1 queue "passengers_on_0" } } } passenger_spawn_1 { start-enabled 1 duration 20 outputs { 0 { amount 1 queue "passengers_on_1" } } } passenger_spawn_2 { start-enabled 1 duration 20 outputs { 0 { amount 1 queue "passengers_on_2" } } } passenger_delete_0 { start-enabled 1 duration 3 inputs { 0 { amount 1 queue "passengers_off_0" } } } passenger_delete_1 { start-enabled 1 duration 3 inputs { 0 { amount 1 queue "passengers_off_1" } } } passenger_delete_2 { start-enabled 1 duration 3 inputs { 0 { amount 1 queue "passengers_off_2" } } } }
Multiproduct Industry
∅TBDL