Elvas Tower: Open/close doors in AI trains - 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.
  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Open/close doors in AI trains Rate Topic: -----

#1 User is offline   Csantucci 

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

Posted 28 January 2017 - 01:45 PM

I'm working on a new feature, that is automatic door open/close at station stops for AI trains (obviusly the carriages must have the door animation). Luckily there is a feature of the MSTS RE that I didn't know, that allows to define at which side of the track the station platform is.
Here a picture
Attached Image: PlatformSide.jpg

Now I have some questions:
- what does MSTS mean when it says "when looking down the platform (from start to end) the platform is actually on this side"? Where is start and where is end?
- is it correct that the platform is meant at the side where the central part of the green line lies (in this case optically at the left side)?
- are there routes where the platforms have this parameter correctly set (I know for sure an Italian one)?

This feature is foreseen to be enabled on a per-route basis.
Doors are opened 4 seconds after train stop and closed 10 seconds before train start, if stop time is sufficiently long.

#2 User is offline   Jovet 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 2,136
  • Joined: 14-January 08
  • Gender:Male
  • Location:Omaha, Nebraska.
  • Simulator:MSTS/Open Rails
  • Country:

Posted 29 January 2017 - 09:38 AM

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- is it correct that the platform is meant at the side where the central part of the green line lies (in this case optically at the left side)?

Yes. The green track marker for the platform has an "extruded middle" that corresponds to this setting. If both check-boxes are checked, then the extrusions appear over both rails forming a square loop.

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- are there routes where the platforms have this parameter correctly set (I know for sure an Italian one)?

I have observed that most route authors set these values correctly.

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- what does MSTS mean when it says "when looking down the platform (from start to end) the platform is actually on this side"? Where is start and where is end?

Not sure where you go that text, but I'm guessing it refers to the internal definition of the Platform interactive marker in the TDB. Passing down the track from the beginning of the marker to the end, left is left and right is right.

Looking at the .tit code for a platform...
	PlatformItem (
		TrItemId ( 119 )
		TrItemSData ( 508.624 00000002 )
		TrItemRData ( 571.194 1 379.515 -12324 14363 )
		PlatformTrItemData ( 00000000 120 )
		PlatformName ( "Platform1" )
		Station ( "Platform1" )
		PlatformMinWaitingTime ( 180 )
		PlatformNumPassengersWaiting ( 50 )
	)
	PlatformItem (
		TrItemId ( 120 )
		TrItemSData ( 211.14 00000002 )
		TrItemRData ( 854.484 1 470.306 -12324 14363 )
		PlatformTrItemData ( ffff0000 119 )
		PlatformName ( "Platform1" )
		Station ( "Platform1" )
		PlatformMinWaitingTime ( 180 )
		PlatformNumPassengersWaiting ( 50 )
	)

I won't pretend to know what all the values do, but the first entry is the "start" and the second entry is the "end," which just depend on the whim of the route author at the time.

#3 User is offline   Csantucci 

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

Posted 29 January 2017 - 09:46 AM

Thanks Joseph, that was very useful info.

#4 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,313
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 29 January 2017 - 09:53 AM

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- what does MSTS mean when it says "when looking down the platform (from start to end) the platform is actually on this side"? Where is start and where is end?

I'm not familiar with the MSTS RE so there may be a visual indication (possibly subtle) for this, but in the data there's two TrItemIds and the platform goes from the second to the first (yes, it does seem to be backwards).

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- is it correct that the platform is meant at the side where the central part of the green line lies (in this case optically at the left side)?

Yes. If you select both, the line splits in two.

View PostCsantucci, on 28 January 2017 - 01:45 PM, said:

- are there routes where the platforms have this parameter correctly set (I know for sure an Italian one)?

I've just scanned along about half the Hisatsu Line and apart from one platform at Yatsushiro being on the wrong track, every one was in the right place with the correct sides selected according to MSTS RE, so I'd expect the in-box routes to be pretty good. I don't know about 3rd party content.

#5 User is offline   Jovet 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 2,136
  • Joined: 14-January 08
  • Gender:Male
  • Location:Omaha, Nebraska.
  • Simulator:MSTS/Open Rails
  • Country:

Posted 30 January 2017 - 06:59 AM

View PostJames Ross, on 29 January 2017 - 09:53 AM, said:

I'm not familiar with the MSTS RE so there may be a visual indication (possibly subtle) for this, but in the data there's two TrItemIds and the platform goes from the second to the first (yes, it does seem to be backwards).

There is no visual distinction, other than rationalizing the orientation based on the settings of "left" or "right."

Second to the first, didn't know that one. Maybe that's why Kuju's car spawners are always backwards. (Platforms, Sidings, and Car spawners all use the same types of handles but of different colors. Platform handles have the mid-section left/right line distinction, and Car spawners possess a shifting white/blue pattern along the (RDB-parallel) line between the handles. One would expect vehicular traffic to move in the same direction as the shifting pattern, but it actually moves in the opposite direction.)

#6 User is offline   jonas 

  • Conductor
  • Group: Status: Active Member
  • Posts: 411
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 30 January 2017 - 10:35 AM

Attached Image: platforms01.jpg

Because "Rechts" ("Right side") is selected, I even assume that in this picture the starting point of the platform is in the foreground. By hovering with the mouse over the markers in the RE you can assign the coordinates of the two platform markers.
So I'm quite sure that
"TrItemRData (-116.258 1 560.115 -5578 14976)" is the start and
"TrItemRData (-116.258 1 591.924 -5578 14976)" the last marker of the platform.

Start and end seems to be differentiate in tdb by the hexadecimal expression "00000000 / fff0000" in the lines "PlatformTrItemData (00000000 10) / PlatformTrItemData ( ffff0000 9 )".

#7 User is offline   Csantucci 

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

Posted 30 January 2017 - 11:46 AM

Thanks Jacob, that was the missing info!

#8 User is offline   Csantucci 

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

Posted 30 January 2017 - 01:09 PM

Here a demo video:
https://youtu.be/5VCq-8HtmH8
You will see at the right a DMU AI train waiting for start, with open doors. After some seconds at the right a regional train will arrive, which will open doors 4 seconds after stop. Few seconds later also the HST train at the left will stop and open doors (not the ones of the wagon restaurant, which is correct). The HST train is the player train in autopilot mode. In such mode doors are operated autonomously by the game. After the freight train has passed the regional train will close doors and restart. Same will do the HST. Also the DMU train will appear for a glance with doors close, ready to start.
Station announcements have been added using the "Location Event and Time Event Sound File".

The feature is not yet beta ready, because the right/left issue has still to be completed.

#9 User is offline   Csantucci 

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

Posted 01 February 2017 - 05:20 AM

A blueprint has been generated https://blueprints.l...rs-in-ai-trains .
Here is a beta kit, to be inserted within x.3777
Attached File  OpenDoorsInAITRains.zip (590.89K)
Number of downloads: 506
Activation of the feature has been simplified, as it seems that in general the platform sides are defined correctly in routes. Now there is a checkbox in the Experimental Options window.
However if desired the checkbox can be overridden on a per-route basis by creating an include .trk file containing following line
			ORTSOpenDoorsInAITrains ( 1 )

This overrides an unchecked checkbox. To override a checked checkbox a zero must be inserted instead of a 1.
As already stated, doors open 4 seconds after train stop and close 10 seconds before train start. If the related sound is implemented in the .wag and .eng files, it is played.
If there is a platform on both sides, doors of both sides are opened.

#10 User is offline   jonas 

  • Conductor
  • Group: Status: Active Member
  • Posts: 411
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 01 February 2017 - 06:39 AM

I like this feature! But where to get wagons with working doors? While i've looked up my whole TRAINSET folder unfortunately I havn't found such wagons. Can someone hint me a link to download such wagons? Thanks!

  • 4 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