lieutenantCherr Posted August 11, 2019 Share Posted August 11, 2019 Well,i give up,gonna seek help here. Nothing that i found on forums helped. I have 2 problems 1. trying to make my character resistant to heat but not vurneable to freezing inst.components.temperature.inherentsummerinsulation = 90 inst.components.temperature.inherentinsulation = 0 seems to do nothing,overheats like all other characters2. Custom speech doesn't work RABBITHOUSE = { GENERIC = "I wish that was a real carrot", Instead she says ,,this is not a real carrot" which is wilsons line Its prolly just some dumb rookie mistake but oh well modmain.lua cherry.lua speech_cherry.lua Link to comment Share on other sites More sharing options...
lieutenantCherr Posted August 11, 2019 Author Share Posted August 11, 2019 Changing the .cherry in modmain to uppercase fixed that problem,woohoo STRINGS.CHARACTERS.cherry = require "speech_cherry" But i still haven't fixed the insulation problem Link to comment Share on other sites More sharing options...
Ultroman Posted August 11, 2019 Share Posted August 11, 2019 (edited) Woodie's insulation is set to 240. For some reason, the insulation time is set by "time in a segment of a day". A day segment is 30 time-units (which I'm guessing is seconds), and Woodie's insulation is set to 8 times that (there are normally 16 segments in a day). My GUESS is he takes 8 more day segments to go from 0 degrees to overheat temperature...or something? Pure speculation. Whatever the case, 80 or 120, as you have tried, is not a massive change. Try a higher value. You're saying you want your character to be more resistant to heat, which is exactly what this variable does, but it won't make the character immune to overheating. It'll still happen, just slower. Edited August 11, 2019 by Ultroman Link to comment Share on other sites More sharing options...
lieutenantCherr Posted August 11, 2019 Author Share Posted August 11, 2019 Yeah i know,i want resistance not immunity. inst.components.temperature.inherentsummerinsulation = 1200 1200 doesn't change anything either. Does it matter how i test it? So far i've been doing it by standing next to fully fueled pitfire Link to comment Share on other sites More sharing options...
Ultroman Posted August 11, 2019 Share Posted August 11, 2019 (edited) Take a look at the code for applying insulation effects in the temperature.lua file. self.delta (the change to be applied) has already been calculated, and this code (below) is now going to apply this change depending on several factors. If the ambient_temperature (current world temperature) is above the starting temperature of the world, it only uses summer insulation if the delta is positive (you're heating up) and does not consider winter insulation if it is negative (you're cooling down). It does the reverse if ambient_temperature is lower than the world starting temperature. So, in order to test this properly, you need it to be summer. You CAN use a firepit to test this, but it has to be summer i.e. the world has to be warm. Spoiler -- Winter insulation only affects you when it's cold out, summer insulation only helps when it's warm if ambient_temperature >= TUNING.STARTING_TEMP then -- it's warm out if self.delta > 0 then -- If the player is heating up, defend using insulation. local winterInsulation, summerInsulation = self:GetInsulation() self.rate = math.min(self.delta, TUNING.SEG_TIME / (TUNING.SEG_TIME + summerInsulation)) else -- If they are cooling, do it at full speed, and faster if they're overheated self.rate = math.max(self.delta, self.current >= self.overheattemp and -TUNING.THAW_DEGREES_PER_SEC or -TUNING.WARM_DEGREES_PER_SEC) end -- it's cold out elseif self.delta < 0 then -- If the player is cooling, defend using insulation. local winterInsulation, summerInsulation = self:GetInsulation() self.rate = math.max(self.delta, -TUNING.SEG_TIME / (TUNING.SEG_TIME + winterInsulation)) else -- If they are heating up, do it at full speed, and faster if they are freezing self.rate = math.min(self.delta, self.current <= 0 and TUNING.THAW_DEGREES_PER_SEC or TUNING.WARM_DEGREES_PER_SEC) end Edited August 11, 2019 by Ultroman Link to comment Share on other sites More sharing options...
lieutenantCherr Posted August 11, 2019 Author Share Posted August 11, 2019 Aye,its working! Thanks bud,much love <3 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