Maps & Route Editor
MG-Payload ships with two maps: South Side and Paleto Bay. You can add your own with the built-in route editor.
Map format
Maps are in Config.Maps in config.lua:
lua
{
id = 'southside',
label = 'South Side',
enabled = true,
attackerSpawn = { vector4(...), ... },
defenderSpawn = { vector4(...), ... },
payload = {
model = 'stockade',
startCoords = vector4(-136.747, -1545.692, 34.099, 136.063),
escortRadius = 12.0,
contestRadius = 12.0,
maxEscortPlayers = 3,
baseSpeed = 1.3,
speedPerExtraPlayer = 0.25,
maximumSpeed = 2.0,
rollbackEnabled = true,
rollbackDelay = 10,
rollbackSpeed = 0.5,
},
route = { vector4(...), ... },
checkpoints = {
{ routeIndex = 41, label = 'South Side Checkpoint #1', addedTime = 240 }
},
boundaries = {
center = vector3(-78.74, -1758.83, 35.96),
radius = 1500.0
}
},| Field | Description |
|---|---|
id | Unique map key, used by commands like /payloadsetmap. |
enabled | false hides the map from voting. |
attackerSpawn / defenderSpawn | Respawn points for each team. |
payload.model | The vehicle being escorted. |
payload.escortRadius | How close attackers must be to push it. |
payload.contestRadius | How close defenders must be to block it. |
payload.baseSpeed / speedPerExtraPlayer / maximumSpeed | Payload speed, and how much each extra escort adds. |
payload.rollback* | The payload rolls back when nobody escorts it. |
route | The path the payload follows, point by point. |
checkpoints | Points on the route (by index) that add time. |
boundaries | The play area. Players must stay inside this circle. |
Building a route in-game
Only admins in Config.Admins can use the editor.
- Stand where the payload should start and run
/payloadeditor. - Walk or drive along the path. Press E to drop a route point.
- Press G to mark the current point as a checkpoint.
- Press H to show or hide the route preview.
- Use
/payloadundoto remove the last point, or/payloadclearto start over. - Run
/payloadsave.
The route is saved as a new file in the resource's generated_routes/ folder. Copy its route and checkpoints into a new entry in Config.Maps, add spawn points and boundaries, then restart the resource.
TIP
Keep points evenly spaced along the road. Up to 250 points and 20 checkpoints are allowed per route.
Editor keys can be changed in Config.Editor:
lua
Config.Editor = {
Enabled = true,
ToggleKey = 'H',
PointKey = 'E',
CheckpointKey = 'G',
MaximumPoints = 250,
MaximumCheckpoints = 20,
}Testing a map
- Run
/payloadtestto start a solo test round. - Run
/payloadsetmap <id>to switch maps. - Run
/payloaddebugto draw the route, checkpoints and boundaries. - Run
/payloadteststopwhen you're done.
