I can only tell you how I write masks.
I have bmp file with my adventure map objects. I open Def maker, load this bmp in it and click reposition tab.
So you can see 20 square parts in four rows. Each row has 5 squares.
And you have three mask parameters.
V - visible, transparent square
B - blocked square (red in map editor)
A - visitable by hero square (yellow in map editor)
So first square in first row is visible - V
second square - visible - V
fifth square - visible - V
Mask for first row is then: VVVVV
first square - V
second square - blocked/red - B (or V, you must decide and then test proper visibility in game)
third square - B
fourth square - B (or V, reason as above)
fifth square - V
So mask for second row is: VBBBV
analogically mask for third row should be: VABBV
a fourth row: VVVVV
so your code is:
As you see, it’s no simple way to obtain masks, you must make them patienty. I think maybe someday someone write handy tool for easy mask design like Object Editor Tool for ERA platform.
But, if you open SoD map editor and place SoD dwelings on the ground, you can easily “read” all visible, red and yellow squares and easily write proper masks by yourself.