Jump to content

Recommended Posts

Posted

I would like to implement a mod that adds shade cloths that lower the temperature for growing crops in the south, but I can't seem to find anything about how temperature is regulated. I know Cellars lower the temperature, but I can't find where their behavior is defined in the code. Any recommendations or advice would be appreciated!

Posted (edited)

Coding is very much a "black area" for me. I am afraid that I cannot help past my initial ideas. Temperature is utilising noise maps. I have no idea how exactly they work.

A (very dirty) quarter-solution/first step could be to manipulate the "heatDamageAbove" value of crops if below shade blocks.

I'd start by looking how the game handles these things.

https://github.com/search?q=org%3Aanegostudios+heatDamage&type=code
https://github.com/search?q=org%3Aanegostudios temperature&type=code
https://github.com/anegostudios/vssurvivalmod/blob/84c80e85f36e31d3b6454021da0fbbba4cba71a3/BlockEntity/BEFarmland.cs

There is also this mod, which manipulates temperature curves. Maybe it can be helpful to look at the code.

Edited by Brady_The
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.