Train-Sim.Com
MSTS Activity Design

Hacking the .act

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #1494

Member since Aug-31-02 · 259 posts

I have been working on an activity and have gotten to the point of setting up the events and event logic. The first event in this particular activity is picking up a string of a dozen empty grain hoppers. After going through the "add a car" mantra a few times I decided there must be an easier way and bailed out of AE with only the first three cars idenified in the action event and took a look at the .act file. Sure enough, here was the event: Events (
EventCategoryAction (
EventTypePickUpWagons ( )
ID ( 0 )
Activation_Level ( 1 )
Outcomes (
DisplayMessage ( "Richmond Beach Pickup." )
)
Name ( Action0 )
Wagon_List (
UiD ( 2147483648 )
SidingItem ( 4294967295 )
Description ( "Richmond Beach #1" )
UiD ( 2147483649 )
SidingItem ( 4294967295 )
Description ( "Richmond Beach #1" )
UiD ( 2147483650 )
SidingItem ( 4294967295 )
Description ( "Richmond Beach #1" )Well now, let's see. Each item in the wagon list section is defined by three lines. The UID is unique to the individual car itself and corresponds to the nuimber one see's with the F7 key. The siding item is fixed -- I assume the number identifies the particular siding the car is on. The description is also a fixed value. What if we just copy one three line group, paste it three times (total of 12 cars) and edit the UID number to increment its way down the list. Sure enough. Works fine, lasts a long time. Checked the event in AE and all the cars were listed in the proper order. It took less time to add the final nine cars in this manner then it did to add the first three in AE. Sorry if this is old news. Its new news to me. Wouldn't be the first time I've reinvented the wheel.Brad Meyer

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured May 16, 2003. About this archive.