Elvas Tower: Expand potential of TCS scripting - 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.
  • 13 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Expand potential of TCS scripting Rate Topic: -----

#21 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 12 March 2020 - 03:11 PM

That looks very interesting. Good development there.

Geoff

#22 User is offline   FS.E652 091 

  • Conductor
  • Group: Status: Active Member
  • Posts: 274
  • Joined: 22-April 14
  • Gender:Male
  • Location:Sicily
  • Simulator:ORTS
  • Country:

Posted 13 March 2020 - 03:18 AM

This is a very important step for the incrementation of drive realism!! really impressionant!!!

I hope that the team will add the cruise control as soon possible!!

#23 User is offline   Csantucci 

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

Posted 15 March 2020 - 03:46 AM

If someone is interested in looking at the files or also in trying the SCMT-RSC TCS script, here is what has to be done:
- download and unpack OR_NewYear_MG rev.55.1 from the usual link, that is http://www.interazio..._NewYear_MG.zip
- download, read the readme file and unpack http://www.interazio...SCMT_Rev3.0.zip
- download, read the readme file and unpack http://www.interazio...SCMT_Rev1.0.zip . This last file includes the test activities.

I credit again gpz and Serana for the work done on this field. I could also use (after some adaptations) Serana's script for the part implementing the braking curves.
By the way SCMT foresees that when the overspeed warning threshold (3 Km/h above allowed max speed) is reached, an automatic dynamic braking is started; when the overspeed emergency threshold (5 Km/h above allowed max speed) is reached, the usual emergency braking is started.

15/3/2020 7:18PM: Post updated

#24 User is offline   Haran Banjo 

  • Hostler
  • Group: Status: Active Member
  • Posts: 55
  • Joined: 12-November 19
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 March 2020 - 05:12 AM

I wanted to report something, on the Triveneto scenario, when you put a yellow signal, the scmt does not detect any code and the track monitor signals yellow / green, without having put any deviation.

This occurs on all scenarios with type 1 signaling (Adriatics for example).

#25 User is offline   Csantucci 

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

Posted 26 March 2020 - 09:02 AM

I have replied to you in the trainsimhobby forum.

#26 User is offline   Csantucci 

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

Posted 28 March 2020 - 10:21 AM

A new release of the SCMT-RSC TCS script is available; here is what has to be done from the downloadpage linked in my signature:
- download and unpack OR_NewYear_MG rev.56.1 or later
- download, read the readme file and unpack Pack_SCMT_Rev7.0.zip
- download, read the readme file and unpack Pack_Activity_demo_SCMT_Rev4.0.zip . This last file includes the test activities.

Readme's are also in English.

With OR NewYear MG rev. 56.1 I have added what I think is a useful hook for people writing TCS scripts: it is
            Script.Locomotive = () => Locomotive;

Locomotive is the actual player locomotive.
It looks like a trivial thing, but with this the TCS script may have access to the whole Simulation environment public classes and methods (trainset, player train, signals and so on).
Therefore it is no more needed to add further personalized hooks, and only general use hooks might be added.

#27 User is offline   Csantucci 

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

Posted 30 March 2020 - 10:22 AM

Above downloads are now all available in this small download page http://www.interazio...loads/index.php .

#28 User is offline   cesarbl 

  • Conductor
  • Group: Status: Active Member
  • Posts: 395
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 31 March 2020 - 12:42 AM

Hello,
I am a Spanish railroad enthusiast interested in signalling and TCSs. I have previously developed a TCS script for the most used system in Spain, ASFA, which also included a simple implementation of LZB and ETCS (not very well tested). It can be downloaded at http://www.spaintrai...ex.php?dlid=847

Thanks to Carlo's improvement in TCS API, we decided to create a fully functional version of 'ASFA digital', which uses a lot of buttons and displays. To increase realism, we thought that it could be interesting to modify existing Spanish routes to add 'beacons', using for that purpose REPEATER signals, unused in Spanish signal scripts. It is not an elegant solution, but is as much as we can do at the moment.

I know this is a polemical topic, as signalling code might be refactored in the future, so I understand if you decide to not take into account the changes, which I follow to explain.

First of all, I have added an assembly reference in script compiler for 'Orts.Formats.Msts' to access signal enums from the script. I also modified Find_Next_Object_InRoute in Signals.cs so other sigfn types can be looked for. When testing this functionality, I saw that if two DISTANCE signals were in the same TrackCircuit, only first of them was correctly detected. I have corrected this too.

I attach a diff file with suggested changes.

Thanks in advance

Attached File(s)

  • Attached File  diff.txt (2.75K)
    Number of downloads: 523


#29 User is offline   Csantucci 

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

Posted 31 March 2020 - 03:03 AM

I'm happy that you can use what OR offers to generate a script for Spain.
I have added your diffs in the source code of OR NewYear MG and uploaded them, and I have uploaded OR NewYear MG REv 56.2 , which includes your improvements. Thank you also for spotting the bug.
I will have an interested look at your ETCS script, and will allow myself to use parts of it if you agree, as I have the intention to work on it for Italian HSTs, so, if I can spare work, that's welcome :)

#30 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 31 March 2020 - 04:09 AM

View PostCsantucci, on 28 March 2020 - 10:21 AM, said:

With OR NewYear MG rev. 56.1 I have added what I think is a useful hook for people writing TCS scripts: it is
            Script.Locomotive = () => Locomotive;

Locomotive is the actual player locomotive.
It looks like a trivial thing, but with this the TCS script may have access to the whole Simulation environment public classes and methods (trainset, player train, signals and so on).
Therefore it is no more needed to add further personalized hooks, and only general use hooks might be added.


Originally, it was not accepted to give access to the simulator data structures in order not to have scripts do weird things with the simulator.
That's why we isolated the scripts as much as it is currently.

  • 13 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • 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