Skip to content

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
    }
},
FieldDescription
idUnique map key, used by commands like /payloadsetmap.
enabledfalse hides the map from voting.
attackerSpawn / defenderSpawnRespawn points for each team.
payload.modelThe vehicle being escorted.
payload.escortRadiusHow close attackers must be to push it.
payload.contestRadiusHow close defenders must be to block it.
payload.baseSpeed / speedPerExtraPlayer / maximumSpeedPayload speed, and how much each extra escort adds.
payload.rollback*The payload rolls back when nobody escorts it.
routeThe path the payload follows, point by point.
checkpointsPoints on the route (by index) that add time.
boundariesThe play area. Players must stay inside this circle.

Building a route in-game ​

Only admins in Config.Admins can use the editor.

  1. Stand where the payload should start and run /payloadeditor.
  2. Walk or drive along the path. Press E to drop a route point.
  3. Press G to mark the current point as a checkpoint.
  4. Press H to show or hide the route preview.
  5. Use /payloadundo to remove the last point, or /payloadclear to start over.
  6. 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 ​

  1. Run /payloadtest to start a solo test round.
  2. Run /payloadsetmap <id> to switch maps.
  3. Run /payloaddebug to draw the route, checkpoints and boundaries.
  4. Run /payloadteststop when you're done.

All MG Development resources are protected. Redistribution is not permitted.