Difference between revisions of "RA2lover/Sandbox/Grow light automation"
From Unofficial Stationeers Wiki
< User:RA2lover/Sandbox
| Line 11: | Line 11: | ||
<br>Proper grow light use can maximize light efficiency. | <br>Proper grow light use can maximize light efficiency. | ||
| − | === | + | ===Light Efficiency=== <!--Objects.Items.PlantRecord::UpdateRecord--> |
| − | Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is applied if | + | Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is only applied if the plant has exceeded its light per day requirements and is not darkness deficient. |
| + | ====Light Stress==== | ||
Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible. | Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible. | ||
| − | A plant counts as being in light if it | + | |
| + | If a plant is deficient in light or darkness, Light stress increases at a rate of 200%/day. Otherwise, it decreases to 0% exponentially at a half-life of 1.38625 days for values of light stress below 50%. <!-- experimental calculation assuming plant simulation runs every tick which may not be guaranteed. function uses lerp smoothing and that's broken, see https://www.youtube.com/watch?v=LSNQuFEDOyQ --> | ||
| + | |||
| + | ====Light/Darkness Deficiency==== | ||
| + | Light per day and Darkness per day requirements are tracked by TimeLitRatio and TimeDarknessRatio variables which are initialized at 50% for each plant. For non-deficient plants (ratios above 0%), these values decrease by 100%/day. Plants with a deficiency decrease the corresponding value at a slower date (S-curve from -100%/day at 0% to 0%/day at -500%). Plants exceeding their light/darkness per day requirements decrease their corresponding value at a faster rate (S-curve from -100%/day at 100% to -500%/day at 1000%). | ||
| + | |||
| + | <!-- WANTED FOR GUIDE: Images plotting the AnimationCurves for light/darkness usage and light/darkness gain. | ||
| + | Curves are an EaseInOut curve on Objects.Items.PlantRecord::_darknessLightUsageMultiplier: | ||
| + | Keyframe(-5, 0), | ||
| + | Keyframe(0, 1), | ||
| + | Keyframe(1, 1), | ||
| + | Keyframe(10, 5) | ||
| + | and an EaseInOut curve on Objects.Items.PlantRecord::_darknessLightGainMultiplier: | ||
| + | Keyframe(-5, 5), | ||
| + | Keyframe(-0.01, 2), (even this is still an S-curve instead of a step function) | ||
| + | Keyframe(0, 1), | ||
| + | Keyframe(1, 1), | ||
| + | Keyframe(5, 0) | ||
| + | --> | ||
| + | |||
| + | TimeDarknessRatio is supplied when the plant is in darkness (not under sunlight or growlight illumination). Supplying darkness increases the value (on an S-curve) by 200%/darkness per day period at -1% to 500%/period at -500%, 100%/period on 0-100%, and 100%/period at 100% to 0%/period at 500% (on an S-curve). | ||
| + | |||
| + | TimeLitRatio supply is similar (though using light per day instead), but the increase in values is multiplied by how much light the plant is exposed to, which can be viewed as the Light Intensity parameter on the Plant Analyser [[Cartridge]]. A plant counts as being in light if it is exposed to at least 1% of earth's average solar irradiance (1367 W/m²). Grow lights within distance of a plant count as an additional 80% solar irradiance regardless of how close they are to it. Multiple grow lights illuminating the same plant don't stack, but sun exposure on top of a grow light does. | ||
| + | |||
| + | ===Maximizing Light Efficiency=== | ||
| + | |||
| + | Plants with TimeLitRatio above 100% and not under darkness deficiency receive a multiplicative buff for excess TimeLitRatio, multiplying light efficiency by up to 2x at 400% TimeLitRatio. <!-- LightEfficiency *= Lerp(1, 2, (TimeLitRatio - 1) / 3) --> | ||
| + | |||
| + | Light Efficiency also receives a multiplicative debuff based on how much light stress the plant is under. LightEfficiency = 1 / (1 + LightStress) | ||
| + | <br>Because light stress has a very slow decay period, we want to avoid any circumstances placing the plant into a deficiency. | ||
| + | |||
| + | Maximizing TimeLitRatio while avoiding a darkness deficiency requires exposing plants to as much strong light for as long as possible while still meeting the plant's darkness per day requirements throughout its entire lifetime. | ||
| + | <br>Because TimeDarknessRatio is only initialized at 50%, plants under this farming regime need to be exposed to its first darkness period within half a day of being planted, and it needs to be long enough to last until the next darkness period. | ||
Revision as of 16:58, 8 November 2025
Contents
Disclaimer
Due to the frequency of game updates, all solutions are subject to change and may or may not be functional.
The designs on this page are valid as of v0.2.3771.18264 (2023-01-12)
Plant mechanics
Plant growth rate is multiplied by its growth efficiency. Thus, maximizing growth efficiency results in a more effective farm.
Factors which affect it are Breathing, Hydration, Temperature, Pressure, and Light efficiencies, the plant's Growth speed gene, and a small random variance assigned when planting each plant.
Proper grow light use can maximize light efficiency.
Light Efficiency
Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is only applied if the plant has exceeded its light per day requirements and is not darkness deficient.
Light Stress
Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible.
If a plant is deficient in light or darkness, Light stress increases at a rate of 200%/day. Otherwise, it decreases to 0% exponentially at a half-life of 1.38625 days for values of light stress below 50%.
Light/Darkness Deficiency
Light per day and Darkness per day requirements are tracked by TimeLitRatio and TimeDarknessRatio variables which are initialized at 50% for each plant. For non-deficient plants (ratios above 0%), these values decrease by 100%/day. Plants with a deficiency decrease the corresponding value at a slower date (S-curve from -100%/day at 0% to 0%/day at -500%). Plants exceeding their light/darkness per day requirements decrease their corresponding value at a faster rate (S-curve from -100%/day at 100% to -500%/day at 1000%).
TimeDarknessRatio is supplied when the plant is in darkness (not under sunlight or growlight illumination). Supplying darkness increases the value (on an S-curve) by 200%/darkness per day period at -1% to 500%/period at -500%, 100%/period on 0-100%, and 100%/period at 100% to 0%/period at 500% (on an S-curve).
TimeLitRatio supply is similar (though using light per day instead), but the increase in values is multiplied by how much light the plant is exposed to, which can be viewed as the Light Intensity parameter on the Plant Analyser Cartridge. A plant counts as being in light if it is exposed to at least 1% of earth's average solar irradiance (1367 W/m²). Grow lights within distance of a plant count as an additional 80% solar irradiance regardless of how close they are to it. Multiple grow lights illuminating the same plant don't stack, but sun exposure on top of a grow light does.
Maximizing Light Efficiency
Plants with TimeLitRatio above 100% and not under darkness deficiency receive a multiplicative buff for excess TimeLitRatio, multiplying light efficiency by up to 2x at 400% TimeLitRatio.
Light Efficiency also receives a multiplicative debuff based on how much light stress the plant is under. LightEfficiency = 1 / (1 + LightStress)
Because light stress has a very slow decay period, we want to avoid any circumstances placing the plant into a deficiency.
Maximizing TimeLitRatio while avoiding a darkness deficiency requires exposing plants to as much strong light for as long as possible while still meeting the plant's darkness per day requirements throughout its entire lifetime.
Because TimeDarknessRatio is only initialized at 50%, plants under this farming regime need to be exposed to its first darkness period within half a day of being planted, and it needs to be long enough to last until the next darkness period.
Farm designs
Farms benefitting from grow lights can be generally separated into two types: Indoor farms that can be placed in locations without regular sunlight exposure, and outdoor greenhouses where grow lights are used to augment the sun and provide faster growth rates.
Geometry of Daylight Sensors
The Solar Angle variable from Daylight Sensors go from 0 degrees at mid-day, to 180 degrees at midnight, and then back to 0 degrees. The value is never negative.
How much light/dark do plants need?
| Plant | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Corn | L | L | L | L | L | L | L | L | L | D | D | D | D | |||||||
| Potato | L | L | L | L | L | L | L | L | L | L | D | D | D | D | ||||||
| Pumpkin | L | L | L | L | L | L | L | L | L | D | D | |||||||||
| Rice | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Soybean | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Tomato | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||||
| Wheat | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Darga Fern | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Fern | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||||
| Hades Alpha | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Hades Beta | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Peace Lily | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Switch Grass | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Tropical Lily | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Winterspawn Alpha | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D | |||||
| Winterspawn Beta | L | L | L | L | L | L | L | L | L | L | D | D | D | D | D |
As you can see from the table above, most plants need a minimum of 10 minutes of light, and 5 minutes of darkness. We can split the remaining 5 minutes equally, giving us 12.5 minutes of light and 7.5 minutes of darkness.
Let's do some math...
- The planet rotates 360 degrees per day.
- A day is 20 minutes.
360 degrees / 20 minutes = 18 degrees per minute
- We need light for 12.5 minutes per day.
18 degrees per minute * 12.5 minutes = 225 degrees
- We want half the light-budget on either side of mid-day
225 degrees / 2 = 112.5 degrees on either side
Bringing it all together
What you need:
- Logic I/O (x2) > Reader and Batch Writer
- Logic Processor > Compare
- Logic Memory
- Kit (Sensor) > Daylight Sensor
- Place the Daylight Sensor. Direction of data-port doesn't matter.
- Logic Reader > IN: Daylight Sensor VAR: Solar Angle
- Logic Memory > Value: 112.5
- Logic Compare > 1: Logic Reader 2: Logic Memory OUT: Less
- Logic Batch Writer > IN: Logic Compare OUT TYPE: Grow Light OUT VAR: On
Saving Power
You can save a bit of power by delaying turning on the light. If you reduce the time with lights to 10.5 minutes, then you can set the Logic Memory to 94.5.

