Home › Lua API › MapRouteBuilder
Available out of the box. Usable from Lua in the unmodified game.
MapRouteBuilder
3 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.
Signatures are recovered from the game code. ⚠ = partly understood (arguments may be missing or approximate). ? after a name = optional argument. Types: integer/number are Lua numbers, enum-typed arguments show the C++ type in brackets. Two signatures mean the method is registered separately for the UI and the gameplay state and each wrapper was decoded on its own. "same code as" in the Symbol column means the compiler merged identical functions: those methods share one wrapper and cannot be told apart by address.
| Method |
Signature |
Where |
Reference |
Symbol |
Current |
| CanHaveRoute |
MapRouteBuilder.CanHaveRoute(plot: integer/Plot) → boolean |
gameplay |
— |
0x1fca0 |
0x20190 |
| SetRoutePillaged |
MapRouteBuilder.SetRoutePillaged(plot: integer/Plot) (or nothing) args: plot — Plot index (named plotIndex / plotID in the scripts). (inferred) |
gameplay |
— |
0x1fd50 |
0x20240 |
| SetRouteType ★ |
MapRouteBuilder.SetRouteType(plot: integer/Plot) (or nothing) |
gameplay |
— |
0x1fdc0 |
0x202b0 |
Notes (★)
SetRouteType
Sets the route type on a plot.
- The recovered signature lists only the plot. Civ6-GCO passes a second argument, the route type index: RouteBuilder.SetRouteType(plot, 1), with the plot as a Plot object rather than x, y. Index 1 was not checked against the Routes table.
[inferred; evidence: community-reference — Civ6-GCO Scripts/GCO_AltHistScript.lua:889,917,950,971; third-party mod Civ6-GCO (Gedemon, 2021), not a Firaxis script]