Base Value Calculations

Started by DariusWolfe, June 17, 2017, 01:26:27 PM

Previous topic - Next topic

DariusWolfe

Hey all, Back with another question; One I won't be able to test for myself within the next few hours, considering I spent several hours fucking with it last night.

When I play a game with some complexity, I eventually get to a point where I break out the spreadsheets. It's just a thing I do. Rimworld has taken me longer than most, but last night I finally pulled together a spreadsheet to calculate stats for articles of clothing based on material and quality. Unfortunately I ran into a reinforced granite wall when it came to Base Value, and here I am without grenades.

The problem isn't entirely that the equations aren't clear, though that's part of it; It's that every possible combination of numbers I've tried fail to consistently reach the correct numbers. I tried different combinations of material costs, work-to-make, material values, and never found any sort of consistent formula.

One pattern I managed to find is that cloth clothing at normal quality and full health (more on health later) has a base value that is 10% of the material cost less in dollars than the displayed cost from the workbench. So for instance, pants. Pants require 50 materials, and the base value shown in the workbench is $121; The value of normal cloth pants is $116 (10% of 50 = 5; 121-5=116). This is consistent across at least 3-4 articles of clothing I tested. Quality differentiation also creates predictable values for cloth clothing.

I still don't know how either of those values are reached ($121 or $116), and the UI suggests that this number is calculated based on material and work; If this was consistent, I could run with it, even if I can't understand the basis.

But shit gets weird when you start using other materials. I had a bunch of deerskin articles, so that's where a lot of my other testing went; The fact that most of my deerskin articles were in use, and therefore at less than full health, and different qualities ended up with some weird numbers with lots of decimals. Possibly they were correct, but the best way to test would have been to get a selection of deerskin clothing in full health, so I could eliminate one of the factors; Trying to use the devtools wasn't especially helpful, because while I spawned a dozen pairs of pants, none of them were deerskin. (ideally, I'd want deerskin normal) Still, some very rough calculations had deerskin coming in at 10% of material costs over the base value displayed in the workbench.

The problem with this kind of approach is that +.10(materials) doesn't jive with either the relative costs of the materials (cloth 1.9, deerskin 3.1) or the 130% value modifier specified in the UI for deerskin.

I even went into the defs looking for some hint to how the calculations happened, but neither the clothing nor the materials had any reference to value at all.

Edit: The health calculations are also obscured, and really strange. The value modifier isn't linear, and seems to vary from one article of clothing to the next (though quality may have something to do with that?) The only consistency I can find is that the modifier is always higher than the percentage, and an oddly coincidental number of times (but less than 100% of the time), the final value of the clothing has a decimal component that matches the quality multiplier. (so 87% modifier from health often results with a final value of $X.87)

So what's the TL;DR of this? If someone can give me a consistent formula, either because they're smarter than I am and figured it out, or know where to dig around in the code and source files to find it, I'd greatly appreciate it. I may literally not be able to continue playing this game because of how obsessed I've become at figuring this out. I normally pride myself on finding the answers myself, but at this point, I just want to know how it works.

DariusWolfe

Seriously, no one has any insight on this? I'm bumping this once, hoping maybe someone technically minded will see it, then I guess I'll just let it die here.

Maybe I'll ask again on Reddit.

BetaSpectre

Generally speaking I just look at the item price listing inside the info button.
Wasn't there a total colony wealth number somewhere? I do recall it existing.
░░░░░░░░░░░░░░░░░─╤▌██ |
░░░░░░░░─╤▂▃▃▄▄▄███████▄▃|
▂█▃▃▅▅███/█████\█[<BSS>█\███▅▅▅▃▂
◥████████████████████████████████◤
                           TO WAR WE GO