Wanted to have an easy way to fit magnets into the grid of Dungeon Blocks.
I then found a script by SANSd20 which could make a grid of any size and modified the script to include magnet holes.
The models I have provided are for 8mm (Ø) x 3mm deep magnets (with some tolerance added), but if you want your own magnets you can edit the script parameters at the top. Just note that magnet cylinder size is defined as radius so you just have to divide your magnets diameter by 2.
Currently the script only generates magnet holes at the corners, so if you enter a 5x5 grid size it will still only put the magnet holes at the corners and not in the middle. I have plans to make it support other magnet configurations, but for now it only makes holes on the edges.
You can edit the script directly in your browser with https://openscad.org/ and the file
The author remixed this model.
The new script adds auto magnet holes in the corners which are adjustable