Jump to content

No Drying


Recommended Posts

The relevant code from moisture.lua is this:

local rate = self.baseDryingRate
    + easing.linear(heaterPower, self.minPlayerTempDrying, self:GetSegs() < 3 and 2 or 5, 1)
    + easing.linear(TheWorld.state.temperature, self.minDryingRate, self.maxDryingRate, self.optimalDryingTemp)
    + easing.inExpo(self:GetMoisture(), 0, 1, self.maxmoisture)

return math.clamp(rate, 0, self.maxDryingRate + self.maxPlayerTempDrying)

So, yes. This is a large part of the answer.

inst.components.moisture.baseDryingRate = 0

What the code also tells you, is that the player dries not only from baseDryingRate and heaters around them, but also from the world temperature, which would be a constant decrease in wetness when the rain stops. You can lower the impact of the world temperature by changing maxDryingRate. Try setting that to 0, as well (default value is 0.1). There is a separate variable, maxPlayerTempDrying, which controls how much the player can be warmed up by heaters (default value 5). It might be interesting for your character to not be heated up by the world, but get heated up quicker/more by heaters. Just an example, really.

Edited by Ultroman
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
 Share

×
×
  • Create New...