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

_{f}Or to put it more simply:

**V = mv**_{r} + v_{f}where 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