Tutorials Making Defect Detectors - MagnumMacKivler/trakpak3 GitHub Wiki

Back to Hammer Tutorials

For now, until I can get a proper tutorial set up, here's an explanation I gave in the Trakpak3 Discord for how to set these up.


So this is what you need for a defect detector setup. The tp3_defect_detector, a trigger_multiple, and a prop_static for the actual detector.

image

The trigger is nothing special but it needs a targetname and must be set to check for physics objects.

image image

The detector itself is a bit more involved. Take note of the Scan Box Size (64x64x4) since that will be important when doing the setup.

image

make a temporary brush with those dimensions. 64x64x4.

image

Position it parallel with the rails, as close to them as you can, but it should not go above the railhead.

image

Also, don't rotate it. It must be aligned with the world axes.

Next, duplicate the brushes and move them down a ways. These represent the endpoints of the scan path that the defect detector will use to check for dragging equipment. If there's an issue with spurious trips (as in, the detector crying dragging equipment even when everything is fine), you can move these brushes down an inch or two without any problems.

image

Now, go into the defect detector and drag its two scan axes to the center top face of each brush. Make sure the lines between the origin points run parallel to the track, not across it.

image

They're kinda hard to see so here's a line:

image

In my example here the origin points are actually 2 units below the railhead.

image

You may need to offset them further down if you install it on a hill, because the box doesn't rotate when it scans.

After that, you can delete the nodraw brushes.

Set the Trigger keyvalue to the trigger_multiple targetname (it'll wire itself automatically).

Set the minimum detection speed. It gives a conversion ratio in the description, 176 u/s = 10 mph. I picked 88 for mine - 5 mph.

The ambient temperature mins and maxes are for the detector readout and don't really affect anything.

Pick a sound font name next. The sound fonts are listed in cl_defect_detector.lua. I was going to make a list of the sounds on the wiki at some point but never got around to it, oops. The sound fonts currently available are:

  1. ge (the standard GE defect detector sound font)
  2. paree (I had a friend of mine record a soundset for me)
  3. tts (text-to-speech)
  4. sns (speak-n-spell, good for really old defect detectors from the 1980s)

More may be added in the future. After that comes the rest of the playback options:

  • Speak Intro Initially - sets whether to play the intro sentence immediately when a train rolls over it. Some high-traffic lines disable this in order to conserve radio bandwidth.
  • Report Defects Instantly - sets whether or not to immediately broadcast news of a defect. Can't think of any reason why this shouldn't be on.

The Sentence keyvalues allow you to customize the words the detector will speak. A list of all words (varies for each sound set though most are shared) can be found in cl_defect_detector.lua as well.

If you want the detector to repeat the intro sentence when reading the results, you can use the variable %intro in the sentence

If there's a defect, the Dragging Equipment and Hot Box sentences can insert variables to tell you where the defect is in the train. Those are %def_axle or %def_car.

The outro is used after the train finishes the detector cycle and can be used to list total train length, train speed, temperature, etc. using %axles, %cars, %feet, %meters, %mph, %kph, and %temp.

There's also 4 generic sentences so you can make preset word sequences and then reference them in the other sentences, but this is unlikely to be used.

Once everything is configured to your liking, the defect detector should be ready to use!

image