Skip to content
Tempo on GitHub (opens in a new tab)

4.22 Game pack TOML

This sample is the REEFSCAPE 2025 field plus a practice ramp the real field doesn’t have. To write a complete pack, see Create a game pack.

TOML
[meta]
name = "REEFSCAPE 2025"
year = 2025
version = 1

[field]
lengthM = 17.548
widthM = 8.052
origin = "alwaysBlue"
symmetry = "rotational"          # red = blue rotated 180 deg about field center

# Blue/neutral only: the red half is derived.
[[obstacles]]
id = "reef"                      # the blue reef tower, 1.664 m across faces; red is derived
shape = "polygon"
verticesM = [
  [5.321, 4.506], [4.489, 4.987], [3.657, 4.506],
  [3.657, 3.546], [4.489, 3.065], [5.321, 3.546],
]

[[obstacles]]
id = "bargePost"
shape = "cRectangle"
centerM = [8.774, 4.026]         # the field center
lengthM = 0.61
widthM = 0.61
mirror = false                   # its red copy would be the same square

[[terrain]]                      # a crossable zone: a shape and an id, no crossing settings
id = "practiceRamp"              # 2025's field is flat; this is a practice-field ramp
shape = "rectangle"
minM = [10.0, 3.0]
maxM = [11.2, 5.0]

[meta] requires name, year and version. version is the version of this file format, and it must be 1. [field] requires lengthM, widthM and origin, and takes symmetry and fieldCenterM = [x, y] (Units and origin).

A key the format doesn’t have is a load error in every table, except the eight old terrain keys listed under Terrain. In [[regions]] and [[terrain]] the error names the key and the entry, as in region 'keepOut': unknown key 'efect'.

A pack with an obstacle left out still loads with no warning, and routes are planned as if that obstacle weren’t on the field.

Element groups

GroupPlanner treatment
[[obstacles]]Always routed around
[[terrain]]Crossable, such as a bump or ramp. Avoided until a leg calls .cross(...)
[[regions]]Named area. effect = "avoid" makes it an avoid zone that is on by default, and without an effect it only labels. A leg can stayWithin one

An element takes these keys besides its shape. effect and enabled are a load error on an obstacle or terrain.

KeyDefaultValues and use
idRequiredEvery element
alliance"blue""blue", "red" or "neutral"
mirrortrue on bluefalse makes no red copy
mirrorHA same-alliance copy under a new id (mirrorH)
noteFree text
effect[[regions]] only: "avoid" is the one value
enabledtrue[[regions]] only, for avoid zones: false starts the zone switched off, and a route’s allow(zone) makes that route obey it
rotationDeg0Rectangles and polygons, counterclockwise degrees

Shapes

shapeFields
rectangleminM = [x, y], maxM = [x, y]
cRectanglecenterM = [x, y], lengthM along X, widthM along Y
circlecenterM = [x, y], radiusM
polygon, explicitverticesM = [[x, y], ...]
polygon, regularsides, centerM, diameterM

Rectangles rotate about their center and explicit polygons about their bounding-box center. A circle rejects a nonzero rotation. A regular polygon has 3 to 64 sides. diameterM is its inscribed diameter (across flats for a hexagon), and at zero rotation one vertex points along +Y. An explicit polygon needs 3 to 1,024 distinct vertices, nonzero area and no crossing or touching nonadjacent edges, and it can be concave.

These fail at load time: an unknown effect, a duplicate (id, alliance) in one group, a shape outside the field, mirror = true on a red or neutral element, and more than 64 terrain features or 64 avoid zones, counting the red copies.

Symmetry

TOML
symmetry = "rotational"   # 180 deg about center: 2022 Rapid React, 2025 Reefscape, 2026 Rebuilt
# symmetry = "mirror"     # x reflected about the field center, y kept: 2023 Charged Up, 2024 Crescendo
# symmetry = "none"       # asymmetric field; author everything explicitly

symmetry defaults to rotational. A blue element gets a red copy with the same id, a neutral element is kept once, and a red element written with the same id replaces the copy. With symmetry = "mirror" the red copy has its x reflected about the field center and keeps its y, and none makes no copies. Routes are flipped separately (Alliance flipping).

mirrorH

TOML
[[terrain]]
id = "bumpLeft"
shape = "rectangle"
minM = [4.061, 4.633]
maxM = [5.19, 6.485]
mirrorH = "bumpRight"

mirrorH copies an element across the field’s long axis, the line that runs from one alliance wall to the other through the field center. The copy keeps its x, and it has a new id and the same alliance.

  • With alwaysBlue, y becomes widthM - y (or the reflection about fieldCenterM when set). With fieldCenter it becomes -y.
  • The copy inherits alliance, note, mirror setting, effect and enabled flag.
  • mirrorH works on every group and shape, and the copy counts toward the 64-element limits.

This example is the bump in the bundled REBUILT 2026 pack. On a rotational field it defines bumpLeft and bumpRight on blue and both get red copies. mirror = false or symmetry = "none" keeps only the blue pair.

Terrain

A [[terrain]] block takes a shape, id, alliance, mirror, mirrorH, note and rotationDeg. The loader accepts crossHeadingRad, crossToleranceRad, rampUpM, flatM, rampDownM, heightM, maxCrossSpeedMps and crossable with no warning, but they have no effect. Any other key is a load error.

Crossing depth and targets are set on the route (Terrain), and speed caps are in TerrainConfigs.

Units and origin

Lengths are meters and rotationDeg is degrees. [field] origin is required:

origin(0, 0)BoundsPivot
alwaysBlueCorner on the blue driver’s right, with +X toward red and +Y to the driver’s leftx 0 to lengthM, y 0 to widthM[field] fieldCenterM = [x, y], default [lengthM/2, widthM/2]
fieldCenterField centerx within lengthM/2, y within widthM/2 of 0[0, 0], and fieldCenterM is ignored

The bundled packs use alwaysBlue. Odometry and every coordinate you write must use the pack’s origin. Changing the WPILib year doesn’t translate any of them (2026 vs 2027).

Loading

The robot loads src/main/deploy/tempo/game.toml (Java and C++) or deploy/tempo/game.toml (RobotPy) unless a pack is set in code. The load order and warnings are on GamePack, and loading from a path or a string is under advanced loading.

esc

Loading search...