"Queues" container
m ("queues" Container moved to "Queues" container) |
(add examples) |
||
Line 1: | Line 1: | ||
+ | {{ORP-top}} | ||
The [["queues" Container]] is a top-level [[config.txt file]] entry used by various [[Content Types]]. | The [["queues" Container]] is a top-level [[config.txt file]] entry used by various [[Content Types]]. | ||
Line 65: | Line 66: | ||
: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. | :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=== | ||
+ | <pre> | ||
+ | |||
+ | 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> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | ===Queues in a Locomotive=== | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | 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> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | ===Queues in a Boxcar=== | ||
+ | <pre> | ||
+ | |||
+ | 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" | ||
+ | |||
+ | </pre> | ||
+ | <pre> | ||
+ | |||
+ | 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> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </pre> | ||
+ | ==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. | ||
+ | |||
+ | ===Multiplatform Train Station=== | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | 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" | ||
+ | 4 "a.passon05"</pre> {{...| 5 "a.passon06" | ||
+ | 6 "a.passon07" | ||
+ | 7 "a.passon08" | ||
+ | 8 "a.passon09" | ||
+ | 9 "a.passon10" | ||
+ | 10 "a.passon11" | ||
+ | 11 "a.passon12" | ||
+ | 12 "a.passon13" | ||
+ | 13 "a.passon14" | ||
+ | 14 "a.passon15" | ||
+ | 15 "a.passon16" | ||
+ | 16 "a.passon17" | ||
+ | 17 "a.passon18" | ||
+ | 18 "a.passon19" | ||
+ | 19 "a.passon20" | ||
+ | 20 "a.passon21" | ||
+ | 21 "a.passon22" | ||
+ | 22 "a.passon23" | ||
+ | 23 "a.passon24" | ||
+ | 24 "a.passon25" | ||
+ | 25 "a.passon26" | ||
+ | 26 "a.passon27" | ||
+ | 27 "a.passon28" \ }}<pre> | ||
+ | 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"</pre> | ||
+ | {{...| 3 "a.passon34" | ||
+ | 4 "a.passon35" | ||
+ | 5 "a.passon36" | ||
+ | 6 "a.passon37" | ||
+ | 7 "a.passon38" | ||
+ | 8 "a.passon39" | ||
+ | 9 "a.passon40" | ||
+ | 10 "a.passon41" | ||
+ | 11 "a.passon42" | ||
+ | 12 "a.passon43" | ||
+ | 13 "a.passon44" | ||
+ | 14 "a.passon45" | ||
+ | 15 "a.passon46" | ||
+ | 16 "a.passon47" | ||
+ | 17 "a.passon48" | ||
+ | 18 "a.passon49" | ||
+ | 19 "a.passon50" | ||
+ | 20 "a.passon51" | ||
+ | 21 "a.passon52" | ||
+ | 22 "a.passon53" | ||
+ | 23 "a.passon54" | ||
+ | 24 "a.passon55" | ||
+ | 25 "a.passon56" | ||
+ | 26 "a.passon57" | ||
+ | 27 "a.passon58"</pre> | ||
+ | \ }} | ||
+ | 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" | ||
+ | </pre> {{..| 2 "a.passon63" | ||
+ | 3 "a.passon64" | ||
+ | 4 "a.passon65" | ||
+ | 5 "a.passon66" | ||
+ | 6 "a.passon67" | ||
+ | 7 "a.passon68" | ||
+ | 8 "a.passon69" | ||
+ | 9 "a.passon70" | ||
+ | 10 "a.passon71" | ||
+ | 11 "a.passon72" | ||
+ | 12 "a.passon73" | ||
+ | 13 "a.passon74" | ||
+ | 14 "a.passon75" | ||
+ | 15 "a.passon76" | ||
+ | 16 "a.passon77" | ||
+ | 17 "a.passon78" | ||
+ | </pre> | ||
+ | \ }}<pre> | ||
+ | 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" | ||
+ | </pre> {{...| | ||
+ | 2 "a.passoff03" | ||
+ | 3 "a.passoff04" | ||
+ | 4 "a.passoff05" | ||
+ | 5 "a.passoff06" | ||
+ | 6 "a.passoff07" | ||
+ | 7 "a.passoff08" | ||
+ | 8 "a.passoff09" | ||
+ | 9 "a.passoff10" | ||
+ | 10 "a.passoff11" | ||
+ | 11 "a.passoff12" | ||
+ | 12 "a.passoff13" | ||
+ | 13 "a.passoff14" | ||
+ | 14 "a.passoff15" | ||
+ | 15 "a.passoff16" </pre> | ||
+ | \ }}<pre> | ||
+ | |||
+ | |||
+ | 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" | ||
+ | </pre> {{...| | ||
+ | 2 "a.passoff21" | ||
+ | 3 "a.passoff22" | ||
+ | 4 "a.passoff23" | ||
+ | 5 "a.passoff24" | ||
+ | 6 "a.passoff25" | ||
+ | 7 "a.passoff26" | ||
+ | 8 "a.passoff27" | ||
+ | 9 "a.passoff28" | ||
+ | 10 "a.passoff29" | ||
+ | 11 "a.passoff30" | ||
+ | 12 "a.passoff31" | ||
+ | 13 "a.passoff32" | ||
+ | 14 "a.passoff33" | ||
+ | </pre> \ }}<pre> | ||
+ | |||
+ | |||
+ | 15 "a.passoff34" | ||
+ | 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" | ||
+ | </pre> {{...| | ||
+ | 2 "a.passoff38" | ||
+ | 3 "a.passoff39" | ||
+ | 4 "a.passoff40" | ||
+ | 5 "a.passoff41" | ||
+ | 6 "a.passoff42" | ||
+ | 7 "a.passoff43" | ||
+ | 8 "a.passoff44" | ||
+ | 9 "a.passoff45" | ||
+ | 10 "a.passoff46" | ||
+ | 11 "a.passoff47" | ||
+ | 12 "a.passoff48" | ||
+ | 13 "a.passoff49" | ||
+ | 14 "a.passoff50" </pre> | ||
+ | \ }}<pre> | ||
+ | |||
+ | 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" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
==Categories== | ==Categories== | ||
[[Category:Config Container]] | [[Category:Config Container]] |
Revision as of 02:28, 23 September 2013
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 "" custom-attachments "" 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.
custom-attachments
- Type: String
- Desc: Specifies that this queue has custom attachment points. Custom attachments are used in game to visually represent the amount of product in the queue. An 'attachment-points' container is used to list the custom attachments.
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.
Multiplatform Train Station
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" 4 "a.passon05"…
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"
</pre> {{..| 2 "a.passon63"
3 "a.passon64" 4 "a.passon65" 5 "a.passon66" 6 "a.passon67" 7 "a.passon68" 8 "a.passon69" 9 "a.passon70" 10 "a.passon71" 11 "a.passon72" 12 "a.passon73" 13 "a.passon74" 14 "a.passon75" 15 "a.passon76" 16 "a.passon77" 17 "a.passon78" </pre>\ }}
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"
…
15 "a.passoff34" 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" } } }}