Trying to write a script for the British AWS
#21
Posted 03 February 2020 - 02:08 AM
#22
Posted 03 February 2020 - 04:29 AM
If OR can read distant signals then it would also be good to add them to the track monitor. Yes I know I can see all the home signals two miles ahead, but driving steam the distant was usually positioned at what would nowadays be called the braking point - usually about 800 yards before the outer home on level track on fast routes - stopping distance from around 70 mph with vacuum brakes.
#23
Posted 03 February 2020 - 05:14 AM
As for this particular script, for now I would limit it to NORMAL signals, that would cover all modern continouos block MAS systems.
However, even in these systems not all signals set by OR as NORMAL would have AWS, for instance shunt signals in yards and sidings would not be equiped with AWS. To make this distinction, you could opt for a check on the type of signalhead available in the signal, allthough that would require a list of applicable signalheads to be provided per route one way or the other.
Regards,
Rob Roeterdink
#24
Posted 04 February 2020 - 01:39 PM
Preparation
Download and install https://www.uktrains...orm_fileid=4488 (NWT150 DMU) into the mep miniroute
Download and install https://www.uktrains...orm_fileid=5692 (cabview for NWT150) into the mep miniroute by Graham Parkin
The NWT150 has been wisely suggested by Coolhand, because it has a usable sunflower. However without the AWS TCS it works unproperly.
Download file mep_AWS_demo_pack.zip Rev.10 from here http://www.interazio...loads/index.php , unpack and install it into your Train Simulator folder for the MEP mini-route install
The pack must be run with OR NewYear MG rev. 53 or later.
For interested people such file includes:
- modified cabview (.cvf file named 2000_aws.cvf), with addition of the animation of the alerter reset button (files are added in the CABVIEW folder of the NWT150)
- AWS bell and beep sounds, and the TCS_AWS_UK.sms file that manages them; the AWS bell sound is the "bing" sound available in https://www.uktrains...orm_fileid=4053 , by James Horgan (files are added in the SOUND folder of the NWT150)
- modified .eng files, located in the OPENRAILS folder within the NWT150 folder; the modified .eng files refer to the new cabview and include a line
Include ( "AWS_eng.inc")
which includes the references to the script files; such AWS_eng.inc file is also included in the pack and resides within the Openrails subfolder. Its content is as follows
ORTSTrainControlSystem( TCS_AWS_UK )
ORTSTrainControlSystemSound( TCS_AWS_UK.sms )
ORTSTrainControlSystemParameters( TCS_AWS_UK.ini )
The first line refers to file TCS_AWS_UK.cs, which is the script file itself, and which resides within the SCRIPT subfolder of the NWT150 folder
The second line is self-explanatory
The third line refers to the file that contains the configuration parameters of the script file.
To run the AWS script file you must use OR NewYear MG rev. 52.4 or higher, which can be downloaded from here http://www.interazio...loads/index.php .
To enable AWS operation you must uncheck general option "Disable TCS scripts"
If you want to have also the speed reduction warning check (which applies if there is a speed reduction of more than 25 mph) you must check general option "Speed Control"
If you want to have also the alerter you must check general option "Alerter in cab"
The file includes also the files for two short test activities, that is TESTAWS1 and TESTAWS3. TESTAWS1 operates in a light signals environment, while TESTAWS3 operates in a semaphore environment.
AWS warning acknowledgements occur by pressing the Alerter Reset key or by clicking the AWS reset button with the mouse.
There are uncovered points:
- the AWS braking is stronger than in reality
- shunting NORMAL signals are not excluded (but there are very few)
- the AWS experts could find other flaws.
I am grateful for any comment.
I'm neither sure I manage correctly the case where a speed warning signal is between a speed reduction warning post and the speed reduction post.
You may of course try the pack also in other routes, but you will have to build the test activities by yourself.
You may also play (with some caution) with the configuration parameters of the .ini file.
It is possible to equip other trainsets with the AWS, and therefore to run existing activities using AWS, however if such trainsets don't have Alerter Reset button and operating sunflower there won't be visual cab interaction.
I wish to thank Coolhand and darwins for the many suggestions and explanations. Some support by you is probably still needed.
I credit also gpz and Serana, which developed a well generalized TCS script framework, again Serana for his script for the French TCSs, that I used as guideline to develop my one, and also roeter for his well-organized actual track section structure, that allowed me easily to get the needed data.
#25
Posted 04 February 2020 - 07:53 PM
Many thanks for making the AWS Carlo. I will speed up the time to get my new PC with windows 10.
Thanks
#26
Posted 05 February 2020 - 12:44 AM
#27
Posted 05 February 2020 - 02:53 AM
#28
Posted 05 February 2020 - 05:25 AM
Coolhand101, on 04 February 2020 - 07:53 PM, said:
Many thanks for making the AWS Carlo. I will speed up the time to get my new PC with windows 10.
Thanks
Coolhand,
which OR version are you using?
#29
Posted 05 February 2020 - 09:03 AM
#30
Posted 05 February 2020 - 09:38 AM
I selected the Baby Blues activity
The three steps needed are as follows:
1) take folders SCRIPT, SOUND and OPENRAILS from the demo pack and copy them within Trainset\MEP-D5909 (which is the folder where the player locomotive is present).
2) copy the two .eng files from TRAINSET\MEP-D5909 into TRAINSET\MEP-D5909\OPENRAILS .
3) add to both files, within the engine section, line
Include ( "AWS_eng.inc")
You can start the activity. By the way the cab of the D5909 has a working sunflower too.
Pay attention that, if one of the script files will be improved, you will have to update all your script-equipped trainsets with the improvements, if you want them.
I haven't tested if it works to insert all the script files (and eventually also the sound files) in a TRAINSET\Common.script folder and to modify the references to the files within AWS_eng.inc.
#31
Posted 05 February 2020 - 03:33 PM
#32
Posted 06 February 2020 - 01:31 AM
after having made a backup of Orts.Simulation.dll and Orts.Simulation.pdb, replace them in your OR version with the two files included in the attached .zip. That should allow you to run the AWS script, accordingly to the instructions in my post #24

Number of downloads: 493
#33
Posted 06 February 2020 - 05:52 AM
Firstly I could not seem to get a MonoGame update. (Me still with New Year MG - well it is another New Year.)
Searched around could not find a download for Rev .52.1 or higher. Could not find a link in your post either.
Downloaded Rev .4 anyway.
Downloaded the class 150 model and cab.
Do not have Mid East Plus. Downloaded the freeware D5909 which is still aliased to the MSTS GP38 cab an no cabview available to download.
Now a look at the MEP_AWS_demo pack. Well clearly can not use the test activities, paths etc, so will have to make my own test for another route.
Glad I kept the original cab for now. Everything in the trainset folder looks ready to go and I can identify the script file and the important line to add to eng files Include ( "AWS_eng.inc").
In the sound folder the TCS_AWS_UK.sms could easily be edited to use the rather different sounds on older locomotives.
Thanks for providing the Bing and the Buzz.
A quick Explore Route on North West England confirms that my version of MG is too old. But the drive from Blackpool to Preston to Manchester will be nice with both semaphore and MAS.
So now copy and paste your two files from Simulation.zip into a duplicate copy of the latest unstable version of OR U2020.02.06-0551
OpenRails gives a fatal error notice on start up
System.MissingMethodException: Method not found: Microsoft.Xna.Framework.Vector2 ORTS.Common.WorldLocation.GetDistance2D
At this point I am going to stop and await assistance.
#34
Posted 06 February 2020 - 06:26 AM
Thank you for having tried and sorry for the inconveniences.
The AWS demo pack works only with OR MG NewYear Rev. 52.1 or higher. It does not work with OR Unstable neither with OR Testing.
OR NewYear MG (name not changed even if we are in 2020, for continuity of naming) Rev 52.2 (which is the latest one) can be downloaded from here http://www.interazio..._NewYear_MG.zip (more about that here http://www.elvastowe...post__p__255502 ). I have now added such download link in the post on how to install the AWS demo pack.
Updates to OR NewYear MG must not be obtained by clicking on the upper right link in the Menu window, but instead by downloading them from the link above.
The NWT150.eng file in the Openrails subfolder already points to the 2000_aws.cvf cabview file. As OR findes .eng files in the Openrails subfolder, it does not consider the original ones in the base folder NWT150.
If your D5909 aliases to the GP38 cab, you obviously won't see the sunflower, so I suggest you to use the AWS150.
The .zip file containing the simulation dll works only with the very old release that Coolhand is using. I have generated it to allow him to test AWS.
I hope this clarified some points. If problems persist, I'm ready to provide support.
#35
Posted 06 February 2020 - 06:31 AM
Csantucci, on 06 February 2020 - 01:31 AM, said:
after having made a backup of Orts.Simulation.dll and Orts.Simulation.pdb, replace them in your OR version with the two files included in the attached .zip. That should allow you to run the AWS script, accordingly to the instructions in my post #24

Thanks Carlo.
I will be testing this later today.