How to Add YaPB Waypoints/Graphs for Custom Maps

September 24, 2025 Daemon666 8 min read 3 visualizações

Bots on YaPB do not path from raw geometry — they follow a per-map navigation graph. Official maps ship one (or YaPB downloads it), but a custom map usually arrives with none, so bots spawn and stand still. This guide builds a graph for a custom map: auto-generate a first pass with the analyzer, then fix the tricky spots by hand, and save.

1. Confirm the map really has no graph

Graph files are named after the map and live in the bot's data folder:

cstrike/addons/yapb/data/graph/<mapname>.graph

Load the custom map with a couple of bots. If the console prints a message to the effect of no graph for this map and the bots idle at spawn, you need to create the file. YaPB's native format is .graph; it can import an old .pwf waypoint file if someone hands you one, but you will usually build fresh.

2. Enter the graph editor

Get admin rights on the server (rcon or listen server), then turn the editor on from the console:

yb graph on

Nodes now draw in the world as coloured markers and a wire mesh of connections. Open the editor menu for the full set of actions:

yb graph menu

From that menu you place nodes, set their type, connect paths, and save — it is far easier than memorising every subcommand.

3. Let the analyzer do the first pass

Modern YaPB can walk the map and generate a rough graph automatically, which saves enormous time on a large map. Start the analyzer from the graph menu (the auto-add / analyze option) and let it run; it seeds nodes along walkable surfaces and links them. When it finishes you have a navigable draft that already gets bots moving — you then refine it rather than placing hundreds of nodes by hand.

4. Add and type nodes by hand where it matters

The analyzer misses map-specific intent, so walk the key areas yourself and place nodes with the right type. Stand where you want a node and add it from the menu (or yb graph add), then pick its type:

  • Normal — a plain path point.
  • Crouch — forces bots to duck through vents and low gaps.
  • Jump — marks a spot bots must jump.
  • Camp — a hold position, with a facing direction.
  • Goal — bomb sites, hostage spots, rescue and escape zones.
  • Ladder — placed on ladder rungs so bots climb.

Place goal nodes at both bomb sites (or every hostage and the rescue point), camp nodes at common angles, and crouch nodes in every vent. This is what separates bots that merely move from bots that actually play the objective.

5. Connect the nodes into paths

Nodes are useless without connections — a bot travels along the links between them. The analyzer connects most automatically, but check awkward geometry: one-way drops, long jumps, and ladders often need a manual path added in the direction of travel. Use the pathing options in the graph menu to add a connection from the nearest node to the one you are looking at, and add a one-way link where a bot can drop down but not climb back. Sparse or broken connections are why bots "move but path badly."

6. Save the graph

When the layout is done, save from the menu or the console:

yb graph save

That writes <mapname>.graph into addons/yapb/data/graph/. Graphs are read at map load, so reload the map to pick up the saved file:

changelevel <mapname>

From now on YaPB prefers your local file over any download. Keep the .graph alongside the map's .bsp in your own records so you never regenerate it — it is server-side navigation data and does not go on your FastDL mirror.

Common errors

  • Bots still idle after saving — the filename does not match the map. It must be data/graph/<exactmapname>.graph, case-matched on Linux. See bots stand still, no waypoints.
  • yb graph on does nothing — you lack admin rights, or YaPB is not loaded. Check meta list for YaPB as RUN.
  • Bots move but fall off ledges or bunch up — missing or wrong connections. Add one-way links on drops and fix the pathing at chokepoints.
  • Bots ignore a bomb site — no goal node there. Place a goal node at each objective.
  • Analyzer produced a sparse graph — complex or vertical maps confuse it; supplement by hand in the thin areas and save again.

Verification

Turn the editor off (yb graph off), reload the map with a few bots, and watch them: within seconds they should leave spawn, take routes, use ladders and vents, and push the objective. Confirm there is no "no graph" message in the console. If the bots navigate the whole map cleanly, the graph is valid and complete; if they stall in one area, re-enter the editor, thicken the nodes and connections there, and save again.

Colaboradores: Daemon666 ✦
Compartilhar: