Utilities

Small helpers for identifiers that Trackmania uses.

Accounts

Trackmania (2020) identifies players by an account ID, which is shown as a shorter login in some places. AccountUtils converts between them.

AccountUtils.ToLogin(accountId)
AccountUtils.ToAccountId(login)

Map UIDs

The game makes a map UID from a new UUID and the CRC32 of the map: 20 bytes written as one number in base 63, with _0-9a-zA-Z as the digits. MapUtils makes them the same way.

OQNeAcbA0Uh7ftCm_tRbW7wezdb
MapUtils.GenerateMapUid(seed: 1112); // the same UID for the same seed MapUtils.GenerateMapUid(); // a new UID every time

Random UIDs use a random number in place of the CRC32, which needs the whole map.

Inside a map UID

Edit either side. The UID decodes into its UUID and CRC32, and they encode back into the same UID the game would make.

  • 27 characters
  • Version 4 UUID inside, like in UIDs made by the game
MapUtils.TryDecodeMapUid(mapUid, out var uuid, out var crc32)
MapUtils.GenerateMapUid(uuid, crc32)

The game uses a new random UUID, and the CRC32 of the map's data with the map name left empty.

An unhandled error has occurred. Reload 🗙