3D cabs - a short term effort to fully expose them
In my initial roadmap, creating support for 3D cabs was the next step to be done after version 1.0. Unfortunately, my plans to revamp the entire architecture would ultimately delay this by half or a full year. Therefore, I am considering a quick solution to introduce 3D cabs with minimal effort. But it depends on what you think and how exactly it should be done.
The solution with least effort would be to recycle the animated object system, and therefore use a single animated object file to represent the cab, such as cab.animated (having precedence over panel2.cfg and panel.cfg). There would need to be a series of new variables to query all relevant states of the train, e.g. reverser, power notch, brake notch, etc. Introducing these variables would be one requirement, but there might be more considerations.
The camera would be able to rotate freely in the cab, thus no camera restriction is required. The driver's eye location could be sufficiently determined via the train.dat (#CAB or #COCKPIT section). Sounds would be left the way they are for now. While I will ultimately introduce the functionality to place sounds freely in each car, it would be some sort of a wasted effort to do this for the BVE-style trains now.
I would like you to consider the usefulness of 3D cabs with existing trains, to think of the list of required variables, and for anything else that would be necessary for 3D cabs and I have missed to mention or consider.
List of variables that need to be introduced (may not be complete):
reverserNotch: Queries the state of the reverser, i.e. -1 (B), 0 (N) or 1 (F).
powerNotch: The current power notch.
powerNotches: The amount of power notches.
brakeNotch: The current brake notch, or 0 (REL) / 1 (LAP) / 2 (SRV) for trains with automatic air brake.
brakeNotches: The amount of brake notches, or 2 for trains with automatic air brake.
brakeNotchLinear: The current brake notch plus hold brake plus emergency brake, e.g. 0 (B0), 1 (HLD), 2 (B1), 3 (B2), 4 (B3), 5 (EMG), or 0 (REL) / 1 (LAP) / 2 (SRV) / 3 (EMG) for trains with automatic air brake.
brakeNotchesLinear: The amount of brake notches plus hold brake plus emergency brake, or 3 for trains with automatic air brake.
emergencyBrake: Whether the emergency brake is currently active (1) or not (0).
hasAirBrake: Whether the train has the automatic air brake (1) or not (0).
holdBrake: Whether the hold brake is currently active (1) or not (0).
hasHoldBrake: Whether the train has the hold brake (1) or not (0).
constSpeed: Whether the const speed system is currently active (1) or not (0).
hasConstSpeed: Whether the train has the const speed sytem (1) or not (0).
brakeCylinder: The pressure in the brake cylinder in Pa.
brakePipe: The pressure in the brake pipe in Pa.
emergencyReservoir: The pressure in the emergency reservoir in Pa.
mainReservoir: The pressure in the main resevoir in Pa.
doors: The state of the doors in all cars, i.e. between 0 (closed) and 1 (open) [already available]
doors[carIndex]: The state of the doors in a particular car, i.e. between 0 (closed) and 1 (open)
leftDoors: The state of the left doors in all cars, i.e. between 0 (closed) and 1 (open)
leftDoors[carIndex]: The state of the left doors in a particular car, i.e. between 0 (closed) and 1 (open) [already available]
rightDoors: The state of the right doors in all cars, i.e. between 0 (closed) and 1 (open)
rightDoors[carIndex]: The state of the right doors in a particular car, i.e. between 0 (closed) and 1 (open) [already available]
leftDoorsTarget: The target state of the left doors in all cars, i.e. 0 (closed) or 1 (open) [already available]
leftDoorsTarget[carIndex]: The target state of the left doors in a particular car, i.e. 0 (closed) or 1 (open)
rightDoorsTarget: The target state of the right doors in all cars, i.e. 0 (closed) or 1 (open) [already available]
rightDoorsTarget[carIndex]: The target state of the right doors in a particular car, i.e. 0 (closed) or 1 (open)
ats: The ATS lamp, i.e. inactive (0) or active (1)
atsRun: The ATS RUN lamp, i.e. inactive (0), lit (1), or flashing (2)
pPower: The P POWER lamp, i.e. inactive (0) or active (1)
ptnApproach: The PTN APPROACH lamp, i.e. inactive (0) or active (1)
brakeRelease: The BRAKE RELEASE lamp, i.e. inactive (0) or active (1)
atsP: The ATS P lamp, i.e. inactive (0) or active (1)
failure: The FAILURE lamp, i.e. inactive (0) or active (1)
atc: The ATC lamp, i.e. inactive (0) or active (1)
atcPower: The ATC POWER lamp, i.e. inactive (0) or active (1)
atcSrv: The ATC SRV lamp, i.e. inactive (0) or active (1)
atcEmg: The ATC EMG lamp, i.e. inactive (0) or active (1)
atcState: The current state of ATC, i.e. 0 (X), 1 (0 km/h), 2 (15 km/h), 3 (25 km/h), ..., 9 (100 km/h), 10 (110 km/h), 11 (120 km/h), 12 (ATS)
The solution with least effort would be to recycle the animated object system, and therefore use a single animated object file to represent the cab, such as cab.animated (having precedence over panel2.cfg and panel.cfg). There would need to be a series of new variables to query all relevant states of the train, e.g. reverser, power notch, brake notch, etc. Introducing these variables would be one requirement, but there might be more considerations.
The camera would be able to rotate freely in the cab, thus no camera restriction is required. The driver's eye location could be sufficiently determined via the train.dat (#CAB or #COCKPIT section). Sounds would be left the way they are for now. While I will ultimately introduce the functionality to place sounds freely in each car, it would be some sort of a wasted effort to do this for the BVE-style trains now.
I would like you to consider the usefulness of 3D cabs with existing trains, to think of the list of required variables, and for anything else that would be necessary for 3D cabs and I have missed to mention or consider.
List of variables that need to be introduced (may not be complete):
reverserNotch: Queries the state of the reverser, i.e. -1 (B), 0 (N) or 1 (F).
powerNotch: The current power notch.
powerNotches: The amount of power notches.
brakeNotch: The current brake notch, or 0 (REL) / 1 (LAP) / 2 (SRV) for trains with automatic air brake.
brakeNotches: The amount of brake notches, or 2 for trains with automatic air brake.
brakeNotchLinear: The current brake notch plus hold brake plus emergency brake, e.g. 0 (B0), 1 (HLD), 2 (B1), 3 (B2), 4 (B3), 5 (EMG), or 0 (REL) / 1 (LAP) / 2 (SRV) / 3 (EMG) for trains with automatic air brake.
brakeNotchesLinear: The amount of brake notches plus hold brake plus emergency brake, or 3 for trains with automatic air brake.
emergencyBrake: Whether the emergency brake is currently active (1) or not (0).
hasAirBrake: Whether the train has the automatic air brake (1) or not (0).
holdBrake: Whether the hold brake is currently active (1) or not (0).
hasHoldBrake: Whether the train has the hold brake (1) or not (0).
constSpeed: Whether the const speed system is currently active (1) or not (0).
hasConstSpeed: Whether the train has the const speed sytem (1) or not (0).
brakeCylinder: The pressure in the brake cylinder in Pa.
brakePipe: The pressure in the brake pipe in Pa.
emergencyReservoir: The pressure in the emergency reservoir in Pa.
mainReservoir: The pressure in the main resevoir in Pa.
doors: The state of the doors in all cars, i.e. between 0 (closed) and 1 (open) [already available]
doors[carIndex]: The state of the doors in a particular car, i.e. between 0 (closed) and 1 (open)
leftDoors: The state of the left doors in all cars, i.e. between 0 (closed) and 1 (open)
leftDoors[carIndex]: The state of the left doors in a particular car, i.e. between 0 (closed) and 1 (open) [already available]
rightDoors: The state of the right doors in all cars, i.e. between 0 (closed) and 1 (open)
rightDoors[carIndex]: The state of the right doors in a particular car, i.e. between 0 (closed) and 1 (open) [already available]
leftDoorsTarget: The target state of the left doors in all cars, i.e. 0 (closed) or 1 (open) [already available]
leftDoorsTarget[carIndex]: The target state of the left doors in a particular car, i.e. 0 (closed) or 1 (open)
rightDoorsTarget: The target state of the right doors in all cars, i.e. 0 (closed) or 1 (open) [already available]
rightDoorsTarget[carIndex]: The target state of the right doors in a particular car, i.e. 0 (closed) or 1 (open)
ats: The ATS lamp, i.e. inactive (0) or active (1)
atsRun: The ATS RUN lamp, i.e. inactive (0), lit (1), or flashing (2)
pPower: The P POWER lamp, i.e. inactive (0) or active (1)
ptnApproach: The PTN APPROACH lamp, i.e. inactive (0) or active (1)
brakeRelease: The BRAKE RELEASE lamp, i.e. inactive (0) or active (1)
atsP: The ATS P lamp, i.e. inactive (0) or active (1)
failure: The FAILURE lamp, i.e. inactive (0) or active (1)
atc: The ATC lamp, i.e. inactive (0) or active (1)
atcPower: The ATC POWER lamp, i.e. inactive (0) or active (1)
atcSrv: The ATC SRV lamp, i.e. inactive (0) or active (1)
atcEmg: The ATC EMG lamp, i.e. inactive (0) or active (1)
atcState: The current state of ATC, i.e. 0 (X), 1 (0 km/h), 2 (15 km/h), 3 (25 km/h), ..., 9 (100 km/h), 10 (110 km/h), 11 (120 km/h), 12 (ATS)
