← Back to Guide List

Traffic Editor

The Traffic Editor is the tool that defines where traffic can drive. Every track with working traffic has a network of lanes, intersections, spawn areas and rule presets authored in this editor. If you want traffic on a track that has none, or you want to change how it flows on one that does, this is the place — and the data you create travels with the track so everyone who loads it inherits your work.

How to open it

  1. Enable Show Advanced Settings and Show Editor Tab in App Settings.
  2. Open the Editor tab, then the four traffic sub-tabs appear: Lanes, Intersections, Areas, Rules.

How the four concepts fit together

The editor is not a drawing program that remembers a picture. It authors a graph that the traffic system queries every frame. Four object types make up that graph:

  • Lanes are ordered curves along which cars drive. A lane carries a speed limit and a priority so the simulator knows how fast to go and how desirable that lane is.
  • Intersections are decision points where lanes meet. They describe which lanes feed into which, and optionally which phases get green when.
  • Areas are rectangles of world space with local spawn rules. They do not shape driving — they shape where traffic is born and how densely.
  • Rules are reusable presets (role = priority + speed limit). You apply a rule to many lanes by name, and changing the rule updates every lane using it.

A small network (one lane, no intersection) already works for straight cruising. The full four-object toolkit is only needed when you build real road networks with choices, junctions and varying speed.

How to lay down your first lane

A lane is defined by a short list of waypoints that the tool smooths into a Bezier curve — not a polyline. Two consequences follow:

  1. You do not need many waypoints to get a smooth curve. Five or six well-placed points through a bend are usually enough.
  2. Wherever you place waypoints matters more than how many you place. A waypoint slightly off-centre will pull the smoothed curve off the road; drag it into place before moving on.

The practical workflow is: switch to Lanes, click New Lane, click roughly-spaced points along the drivable path, then use the 3D gizmo on each point to fine-tune height and position. End the lane when it reaches the end of the intended road.

The lane still needs a role before traffic will actually use it. Pick one of your defined rules (Highway, Main, Secondary, Parking) so the lane inherits a sensible priority and speed limit.

How role and priority shape traffic choice

When the simulator picks a spawn position, it chooses from all eligible lanes weighted by their priority. A lane with priority 10 will carry more cars than a priority-1 lane running parallel to it. The role presets set sensible defaults — Highway is high priority, Parking is low — so lanes you mark “Parking” essentially never see spawned traffic until every other option is full.

That is why parking driveways do not flood with cars even if you draw them meticulously: their role says “not preferred”. Likewise, marking your main avenue as Highway rather than Secondary is what gets traffic to actually use it. Changing the role of a single lane is the fastest fix for “cars ignore my new lane”.

Per-lane density slider — the simpler dial

Priority is powerful but can become confusing on dense networks — you end up juggling values across many lanes to get one specific distribution. For that reason every lane also exposes a per-lane density (chance) slider alongside its priority. This slider blocks a percentage of spawns on that specific lane and redistributes the skipped spawns across the other lanes nearby.

A concrete example: a three-lane highway where you want fewer cars in the fast lane and more in the slow lane. Instead of tuning priorities, set the fast lane’s density to 50 % and the slow lane’s to 100 %. Half of the fast-lane spawns are blocked and those cars end up on the other lanes instead. The result is a realistic-looking traffic distribution without touching the role or priority.

Use role + priority to set the overall character of a lane; use the per-lane density slider for local, targeted tweaks that you do not want to reason about in terms of weights.

How to author an intersection

An intersection is the explicit declaration of a choice point. You place a node where lanes meet, attach some lanes as inbound (cars arrive along these), and others as outbound (cars leave along these). The tool then generates the implicit turn decisions: any inbound can take any outbound.

If you want traffic to take turns rather than flow continuously, assign a light program: a list of phases each describing which inbound lanes get green for how many seconds. Cars arriving at a red wait; cars arriving at a green flow through. This is how real junctions with cross streets avoid permanent deadlock.

Intersections are optional. A lane network without any intersection still works for loops and point-to-point highways — traffic just flows continuously. You only need intersections when cars must choose between paths.

How Areas override local rules

Areas are regions you draw in the world where you can override the speed and density rules that would normally apply. They do not shape spawn behaviour on their own — they sit on top of whatever the lanes inside them would otherwise do and rewrite specific values for that region only.

The most useful thing to override is speed. An area with a reduced speed limit forces the cars driving through it to slow down, regardless of what their lane role says. This is how you build believable local slow-downs:

  • Parking lots and customs zones. Drop the speed to a realistic crawl so cars do not fly through at highway pace.
  • Approaches to narrow sections. A small area with a reduced limit in front of a tight passage makes traffic visibly decelerate before it rather than braking at the last moment.

Fake stops — visual pauses at gas stations, pillars, toll gates

A specific trick the Area system enables is a fake stop. Traffic cars cannot actually park and stand still at an arbitrary point — the AI is built to keep moving — but you can get very close visually by drawing a small area at the intended stop location and setting its speed limit to something tiny like 1 km/h.

The car does not literally stop; it crawls through the area at near-zero speed. From the player’s perspective it looks almost identical to a car that has stopped at a gas pump, a pillar, a customs barrier, or a delivery bay. It satisfies the visual effect of “traffic halts here” without requiring the AI to genuinely park.

Density override per area

Areas can also override density locally — raise it to concentrate traffic in a downtown core, or lower it to keep problem spots (tunnels, underground sections) empty. Density overrides affect spawning only, so cars already driving through the area are not removed when you change the setting; they continue and new spawns follow the new rule.

How Rules save you from per-lane tuning

Rules are named presets of (priority, speed limit). Define a rule once, apply it to dozens of lanes. When you change the rule — say, drop the Main-road speed from 80 to 70 — every lane that uses the Main rule updates in one step.

This is how authoring a 100-lane town stays manageable. You do not tune 100 speed limits; you tune five or six rules and assign them. It also makes your network internally consistent: every Main-road lane behaves identically because they all share one definition.

How the editor saves your work

The editor auto-saves after a short idle delay. Data is written as JSON into the track’s folder, so networks travel with the track. Sharing your track — or someone else loading it — automatically brings the traffic data along. No separate export step is required.

For big edits it is worth keeping a manual backup of the traffic folder. Auto-save is convenient but destructive to mistakes: the file on disk is the latest state you produced.

How to test what you built

The editor and the simulation run at the same time. You do not have to close the editor to see your changes — drive out of the editor view and traffic starts using whatever exists on disk at that moment. The typical iteration is: edit a lane, wait for auto-save, drive through, return to the editor and fix.

For a proper test, boost Traffic Density and drive your new network end-to-end. Cars will expose problems you did not see while authoring — a corner that is too tight, an intersection that deadlocks, a lane whose role is wrong.

Good practices

  • Author one lane end-to-end before adding intersections. Verify cars flow on it first.
  • Keep waypoints sparse (every 20 – 40 m on average). Too many is a maintenance burden.
  • Define role rules early. Editing fifty lanes because you later changed the priority of one rule is painless; editing fifty lanes by hand is not.
  • Use Areas to hide spawn problems (tunnels, underground sections) rather than trying to fix them at the lane level.
  • Back up before bulk edits. Auto-save overwrites your previous state on every tick.

Troubleshooting

Editor tab does not appear
Enable Show Advanced Settings, then Show Editor Tab, in App Settings.
Waypoints drop under the ground
The editor snaps clicks to the first surface it hits. Use the 3D gizmo to lift the waypoint into position.
Traffic ignores a new lane
Its role is wrong. Promote from Parking / Secondary to Main or raise its priority in the rule.
Intersection causes deadlock
The light program has no green phase for one of the inbound lanes. Edit the phases.
Edits disappear after restart
The auto-save delay means very rapid closes can drop the last change. Wait for the save toast before quitting.