Sign in to follow this  

Fire does not dry wet, if raining

  • Pending

I'm not sure if it is intended or not, but it seems as long as it is raining, or at least as long as GetMoistureRate is returning a value >0, the character is not able to dry at a fire.
If I set the value to 0, the character dries very very fast at a fire. But if the value is 0.001 (can be up to 1, so 0.001 is very less), I'm getting wet and do not dry.

I think this is a bug, isn't it?
The fire should decrease the wetness, depending on the size of fire. And if this drying rate is bigger than the moisturerate, my char should dry.

Steps to Reproduce
start game and use TheWorld:PushEvent("ms_forceprecipitation") console command to make it rain. Also use something to get and change the MoistureRate of your character (I did it via a mod). even if the MoistureRate is very small, it makes absolutey no difference if you stand next to a fire or not. As soon as the MoistureRate is 0, the fire will dry you nearly instantly.
Sign in to follow this  

User Feedback

Ok, I found the following in components moisture.lua

function Moisture:GetDryingRate(moisturerate)
    -- Don't dry if it's raining
    if (moisturerate or self:GetMoistureRate()) > 0 then
        return 0

But I think this is a wrong decision.
If we have a big fire (~fuel higher than 80% or whatever we can use to determine size of fire), it should provide drying ~0.1. So if the MoistureRate is less than 0.1, the char should dry slowly if near to fire.

Or can you explain why this should not be possible?

Share this comment

Link to comment
Share on other sites

I made now a mod, here some code to show you how I imagine it should look like ~:

AddComponentPostInit("moisture", function(self)
    local _GetMoistureRate = self.GetMoistureRate -- max is 0.75
    self.GetMoistureRate = function(self)
        if _GetMoistureRate(self)>0 then -- only check it, if object is getting wet
            if GetModConfigData("improved drying") then
                local heaterPower = self.inst.components.temperature ~= nil and self.inst.components.temperature.externalheaterpower or 0 
                local rate = self.baseDryingRate -- normally 0
                    + heaterPower -- 0 to 150 ? -- at least 115 near a big firepit fire
                    + GLOBAL.TheWorld.state.temperature -- -90 to 90 ? 
                    - self:GetMoisture()/2 -- 0 to 50
                local dryrate = math.clamp(rate, 0, 200) -- between 0 and 200
                dryrate = dryrate / 2000 -- between 0 and .1
                return math.clamp(_GetMoistureRate(self)-dryrate,0,_GetMoistureRate(self))
        return _GetMoistureRate(self)

so the MoistureRate is now reduced up to an absolute value of 0.1 if near really hot things.
The Drying process itself is not changed, but if MoistureRate reaches 0 that way, of course drying will start.

Share this comment

Link to comment
Share on other sites

I would have assumed that this is because it's raining, and Klei doesn't want you to get dry while it is raining.

...which is how it works in real life.  Standing next to a fire is not going to dry your clothes while it is still raining.

Share this comment

Link to comment
Share on other sites

that's why I only reduced it by a value up to ~ 0.06 ;) If it rains just a little bit, you can dry near a fire.

But I think it is okay, if they leave it as it is. But I still would like to know how to mod the wetness if items and structures =/

  • Like 1

Share this comment

Link to comment
Share on other sites

so since this is not a bug, I think you can close it.

But use this as a suggestion ;)
In my relaesed mod heat is able to delay wetness:
- The Moisture Rate of players is decreased by an small absolute value depending on the heat.
- Items and structures does not all get wet as soon as World wetness is over 35. Instead if they are near heat, the value of 35 is slightly increased, so they take a bit longer to get wet.
- Items do dry faster / get wet slower if near heat.


since this is my first work, it might be coded poorly, but you can do better of course.

Edited by Serpens

Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now