Using Oskari's Plugin (OS ATS1.dll)

From BVEStation Wiki
Revision as of 20:24, 6 February 2015 by Kevin (Talk | contribs) (Created page with "This is one of the older OpenBVE plugins, the most common plugin for most trains. It is a Win32 plugin, and it is NOT cross-platform compatible. This allows for the use of an...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is one of the older OpenBVE plugins, the most common plugin for most trains. It is a Win32 plugin, and it is NOT cross-platform compatible.

This allows for the use of animated destination signs, rail gaps, the train stop feature, switchable interior lighting, and more.

More documentation will be available soon

Rail Gap

On Route

You will need to specify this within your "With Structure" list. It is best to use a null object for the basis of the beacon. In this example, we use null.x

.Beacon(1) MyRoute\null.x			;beacon for power rail gaps and tripcock

Of course, change the directory of the object to where it is located. For example, we put it in the Rails folder instead

.Beacon(1) MyRoute\Rails\null.x			;beacon for power rail gaps and tripcock

Now here is the beacon for the rail gap to place within the route:

X, .Beacon 20; 1; 0; Y

X represents the location where you would want to place the beacon. For example if you want to place the beacon on a switch that the train crosses for a different track, and the switch object starts at 256 meters, the location would be stated as this:

256, .Beacon 20; 1; 0; Y

Now Y represents the duration of the gap, in meters. For example, the switch is 30 meters long, then you would specify the following:

256, .Beacon 20; 1; 0; 30

And there you have it! Your new route or existing route is now equipped with the rail gap!


On Train



This feature will only work if your exterior/interior objects are associated with an .animated file rather than being a standalone .b3d or .csv object. So first, create an .animated file on notepad, and here is how it works:

[Object]
States = OFF.b3d, ON.b3d
StateFunction = pluginstate[53]

OR

[Object]
States = OFF.csv, ON.csv
StateFunction = pluginstate[53]

OR

[Object]
States = OFF.b3d, ON.csv
StateFunction = pluginstate[53]

OR

[Object]
States = OFF.csv, ON.b3d
StateFunction = pluginstate[53]

OFF.csv and OFF.b3d represents the object without the EmissiveColor (.b3d)/SetEmissiveColor (.csv) command being used, while ON.csv and ON.b3d represents the same object, but using the EmissiveColor/SetEmissiveColor command.

Your train's extensions.cfg MUST specify these .animated files. For each car object, a pair of .b3d files (or .csv) needs to be made, as shown above.

StateFunction = pluginstate[53]

This is the StateFunction for the rail gap to work. The OFF state must be MENTIONED FIRST before the ON state on the states list! In this example, we are using .csv objects:

States = OFF.csv, ON.csv

The same will apply to animated doors as well, if the train includes an interior. Here is an exmaple of applying the rail gap with 2 pairs of animated doors:

[Object]
Position = -1.28, 1.05, -6.67
States = doorLNP.b3d,doorL.b3d
StateFunction = pluginstate[53]
TranslateZFunction = if[leftdoorstarget==0, min[value+delta*1.8/4.8,0], max[value-delta*0.8/1.5,-0.8]] 

[Object]
Position = -1.28, 1.05, -6.03
States = doorL1NP.b3d,doorL1.b3d
StateFunction = pluginstate[53]
TranslateZFunction = if[leftdoorstarget==0, max[value-delta*1.8/4.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = 1.30, 1.05, -2.50
States = doorRNP.b3d,doorR.b3d
StateFunction = pluginstate[53]
TranslateZFunction = if[rightdoorstarget==0, min[value+delta*1.8/4.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = 1.30, 1.05, -1.85
States = doorR1NP.b3d,doorR1.b3d
StateFunction = pluginstate[53]
TranslateZFunction = if[rightdoorstarget==0, max[value-delta*1.8/4.8,0], min[value+delta*0.8/1.5,0.8]]

And there you have it, your basics of applying the rail gap feature on an exterior/interior train object!


Tripcock/Train Stop

On Route

You will need to specify this within your "With Structure" list. It is best to associate it with a tripcock object for the basis of the beacon. In this example, we use tripcock.x

.Beacon(2) YOURSIGNALS\tripcock.x


Now here is the beacon for the tripcock/train stop to place within the route. It has been tested and successfully trips the train.:

X, .Beacon 44003;2;0;0,

On Train

This feature will only work if your exterior/interior objects are associated with an .animated file rather than being a standalone .b3d or .csv object. So first, create an .animated file on notepad, and here is how it works:

[Object]
States = DISENGAGED.b3d, ENGAGED.b3d
StateFunction = pluginstate[51]

This works best for trains that have pivoting trucks/bogies or detailed trucks/bogies.

Animated objects

Animated Static Destination Signs

here's how it works:

[Object]
States = your states here, either .b3d or .csv, separated by a comma per state.
Statefunction =  Mod[value+delta*pluginstate[customindicator], numberofobjects]

THIS SECTION IS STILL INCOMPLETE. WILL BE COMPLETED LATER.