Automatic house-builder
Python 2, 128 bytes

w,h,d=input();i=d
while-i&lt;h:c='|/'[i&gt;0];print' '*i+c+'- _'[(d&gt;i!=0)+(h+i&lt;2)]*(w-2)+c+' '*min(d-i,h-1,w+1,h-1+i)+'/|'[d-i&lt;h];i-=1

Prints row by row. The row indices i count down from d to -h+1.