icantevenname Posted October 22, 2019 Share Posted October 22, 2019 Is it possible to have a player character dry off slower? Link to comment https://forums.kleientertainment.com/forums/topic/112905-retaining-water/ Share on other sites More sharing options...
Jessie_ Posted October 23, 2019 Share Posted October 23, 2019 take a look at GetDryingRate at line 231 of data/scripts/components/moisture.lua: function Moisture:GetDryingRate(moisturerate) -- Don't dry if it's raining if (moisturerate or self:GetMoistureRate()) > 0 then return 0 end local heaterPower = self.inst.components.temperature ~= nil and math.clamp(self.inst.components.temperature.externalheaterpower, 0, 1) or 0 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) end there seems to be a variety of ways to affect the drying rate, like you could override this function to lower its return value for example Link to comment https://forums.kleientertainment.com/forums/topic/112905-retaining-water/#findComment-1274933 Share on other sites More sharing options...
icantevenname Posted October 23, 2019 Author Share Posted October 23, 2019 9 minutes ago, Jessie223 said: take a look at GetDryingRate at line 231 of data/scripts/components/moisture.lua: function Moisture:GetDryingRate(moisturerate) -- Don't dry if it's raining if (moisturerate or self:GetMoistureRate()) > 0 then return 0 end local heaterPower = self.inst.components.temperature ~= nil and math.clamp(self.inst.components.temperature.externalheaterpower, 0, 1) or 0 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) end there seems to be a variety of ways to affect the drying rate, like you could override this function to lower its return value for example I'll fiddle around with this stuff until I run out ideas. This isn't that big of a priority to be honest, but thanks for the info anyway. Link to comment https://forums.kleientertainment.com/forums/topic/112905-retaining-water/#findComment-1274935 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