Skip to content

Commit bc1ffd8

Browse files
committed
Update OR manual about trainset windows animation
1 parent 65eeaa7 commit bc1ffd8

File tree

4 files changed

+194
-4
lines changed

4 files changed

+194
-4
lines changed

Source/Documentation/Manual/cabs.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ and the mirrors.
819819
The control blocks are like the one shown for the cab light. The Type strings
820820
are ORTS_LEFTDOOR, ORTS_RIGHTDOOR and ORTS_MIRRORS.
821821

822+
Animation for 2D cab windows is described :ref:`here <features-windows>` .
823+
822824
.. _cabs-generic-items:
823825

824826
Cab controls for generic items
@@ -1025,6 +1027,7 @@ Rotation may be applied, with the same syntax, also to DigitalClock cab controls
10251027

10261028
Display and animation of cabview controls in side views of 2D cabs
10271029
------------------------------------------------------------------
1030+
.. _cabs-side-views:
10281031

10291032
This is possible adding after the CabViewControls ( ) compound block an
10301033
ORTSCabviewControls ( ) compound block, that has the same format as the
@@ -1177,6 +1180,7 @@ Development Rules
11771180
font. If no ace is specified, the default will be used.
11781181
- Mirrors and doors can be operated from 3D cabs. The names used are
11791182
``LEFTDOOR``, ``RIGHTDOOR`` and ``MIRRORS``.
1183+
- Animation for 3D cab windows is described :ref:`here <features-windows>` .
11801184
- like the 2D cabs, also 3D cabs can have a night version. Night textures, named like the
11811185
corresponding day textures, must be located within a ``NIGHT`` subfolder of the
11821186
``CABVIEW3D`` folder. To enable night cabs an ``.sd`` file with the same name as the

Source/Documentation/Manual/driving.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,10 +1088,24 @@ More information on connecting brakes and manipulating the brake hose
10881088
connections can be found :ref:`here <physics-hud-brake>` and
10891089
:ref:`here <driving-car-operations>`.
10901090

1091-
Doors and Mirror Commands
1092-
-------------------------
1093-
1094-
Note that the standard keys in OR for these commands are different from
1091+
Doors, Mirror and Windows Commands
1092+
----------------------------------
1093+
.. _driving-anim-commands:
1094+
1095+
Note that these commands are active only if the trainset is equipped with
1096+
the related animations.
1097+
1098+
=================== =====================================
1099+
Command Function
1100+
=================== =====================================
1101+
``<Q>`` Door left open/close
1102+
``<Shift+Q>`` Door right open/close
1103+
``<Shift+V>`` Mirror rotate clock/counterclockwise
1104+
``<Ctrl+Q>`` Window left open/close
1105+
``<Ctrl+Shift+Q>`` Window right open/close
1106+
=================== =====================================
1107+
1108+
Note that the standard keys for doors and mirror in OR are different from
10951109
those of MSTS.
10961110

10971111
Wheelslip Reset

Source/Documentation/Manual/features-rollingstock.rst

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,167 @@ ENG or WAG file::
12341234
)
12351235

12361236

1237+
.. _features-windows:
1238+
1239+
Trainset windows
1240+
================
1241+
1242+
1243+
Left and right 2D- or 3D-cab windows can be animated, showing the animation both in cabview and in
1244+
external views. For locomotives also two windows for the rear cab can be defined.
1245+
1246+
The external sounds and the track sound are reproduced unattenuated with open window.
1247+
To have a volume difference, two lines as follows must be added to the wagon section of the .eng or .wag file::
1248+
1249+
ORTSExternalSoundPassedThroughPercent ( 30 )
1250+
ORTSTrackSoundPassedThroughPercent ( 25 )
1251+
1252+
Numbers in parenthesis may vary from 0 (no sound heard internally) to 100 (sound heard unattenuated).
1253+
Note that, if these two lines are'nt added, but audio option "% of external sound heard internally" is set
1254+
to a value lower than 100, the above effect will be still available with external sounds, but not with
1255+
the track sound.
1256+
1257+
Keyboard commands to toggle window state are listed :ref:`here <driving-anim-commands>` .
1258+
1259+
Names of the animations are as follows.
1260+
1261+
Names for the windows animations as seen from the external camera views (the ones to be inserted in the .s
1262+
file of the trainset)::
1263+
1264+
LEFTWINDOWFRONT
1265+
RIGHTWINDOWFRONT
1266+
LEFTWINDOWREAR
1267+
RIGHTWINDOWREAR
1268+
1269+
In case of carriages, only the first two apply.
1270+
1271+
Names for the windows animations as seen from within a 2D cab (same names are valid for
1272+
front and rear cab); left and right are considered as seen from the related cab::
1273+
1274+
ORTS_2DEXTERNALLEFTWINDOW
1275+
ORTS_2DEXTERNALRIGHTTWINDOW
1276+
1277+
Note that in general the lateral windows will be located in the side views of the 2D cab.
1278+
Therefore the related control blocks in the .cvf file will have to be located as described
1279+
:ref:`here <cabs-side-views>` .
1280+
1281+
Names for the window animations as seen from within a 3D cab (the ones to be inserted in the .s
1282+
file of the 3D cab); Left and right are considered
1283+
as seen in the forward direction of the first cab. The convention difference between 2D and
1284+
3D cabs is due to the difference in the handling of the cabs. NOTE: these 4 controls are not
1285+
needed in the .cvf file (same applies also for wipers, doors and so on as seen from within a
1286+
3D cab)::
1287+
1288+
ORTS_EXTERNALLEFTWINDOWFRONT
1289+
ORTS_EXTERNALRIGHTWINDOWFRONT
1290+
ORTS_EXTERNALLEFTWINDOWREAR
1291+
ORTS_EXTERNALRIGHTWINDOWREAR
1292+
1293+
LEFTWINDOW and RIGHTWINDOW are the names of the controls that can be inserted in the
1294+
.cvf file and in the 3Dcab .s file to command the state change with the mouse.
1295+
1296+
Here is an example of the animation of the left window in a 2D cab::
1297+
1298+
ORTSCabViewControls
1299+
( 1
1300+
ORTSAnimatedDisplay (
1301+
Type ( ORTS_2DEXTERNALLEFTWINDOW MULTI_STATE_DISPLAY )
1302+
Position ( 101 69 235 365 )
1303+
Graphic ( ../../Common.Cab/CabE464/FinestraSX.ace )
1304+
ORTSCycleTime ( 0.6 )
1305+
States ( 16 4 4
1306+
State (
1307+
Style ( 0 )
1308+
SwitchVal ( 0 )
1309+
)
1310+
State (
1311+
Style ( 0 )
1312+
SwitchVal ( 0.0625 )
1313+
)
1314+
State (
1315+
Style ( 0 )
1316+
SwitchVal ( 0.125 )
1317+
)
1318+
State (
1319+
Style ( 0 )
1320+
SwitchVal ( 0.1875 )
1321+
)
1322+
State (
1323+
Style ( 0 )
1324+
SwitchVal ( 0.25 )
1325+
)
1326+
State (
1327+
Style ( 0 )
1328+
SwitchVal ( 0.3125 )
1329+
)
1330+
State (
1331+
Style ( 0 )
1332+
SwitchVal ( 0.375 )
1333+
)
1334+
State (
1335+
Style ( 0 )
1336+
SwitchVal ( 0.4375 )
1337+
)
1338+
State (
1339+
Style ( 0 )
1340+
SwitchVal ( 0.5 )
1341+
)
1342+
State (
1343+
Style ( 0 )
1344+
SwitchVal ( 0.5625 )
1345+
)
1346+
State (
1347+
Style ( 0 )
1348+
SwitchVal ( 0.625 )
1349+
)
1350+
State (
1351+
Style ( 0 )
1352+
SwitchVal ( 0.6875 )
1353+
)
1354+
State (
1355+
Style ( 0 )
1356+
SwitchVal ( 0.75 )
1357+
)
1358+
State (
1359+
Style ( 0 )
1360+
SwitchVal ( 0.825 )
1361+
)
1362+
State (
1363+
Style ( 0 )
1364+
SwitchVal ( 0.88 )
1365+
)
1366+
State (
1367+
Style ( 0 )
1368+
SwitchVal ( 0.94 )
1369+
)
1370+
)
1371+
ORTSCabviewpoint ( 1 )
1372+
)
1373+
)
1374+
1375+
FinestraSX.ace contains the various frames, from window fully close to window fully open.
1376+
ORTSCycleTime means that the opening/closing time of the window is 0.6 seconds. If one wants to use higher times,
1377+
more frames are needed to get a smooth animation. Note that, as explained above,
1378+
the control is within the ORTSCabviewControls block, which is skipped by MSTS and older OR versions to avoid
1379+
error messages, and note that the ORTSCabviewpoint ( 1 ) line specifies that that animation is in the left cabview.
1380+
1381+
A simple control block to move a window by clicking the mouse can be as follows::
1382+
1383+
TwoState (
1384+
Type ( ORTS_LEFTWINDOW TWO_STATE )
1385+
Position ( 120 425 30 21 )
1386+
Graphic ( cab.ace )
1387+
NumFrames ( 2 2 1 )
1388+
Style ( ONOFF )
1389+
MouseControl ( 1 )
1390+
)
1391+
1392+
If there is no specific window control in the real cab, you can locate this control on the window itself,
1393+
using a transparent graphic. So, clicking on the window, you change its state. This can be applied
1394+
both to 2D and 3D cabs.
1395+
1396+
Sound triggers for windows animation are listed :ref:`here <sound-windows>` .
1397+
12371398
C# engine scripting
12381399
===================
12391400
.. _features-scripting-csharp:

Source/Documentation/Manual/sound.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,17 @@ Trigger Function
403403
243 GenericItem2Off
404404
========= =====================================
405405

406+
Following triggers are related to windows animation:
407+
408+
.. _sound-windows:
409+
410+
========= =====================================
411+
Trigger Function
412+
========= =====================================
413+
260 WindowClosing
414+
261 WindowOpening
415+
========= =====================================
416+
406417
Variable Triggers
407418
-----------------
408419

0 commit comments

Comments
 (0)