If you want the eight sides that are the same length (as opposed to the same number of pieces of wall) you have to remember that the diagonal walls are longer than the straight ones, and the maths on it is pretty simple, it's just Pythagoras's theorem (the square on the hypotenuse etc... that one) basically the diagonal walls are the length of the straight ones multiplied by the square root of two, working out how to get a given size is trickier, if I've rearranged my equations correctly you need to multiply the desired size by root 2 and then divide it by root 2 plus 2 to get the number of wall sections on a straight side and then divide that number by root 2 to get the number of wall sections on a diagonal side. So for a target size of twenty squares the closest whole numbers turn out to be 8 pieces of wall on the straight sides and 6 on the diagonal sides.
Alternatively you could do what I normally do and place an octagonal roof directly on the floor where I want my house to be and count.
Also thank you Joria, glad you liked them.