Elvas Tower: Managing multiple screen pages on a display in 2D and 3D cabs - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 5 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

Managing multiple screen pages on a display in 2D and 3D cabs Rate Topic: -----

#31 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 September 2022 - 12:01 AM

As far as I can see from the code, there is only a limit on the maximum number of displays, which is 8. There is no limit on the number of screens which can displayed on the displays.

#32 User is offline   trainagrandevitesse 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 32
  • Joined: 17-September 13
  • Gender:Male
  • Location:Paris Gare de l'Est
  • Simulator:ORTS
  • Country:

Posted 18 September 2022 - 11:39 AM

hello Carlo,

I understood where my problem comes from. when I pressed the key, unconsciously I wanted to display 2 different screen names at the same time, whereas only one can be displayed.

Will we be able to display several at the same time in the future? Now I managed to make the 2 screens work together, but it takes a bit of fiddling and concessions.

but if we could display several screens at the same time on several systems, that would be a new advance.

Thank you very much Carlo for all these new features that you bring to ORTS.

Good evening

#33 User is offline   VAPOR3D 

  • Conductor
  • Group: Status: Active Member
  • Posts: 268
  • Joined: 15-March 20
  • Gender:Male
  • Location:Barcelona, Catalunya
  • Simulator:Open Rails
  • Country:

Posted 24 October 2022 - 10:29 AM

Hello!

Question. I suppose it is possible to use this function to change the screen of a monitor that is used in reality to show the various cameras inside the train that allow the driver to "keep an eye" on the passengers.

In other words, they are simply static screens that can be changed by pressing one or more buttons. But it is not at all clear to me how to implement something so simple, with its own dedicated controls in the 3d cab. I don't know if it's possible to put some code to show how it would work.

Thanks!

#34 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 25 October 2022 - 04:53 AM

Is there a button for every static screen, or is there a single button that is used to browse through the static screen sequence? How many static screens are there?

#35 User is offline   VAPOR3D 

  • Conductor
  • Group: Status: Active Member
  • Posts: 268
  • Joined: 15-March 20
  • Gender:Male
  • Location:Barcelona, Catalunya
  • Simulator:Open Rails
  • Country:

Posted 26 October 2022 - 02:49 PM

Thank you Carlo.

So far I have managed to get the ORTS_ITEM2STATE to turn the monitor screen on and off.

Not bad, but it would be more interesting if at least 2 different images could be displayed on the screen...

#36 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 27 October 2022 - 01:33 AM

That's good.
My question is: what do you want the OR player to do, to pass from one picture to the other and vice-versa?

#37 User is offline   VAPOR3D 

  • Conductor
  • Group: Status: Active Member
  • Posts: 268
  • Joined: 15-March 20
  • Gender:Male
  • Location:Barcelona, Catalunya
  • Simulator:Open Rails
  • Country:

Posted 27 October 2022 - 09:17 AM

View PostCsantucci, on 27 October 2022 - 01:33 AM, said:

That's good.
My question is: what do you want the OR player to do, to pass from one picture to the other and vice-versa?


For example, by pressing the same button, you can change the image.

1st press: the screen "turns on" and the 1st image is displayed.

2nd press: the 2nd image is shown.

3rd press: the screen turns off again.

This is an idea to simulate a closed-circuit television with 2 cameras inside the vehicle.

#38 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 28 October 2022 - 12:16 PM

I believed it wasn't possible, but it is. This is what I added in the standard Dash9 2D cabview to test:
		TwoState (
			Type ( ORTS_SCREEN_SELECT )
			Position ( 80 60 24 22 )
			Graphic ( AlerterLeft.ace )
			NumFrames ( 2 2 1 )
			Style ( WHILE_PRESSED )
			MouseControl ( 1 )
			ORTSNewScreenPage ( "camera1on" )
			ORTSScreenPage ( "default" )
			ORTSScreenPage ( "cameraoff" )
			ORTSLabel ( "camera1gotoon" )
		)
		TwoState (
			Type ( ORTS_SCREEN_SELECT )
			Position ( 80 60 24 22 )
			Graphic ( AlerterLeft.ace )
			NumFrames ( 2 2 1 )
			Style ( WHILE_PRESSED )
			MouseControl ( 1 )
			ORTSNewScreenPage ( "camera2on" )
			ORTSScreenPage ( "camera1on" )
			ORTSLabel ( "camera2gotoon" )
		)
		TwoState (
			Type ( ORTS_SCREEN_SELECT )
			Position ( 80 60 24 22 )
			Graphic ( AlerterLeft.ace )
			NumFrames ( 2 2 1 )
			Style ( WHILE_PRESSED )
			MouseControl ( 1 )
			ORTSNewScreenPage ( "cameraoff" )
			ORTSScreenPage ( "camera2on" )
			ORTSLabel ( "cameragotooff" )
		)
		MultiStateDisplay (
			Type ( ORTS_STATIC_DISPLAY MULTI_STATE_DISPLAY )
			Position ( 246 180 105 16 )
			Graphic ( ReverserDisplayCompound.ace )
			States ( 1 1 1
				State (
					Style ( 0 )
					SwitchVal ( 0 )
				)
			)
			ORTSScreenPage ( "camera1on" )
		)
		MultiStateDisplay (
			Type ( ORTS_STATIC_DISPLAY MULTI_STATE_DISPLAY )
			Position ( 246 180 105 16 )
			Graphic ( Horn.ace )
			States ( 1 1 1
				State (
					Style ( 0 )
					SwitchVal ( 0 )
				)
			)
			ORTSScreenPage ( "camera2on" )
		)

The static displays camera1on and camera2on are what you would show on your display (I used two standard aces to test). The three ORTS_SCREEN_SELECT controls are enabled one after the other, in circular way. You might use .aces of different colour for these three controls (or even different aces).
These controls implement the sequence you desire.

You may add any number of further camera views for this. Any further camera requires an ORTS_STATIC_DISPLAY block and an ORTS_SCREEN_SELECT control.

#39 User is offline   VAPOR3D 

  • Conductor
  • Group: Status: Active Member
  • Posts: 268
  • Joined: 15-March 20
  • Gender:Male
  • Location:Barcelona, Catalunya
  • Simulator:Open Rails
  • Country:

Posted 29 October 2022 - 09:44 AM

Thank you very much Carlo.

This is the kind of precise answers that we developers like!

As soon as I have a free moment I'll try it and I'll comment here...

Thanks!

#40 User is offline   VAPOR3D 

  • Conductor
  • Group: Status: Active Member
  • Posts: 268
  • Joined: 15-March 20
  • Gender:Male
  • Location:Barcelona, Catalunya
  • Simulator:Open Rails
  • Country:

Posted 01 November 2022 - 02:15 PM

Well, I've been trying to understand how it works for a few days now, but I can't seem to get my head around it. I don't want to bother with this but I can't get it to work at all.

I'll try to explain as best I can.

The idea is to be able to change the screens on a monitor located within sight of the driver. In the image, you can see the "device" showing on its lit screen, the view of one of the cameras located inside the vehicle to "watch" its passengers (although it is now empty):

Attached Image: Open Rails 2022-10-24 03-12-17.jpg

With ORTS_ITEM2TWOSTATE:0:0 and ORTS_GENERIC_ITEM2:0, I can make it show a single screen. When the GENERIC_ITEM2 "switch" is pressed, the plane that is hidden inside the screen moves and at the same time, ORTS_ITEM2TWOSTATE:0:1, which is the power-on pilot also appears (not present in the image). When it swicht is pressed again, the display and the pilot disappears inside the monitor.

Well, the idea of using ORTS_STATIC_DISPLAY is, besides freeing ORTS_ITEM2TWOSTATE to use it in another element of the cockpit, for the possibility of displaying several cameras (screens) on the monitor. This is the code of what is now in the .cvf file:

20  TwoState (
      21      Type ( ORTS_SCREEN_SELECT )
      22      Position ( 80 60 24 22 )
      23      Graphic ("trans.ace")
      24      NumFrames ( 2 2 1 )
      25      Style ( WHILE_PRESSED )
      26      MouseControl ( 1 )
      27      ORTSNewScreenPage ("camera1on")
      28      ORTSScreenPage ("default")
      29      ORTSScreenPage ("cameraoff")
      30      ORTSLabel ("CAMARA 1 ON")
      31      )
      32  TwoState (
      33      Type ( ORTS_SCREEN_SELECT )
      34      Position ( 80 60 24 22 )
      35      Graphic ("trans.ace")
      36      NumFrames ( 2 2 1 )
      37      Style ( WHILE_PRESSED )
      38      MouseControl ( 1 )
      39      ORTSNewScreenPage ("camera2on")
      40      ORTSScreenPage ("camera1on")
      41      ORTSLabel ("CAMARA 2 ON")
      42      )
      43  TwoState (
      44      Type ( ORTS_SCREEN_SELECT )
      45      Position ( 80 60 24 22 )
      46      Graphic ("trans.ace")
      47      NumFrames ( 2 2 1 )
      48      Style ( WHILE_PRESSED )
      49      MouseControl ( 1 )
      50      ORTSNewScreenPage ("cameraoff")
      51      ORTSScreenPage ("camera2on")
      52      ORTSLabel ("MONITOR OFF")
      53      )
      54  MultiStateDisplay (
      55      Type ( ORTS_STATIC_DISPLAY MULTI_STATE_DISPLAY )
      56      Position ( 246 180 105 16 )
      57      Graphic ("trans.ace")
      58      States ( 1 1 1
      59                          State (
      60                                  Style ( 0 )
      61                                  SwitchVal ( 0 )
      62                          )
      63                  )
      64                  ORTSScreenPage ("camera1on")
      65      )
      66  MultiStateDisplay (
      67      Type ( ORTS_STATIC_DISPLAY MULTI_STATE_DISPLAY )
      68      Position ( 246 180 105 16 )
      69      Graphic ("trans.ace")
      70      States ( 1 1 1
      71                          State (
      72                                  Style ( 0 )
      73                                  SwitchVal ( 0 )
      74                          )
      75                  )
      76                  ORTSScreenPage ("camera2on")
      77          )


I have customised it to my needs in the labels, but maybe that doesn't work.

Well, then we have that ORTS_STATIC_DISPLAY:0:0 is one of the screens, but here the doubts begin: is it possible that the fact that it is called STATIC is the cause of its animation not working?

The second screen is called ORTS_STATIC_DISPLAY:1:0. There are two switches called ORTS_SCREEN_SELECT:0 and ORTS_SCREEN_SELECT:1 and the part representing the ignition pilot is called ORTS_SCREEN_SELECT:2.

When I enter the simulator and put the mouse over the switches, the labels are displayed correctly, but if I click on them, they disappear (and no matter how hard I look for them, it's a mystery where they go), and of course, the displays are not shown.

The .log shows this, for what it's worth:

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 27

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 39

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 50

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596_rv.cvf:line 27

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596_rv.cvf:line 39

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596_rv.cvf:line 50

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 27

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 39

Warning: When expecting a number, we found a ) marker. Using the default -1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\Tamagochis 596\CABVIEW\596.cvf:line 50


Clearly there is something I haven't quite figured out. Apologies. Any clarification of whatever it is, I will be happy to give it. I really appreciate the help with each new challenge to solve to make this the best simulator of all past, present and future simulators, because I fully support the open source philosophy. Thank you!

  • 5 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users