RimWorld

RimWorld

Realistic Rooms
Norr May 2, 2021 @ 10:06am
How Rimworld calculates 'space in a room'
The amount of 'space' in a room rarely corresponds to the amount of tiles the room has, which might come across as confusing (I know it was to me).

The Rimworld wiki on Space[www.rimworldwiki.com] has the answer though:
Tiles are weighted in the 'space' calculation in the following way (quote from the wiki):
"The equation is: (1.4 x tiles where you can stand) + (0.5 x tiles you can walk through) rounded to the nearest integer."

This means an empty 3x3 room (9 tiles tiles you can stand on) has:
9 x 1.4 = 12.6 ~ 13 Space (vanilla: tight, RR: average).

A 3x3 room with a bed in it (7 tiles tiles you can stand on and 2 tiles you can move over) has:
7 x 1.4 + 2 x 0.5 = 10.8 ~ 11 Space (vanilla: cramped, RR: tight).

A 3x6 room with a royal bed and a large sculpture (one optimal bedroom according to an optimal bedroom guide[rimworldwiki.com]) has:
12 x 1.4 + 5 x 0.5 = 19.3 ~ 19 (vanilla: tight, RR: average).


From a personal standpoint, my own RL room is about 12-13 tiles with a about 5 tiles worth of furniture. This leaves my room at 12 or 14 'space', and I wouldn't describe it as anything close to 'cramped' or 'tight'.
So I think this mod is living up to it's name at least.
< >
Showing 1-3 of 3 comments
Kaedys Jul 10, 2021 @ 6:40pm 
I mean, the issue is larger than that. In addition to the space, this mod only changes how large a room has to be to register as the various labels of spaciousness. The Impressiveness equation is still constrained by the size of the room, and as far as I can tell, this mod doesn't alter that at all. So while installing the mod may take your 35-size room from being "average-sized" to "quite spacious", it won't change your room's impressiveness at all.

Impressiveness takes into account room size in two ways. Firstly, it's one of the 4 factors in the equation to determine the impressiveness of a room, and the lowest of these 4 stats contributes a bit over 50% of the weight to the final score. In addition, even after those calculations, the impressiveness of your room is further constrained simply by the raw size of your room, and if the impressiveness exceeds that threshold, you lose 75% of the impressiveness value over that threshold.

For example, even if you had impressiveness factors from the other 3 stats of 3, after the logarithmic adjustment (which would require a wealth of 11084, a beauty 22.2, and an impossible cleanliness of 15.98), the above 35-tile room's theoretical impressiveness score is 160.6, and then is further reduced, due to the size capping, to only 145.15. If your room was actually 70 tiles in size (the normal minimum for the "quite spacious" label within this mod), your room impressiveness would instead be 174.95, and would be unconstrained by the size (the capping threshold for any room of size 125 or lower is Size * 4).

That alone would be enough to move your room from Extremely Impressive to Unbelievably Impressive.

Any it's worth noting here, the only things in the game which directly use the size of the room are the size minimums for throne rooms and noble bedrooms, and the size thresholds for the "cramped", "confined", and "spacious" pawn thoughts, and as far as I can tell, this mod doesn't alter those thresholds at all.

Literally everything else is based on the Impressiveness of the room, not the size label. Pawns don't care if their bedroom is "average-sized" or "very spacious", they care how impressive a room is. Same for throne rooms, dining rooms, and recreation rooms.

Here's a pair of screenshots I took a while back, one with the mod, one without. The space label of the room went from "cramped" to "rather tight", but the room's impressiveness stat didn't change at all. https://imgur.com/a/HLQ0Z3K

This mod is an illusion. It changes the label but doesn't do squat to the part of room size that actually matters, that being how it interacts with room Impressiveness. I posted about this last year in the suggestions thread, but the mod author apparently ignored it.

Ref: https://rimworldwiki.com/wiki/Room_stats#Impressiveness
Last edited by Kaedys; Jul 10, 2021 @ 6:41pm
SabasNL Jul 24, 2021 @ 7:07am 
Originally posted by Kaedys:
This mod is an illusion. It changes the label but doesn't do squat to the part of room size that actually matters, that being how it interacts with room Impressiveness. I posted about this last year in the suggestions thread, but the mod author apparently ignored it.

The mod isn't an illusion. It changes pawns' mood (de)buffs from any room's Space and Cleanliness stats. As far as I can see you're right that the mod does not change the Impressiveness calculation, which may be an oversight or may be intentional.

Personally I think that if the author would alter the Impressiveness calculation just like they did with the two stat buffs, the mod would be way overpowered as it makes creating a sufficient throne room / ritual room / jealous bed room far, far cheaper. In its current form, it just takes away the exaggerated Space / Cleanliness mood debuffs in vanilla - as promised in the mod description.
Last edited by SabasNL; Jul 24, 2021 @ 7:09am
Kaedys Jul 24, 2021 @ 10:36am 
Originally posted by sabasNL:
The mod isn't an illusion. It changes pawns' mood (de)buffs from any room's Space and Cleanliness stats. As far as I can see you're right that the mod does not change the Impressiveness calculation, which may be an oversight or may be intentional.

Do you have screenshots to back that? All of the testing I did shows that pawns calculate their space based on the actual tile space of the room, not the label for the room. I've yet to find a room size where a pawn gets Confined Interior or Cramped Interior without the mod and does not with, and similarly haven't found a mood size where they fail to get Spacious Interior without the mod and gain it with.

The game determines these moodlets based on the same equation it uses for the "outdoors" Need, which is by counting the number of tiles which are not "impassable" (doors, walls, things that hard-block pathing) within a 7-tile radius within that room. If it's less than 3, they get Confined. If it's 4-10, they get Cramped. If it's 41 or more, they get Spacious.

On the other hand, the space in the room for the tooltip and the Impressiveness calculation is done by the full sum of cells in that room multiplied by 1.4, and then minus 0.5 times the number of cells a pawn can walk through but not stand on (ex. beds, dressers, statues, etc).

So if you have a 4x4 room with a single 2x2 double bed and a 1x1 large statue, the calculation for that would be 1.4*(4*4) - 0.5*(2*2 + 1*1) = 1.4 * 16 + 0.5 * 5 = 19.9. And all this mod does is change how high that number needs to be for any given label. A pawn standing anywhere in this room would have a spaciousness calculation of simply 4*4 = 16, however, meaning they wouldn't get Cramped (<10), but they also wouldn't get Spacious (>41), and their outdoors Need would tend to equalize towards ~16%.

You can see this from the code files. The core game uses a C# worker reference (ThoughtWorker_NeedRoomSize) to check for and apply room size moodlets, but this mod is purely XML patch calls with no assemblies, it cannot alter or override that worker reference or behavior.

Heck, the wiki even calls this out:

The game concepts of "Need for Space" and "Space in a room" are easily confused. It's possible for a pawn to have the "Cramped interior" Thought while standing in the wrong part of an "extremely spacious" room (like the end of an 8x1 hallway). Likewise, a pawn can think "Spacious interior" and get 100% Space satisfaction from standing in a merely "average-sized" room.

Again, if you have screenshots to demonstrate otherwise, I'd love to see them so I can try to replicate it.

----

On the Cleanliness side, this mod does make concrete changes there, but all it does is reduce the Beauty penalty from -15 to -4 for dirt spots. That does have concrete effect, both on a room's stats (Cleanliness isn't affected, but Beauty is a factor in Impressiveness as well, in addition to being a direct pawn Need) and on pawn Needs. But in a clean room, the influence in the Impressiveness is null, and frankly, there are plenty of other (smaller) mods that help on cleaning (Doormats and Misc Robots come to mind). It is worth noting that this mod does nothing about the Cleanliness stat itself (dirt spots are still -5 on cleanliness), and that stat is 99% of the time the lowest room stat (51.25% weight) for a room's Impressiveness, due to not really easily being able to get it above 0.0.

Note, however, that those 3 moodlets above, Confined/Cramped/Spacious Interior, are the only ones that are directly based on any room stat except Impressiveness. And that is what I call this mod an illusion. It alters the label for room size in the tooltip, but that label doesn't do anything. No moodlets are based on that label (but in fact, the actual size of the room), and this mod doesn't alter Impressiveness at all, nor how it is calculated, which is the one that does influence mood.

All it does is override the stat definition, and that's only used for the tooltip for the room.

It's also worth noting that it does this in a really questionable way, as instead of patching the definitions, it just straight re-defines them, which is really bad for playing nicely with other mods (not that other mods have much reason to be mucking with these stat definitions, since as above, they don't do anything, aside from Impressiveness).

Seriously, all this mod does is improve the effect that dirt has on surrounding beauty, and change the word in the room tooltip. Your room may say it's "spacious", but it's still applying all of the same gameplay impact as an Average-sized room as far as pawn mood goes, excepting the tiny impact from the dirt beauty change.

And that's important, because room size is unique amongst the 5 stats that go into Impressiveness. It isn't just a factor, it's then applied as a post-calculation softcap as well, making it nearly impossible to make a high Impressiveness room that's also small. The room's lowest stat (which in this context is actually probably going to be Cleanliness, but this mod doesn't actually influence that stat, it only alters the Beauty penalty of dirt) is given 51.25% weight, and then if the room's Impressiveness is more than 5*RoomSize (again, actual cell calculation, not label!), 75% of the Impressiveness above that level is discarded.

It's an illusion. If you think otherwise, show me screenshots of a room that has different Impressiveness values with and without the mod (and make sure you keep the game paused when you load back in for the second screenshot, to avoid additional dirt from being placed by pawns moving around). Or for that matter, pawns with different moodlets from a room with and without the mod.

See the wiki pages for details on the calculations:
https://rimworldwiki.com/wiki/Space
https://rimworldwiki.com/wiki/Room_stats#Impressiveness

I've already provided screenshots above showing a room going from "cramped" to "rather tight" and the Impressiveness score doesn't budge at all.

Personally I think that if the author would alter the Impressiveness calculation just like they did with the two stat buffs, the mod would be way overpowered as it makes creating a sufficient throne room / ritual room / jealous bed room far, far cheaper. In its current form, it just takes away the exaggerated Space / Cleanliness mood debuffs in vanilla - as promised in the mod description.

I mean, altering that calculation would require them to implement a C# Harmony patch, which is quite a bit more than this mod does right now. This mod is just XML patching, and XML patching cannot influence the equation for Impressiveness.

Edit: I want to be clear here, if you want to keep using the mod, go for it. If it makes you feel better to see "Spacious" instead of "Average" or "Rather Tight", more power too you. Just don't think it's actually having any gameplay impact. That is the part that's an illusion (again, excepting the tiny impact of the dirt Beauty penalty patch).
Last edited by Kaedys; Jul 24, 2021 @ 10:39am
< >
Showing 1-3 of 3 comments
Per page: 1530 50