You edit the json text with a text editor.
take a look at data/json/mapgen/fire_station.json - I chose it because fire stations are fairly memorable within the game.
At the top, there’s a definition of the fireman_doc item_group, a collection of books that might be in the fire station.
Immediately after that is the GROUP_FIRE monstergroup, which mostly consists of sets of 3-5 fireman zombies, but sometimes has normal zombies in it.
Then there’s the actual firehouse terrain, followed by place_items and place_monsters blocks. place_ syntax is a little opaque to me, but there’s an 80% chance of having items from the bed item_group on each square of the beds, a 70% chance of items from the novels item_group on the counter between the beds, etc. There’s also (I think) a 1% chance of a GROUP_FIRE spawning on each tile between x2:y9 and x21:y21, so basically the vehicle bay.
Finally, there’s a 30% chance of a single fire engine spawning in the vehicle bay, aligned as though it had pulled into the bay.
Adding monsters to a monstergroup should be easy:
use the copy-from to make a copy of the monstergroup, then extends the monsters field:
{
"name": "GROUP_FIRE",
"type": "monstergroup",
"copy-from": "GROUP_FIRE",
"extend": {
"monsters": [
{ "monster": "mon_zombie_blazer", "freq": 10, "cost_multiplier": 5 }
]
}
}
Similar syntax for an item_group.
The weird symbols in the mapgen rows list are the symbols that make up the map, and are decoded in the terrain dictionary beneath it. For instance, the ‘M’ symbol represents the t_door_metal_locked terrain, and you can see the metal door to the interior of the station and the two metal garage doors in the rows list.