Editing .trf file

The MSTS Activity Editor allows you to make your own activities, or missions, for the player to complete. This is also how you can get lots of other trains running while you drive yours!

Moderator: Moderators

Locked
alanturk
Been on the forums for a while
Posts: 167
Joined: Tue Mar 01, 2005 9:40 am

Editing .trf file

Post by alanturk »

I want to start an activity with the player train and an AI train at opposite platforms of a station. I have the player train waiting through its passenger loading time OK, but the AI train starts moving immediately. I have set it to call at this station, so I would expect it also to wait while loading passengers before moving. Ideally, I want them both to be present when the activity starts, but with the AI train not moving until, say, 30 seconds after the player train. I know how to edit the files manually if necessary (to overcome real or imagined MSTS deficiencies!), but I can't work out exactly what changes I need to make, though it is clear the .trf file is the one to edit. (I normally run activities in OR these days, switching to the "auto-pilot" mode at the outset.) Has anyone tried to do anything like this? If so, did you succeed and please can you help? Thanks.
coolhand101
Very Active Forum Member
Posts: 1200
Joined: Tue Mar 06, 2007 2:20 pm

Re: Editing .trf file

Post by coolhand101 »

You can set a wait point for the AI, using the Activity Editor or the OR Trackviewer( under paths ). The wait point sets the allocated time. However in my experience, OR will wait until the station departure time is reached( I believe the times must be set correctly), then the AI train departs.

You can edit the Activity/traffic file manually for the specific AI train. For OR, look for the name of the AI and add 30( for 30 seconds ) to the last 2 digits of the departure time. For MSTS, you must use a wait point which is the easiest option( other is to block the path with an invisible engine)!

Thanks
User avatar
casperdog
Well Established Forum Member
Posts: 557
Joined: Sun Jan 18, 2009 6:54 pm
Location: Wet and Windy Cornwall

Re: Editing .trf file

Post by casperdog »

Hi,
You can set it up in MSTS ae. As an example:
If your activity/player starts at 8.00 and departs at 8.01, open the traffic file and set the start time of the ai as 7.59. Save.
Scroll down to the ai and left click the time. This will open the arrival and departure times.
Double left click the arrival time and enter the DEPARTURE time i.e 8.01.30. Double left click the arrival time again and enter the start time 7.59.

In the activity your player should start at 8.00 with the other train waiting to depart.

I think you can also do this in the TSRE activity editor.

This works when running activities in OR and, I think, MSTS

Cheers
Clive
Bristol to Birmingham. 0 miles to go.
The Somerset and Dorset. 0 miles to go.
Thames Trent V3. 0 miles to go.

Just playing trains for a while :)
alanturk
Been on the forums for a while
Posts: 167
Joined: Tue Mar 01, 2005 9:40 am

Re: Editing .trf file

Post by alanturk »

Success! Thanks to both for your suggestions. For some reason, setting a wait point made no difference. Does OR's auto-pilot mode ignore them perhaps? I also tried the invisible loco trick, but that failed too. Then I realised what it was that was needed for the traffic file, setting the arrival and departure times as suggested, though I was confused at first because both were initially set as -9, presumably by the MSTS AE. What then happened was that the AI train appeared a moment after the activity started, but I guess that's simply a function of the software - can't make it appear before the software starts!

The result was quite amusing. The AI train set off about 30 seconds after the other (which was what I wanted), but beat the player train to a point where their paths converged, so the latter had to wait at the signal for a while. The AI train then disappeared about its own business on a different path, but popped up again later at another spot where paths converged - same result. Finally, both arrived within a few seconds of each other at opposite platforms of another station before they eventually diverged for the last time. I hadn't expected so much fun! Now I plan to add some more traffic ....

Thanks again,

Alan.
alanturk
Been on the forums for a while
Posts: 167
Joined: Tue Mar 01, 2005 9:40 am

Re: Editing .trf file

Post by alanturk »

PS What do you use for editing? I found Wordpad works well, but single and double left clicks did nothing for me, just simple editing.
Locked

Return to “[MSTS1] Activity Creation”