Elvas Tower: Cabview controls for generic items - 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 +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Cabview controls for generic items Rate Topic: -----

#1 User is offline   Csantucci 

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

Posted 12 October 2021 - 05:22 AM

I already had in mind something like this http://www.elvastowe...870#entry276870 , so I've decided to start this development.
The state of two new generic two-state items of a locomotive can be modified through two new cabview controls, that is ORTS_GENERIC_ITEM1 and ORTS_GENERIC_ITEM2. Keys shift+. and shift+, can also be used to switch item state. Sound events are associated, that is
                        case 240: return Event.GenericItem1On;
                        case 241: return Event.GenericItem1Off;
                        case 242: return Event.GenericItem2On;
                        case 243: return Event.GenericItem2Off;

Animations, either stopped/moving or twostate can be associated to the item state.
Linked stopped/moving (wiper type) animations are named ORTSITEM1CONTINUOUS and ORTSITEM2CONTINUOUS
Linked two state animations (doors type) are named ORTSITEM1TWOSTATE and ORTSITEM2TWOSTATE.

The default animation speed for stopped/moving type animations is 8 FPS. It may be modified with following parameter in the .sd file:
ESD_CustomAnimationSpeed ( 8 )




I suppose that there might be various uses for this. An example is fan control.

Blueprint https://blueprints.l...r-generic-items .

#2 User is offline   Borislav 

  • Hostler
  • Group: Status: Active Member
  • Posts: 98
  • Joined: 30-July 17
  • Gender:Male
  • Location:Gunzburg, Germany
  • Simulator:ORTS
  • Country:

Posted 12 October 2021 - 06:00 AM

Thank you very much, Carlo! This is exactly what I need for the new version of my Evolution Series cab. I'll make a video later and post it here, just so that you and others can see what I am working on.

#3 User is offline   Borislav 

  • Hostler
  • Group: Status: Active Member
  • Posts: 98
  • Joined: 30-July 17
  • Gender:Male
  • Location:Gunzburg, Germany
  • Simulator:ORTS
  • Country:

Posted 12 October 2021 - 02:02 PM

You can see the WIP cab update here: https://youtu.be/6V_-WTqN6Ds

The "Switch Computer Screen" commands are currently linked to "Cab Light" commands, so having a command separate from this would be perfect.

#4 User is offline   Csantucci 

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

Posted 15 October 2021 - 08:14 AM

The feature is now available in OR NewYear MG rev. 108.

#5 User is offline   Borislav 

  • Hostler
  • Group: Status: Active Member
  • Posts: 98
  • Joined: 30-July 17
  • Gender:Male
  • Location:Gunzburg, Germany
  • Simulator:ORTS
  • Country:

Posted 15 October 2021 - 01:42 PM

 Csantucci, on 15 October 2021 - 08:14 AM, said:

The feature is now available in OR NewYear MG rev. 108.


This is perfect, Carlo! It works like a charm. I want to thank you so much, and I will certainly credit you in the Readme file for my upcoming cab update.

#6 User is offline   Csantucci 

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

Posted 10 December 2021 - 09:47 AM

The feature is now available also in official OR Unstable release U2021.12.10-1651.

#7 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 13 December 2021 - 10:32 AM

Hello Carlo and the rest of the world.

I'm trying to incorporate these functions to my new 3D cab, but it doesn't work. I'm using version T1.4-55-g04375e6bf. Just in case it wasn't the last unstable version, I downloaded it again, but it's the same.

This is a switch on the control desk with two states, which move the sunshield of the cockpit.

The lines of code for the .cvf file are:
		TwoState (
			Type ( ORTS_GENERIC_ITEM1 TWO_STATE )
			Position ( 194 397 24 14 )
			Graphic ("trans.ace")
			NumFrames ( 2 2 1 )
			Style ( ONOFF )
			MouseControl ( 1 )
		)
		TwoState (
			Type ( ORTSITEM1TWOSTATE TWO_STATE )
			Position ( 194 397 24 14 )
			Graphic ("trans.ace")
			NumFrames ( 2 2 1 )
			Style ( ONOFF )
			MouseControl ( 0 )
		)


The .log file gives me this answer:

Information: Skipped unknown ControlType ORTS_GENERIC_ITEM1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 24
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTS_GENERIC_ITEM1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 24
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTS_GENERIC_ITEM1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 24
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTS_GENERIC_ITEM1 in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 24
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in C:\Program Files (x86)\Microsoft Games\Train Simulator\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33


If there are any clues, someone who has managed to make these controls work, I would be very grateful (and I guess the rest of the developers too).

Thanks in advance...

#8 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 13 December 2021 - 11:18 AM

 Weter, on 13 December 2021 - 11:13 AM, said:

Hello.
U is unstable version (where this function implemented)
T (that You mentioned) is testing version, so I guess, that function is on the go to be approved for including there.
(to further versions)


Ok, Weter, thanks, I have managed to find the unstable version, and I have managed to get it partially working there, i.e. the switch does work, but not what it is supposed to move.

The .log file now shows me this:

Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in \MSTS\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in \MSTS\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in \MSTS\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33
Information: Skipped unknown ControlType ORTSITEM1TWOSTATE in \MSTS\trains\trainset\FV2400\CABVIEW\FV2401.cvf:line 33


Well, at least we are making progress. However, the change of cabins still causes the same error...

#9 User is offline   Csantucci 

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

Posted 13 December 2021 - 01:58 PM

ORTSITEM1TWOSTATE is the name of the animation within the locomotive shape file (not the 3D shape file), which is controlled by the cabview control ORTS_GENERIC_ITEM1 within the .cvf file(I see now that there is a typo in the manual, which I will correct).
If you want to animate ORTS_GENERIC_ITEM1 itself within the 3D cab, its 3D cab animation must be called ORTS_GENERIC_ITEM1:0, with the same naming rule of the other 3D cab animations.

#10 User is offline   Csantucci 

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

Posted 14 December 2021 - 12:05 AM

At the moment it is only in the version of the manual present in the OR repository. It will enter the .pdf manual when the feature will be merged in the testing release.

  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • 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