Ludeon Forums

RimWorld => General Discussion => Topic started by: kaptain_kavern on August 16, 2016, 01:19:51 PM

Title: [Technical Info] On how Impressiveness of a room is calculated
Post by: kaptain_kavern on August 16, 2016, 01:19:51 PM
Hi all , I don't know if this kind of thing may appeal to all, but i guess some will like this kind of data. Sorry it's a reddit link but all is wrote there.

https://www.reddit.com/r/RimWorld/comments/4xot2t/psa_depending_on_the_wealth_space_and_beauty_of_a/

In fact I will try to put it there

public class RoomStatWorker_Impressiveness : RoomStatWorker
    {
        //
        // Methods
        //
        private float GetFactor (float baseFactor)
        {
            if (Mathf.Abs (baseFactor) < 1f) {
                return baseFactor;
            }
            if (baseFactor > 0f) {
                return 1f + Mathf.Log (baseFactor);
            }
            return -1f - Mathf.Log (-baseFactor);
        }

        public override float GetScore (Room room)
        {
            float factor = this.GetFactor (room.GetStat (RoomStatDefOf.Wealth) / 3500f);
            float factor2 = this.GetFactor (room.GetStat (RoomStatDefOf.Beauty) / 6f);
            float factor3 = this.GetFactor (room.GetStat (RoomStatDefOf.Space) / 125f);
            float factor4 = this.GetFactor (1f + room.GetStat (RoomStatDefOf.Cleanliness) / 2.5f);
            float num = Mathf.Min (factor, Mathf.Min (factor2, Mathf.Min (factor3, factor4)));
            float num2 = (factor + factor2 + factor3 + factor4) / 4f;
            num2 = (num2 + num) / 2f;
            return num2 * 100f;
        }
    }


So if I understood it right :

You start from this :

For

WealthBeautySpaceCleanliness
40
0
70
0

I find roughly 33.75 which correspond to mediocre.

Confirmed IG by Mehni (https://i.imgur.com/ETPxLkh.jpg)




I also  have the Chance of Surgery success computation method but is it the kind of information that you all consider useful? If not sorry ;-)
If yes I'm sure we can dig some more, asking to fellow modders, etc.



Plus I saw that my colleague-data-addict-from-reddit, Mehni  (https://ludeon.com/forums/index.php?action=profile;u=60718) is now on this forum. Hi buddy