run_nav_generate
Generates Left 4 Dead 2 nav meshes by launching the game as a listen server, copying the map loose, hiding conflicting add-ons, and returning the .nav, nav dump, verdict, and warnings.
Instructions
Generates nav meshes the only way Left 4 Dead 2 can: it launches the game client as a listen server, with sv_cheats 1 and nav_edit 1, and waits for the engine to write each map's .nav. The map must be loose, so the tool copies it into left4dead2/maps, moves the named add-on archives aside so they cannot shadow it, and restores everything afterwards. Returns the mesh, the engine's <map>_nav.txt dump, the decoded nav verdict and the flow warnings from the console. A map whose archive contains the same map must be passed in addonsToHide. Long-running and guarded.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"maps": "<maps>"
},
"name": "run_nav_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maps | Yes | Compiled .bsp files to generate nav for, absolute or relative to the repo. | |
| outDir | No | Directory for the generated .nav and <map>_nav.txt. Defaults to the directory of each source .bsp. | |
| confirm | No | ||
| addonsToHide | No | Add-on archives to move aside while generating (for example a campaign VPK that contains the same map names). Restored even if generation fails. | |
| timeoutSeconds | No | Per map. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| maps | Yes | ||
| restored | Yes |