Skip to content

Commit 47fdf9c

Browse files
authored
Merge branch 'openrails:master' into master
2 parents db91918 + 7badf9c commit 47fdf9c

File tree

77 files changed

+3261
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3261
-711
lines changed

Source/Documentation/Manual/cabs.rst

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,60 @@ if e.g. the wiper moves from left to right and back, only the frames related
466466
to the motion from left to right have to be included. For the reverse
467467
motion the same frames are used from last to first. SwitchVal can vary from 0 to 1.
468468

469+
Multiple screen pages on displays
470+
---------------------------------
471+
472+
Modern locomotives have one or more displays in their cabs, and often in such
473+
displays it is possible to switch among more screen pages. Fields and controls
474+
described in this paragraph enable the implementation of .cvf files with such
475+
functionality, for both 2D and 3D cabs.
476+
477+
In the .cvf control blocks following further fields may be optionally present::
478+
479+
ORTSDisplay ( numeric ), indicating the display ID number (from 0 to 7)
480+
to which the control is linked; if such field is missing, display ID number
481+
zero is assumed;
482+
483+
ORTSScreenPage ( alphanumeric-string ) indicating the screen ID string to
484+
which the control is linked; that means that the control is displayed/may be
485+
operated only if its screen is active in that moment; a missing entry
486+
indicates that the control is displayed independently from the selected screen page;
487+
at game start such controls are enabled, plus the ones with line
488+
ORTSScreenPage ( "default" ); more ORTSScreenPage() entries in a single control
489+
are possible.
490+
491+
A new on/off control, called ORTS_SCREEN_SELECT is available, which, in addition to the usual fields and to
492+
the optional fields ORTSDisplay and ORTSScreenPage contains one or more of following fields::
493+
494+
ORTSNewScreenPage ( alphanumeric-string numeric ): when the control is clicked,
495+
the controls with field ORTSScreenPage equal to the string of this field and
496+
with field ORTSDisplay equal to the numeric will be displayed on such display
497+
in place of the ones displayed up to that moment. if the numeric is missing within
498+
ORTSNewScreenPage, the involved display is the one referenced in field ORTSDisplay
499+
of ORTS_SCREEN_SELECT.
500+
501+
A further control is available, named ORTS_STATIC_DISPLAY, which is specially devoted to the loading of the
502+
background of screen pages (their static part).
503+
Here is an example of usage of it::
504+
505+
MultiStateDisplay (
506+
Type ( ORTS_STATIC_DISPLAY MULTI_STATE_DISPLAY )
507+
Position ( 246 151 105 16 )
508+
Graphic ( semproniostatic.ace )
509+
States ( 1 1 1
510+
State (
511+
Style ( 0 )
512+
SwitchVal ( 0 )
513+
)
514+
)
515+
ORTSScreenPage ( "sempronio" )
516+
)
517+
518+
With this block, the static part of the "sempronio" screen page is loaded on display 0 when such screen
519+
becomes the active one.
520+
521+
.cvf files not using fields and controls listed in this paragraph work as usual, with no changes needed.
522+
469523
Further OR cab controls
470524
-----------------------
471525

@@ -480,6 +534,44 @@ and the mirrors.
480534
The control blocks are like the one shown for the cab light. The Type strings
481535
are ORTS_LEFTDOOR, ORTS_RIGHTDOOR and ORTS_MIRRORS.
482536

537+
.. _cabs-generic-items:
538+
539+
Cab controls for generic items
540+
------------------------------
541+
542+
OR supports the cabview controls for two generic two-state items.
543+
The cabview controls aree called ``<ORTS_GENERIC_ITEM1>`` and
544+
``<ORTS_GENERIC_ITEM2>``. Their state can be toggled also by respectively
545+
clicking keys ``<Shift+.>`` and ``<Shift+,>``.
546+
547+
Sound events are associated, that is::
548+
549+
240: GenericItem1On
550+
241: GenericItem1Off
551+
242: GenericItem2On
552+
243: GenericItem2Off
553+
554+
Animations within the .s file of the locomotive, either stopped/moving or
555+
two-state can be associated to the item state. Linked stopped/moving (wiper type)
556+
animations are named ``<ORTSITEM1CONTINUOUS>`` and ``<ORTSITEM2CONTINUOUS>``.
557+
Linked two-state animations (doors type) are named ``<ORTSITEM1TWOSTATE>`` and
558+
``<ORTSITEM2TWOSTATE>``.
559+
The default animation speed for stopped/moving type animations is 8 FPS.
560+
It may be modified with following parameter in the .sd file::
561+
562+
ESD_CustomAnimationSpeed ( 8 )
563+
564+
Examples of use are fan control, open/close of aerodynamic coverages of couplers
565+
in high speed trains, menu pages switching.
566+
567+
Animations within the 3D cab .s file are also available, as follows::
568+
569+
ORTS_ITEM1CONTINUOUS
570+
ORTS_ITEM2CONTINUOUS
571+
ORTS_ITEM1TWOSTATE
572+
ORTS_ITEM2TWOSTATE
573+
574+
in analogy to the four animations for the locomotive .s file.
483575

484576
High-resolution Cab Backgrounds and Controls
485577
--------------------------------------------
@@ -808,3 +900,13 @@ Here below is an example of an entry for a 3D cab::
808900
ScaleRange ( 0 5000 )
809901
Units ( LBS )
810902
)
903+
904+
Alignment for digital controls
905+
------------------------------
906+
907+
For backwards compatibility reasons, ``Justification ( 1 )``, ``Justification ( 2 )`` and
908+
``Justification ( 3 )`` all lead to a left alignment of the digital in 3Dcabs.
909+
910+
``Justification ( 5 )`` must be used for center alignment, and ``Justification ( 6 )``
911+
must be used for right alignment. ``Justification ( 4 )`` leads to left alignment.
912+

Source/Documentation/Manual/driving.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,8 +1606,8 @@ key assignment list shown by pressing ``<F1>``.
16061606
In addition, Open Rails offers functionality similar to the time
16071607
acceleration switch for MSTS.
16081608

1609-
Use ``<Alt+PgUp>`` or ``<Alt+PgDn>`` keys to increase or decrease the
1610-
speed of the game clock.
1609+
Use ``<Ctrl+Alt+PgUp(Numkey)>`` or ``<Ctrl+Alt+PgDn(Numkey)>`` keys to increase or decrease the
1610+
speed of the game clock. ``<Ctrl+Alt+Home(Numkey)>`` resets the speed.
16111611

16121612
In a multiplayer session, all clients' time, weather and season selections
16131613
are overridden by those set by the server.
723 KB
Loading
11.2 KB
Loading

Source/Documentation/Manual/options.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,14 @@ instead::
720720
Type ( ORTS_ETCS SCREEN_DISPLAY )
721721
Position ( 280 272 320 240 )
722722
Units ( KM_PER_HOUR )
723+
Parameters (
724+
Mode FullSize
725+
)
723726
)
727+
728+
The following DMI size variants are available: FullSize (displays the whole DMI), SpeedArea
729+
(displays only the left part with information about distance and speed) and PlanningArea
730+
(displays only the planning area and navigation buttons).
724731

725732
The information displayed in the DMI is controlled via the TCS script. For more details,
726733
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.

Source/Documentation/Manual/physics.rst

Lines changed: 98 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,18 +2031,106 @@ Some of the cab monitoring gauges provide visibility of what is happening on the
20312031
the "closest" powered car near the Control car and uses its information.
20322032

20332033

2034-
Engines -- Multiple Units in Same Consist or AI Engines
2035-
=======================================================
2036-
2037-
In an OR player train one locomotive is controlled by the player, while
2038-
the other units are controlled by default by the train's MU (multiple
2039-
unit) signals for braking and throttle position, etc. The
2040-
player-controlled locomotive generates the MU signals which are passed
2041-
along to every unit in the train. For AI trains, the AI software directly
2042-
generates the MU signals, i.e. there is no player-controlled locomotive.
2034+
Multiple Units of Locomotives in Same Consist
2035+
=============================================
2036+
2037+
In an OR player train one locomotive is controlled by the player, while
2038+
the other units are controlled by default by the train's MU (multiple
2039+
unit) signals for braking and throttle position, etc. The
2040+
player-controlled locomotive generates the MU signals which are passed
2041+
along to every unit in the train.
2042+
2043+
Distributed Power
2044+
-----------------
2045+
2046+
This is applicable only to trains hauled by diesel locomotives equipped with
2047+
dynamic brakes.
2048+
2049+
More locomotive groups may be present in American long freight trains; a
2050+
locomotive group is defined as a set of locomotives that have no wagons in
2051+
between.
2052+
Groups different from the group including the lead locomotive are called
2053+
remote groups.
2054+
2055+
Remote groups can be controlled in two modes: *synchronous* or
2056+
*asynchronous*. Locomotives in the player train can be arranged to be part of
2057+
one of the two above control groups. So each locomotive group (except the lead one,
2058+
which always belongs to the *sync* control group)
2059+
can be either part the *sync* or of the *async* control group. However, if a
2060+
locomotive group is part of the *async* control group, all locomotive groups behind
2061+
it must also be part of the *async* control group.
2062+
2063+
The arrangement can be changed during run,
2064+
which in real life is performed by using the locomotive's onboard computer
2065+
(e.g. Locotrol).
2066+
2067+
This functionality is necessary in American long-train freight
2068+
operations. An example use case is when a train finished climbing a
2069+
mountain pass. At this point the lead locomotives have to start dynamic
2070+
braking driving downhill, while the trailing units still need to keep pushing
2071+
the train's end uphill. The locomotive driver has the possibility to build
2072+
the *fence*, i.e. move the last locomotive group to the *async* control group.
2073+
2074+
While locomotives in *sync* control group always copy the traction and dynamic
2075+
brake settings of the lead (man-controlled) locomotive, for locomotives in
2076+
*async* control group these can be adjusted independently. Other controls, like
2077+
reverser and air brake are always synchronized throughout the whole train,
2078+
and changing reverser setting or applying air brakes will force *async*
2079+
controlled locomotives to fall back to idle.
2080+
2081+
The *fence* between *sync* and *async* control groups can be moved back and forth
2082+
along the train. This is useful when there are one or more middle-train
2083+
locomotive groups in the consist. However it is not possible to move the
2084+
fence to separate two directly interconnected locomotives: such locomotives
2085+
can be rearranged only together.
2086+
2087+
If the driver dismantles the *fence*, by moving it after the last locomotive
2088+
group, all locomotive groups are moved back to *sync* control group, and
2089+
therefore all locomotives will work in sync with the leading one.
2090+
All-sync operation is also the default, when the game starts.
2091+
2092+
Traction and dynamic brake settings for *sync* group can be controlled by the
2093+
usual keys: ``<A>`` and ``<D>``. The following additional controls are
2094+
available for controlling the *async* group settings:
2095+
2096+
- Move To Back -- ``<Ctrl+Shift+O>``: Move one locomotive group to back (*async*)
2097+
control group (*fence* is moved towards the front of the train).
2098+
- Move To Front -- ``<Ctrl+O>``: Move one locomotive group to front (*sync*)
2099+
control group (*fence* is moved towards the back of the train).
2100+
- Traction -- ``<Ctrl+L>``: Switch *async* group to traction mode.
2101+
- Idle -- ``<Ctrl+Shift+L>``: Switch *async* group to idle state.
2102+
- Brake -- ``<Ctrl+'> (key two positions at the right of L)``: Switch *async*
2103+
group to dynamic braking mode.
2104+
- More -- ``<Ctrl+U>``: Increase *async* group traction or dynamic brake by a notch,
2105+
depending on its mode setting.
2106+
- Less -- ``<Ctrl+Shift+U>``: Decrease *async* group traction or dynamic brake by a notch,
2107+
depending on its mode setting.
2108+
2109+
HUD shows the sync--async configuration in line *Multiple Units* on main page.
2110+
When it reads e.g. "2--2 | 1", then it means that front and middle-train
2111+
double-unit locomotives are controlled in *sync* with the leading unit,
2112+
while the trailing pushing unit is controlled *async* independently.
2113+
The actual set value of traction or dynamic brake of *async* group is shown in
2114+
lines *Throttle* and *Dynamic Brake*, respectively, in brackets, e.g.:
2115+
Throttle: 0% (50%).
2116+
2117+
The complete distributed power configuration is displayed in the
2118+
Distributed Power Info extended HUD page, where the state of all locomotives
2119+
in the train are shown, as well as in the *Train DPU Info* window, which is
2120+
displayed after pressing ``<Shift+F9>``, and which shows only the state of the first
2121+
locomotive of each locomotive group, as occurs also in displays of real
2122+
locomotives.
2123+
2124+
.. image:: images/physics-dpu-window.png
2125+
2126+
Engines of AI Trains
2127+
--------------------
2128+
2129+
For AI trains, the AI software directly generates the remote control
2130+
signals, i.e. there is no player-controlled locomotive.
20432131
In this way, all engines use the same physics code for power and friction.
20442132

2045-
This software model will ensure that non-player controlled engines will
2133+
This software model will ensure that non-player controlled engines will
20462134
behave exactly the same way as player controlled ones.
20472135

20482136
.. _physics-braking:

Source/Documentation/Manual/sound.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,18 @@ Trigger Function
391391
235 AirConditioningOff
392392
========= =====================================
393393

394+
Triggers from 240 to 243 associated to the two generic items
395+
(see :ref:`here <cabs-generic-items>`) :
396+
397+
========= =====================================
398+
Trigger Function
399+
========= =====================================
400+
240 GenericItem1On
401+
241 GenericItem1Off
402+
242 GenericItem2On
403+
243 GenericItem2Off
404+
========= =====================================
405+
394406
Variable Triggers
395407
-----------------
396408

Source/Documentation/Manual/timetable.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,9 @@ Special Rows
303303
will read that path. If not, it will read the 'normal' path, and will then
304304
store this as binary for future use. Binary paths are stored in a subdirectory
305305
named ``OpenRails`` which must be created in the Paths directory of the route.
306-
307-
**Important:**
308306

309-
- If a path is edited, the binary version must be deleted manually, otherwise the program will still use this older version.
310-
- If a route is edited, such that the .tdb might have been changed, all binary paths must be deleted.
307+
Note: If a path or the route is edited, then the binary data will be out of date.
308+
If so, it is deleted and re-created automatically when the user starts the route.
311309

312310
- ``#consist`` row
313311

Source/ORTS.Common/Input/UserCommand.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public enum UserCommand
4343
[GetString("Display Station Labels")] DisplayStationLabels,
4444
[GetString("Display Switch Window")] DisplaySwitchWindow,
4545
[GetString("Display Train Operations Window")] DisplayTrainOperationsWindow,
46+
[GetString("Display Train Dpu Window")] DisplayTrainDpuWindow,
4647
[GetString("Display Next Station Window")] DisplayNextStationWindow,
4748
[GetString("Display Compass Window")] DisplayCompassWindow,
4849
[GetString("Display Train List Window")] DisplayTrainListWindow,
@@ -204,11 +205,22 @@ public enum UserCommand
204205
[GetString("Control ImmediateRefill")] ControlImmediateRefill,
205206
[GetString("Control Turntable Clockwise")] ControlTurntableClockwise,
206207
[GetString("Control Turntable Counterclockwise")] ControlTurntableCounterclockwise,
207-
[GetString("Control Generic 1")] ControlGeneric1,
208-
[GetString("Control Generic 2")] ControlGeneric2,
208+
[GetString("Control Generic Item 1")] ControlGenericItem1,
209+
[GetString("Control Generic Item 2")] ControlGenericItem2,
210+
[GetString("Control TCS Generic 1")] ControlTCSGeneric1,
211+
[GetString("Control TCS Generic 2")] ControlTCSGeneric2,
209212
[GetString("Control Cab Radio")] ControlCabRadio,
210213
[GetString("Control AI Fire On")] ControlAIFireOn,
211214
[GetString("Control AI Fire Off")] ControlAIFireOff,
212215
[GetString("Control AI Fire Reset")] ControlAIFireReset,
216+
217+
//Distributed power
218+
[GetString("Control DP Move To Front")] ControlDPMoveToFront,
219+
[GetString("Control DP Move To Back")] ControlDPMoveToBack,
220+
[GetString("Control DP Traction")] ControlDPTraction,
221+
[GetString("Control DP Idle")] ControlDPIdle,
222+
[GetString("Control DP Brake")] ControlDPBrake,
223+
[GetString("Control DP More")] ControlDPMore,
224+
[GetString("Control DP Less")] ControlDPLess,
213225
}
214226
}

Source/ORTS.Settings/InputSettings.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,10 @@ static void InitializeCommands(UserCommandInput[] Commands)
388388
Commands[(int)UserCommand.ControlForwards] = new UserCommandKeyInput(0x11);
389389
Commands[(int)UserCommand.ControlGearDown] = new UserCommandKeyInput(0x12, KeyModifiers.Shift);
390390
Commands[(int)UserCommand.ControlGearUp] = new UserCommandKeyInput(0x12);
391-
Commands[(int)UserCommand.ControlGeneric1] = new UserCommandKeyInput(0x33, KeyModifiers.Control);
392-
Commands[(int)UserCommand.ControlGeneric2] = new UserCommandKeyInput(0x34, KeyModifiers.Control);
391+
Commands[(int)UserCommand.ControlGenericItem1] = new UserCommandKeyInput(0x33, KeyModifiers.Shift);
392+
Commands[(int)UserCommand.ControlGenericItem2] = new UserCommandKeyInput(0x34, KeyModifiers.Shift);
393+
Commands[(int)UserCommand.ControlTCSGeneric1] = new UserCommandKeyInput(0x33, KeyModifiers.Control);
394+
Commands[(int)UserCommand.ControlTCSGeneric2] = new UserCommandKeyInput(0x34, KeyModifiers.Control);
393395
Commands[(int)UserCommand.ControlHandbrakeFull] = new UserCommandKeyInput(0x28, KeyModifiers.Shift);
394396
Commands[(int)UserCommand.ControlHandbrakeNone] = new UserCommandKeyInput(0x27, KeyModifiers.Shift);
395397
Commands[(int)UserCommand.ControlHeadlightDecrease] = new UserCommandKeyInput(0x23, KeyModifiers.Shift);
@@ -436,6 +438,14 @@ static void InitializeCommands(UserCommandInput[] Commands)
436438

437439
Commands[(int)UserCommand.ControlWaterScoop] = new UserCommandKeyInput(0x15);
438440
Commands[(int)UserCommand.ControlWiper] = new UserCommandKeyInput(0x2F);
441+
// Distributed power
442+
Commands[(int)UserCommand.ControlDPMoveToFront] = new UserCommandKeyInput(0x18, KeyModifiers.Control); //O
443+
Commands[(int)UserCommand.ControlDPMoveToBack] = new UserCommandKeyInput(0x18, KeyModifiers.Control | KeyModifiers.Shift); //O
444+
Commands[(int)UserCommand.ControlDPTraction] = new UserCommandKeyInput(0x26, KeyModifiers.Control); //L
445+
Commands[(int)UserCommand.ControlDPIdle] = new UserCommandKeyInput(0x26, KeyModifiers.Control | KeyModifiers.Shift); //L
446+
Commands[(int)UserCommand.ControlDPBrake] = new UserCommandKeyInput(0x28, KeyModifiers.Control); //
447+
Commands[(int)UserCommand.ControlDPMore] = new UserCommandKeyInput(0x16, KeyModifiers.Control); //U
448+
Commands[(int)UserCommand.ControlDPLess] = new UserCommandKeyInput(0x16, KeyModifiers.Control | KeyModifiers.Shift); //U
439449

440450
Commands[(int)UserCommand.DebugClockBackwards] = new UserCommandKeyInput(0x0C);
441451
Commands[(int)UserCommand.DebugClockForwards] = new UserCommandKeyInput(0x0D);
@@ -475,6 +485,7 @@ static void InitializeCommands(UserCommandInput[] Commands)
475485
Commands[(int)UserCommand.DisplaySwitchWindow] = new UserCommandKeyInput(0x42);
476486
Commands[(int)UserCommand.DisplayTrackMonitorWindow] = new UserCommandModifiableKeyInput(0x3E, Commands[(int)UserCommand.DisplayNextWindowTab]);
477487
Commands[(int)UserCommand.DisplayTrainOperationsWindow] = new UserCommandKeyInput(0x43);
488+
Commands[(int)UserCommand.DisplayTrainDpuWindow] = new UserCommandKeyInput(0x43, KeyModifiers.Shift);
478489

479490
Commands[(int)UserCommand.GameAutopilotMode] = new UserCommandKeyInput(0x1E, KeyModifiers.Alt);
480491
Commands[(int)UserCommand.GameChangeCab] = new UserCommandKeyInput(0x12, KeyModifiers.Control);

0 commit comments

Comments
 (0)