So I just recently discovered something interesting about how room value is calculated -- specifically, how openings in the walls affect it. Here's the math. Please note that I'm only confident about this for rectangular rooms -- I haven't tested it out for other shapes.
Let v
r be the value of the room itself, including the the value of the building used to designate it, and the value of the walls and floor (including material modifiers, smoothing/engraving, etc. -- see
Kipi's excellent work for how to calculate this).
Let v
f be the value of any additional furniture installed in the room (not including the item used to designate the room in the first place).
Let n
b be the number of border tiles the room has.
Let n
e be the number of those border tiles that are "empty" -- i.e., not occupied by a wall or door. (Note: I'm not totally confident that doors count as non-empty, but I think they do).
Let V be the total computed value of the room.
Then:V = (8 - ceiling(4*n
e/n
b))*v
r/8 + v
fOr to put it more simply:
V = mvr + vfwhere m is given by the following:
No gaps | m = 1 |
Up to a quarter of the border is gaps | m = 7/8 |
Up to half of the border is gaps | m = 3/4 |
Up to three quarters of the border is gaps | m = 5/8 |
More than three quarters of the border is gaps | m = 1/2 |
I have not tested to see what effect overlapping rooms have on this, nor am I certain whether doors count as part of v
r or part of v
f.
Edited for readability