Community Forum

train crossing barriers

Forum Overview >> Editor

Created19.12.2016 12:21

Tony Price (brownthumb) 19.12.2016 12:23
how do you get more than 2 sets to work?

Ted Fanning (wickedset) 19.12.2016 15:17
I'd like to know this as well.

James Norred (Cajunwolf) 20.12.2016 09:58
Those are setup in the trainSystem.xml files in the [map_name]/maps folder of your map. To make this file work you need to change the path for your trainSystem01transformGroup in the user attributes to read maps/map01_trainSystem01 instead of $data/maps/map01_trainSystem01 which is main game files in your root directory. You can only edit it in a clone or mod map.

Here's the trainSystem01 file from a blank sample map with a basic train system and two crossings.

<?xml version="1.0" encoding="utf-8" standalone="no" ?>

<spline index="0" splineYOffset="0.155" />

<railroadObject className="RailroadCrossing" index="1" startDistance="125" endDistance="125" >
<gate index="1|0|0" startRot="0 0 0" endRot="90 0 0" duration="3" closingOffset="1.5" />
<gate index="1|1|0" startRot="0 0 0" endRot="90 0 0" duration="3" closingOffset="1.5"/>
<signals index="1|0|1" alternatingLights="true" />
<signals index="1|1|1" alternatingLights="true" />
<crossingSound file="data/maps/sounds/trainCrossingBell.wav" radius="50" innerRadius="20" />
<railroadObject className="RailroadCrossing" index="2" startDistance="125" endDistance="125" >
<gate index="2|0|0" startRot="0 0 0" endRot="90 0 0" duration="3" closingOffset="1.5" />
<gate index="2|1|0" startRot="0 0 0" endRot="90 0 0" duration="3" closingOffset="1.5"/>
<signals index="2|0|1" alternatingLights="true" />
<signals index="2|1|1" alternatingLights="true" />
<crossingSound file="data/maps/sounds/trainCrossingBell.wav" radius="50" innerRadius="20" />

<vehicle xmlFile="$data/vehicles/train/locomotive.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonTimber.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonTimber.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonWoodChips.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonGrain.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonGrain.xml" />
<vehicle xmlFile="$data/vehicles/train/wagonSugarbeets.xml" />


They start and stop automatically when within the set range or leaving it. Here they are set to 125 start and 125 end.

Tony Price (brownthumb) 20.12.2016 13:37
Thanks James, you have been a great help, now my map lights up like a christmas tree.

James Norred (Cajunwolf) 20.12.2016 18:52
No problem Tony, and from one FS17 railroad builder to the other, splines are a time consuming pain. Did you use the track spline helper tool? It's a must have tool if you plan to lay out some nice track layouts. It's basically a dummy train car wheel truck assembly with a pointed spike on both ends set for the right height, and the tool keeps it centered. It's especially nice on the curves to keep the spline dead centered. You highlight the end of the spline, hit Ctrl B, and touch the tip of the point with mouse pointer and click the left mouse button. It sucks it right up to this point and you hit insert and it jumps halfway through the tool. You can also adjust the input side alignment at this time too to make sure its centered just right. You then goto the front, hit Ctrl B, and click the front point and there's your spline. Now move the tool up how ever far you think right and do it again until you have the spline laid.

Here is a link to the FS17 modding forums where I have a link and pictures.

I'm finally got a nice 16x map (4096x4096) I'm building, and I'm planning at least three train systems so I'll be laying track, right.

Ted Fanning (wickedset) 20.12.2016 23:15
Thanks James

Kjffhafa (Zocker98nsmods) 02.01.2017 13:40
I did everything but it seems that I doesn't work on TRainsystem02? Everytime I get this error
Error: Invalid spline index!
Error: Loading onCreateLoadedObject 'careerVehicles.onCreateLoadedObjects.onCreateLoadedObject(1)'
dataS2/character/player/player02.i3d (494.04) ms

William Rowe (Bonger76) 02.01.2017 23:13
check your spelling every thing should be the same as trainsystem01.xml just copy and change name to trainsystem02 and make shure that in GE that the path to that .xml is right and make shure that the onCreate attribute is spelled right the index is how it save what is loaded on your train if the index is wrong it cant load the train into map,ihave three trains on my map duplicated the first changed to trainSystem02,changed the .xml path to trainsystem02.xml and then copied the trainsystem01.xml and change the name to trainsystem02.xml and if thier are no crossing just take them out of the .xml and did the same for the third trainsystem, it could just be if that is how you have it spelled TRainsystem02 it might be the two caps TR they should be lower case if the onCreate you are using is the careerVehicles.onCreate it should be TrainSystem.onCreate.

Note: Log in to post. Create a new account here.