Having trouble with adding my own map special

I just started programming my own custom buildings from scratch for a mod i’m making however i’m having trouble getting the game to recognize them in the overmap.
The coding for my custom building is pretty simple consisting of only one z level and only a few pieces of terrain and 1 furniture so I don’t see what I could be possibly missing.

   {
    "type": "mapgen",
    "method": "json",
    "om_terrain": [["exposed_road"]],
    "object": {
	"fill_ter": "t_pavement",
      "rows": [
        "........................",
        ".......o................",
        "........................",
        "...........p|p..........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pp|pp..o......",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp..o......",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pppp...o......",
        "............p...........",
        "........................"
      ],
	  "place_vehicles": [
       { "vehicle": "motorcycle", "x": 10, "y": 30, "chance": 15, "rotation": 180 },
	   { "vehicle": "car", "x": 15, "y": 30, "chance": 50, "rotation": 180 }
	   ],
      "terrain": { ".": "t_sand" ,
	   "|": "t_pavement_y",
	   "p": "t_pavement" },
      "furniture": { "o": "f_street_light" }
  }
  },
    {
    "type": "mapgen",
    "method": "json",
    "om_terrain": [["start_road"]],
    "object": {
	"fill_ter": "t_pavement",
      "rows": [
        "........................",
        ".......o................",
        "........................",
        "...........p|p..........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pp|pp..o......",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp..o......",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        "..........pp|pp.........",
        ".......o..pppp...o......",
        "............p...........",
        "........................"
      ],
	  "place_vehicles": [
       { "vehicle": "motorcycle", "x": 15, "y": 15, "chance": 100, "rotation": 180 }
	   ],
      "terrain": { ".": "t_sand" ,
	   "|": "t_pavement_y",
	   "p": "t_pavement" },
      "furniture": { "o": "f_street_light" }
  }
  }
]```

this seems to be acceptable for the game since when I add it in it says "nothing is using “exposed_road”!
however the game contradicts itself when I add the game in an overmap file and says

DEBUG    : invalid overmap terrain id "exposed_road_north"

 FUNCTION : const T& generic_factory<T>::obj(const string_id<T>&) const [with T = oter_t]
 FILE     : src/generic_factory.h
 LINE     : 445
 VERSION  : f45fb00

when I have only put an equally simple and uncomplicated overmap coding like so

 {
    "id": "exposed road",
    "type": "overmap_special",
    "locations": [ "land" ],
    "overmaps": [
      { "point": [ 1, 1, 1 ], "overmap": "exposed_road_north" }],
"occurrences": [ 0, 1 ]
},
{
    "id": "starter road",
    "type": "overmap_special",
    "locations": [ "land" ],
    "overmaps": [
      { "point": [ 1, 1, 1 ], "overmap": "exposed_road_north" }],
"occurrences": [ 0, 1 ]
}
]

Am i missing anything here? Why is this causing such a problem?

1 Like