@@ -561,12 +561,13 @@ locations where containers may lay. Containers of same length can be stacked one
561561Wagons may be empty at game start, or partially or totally pre-loaded with containers, by
562562inserting the related data either in the consist (``.con ``) file or in the ``.wag `` files.
563563
564- Also container stations may be empty at game start, or partially or totally pre-loaded with
564+ Also container stations may be empty at game start, or partially or totally populated with
565565containers, inserting the related data in the activity (``.act ``) file.
566566
567567The loading and unloading operations are started by the player, by pressing the key ``<T> ``
568568for 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
569+ (starting from the locomotive) which is within the container crane displacement range and which
570+ fulfills the
570571required conditions (e.g. loading space available for loading, container present for unloading).
571572
572573Double stack wagons are managed.
@@ -655,7 +656,7 @@ Center, CenterFront, Front and Above. Following picture shows where the first fi
655656on the wagon, while Above is the above position in dual-stack configurations. The Above position is
656657always centered.
657658
658- .. image :: images/features-loading-area .png
659+ .. image :: images/features-loading-positions .png
659660
660661Some loading configurations are shown in following picture:
661662
@@ -717,6 +718,9 @@ The advantage of this type of allocation is that, for a single ``.wag`` file
717718possible, sparing the time of creating many ``.wag `` files that differ only on the
718719containers loaded.
719720
721+ Here below a picture with a sample entry in the ``.con `` file:
722+ .. image :: images/features-sample-load-entry.png
723+
720724
721725Allocation through ``.wag `` file
722726'''''''''''''''''''''''''''''''''
@@ -759,18 +763,18 @@ Pickup object. A ``.ref`` file entry sample is as follows::
759763 Filename ( RMG_45.s )
760764 PickupType ( _FUEL_COAL_ )
761765 Description ( "Animated container crane" )
762- )
766+ )
763767
764768PickupType is set to ``_FUEL_COAL ``, but this will be overwritten by the data inserted in the
765769extension ``.w `` file (see :ref: `here<features-route-modify-wfiles> `) within the ``Openrails ``
766770sufolder of the World folder.
767771
768772Such extension ``.w `` file is formed by a general part, a container crane related part, and a
769- stack locations related part, as per following example (parts separated by blank lines)::
773+ stack locations related part, as per following example (parts separated by blank lines) ::
770774
771775 SIMISA@@@@@@@@@@JINX0w0t______
772-
773- Tr_Worldfile (
776+
777+ Tr_Worldfile (
774778 Pickup (
775779 UiD ( 21 )
776780 PickupType ( 15 1 )
@@ -833,8 +837,7 @@ Tr_Worldfile (
833837 )
834838 )
835839 )
836-
837- )
840+ )
838841
839842- The UiD number must correspond to the uiD number that the pickup has in the main ``.w `` file.
840843- PickupType ( 15 1 ) identifies this pickup as being a container station.
@@ -970,6 +973,19 @@ realistic value.
970973Parameters of extension ``.w `` file related to the crane and its animations
971974''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
972975
976+ - ORTSPickingSurfaceYOffset ( 0.0 ) : the Y offset of the lower face of the grabbers
977+ (the one which gets in contact with the upper face of the container) when ``YAXIS `` is
978+ equal to 0
979+ - ORTSPickingSurfaceRelativeTopStartPosition ( 0 11.7 0 ) : the values of ``XAXIS ``, ``YAXIS ``
980+ and ZAXIS at game start (should be centered on the Z axis, above the rails and at
981+ top height)
982+ - ORTSGrabberArmsParts ( 4 ) : is 4 if there are all four ``GRABBER01 ``, ``GRABBER02 ``, ``GRABBER01_02 ``
983+ and ``GRABBER02_02 `` animations; is 2 if there is only ``GRABBER01 `` and ``GRABBER02 ``
984+ - ORTSCraneSound ( "ContainerCrane.sms" ) : name and path of the crane sound file; the path is
985+ based on the ``SOUND `` folder of the route; if the file is not found there, the path becomes
986+ based on the ``SOUND `` folder of ``TRAIN SIMULATOR ``. The specific discrete sound triggers
987+ available are listed :ref: `here<sound-container-cranes> ` .
988+
973989Stack Locations
974990''''''''''''''''
975991Within the area that can be reached by the container crane (rails area apart)
@@ -991,18 +1007,83 @@ The stack locations are defined by following parameters:
9911007The ``Length `` and ``MaxStackedContainers `` parameters are optional and, when present, override
9921008the default values present in the ``ORTSStackLocationsLength `` and ``ORTSMaxStackedContainers ``.
9931009
1010+ If ``ORTSStackLocationsLength `` is greater or equal to 12.20m, which is twice the length of
1011+ a 20ft container, Open Rails applies a space optimization strategy: for each stack location
1012+ (let's call it the mother stack location), another one (let's call it the child stack location)
1013+ is created on a position with a Z value which is 6.095m greater than the mother
1014+ stack location (if the latter is flipped the Z value is 6.095m smaller). This child stack location
1015+ can be occupied by a 20ft container only, and only if the mother stack location is empty or
1016+ occupied by a 20ft container too. The child stack location has an index which is equal to
1017+ the mother stack location index plus the total number of mother stack locations. Once both
1018+ the mother and the child stack locations are empty, the mother stack location is again available
1019+ for any type of container of suitable length.
9941020
1021+ A further example of a stack locations allocation code and of its physical counterpart in the
1022+ container station follows. It can be noted that stack location 0 has a 20ft container on it, and so has
1023+ its child stack location 10. Same applies to stack location 3 and its child stack location 13.
9951024
1025+ .. image :: images/features-stack-locations-code.png
9961026
1027+ .. image :: images/features-stack-locations.png
9971028
9981029
1030+ Population of container stations at game start
1031+ ''''''''''''''''''''''''''''''''''''''''''''''
9991032
1033+ Container stations may be populated at game start. This occurs by inserting an ``.lsp ``
1034+ (load station population) in the ``Openrails `` subfolder of the "Activities" folder of the
1035+ route, and inserting the following line at the bottom of the ``Tr_Activity_Header `` in
1036+ ``.act `` files ::
1037+
1038+ ORTSLoadStationsPopulation ( BigContainerStationPopulation )
1039+
1040+ where ``BigContainerStationPopulation `` is the name of the ``.lsp `` file. At the moment population at
1041+ game start is possible only in Activity mode.
1042+
1043+ The ``.lsp `` file is a Json file. An example is shown here below ::
1044+
1045+ "ContainerStationsPopulation": [
1046+ {
1047+ "LoadStationID" : { "wfile" : "w-005354+014849.w", "UiD" : 21, },
1048+ "LoadData" : [
1049+ { "File" : "40HCcai", "Folder" : "common.containerdata", "StackLocation" : 0, },
1050+ { "File" : "40HCcai", "Folder" : "common.containerdata", "StackLocation" : 0, },
1051+ { "File" : "20cmacgm", "Folder" : "common.containerdata", "StackLocation" : 2, },
1052+ { "File" : "20kline", "Folder" : "common.containerdata", "StackLocation" : 2, },
1053+ { "File" : "45HCtriton", "Folder" : "common.containerdata", "StackLocation" : 5, },
1054+ { "File" : "45HCtriton", "Folder" : "common.containerdata", "StackLocation" : 5, },
1055+ { "File" : "48emp", "Folder" : "common.containerdata", "StackLocation" : 6, },
1056+ { "File" : "20maersk", "Folder" : "common.containerdata", "StackLocation" : 14, },
1057+ { "File" : "20maersk3", "Folder" : "common.containerdata", "StackLocation" : 14, },
1058+ ]
1059+ },
1060+ {
1061+ "LoadStationID" : { "wfile" : "w-005354+014849.w", "UiD" : 210, },
1062+ "LoadData" : [
1063+ ...
1064+ ]
1065+ },
1066+ ...
1067+ ]
1068+ }
10001069
1001-
1002-
1003-
1004-
1005-
1070+ The file can define the population at startup of many container stations.
1071+
1072+ - The ``LoadStationID `` contains the info needed to identify the container station.
1073+ - The ``LoadData `` array contains the data to populate the container station.
1074+ - The value of ``File `` is the name of the ``.loa `` file identifying the container.
1075+ - The value of ``Folder `` is the path where the ``.loa `` can be found, starting from the
1076+ ``TRAINSET ``.
1077+ - The value of ``StackLocation `` is the index of the Stack Location. If the index is equal
1078+ or higher than the number of stack locations defined in the extension ``.w `` file, the
1079+ index refers to a child stack location.
1080+ - If more than a container is defined for a stack location, they are stacked one above the
1081+ other.
1082+
1083+ The container station population file must be written taking into account the constraints
1084+ of the stack locations (container length must be smaller than stack location lenght,
1085+ stacked containers can't exceed the allowed number, a stack location must contain
1086+ containers of same length).
10061087
10071088
10081089.. _features-passengerviewpoints :
0 commit comments