How it works:
First, "The number placed in the Building category will be divided between the other five categories" (d20, 1-10: Residence, 11-12: Religious, 13-15: Tavern, 16-17: Warehouse, 18-20: Shop)
Next, it adds for each category the number in the Residence/Religion/Tavern/Warehouse/Shop...