PYT Gate Generator TF2 & 3

Turn your toll gate model into a Pay Your Tolls compatible construction

Pay Your Tolls is currently used by 1,136 players on Steam. Workshop page

Fill in the form and the finished .con file writes itself on the right. Nothing is sent anywhere; this page runs entirely in your browser. Save the file into your mod under res/construction/asset/ with the name shown, ship your model as usual, and Pay Your Tolls will find the gate, count every vehicle through it and charge the toll. No script, no dependency: without Pay Your Tolls your gate is simply a decoration.

Pay Your Tolls in action. Watch on YouTube

Gate
Layout icons

These set the icons and label Pay Your Tolls shows for the gate in its table and click card. Counting works the same whatever you pick.

Direction
Lanes each way
Era icon
With one model, the dropdowns only change the icons Pay Your Tolls shows. Uncheck to hard-wire the values and hide the dropdowns.
Costs
Model placement

Pay Your Tolls counts vehicles in an 18 m circle around the construction's origin. If your model's origin is not on the road centreline, shift it here rather than re-exporting.

One model per layout (optional)

If your pack has a separate model for each layout, fill these in. Any blank slot falls back to the main model path above.

res/construction/asset/pyt_gate_your_mod_name_your_gate_name.con
PYT compatible file namepyt_gate_ + your mod name + gate name
Detection centreconstruction origin, 18 m radius. Keep it on the road centreline.

      

Then, in your mod

  1. Save the file as pyt_gate_your_mod_name_your_gate_name.con inside res/construction/asset/. The pyt_gate_ prefix is what makes it a toll gate. Never rename it after publishing: the path lives in players' saves.
  2. Ship your .mdl, meshes, materials and textures as for any construction.
  3. Do not list Pay Your Tolls as a dependency. Your gate works without it.
  4. Add "Pay Your Tolls compatible" to your Workshop page with a link back here or to the Pay Your Tolls Workshop page. That credit is the only thing the licence asks for. Players who have both mods will see the gate counted, named and listed in the Toll Ways table.

Get featured on the Pay Your Tolls Workshop page

If you use this generator to make your toll gate compatible, let me know! Leave a comment on the Pay Your Tolls Workshop page or ping me on Discord (man_hun). I will gladly feature your mod and link directly to it on the main Pay Your Tolls page, so the players who use Pay Your Tolls can find and download your custom booths.

Contract version 1. Pay Your Tolls reads only the construction's file name prefix and its optional ways, lanes and pyt_era parameters. Pricing, revenue, saves, naming and the UI stay with Pay Your Tolls, so a broken pack can never damage a save.

Licence. The compatibility system, this generator and everything it produces are free to use and modify in any Transport Fever 2 mod, provided you credit "Pay Your Tolls" with a link to its Workshop page or this page, and do not present the system as your own. Your own models and assets stay yours. No dependency on Pay Your Tolls is required or expected. Full text: PYT Compatibility Licence v1.

Pay Your Tolls for Transport Fever 3 (on mod.io) finds toll gates by their model's file name: any placed model whose file name starts with pyt_gate_ becomes a toll, counted in an 18 m circle around the model's origin. Fill in the form and three files write themselves on the right: a build-menu entry (.con.lua), a small placement script (.script.lua) and the lines for your _content.json. Nothing is sent anywhere. No dependency: without Pay Your Tolls your gate is simply a decoration.

Your mod
Gate
Costs
One model per layout (optional)

Fill these in to give your entry Direction and Lanes choices, like Pay Your Tolls' own Toll Gantry; the script places the matching model. Blank slots use the main model. Every file name must start with pyt_gate_.

Model placement

Pay Your Tolls counts traffic 18 m around the model's origin. If the origin isn't on the road centreline, shift the model here.

PYT TF3 compatiblemodel file name starts with pyt_gate_
Detection centrethe model's origin, 18 m radius

      

Then, in your mod

  1. Save the .con.lua and .script.lua into content/my_gates/, next to your model.
  2. Add the lines from the _content.json tab to the "files" list in your mod's _content.json. TF3 only loads listed files, so your model's meshes, materials and textures must be listed too.
  3. In your .mdl, set the collider to type = "NONE" so the gate can stand over a road. TF3's Model Editor resets it to a box on every save.
  4. Give the entry pictures: gate@2x.tga (menu icon, 240 x 150) and gate_preview@2x.tga (720 x 405) in the same folder. Without a preview the info box shows plain blue.
  5. Keep every file and folder name lower case (TF3's upload validator warns on capitals), and never rename the model after release: placed gates are saved by model.
  6. Say "Pay Your Tolls compatible" on your mod page with a link to Pay Your Tolls on mod.io or this page. That credit is all the licence asks for.