Jump to content

[Request] Shelter from the Elements mod concept


Recommended Posts

The mod would allow constructing a new structure (preferably several of the same type, in a tiered scheme) in which you can take shelter from rain and heat (by standing within it). Higher tiers would provide better rain protection and heat insulation, with the highest possibly providing total protection.

This essentially would be a continuation or recreation of the existing Shelter mod; the problem with that (apparently discontinued) mod is that it only offers one structure, which seems to only function as a tree does, i.e. it gives the same shelter/protections a tree. Which isn't particularly useful, nor warrants building a structure for (for functional purposes), since you may just plant a tree instead.

On the technical side, the existing mod works by giving the new structure the "shelter" tag anso it counts as a shelter, like a tree does. I think that mod may also override the message used when under a tree/shelter because the same message is used for both and needs to make sense, but I'm not sure on that one. On the other hand, my proposed mod would need to edit functions present in moisture.lua and temperature.lua to implement the desired effects - from what I gather.

BTW, while looking through these files, I seem to have discovered a possible bug in temperature.lua:

function Temperature:GetInsulation()	local winterInsulation = self.inherentinsulation	local summerInsulation = self.inherentsummerinsulation	if self.inst.components.inventory then		for k,v in pairs (self.inst.components.inventory.equipslots) do			if v.components.insulator then				local insulationValue, insulationType = v.components.insulator:GetInsulation()								if insulationType == "WINTER" then					winterInsulation = winterInsulation + insulationValue				elseif insulationType == "SUMMER" then					summerInsulation = summerInsulation + insulationValue					if self.sheltered then						summerInsulation = summerInsulation + self.shelterinsulation					end				else					print(v, " has invalid insulation type: ", insulationType)				end			end		end	end
I haven't read all the relevant code, but the actual addition of shelter heat insulation value seems to be done in the above loop (via summerInsulation = summerInsulation + self.shelterinsulation) - and it has no business being done inside a loop through items, as it doesn't have to do with items - wouldn't this mean that the bonus is potentially being applied multiple times, once for each equipped item that offer heat insulation, and that it is not being applied at all if the player doesn't have any such items equipped?! I don't really think that'd be intended. Hopefully, I'm just not getting this right. Otherwise, then while modding the contents of this file, this is something to fix on the way. Of course, Klei should fix it, as well.

moisture.lua doesn't seem to have an equivalent problem, I couldn't find an issue from a quick surface check.

This mod wouldn't be unbalanced as it would basically be an immobile version of mobile protection you can already get. It wouldn't actively cool you down if already hot, either, but will lower further exposure - unless you are already overheating (taking damage), in which case it should cool you down a bit as standing under a tree seems to do.

The structure(s) would be a cool addition to bases for both roleplaying and functional purposes, as it's a pretty essential thing to have in a base. It wouldn't help any with freezing (and realistically, if you're under a shelter in Winter during the day, you should actually freeze a little faster).

I guess you could use the mobile protections, as well as a nearby endothermic fire, together with this (effectively stacking the protections), but I doubt it would upset balance as all the forms of protection have costs, and using the structure still depends on you being immobile, anyway.

The protection amounts of each tier should be configurable (to suit users' different tastes), and perhaps the structures could even be made to degrade over time (only during rain and summer, preferably), until they must be repaired to return to full effectiveness (with one of the crafting materials, or maybe even a sewing kit). This could also all be configurable in the mod's options. A fully degraded structure will only provide the protections of one tier below it (tier I will provide a tree's protections), until it is repaired.

Default tiers proposal (obviously, higher tiers cost more to craft):

I: Prototyping requires Science Machine. Heat protection = 60 (which is equivalent to 133.33% of a tree's protection, and equivalent to a Straw Hat's). Rain protection = 0.46 or 46% (equivalent to 133.33% of a tree's protection, which is 35%, and just below a Pretty Parasol's 50% protection).

II: Prototyping requires Science Machine. Heat protection = 120 (equivalent to a Summer Frest/Pretty Parasol/Umbrella's). Rain protection = 0.7 (equivalent to a Rain Hat's).

III: Prototyping requires Alchemy Engine. Heat protection = 216 (90% as good as a Floral Shirt or an Eyebrella, which provide 240 each). Rain protection = 1.0 (same as a Rain Coat or an Eyebrella - 100% protection).

I consider more than 3 new structures for this to be clutter, you might even argue for just two.

Crafting recipes could consistent of differing amounts of Boards, Ropes, and either Silk or Beefalo Wool (with the highest tier requiring amounts of both).

As an extra, good feature, the mod could also expose an interface (in the mod's settings) for the player to tweak the values used for TUNING.CAVE_INSULATION_BONUS, TUNING.DUSK_INSULATION_BONUS, TUNING.NIGHT_INSULATION_BONUS, and even beard insulation values, perhaps (this one via a multiplier, maybe). And any other relevant values I might be missing (I also see some relating to cave's temperature and moisture, but dunno which are most useful to tweak). I've seen a lot of complaints about still overheating at night and in caves, apparently there are bonuses against that in-game but they may not be enough, allowing customizing them will help with these complaints, at least provided they work. :-) This could go into a separate mod, though, or maybe we could keep it in one mod and allow users to disable all the crafting recipes if they don't want the structures.

While this is presently a request and concept for a Don't Starve mod, it of course applies all the same to Don't Starve Together, possibilities permitting. I haven't looked into exactly how different implementing it there would be (and so, importing it from DS to DST), though the aformentioned bugfix at least might not be necessary over there.

Link to comment
Share on other sites

Ive recently deigned something like a really big Eyebrella which was aimed to protect from rain and heat and at the same time lower temperature and wetness but the recipes would obviously include a Deerclops Eye. Unfortunately my design was aimed to be a single tier structure with difficult recipe but high reward. Why is the shelter not good ? Is it not working with temperature ?!

Link to comment
Share on other sites

Ive recently deigned something like a really big Eyebrella which was aimed to protect from rain and heat and at the same time lower temperature and wetness but the recipes would obviously include a Deerclops Eye. Unfortunately my design was aimed to be a single tier structure with difficult recipe but high reward. Why is the shelter not good ? Is it not working with temperature ?!

 

It uses the shelter tag. That is what trees use. It effectively means you have to stand right against it to get the effect, which is slightly reducing wetness rate and barely preventing damage from heat in summer. Not really a shelter, more like an expensive tree.

Link to comment
Share on other sites

@Lampofulmine: Hence this mod concept, where even tier I has 133.33% of the protections of a tree. And of course it would allow standing in a small range around it to get the effect, so that if you're visibly within/under the sprite, you are covered.

It's possible to do, it's just that for now, the existing linked mod just implemented a shelter in the easiest possible way.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...