@@ -540,6 +540,91 @@ A typical configuration code block will be as follows::
540540
541541The empty values for the wagon will be read from the normal base WAG file paramaters.
542542
543+ .. _features-containers :
544+
545+ Container management
546+ ====================
547+
548+ General
549+ -------
550+
551+ With this feature containers are not static objects laying on earth or on wagons, but
552+ may be loaded from a container station onto a wagon, or unloaded from a wagon and laid on
553+ a container station. The load/unload operations are performed through a crane, which is the
554+ heart of the container station.
555+
556+ .. image :: images/features-container.png
557+
558+ The other component of the container station is the set of stack locations, that is the
559+ locations where containers may lay. Containers of same length can be stacked one above the other.
560+
561+ Wagons may be empty at game start, or partially or totally pre-loaded with containers, by
562+ inserting the related data either in the consist (``.con ``) file or in the ``.wag `` files.
563+
564+ Also container stations may be empty at game start, or partially or totally pre-loaded with
565+ containers, inserting the related data in the activity (``.act ``) file.
566+
567+ The loading and unloading operations are started by the player, by pressing the key ``<T> ``
568+ for loading, and the key ``<Shift-T> `` . The operation is performed on the first wagon
569+ (starting from the locomotive) which is within the container crane and which fulfills the
570+ required conditions (e.g. loading space available for loading, container present for unloading).
571+
572+ Double stack wagons are managed.
573+
574+ From a point of view of internal code structure, Open Rails handles container stations as
575+ special pickups.
576+
577+
578+ How to define container data
579+ ----------------------------
580+
581+ Container shape files (``.s ``) must be located in subfolders (or sub-subfolders) of the
582+ ``Trainset `` folder.
583+ Containers that can be managed must be provided with a Json ``.loa `` file. The ``.loa `` files
584+ must be located in a subfolder of the ``Trainset `` folder. It is warmly advised to keep all
585+ ``.loa `` file in a single folder: ``Common.ContainerData `` is suggested. It is also advised to name
586+ the ``.loa `` files in a consistent way: ``40HCtriton.loa `` is suggested, where ``40HC `` is the
587+ container type and ``triton `` the brand painted on the container.
588+
589+ Format of the .loa file
590+ '''''''''''''''''''''''
591+
592+ Here below a sample of a ``.loa `` file::
593+
594+ {
595+ "Container":
596+ {
597+ "Name" : "triton",
598+ "Shape" : "COMMON_Container_3d\\Cont_40ftHC\\container-40ftHC_Triton.s",
599+ "ContainerType" : "C40ftHC",
600+ "IntrinsicShapeOffset": [0,1.175,0],
601+ }
602+ }
603+
604+ - "Container" is a fixed keyword.
605+ - "Name" has as value a string used by Open Rails when the container must be indentified in a message
606+ to the player.
607+ - "Shape" has as value the path of the container shape, having ``Trainset `` as base.
608+ - "ContainerType" identifies the container type, which may be one of the following ones::
609+
610+ * C20ft
611+ * C40ft
612+ * C40ftHC
613+ * C45ft
614+ * C45ftHC
615+ * C48ft
616+ * C53ft
617+
618+ C48ft and C53ft have a HC height (2.90m)
619+ - "IntrinsicShapeOffset" has as value the offset in meters of the center of the bottom rectangle of the
620+ container with respect to the container shape file coordinates. Unfortunately often such
621+ offset is not [0,0,0], which would be advisable for newly produced containers. A simple way to
622+ state such offset is to use the ``Show Bounding Info `` of ``Shape Viewer ``.
623+
624+
625+
626+
627+
543628.. _features-passengerviewpoints :
544629
545630Multiple passenger viewpoints
0 commit comments