ATTENTION!This research has been on hiatus since 20th of November due personal reasons. The current plan is to continue this in few weeks (during February). I have also released the first, unpolished and incomplete, version of the research in
DFFD as PDF file. There are currently things in the file that hasn't been mentioned in this thread, I hope I'm able to update this thread in near future.
Some time ago I had a problem when I tried to make a proper rooms for my monarch. I didn't have too much spare metals and I wanted to know which materials should be enough to make the rooms to Royal without wasting any valuable materials for nothing. I tried to search but nothing came up, at least nothing specific enough, only theories and myths. And thus I decided to conduct a research of my own to actually figure out all the variables and calculations used.
Around the same time I also decided to start a blog about dwarf fortress. Now, it has been some time since that happened and I decided that the first entry of the blog will talk about this research. Unfortunately the research has become quite big and it's not yet finished, but I decided that it would be a good time to publish the first part of the results. And, since I think that there are other players who are interesting to find this out, I decided to make a thread here in forums as well.
When I have finished the research I will publish a document I'm writing about it, which is already getting quite long (35 pages so far). In the meantime I will keep updating this thread and the blog of the current progress of the research.
The blog in question can be found
here.
If you want more details about the research I suggest that you read the blog post I have written as well as all the upcoming updates. In this thread I will mostly compile the data. Of course, suggestions are always accepted. Every detail will be tested and included to the final report, with the description of the testing methods, my own thoughts of the results and random ramblings I just ended up writing.
TerminologyIn this research I use the following terminology in calculations:
- V = Generic value. Depends on the situation what it describes.
- MV = Material value. Usually used in context of tile material, though in case of items also the material item was made. Defined in raws.
- FV = Furniture value. The total combination of the value of every pieces of furniture.
- RS = Room size. The amount of tiles the room contains. Includes every tile, even the ones at the edge.
- QM = Quality modifier. If something has a quality, QM is used.
- IV = Item value. The value determined by item type in case of furniture. In case of smoothing and engraving IV is given separately.
- BV = Basic value. The combined value of rough tiles and FV. Mostly used in tables only.
- Q = Room quality. Used in tables only.
- S = Value of smoothing. This value describes the additional value the smoothing tasks causes.
- SV = Smoothing value. The total value of tile that has been smoothed. Don't confuse with S!
- EV = Value of engraving.
- TP = Type modifier. The value depends on the context where it's used.
- GR = Gap Reduction. A value that is reduced from room value if all the edge tiles aren't walls.
ResultsSince there will be lots of information written in this section I will put everything in spoilers. Next to the title is also the current situation of the given part.
Room Tiles - Partially DoneThe general rule of thumb is that the value of each tile is counted to room value. This tile value is the same as MV of the material. So, if room is made from only one material the value is RS*MV.
I have also figured out that, if the room is not completely circled by walls (every tile in the edge of the room aren't walls), the above formula is not true. Gaps do lower the value of the room. I'm currently trying to figure this out and thus I have used the completely sealed room with access through stairs.
Furniture - Partially DoneSo far I have been able to figure out that the number of furniture doesn't affect the FV. This means that each furniture added inside the room adds the value of the furniture to the total value of the room. This has been confirmed to happen with beds, tables and chairs. I also believe that same applies to armor stands, weapon racks, coffers and so on. This gives us the basic formula of BV=RS*MV+FV.
What I need to figure out is the case of doors and windows, and generally anything that has been placed in one of the edge tiles. But before I can test these out I need to figure out the effects of gaps in general. I'm also planning to test out the statues, especially how they affect the value of smoothing/engraving under them.
Smoothing - FinishedThe formula of smoothing is following: SV=MV+S => SV=MV+MV*IV*TP.
In smoothing IV=4 if the tile is wall and IV=3 if the tile is floor. TP is determined by the type of the material; if the type is layer (layer stone or soil) TP=1, otherwise TP=2.
The wealth of the fortress is increased by IV*TP for each smoothed tile. This means that MV has no effect to the wealth.
Engraving - FinishedEngraving is calculated by EV=10*QM*MV. The wealth is increased by 10*QM only, so again MV has no effect to the wealth.
When the data of smoothing and engraving is combined we get the value of tile, which is determined by V=SV+EV => V=MV+MV*IV*TP+10*QM*MV. This means that both engraving and smoothing affect the end value in case the tile has been engraved.
There are two interesting facts about engraving:
- The direction of engraving does affect the result. If the engraving task is completed from outside the room, only the smoothing is counted to room value and EV will be left out.
- The behavior of material value is a bit strange since there is one special case where the correct MV is not used.
So, how does the exception in MV works? There are few things that must happen for the exception to take place:
- The engraved tile must be wall.
- There must be more than one material used in tiles.
- The material of the engraved tile must be the least common in the room. If there are more tiles of all the other materials than the one engraved (in example, A>B and the material is B) then the MV of most common material is used. So, if the room has materials A, B and C and the engraving is done to material C, we get the following rules:
If A>B>C then MV of A is used. If A>C>B then MV of C is used. If A>B=C then MV of C is used. If A=B=C then again MV of C is used.
Since this error doesn't occur with floors and the wrong MV is used only in the EV=10*QM*MV part, I'm suspecting this to be a bug. Especially since the case when this happens is very limited, only one material of all materials in the room behaves this way and only if it has less number of tiles than any other material.
Gaps in the wall - Partially doneIf a room is not completely surrounded by walls, in other words even one of the edge tiles is floor, the room value is reduced in quality calculations. This reduction is described by GR. This value is determined by several different factors; target quality, number of furniture and so on.
One piece of furnitureIf the room has only one piece of furniture then the furniture doesn't play any role in GR. What does matter is the target quality of the room, the values of GR are listed below:
- Modest: 15
- Norlam: 36
- Decent: 72
- Fine: 143
- Great: 215
- Grand: 358
- Royal: 1429
I have also been able to confirm the following things regarding the case of one piece of furniture:
- The value of furniture used to create the room doesn't affect GR.
- Room size doesn't affect GR.
- Room quality affects GR.
- Number of floors and walls doesn't affect GR (hard number nor rations).
- Distance between the gap and furniture doesn't affect GR.
- Relative position of furniture and gap doesn't affect GR.
Room overlapping - Under workWorkshops - Under workSpecial features - Under work"Interesting" factsThese facts are listed here just for fun and may or may not be accurate. I think these also describe the size of this project quite well.
Number of MS Excel sheets used: 16
Time
wasted spent: Over 150 hours
Number of A4 paper sheets filled: 20
Amount of rooms created: 1500+
Amount of worlds generated: 17
Total number of times I used the "Die" feature of DFHack: Too many, careful estimation is around 100-200 per day.
Amount of tantrum spirals: 2
Size of final report (WIP): 37 pages
My sanity level: 33%