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 +
  • « First
  • 11
  • 12
  • 13
  • You cannot start a new topic
  • You cannot reply to this topic

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

#121 User is offline   VicenteIR 

  • Fireman
  • Group: Status: Active Member
  • Posts: 149
  • Joined: 24-April 15
  • Gender:Male
  • Location:Dimona, Israel
  • Simulator:Open Rails
  • Country:

Posted 13 October 2021 - 10:14 AM

Hi.
I'm sorry about maybe stupid question. Unfortunately I don't know a lot about c# and programming.
Can a TCS script be written for one or little more controls only? For example, if I want to write a script only for cabSignal, based on non-NORMAL Signal Heads, does including of TCS files means that a speed limits of NORMAL Signal Heads doesn't appears for the player train in this case and they must be written into the script?

Regards
Oleg

#122 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 13 October 2021 - 11:23 AM

Hi Oleg,

No, any TCS script is responsible for the behavior of several subsystems ordinarily controlled by Open Rails. So, your code must include instructions to control all of them. Off the top of my head, that includes the cab signal aspect, the signal speed limit, the overspeed alarm (if wanted), the vigilance alarm (if wanted), and the emergency brake.

#123 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 30 October 2021 - 11:03 PM

Hi,

I have specified two additions of the SignalFeatures class:
- The current signal head type name (we currently only have the name of the main signal head)
- The current draw state name

They will be useful to determine which aspect is shown on the signal for signals not fitted with C# scripts.

https://blueprints.l.../tcs-extensions


If you have any other ideas to include, don't hesitate to propose them to me.

#124 User is offline   cesarbl 

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

Posted 04 September 2022 - 07:09 AM

I propose the addition of two new functions to get door state: AreLeftDoorsOpen() and AreRightDoorsOpen().
These are useful for safety systems that cut the traction if doors are open.

#125 User is offline   Csantucci 

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

Posted 04 September 2022 - 10:10 AM

Hi Cesar, I think that this is a useful addition. I would also suggest separate door open and door close commands that pass through the TCS, as well as of course the possibility for the TCS to open and close doors.

#126 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 04 September 2022 - 11:23 AM

To be more complete, we need :
- functions to forbid door opening on one side or both sides
- functions to command door opening and closing


For example, this can be used to:
- force door closing if the speed is above a defined speed.
- lock the doors on the track side

#127 User is offline   cesarbl 

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

Posted 05 September 2022 - 03:08 AM

Hi,
Thanks for your feedback. I did a bit of refactoring on the door handling, and included TCS hooks to open and close doors, as well as for locking them.

#128 User is offline   Haran Banjo 

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

Posted 06 September 2022 - 06:46 AM

The behavior of the TCS script in multiplayer should be improved, especially the Italian SCMT.
The signals are seen incorrectly by the system, red overlay non-existent (the railway stub is displayed on the Track Monitor), and if you leave the preset path (even in single player), only code 120 (yellow) is transmitted, even with green signals.

#129 User is offline   Haran Banjo 

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

Posted 21 September 2022 - 07:12 AM

View PostHaran Banjo, on 06 September 2022 - 06:46 AM, said:

The behavior of the TCS script in multiplayer should be improved, especially the Italian SCMT.
The signals are seen incorrectly by the system, red overlay non-existent (the railway stub is displayed on the Track Monitor), and if you leave the preset path (even in single player), only code 120 (yellow) is transmitted, even with green signals.
Nothing about this?

#130 User is offline   Csantucci 

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

Posted 22 September 2022 - 07:10 AM

That's not easy. Multiplayer has an own way to set signals, and this may mislead the TCS scripts.

  • 13 Pages +
  • « First
  • 11
  • 12
  • 13
  • 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