{"record":{"id":"2ec959d79b5f4a11","repo":"OpenRA/OpenRA","slug":"map-format-format-is-not-supported","errorCode":null,"errorMessage":"Map format {format} is not supported.","messagePattern":"Map format (.+?) is not supported\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"error","filePath":"OpenRA.Game/Map/MapPreview.cs","lineNumber":384,"sourceCode":"\n\t\t\tDictionary<string, MiniYaml> yaml;\n\t\t\tusing (var yamlStream = p.GetStream(\"map.yaml\"))\n\t\t\t{\n\t\t\t\tif (yamlStream == null)\n\t\t\t\t\tthrow new FileNotFoundException(\"Required file map.yaml not present in this map\");\n\n\t\t\t\tyaml = new MiniYaml(null, MiniYaml.FromStream(yamlStream, $\"{p.Name}:map.yaml\", stringPool: cache.StringPool)).ToDictionary();\n\t\t\t}\n\n\t\t\tvar newData = innerData.Clone();\n\t\t\tnewData.Class = classification;\n\t\t\tnewData.GridType = gridType ?? modData.GetOrCreate<MapGrid>().Type;\n\n\t\t\tif (yaml.TryGetValue(\"MapFormat\", out var temp))\n\t\t\t{\n\t\t\t\tvar format = FieldLoader.GetValue<int>(\"MapFormat\", temp.Value);\n\t\t\t\tif (format < Map.SupportedMapFormat)\n\t\t\t\t\tthrow new InvalidDataException($\"Map format {format} is not supported.\");\n\t\t\t}\n\n\t\t\tif (yaml.TryGetValue(\"Title\", out temp))\n\t\t\t\tnewData.Title = temp.Value;\n\n\t\t\tif (yaml.TryGetValue(\"Categories\", out temp))\n\t\t\t\tnewData.Categories = FieldLoader.GetValue<ImmutableArray<string>>(\"Categories\", temp.Value);\n\n\t\t\tif (yaml.TryGetValue(\"Tileset\", out temp))\n\t\t\t\tnewData.TileSet = temp.Value;\n\n\t\t\tif (yaml.TryGetValue(\"Author\", out temp))\n\t\t\t\tnewData.Author = temp.Value;\n\n\t\t\tif (yaml.TryGetValue(\"Bounds\", out temp))\n\t\t\t\tnewData.Bounds = FieldLoader.GetValue<Rectangle>(\"Bounds\", temp.Value);\n\n\t\t\tif (yaml.TryGetValue(\"Visibility\", out temp))","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/OpenRA/OpenRA/blob/a520984d91eda9de48a62b1d15c1e3bad0d4fb1a/OpenRA.Game/Map/MapPreview.cs#L366-L402","documentation":"While building a preview, UpdateFromMap reads MapFormat from yaml and rejects maps below Map.SupportedMapFormat (11). Previews of legacy maps are not supported by the current engine.","triggerScenarios":"MapPreview.UpdateFromMap: yaml has MapFormat and format < Map.SupportedMapFormat.","commonSituations":"A legacy map (format < 11) sitting in the maps folder; previewing a map authored before a format bump.","solutions":["Migrate the map forward by re-saving in a compatible older release, then current.","Remove the legacy map from the scanned folder.","Filter the preview list to maps whose format is current."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (yaml.TryGetValue(\"MapFormat\", out var temp) &&\n    FieldLoader.GetValue<int>(\"MapFormat\", temp.Value) < Map.SupportedMapFormat)\n    return; // skip legacy map in preview","typeGuard":null,"tryCatchPattern":"try { preview.UpdateFromMap(p, classification); }\ncatch (InvalidDataException e) when (e.Message.Contains(\"is not supported\"))\n{ /* skip legacy map */ }","preventionTips":["Migrate legacy maps forward before they reach the preview list.","Filter previews to current-format maps.","Re-author old maps in the current version."],"tags":["map","preview","version","map-format"],"backgroundTag":null,"analyzedSha":"a520984d91eda9de48a62b1d15c1e3bad0d4fb1a","analyzedAt":"2026-08-13T15:30:14.787Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}