LordNiggle Posted December 1, 2019 Share Posted December 1, 2019 How would i make a character never dry naturally? (Still able to gain wetness and dry off from means other than the natural drying rate) Link to comment Share on other sites More sharing options...
Mr. Tiddles Posted December 1, 2019 Share Posted December 1, 2019 (edited) inst.components.moisture.baseDryingRate = 0 may work EDIT: Tested. It did not seem to work Edited December 1, 2019 by Mr. Tiddles Link to comment Share on other sites More sharing options...
Ultroman Posted December 6, 2019 Share Posted December 6, 2019 (edited) 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 December 6, 2019 by Ultroman Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now