Add Insulation to Beds

Started by Pseudozen, June 19, 2015, 04:17:39 PM

Previous topic - Next topic

Pseudozen

Is it possible to add insulation to beds, so while a pawn is sleeping they have some protection from the cold?
I tried playing around with the beds <statBases>  20 deg f, no clothes with different combinations of <Insulation_Cold> & <Insulation_Heat>
Tried -100, -15 for cold insulation
-15,100,15 for head insulation
But my little dude kept freezing.
I also did not see the Insulation properties when i clicked on (i) and looked at the properties
This may not be a thing. 

Adamiks

Quote from: Illusion Distort on June 19, 2015, 07:31:13 PM
Quote from: Pseudozen on June 19, 2015, 04:17:39 PM<Insulation_Cold> & <Insulation_Heat>

I looked at the apparel code and found "<Insulation_Cold>-3</Insulation_Cold>", this might be the thing you are looking for. :D

XML's aren't magic. You can't just write "<mechanoid>" in bed thingDef and hope that this will work. Because you can't "equip" bed (bed isn't apparel) you also can't use "<insulation>" "tag".

Illusion Distort

Quote from: Pseudozen on June 19, 2015, 04:17:39 PM
Is it possible to add insulation to beds, so while a pawn is sleeping they have some protection from the cold?
I tried playing around with the beds <statBases>  20 deg f, no clothes with different combinations of <Insulation_Cold> & <Insulation_Heat>
Tried -100, -15 for cold insulation
-15,100,15 for head insulation
But my little dude kept freezing.
I also did not see the Insulation properties when i clicked on (i) and looked at the properties
This may not be a thing.

On the other-hand you could make a .dll (assembly) which changes the max and min values of "freezing" as long as the pawn is sleeping in the bed. Or am i wrong in saying this?

PS: Adam, do you have a solution to the problem, as i intend to make a "mod" for myself later containing this.

Pseudozen

Quote from: Illusion Distort on June 19, 2015, 08:53:24 PM
On the other-hand you could make a .dll (assembly) which changes the max and min values of "freezing" as long as the pawn is sleeping in the bed. Or am i wrong in saying this?

PS: Adam, do you have a solution to the problem, as i intend to make a "mod" for myself later containing this.
That is an interesting idea. I am just starting to get into modding so I still have some things to learn =)
I suppose you could also make the bed a minor heat source that is toggled on when the pawn is in it if your idea didn't work.

Illusion Distort

Quote from: Pseudozen on June 20, 2015, 11:16:05 AM
Quote from: Illusion Distort on June 19, 2015, 08:53:24 PM
On the other-hand you could make a .dll (assembly) which changes the max and min values of "freezing" as long as the pawn is sleeping in the bed. Or am i wrong in saying this?

PS: Adam, do you have a solution to the problem, as i intend to make a "mod" for myself later containing this.
That is an interesting idea. I am just starting to get into modding so I still have some things to learn =)
I suppose you could also make the bed a minor heat source that is toggled on when the pawn is in it if your idea didn't work.

I was thinking the same thing, but then the whole room would bee heated. It would be a nice "fix" to the problem, though it would be exploited.

skullywag

This is a toughy. My brain says to make the bed tick, check for a pawn ontick and do something but im struggling to think how you could only effect the pawn in the bed and not other stuff.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Illusion Distort

One could make a workerdef telling pawns to use the "insulated bed", then increase the pawns "heat". This would make it a "one pr person" type of heat source and not an oven.

If you have a more detailed explanation on how this could be done or just like spitballing, please leave a comment with your suggestion.