Elvas Tower: TCS scripting - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

TCS scripting DoesBrakeCutPower & BrakeCutsPowerAtBrakeCylinderPressure Rate Topic: -----

#1 User is offline   Stijn D.C. 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 516
  • Joined: 20-August 16
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 10 April 2021 - 11:53 AM

Hello,

Have someone the problem that this tokens not work:

DoesBrakeCutPower ( 1 )
BrakeCutsPowerAtBrakeCylinderPressure ( 1.0bar )

When you are in train with TCS script , without TCS script it works.


In advance thanks,

Stijn

#2 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,231
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 10 April 2021 - 12:52 PM

Are they in the TCS script or the eng file? I am not certain, but I think the TCS script overwrites the eng file and so the eng file is ignored and only the TCS script file is read.


#3 User is offline   Stijn D.C. 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 516
  • Joined: 20-August 16
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 11 April 2021 - 04:07 AM

Hello,

DoesBrakeCutPower ( 1 )
BrakeCutsPowerAtBrakeCylinderPressure ( 1.0bar )


Are in .eng file

Indeed the TCS scripts takes over and ignore al standard MSTS monitors and traincontolsystem data. But that two important lines too.

#4 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,231
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 11 April 2021 - 05:14 AM

Two things here.

First TCS scripts should only disable things in any of

EmergencyStopMonitor( )
VigilanceMonitor( )
OverspeedMonitor( )

So if it is inside one of those sections then

DoesBrakeCutPower ( 1 )
BrakeCutsPowerAtBrakeCylinderPressure ( 1.0bar )

will not be used, but if it is in the normal braking section it should work.

Second the other thing that can be used now in OR is

ORTSDoesBrakeCutPower ( 1 )
ORTSBrakeCutsPowerAtBrakePipePressure ( 3.0bar )
ORTSBrakeRestoresPowerAtBrakePipePressure ( 4.0bar )

This one should definitely work if placed with the normal braking information.

#5 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 939
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 11 April 2021 - 08:31 AM

 darwins, on 11 April 2021 - 05:14 AM, said:

Two things here.

First TCS scripts should only disable things in any of

EmergencyStopMonitor( )
VigilanceMonitor( )
OverspeedMonitor( )





Hi there. I tend to delete the MSTS entries in the quote in vehicles where the GPZ TCS script is placed.

#6 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 20 April 2021 - 04:20 AM

Hello,

These parameters are used in the TCS script only.

In the default TCS, you have this code that manages this functionality:
SetTractionAuthorization(!DoesBrakeCutPower() || LocomotiveBrakeCylinderPressureBar() < BrakeCutsPowerAtBrakeCylinderPressureBar());

So, in the custom TCS script, if this (or something similar) is not defined, then nothing happens.<script src="chrome-extension://hhojmcideegachlhfgfdhailpfhgknjm/web_accessible_resources/index.js">

#7 User is offline   Stijn D.C. 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 516
  • Joined: 20-August 16
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 16 May 2021 - 12:57 PM

Hello,

SetTractionAuthorization((!DoesBrakeCutPower() || LocomotiveBrakeCylinderPressureBar() < BrakeCutsPowerAtBrakeCylinderPressureBar()) && !EmergencyBraking); => works


:sign_thanks: Thanks Serana ;-)

#8 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 28 October 2021 - 09:46 AM

Hello!
In the following video described the Aspect change by TCS script.
Video of Signal Aspect change

The sound is called by TriggerSoundInfo2() function. But I didn't found a way to stop it.
                    else if (RSLastSignalAspect == Aspect.Approach_1 && RSLowConfirmationTimer.Triggered
                            || RSLastSignalAspect == Aspect.Approach_2 && RSLowConfirmationTimer.Triggered)
                    {
                        if (!RSPressed)
                        {
                            TriggerSoundInfo2();                       
                        }
                        else
                        {
                            RSCode = RSCODE.ALSN_4;
                            TriggerSoundAlert2();
                            RSPressed = true;
                            RSEmergencyTimer.Stop();
                        }
                    }

In this section of my code I solved the issue by triggering a sound that doesn't have a reference in sms file but I wanted to ask if there is a more conventional way to stop a triggered sound?

Regards
Oleg

#9 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 28 October 2021 - 12:13 PM

Hi,

The way you described is the conventional way.

#10 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 02 November 2021 - 11:02 AM

Thank you, Serana.
Can you please explain shortly about Aspect.Permission in TrainControlSystem.cs enums?
As my scarce understanding, Aspect.None we gets when the Simulator doesn't able to show any Aspect, like in the case of SPAD or when there is no Signals between the train and end of track (more cases maybe?). What Aspect does have a Signal Head ahead for Aspect.Permission value?

Regards
Oleg

  • 2 Pages +
  • 1
  • 2
  • 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